code: public boolean isUpToDate() throws ManagedSdkVerificationException {
      if (!Files.isRegularFile(getGcloudPath())) {
        return false;
      }
  
      if (version != Version.LATEST) {
        return true;
      }
  
      List<String> updateAvailableCommand =
          Arrays.asList(
              getGcloudPath().toString(),
              "components",
              "list",
              "--format=json",
              "--filter=state.name:Update Available");
  
      try {
        String result = CommandCaller.newCaller().call(updateAvailableCommand, null, null);
        for (CloudSdkComponent component : CloudSdkComponent.fromJsonList(result)) {
          State state = component.getState();
          if (state != null) {
            if ("Update Available".equals(state.getName())) {
              return false;
            }
          }
        }
        return true;
      } catch (CommandExecutionException | InterruptedException | CommandExitException ex) {
        throw new ManagedSdkVerificationException(ex);
      }
    }
docs: Query gcloud to see if SDK is up to date. Gcloud makes a call to the server to check this.