Repository navigation
fcli aviator: Fail fast with clear messages when commands cannot connect - #1145
Draft
kireetivar wants to merge 12 commits into
Draft
kireetivar wants to merge 12 commits into
kireetivar wants to merge 12 commits into
Conversation
…ails AbstractSessionLoginCommand destroyed an existing session before login() ran. If Aviator token or admin-config validation then failed (for example because the server could not be reached), the previous valid session or configuration was lost. Add the isReplaceExistingSessionBeforeLogin() hook. The default keeps the current behavior for all other modules. The Aviator user session login and admin-config create commands opt out, so they validate first and only replace the stored descriptor after validation succeeds. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add AbstractFcliException.getSafeDiagnosticString(). The default returns null, so FcliExecutionExceptionHandler keeps logging the full throwable at DEBUG level. An exception whose causes can hold sensitive text can return a safe description instead; the handler then logs only that description. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add the types for consistent Aviator connectivity failure reporting: - AviatorRequestPolicy: ORDINARY (fail fast, shared messages) or UNCHANGED (current behavior) - AviatorConnectionContext/AviatorEndpoint: safe route summary without URLs or credentials - AviatorConnectivityFailureKind: one message per failure kind - AviatorConnectivityFailureClassifier: maps UNAVAILABLE/DEADLINE_EXCEEDED to a kind using only exception types, never status descriptions or messages; TLS failures (SSLException, CertificateException) keep their current handling - AviatorConnectivityException: prints only the user message and supplies a safe DEBUG description The grpc package does not depend on the diagnose package. The types are not used yet. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
GrpcUtil.executeGrpcCall() now accepts an AviatorRequestPolicy and a connection context. With the ORDINARY policy, unary calls run without wait-for-ready (through a per-call interceptor, because gRPC 1.76 stubs have no withoutWaitForReady()), and UNAVAILABLE/DEADLINE_EXCEEDED failures become AviatorConnectivityException. The 30-second deadline, the shared stubs, and streaming calls do not change. AviatorGrpcClient and AviatorGrpcClientHelper get overloads that accept the policy. All existing constructors and createClient() methods keep the UNCHANGED policy, so no caller changes behavior yet. The existing status mapping is extracted into toAviatorException() without changes to messages or logging. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Aviator app, token, and entitlement commands, 'aviator session login', and 'aviator admin-config create' now use the ORDINARY request policy. When the Aviator server or the configured proxy refuses the connection, these commands now fail at once instead of waiting until the 30-second request deadline, and print a short message, for example: Connection to proxy localhost:33444 was refused Check that the proxy is running and that its host and port are correct All admin commands get the policy through AbstractAviatorAdminSessionOutputCommand.createGrpcClient(). AviatorUserSessionHelper.validateToken() and AviatorAdminConfigHelper.validateConfig() get overloads with a policy; the existing overloads keep the UNCHANGED policy, so connection diagnostics, audit, and correlation commands keep their current behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
parseTarget() and normalizeUrl() included the raw Aviator URL in error messages, in a WARN log entry, and in UnsupportedAviatorUrlSchemeException (which connection diagnostics copy into their evidence). A URL with user info, such as https://user:password@host, exposed the password. These places now show the URL with the user-info part replaced by ***. URLs without user info are shown unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Consolidate classification and inline messages, retain the existing connection timeout, and recognize Windows connection refusals. Protect sensitive causes in terminal output and malformed URL errors. Add TLS CONNECT proxy and address-fallback coverage with focused test helpers. Validation: 927 tests passed across common-core, aviator-common, and aviator; git diff --check passed.
The message is safe to show, so the standard fcli simple exception output is enough. Remove the cause-sensitive and safe-diagnostic hooks from AbstractFcliException, and log only cause types at DEBUG level. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Name the failing proxy or Aviator server, give one remediation, and state the 30-second request limit. Add a TLS failure kind for non-certificate TLS errors; certificate failures keep the fcli PKIX trust-store guidance. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The generic message no longer blames the server for failures that can be client-side, names the gRPC status, and tells the user how to log details. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
kireetivar
requested review from
anishkumarnagaraj-design,
ankit2995 and
umadevis1
October 23, 2026 10:41
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ordinary Aviator admin, user-login, and admin-config commands no longer wait for the gRPC channel to become ready. A refused connection fails when the operating system reports the refusal. The 30-second request deadline is unchanged.
Audit, correlation, diagnostics, and the existing public
createClient(url)constructors still wait. A new ordinary command gets fail-fast only when it usescreateGrpcClientor passesAviatorRequestPolicy.FAIL_FAST.The two-line "was refused" message is used for known English JDK and Netty refusal reasons. Other transport failures get a short unavailable, timeout, DNS, or proxy message. Terminal output and DEBUG logs omit URL userinfo and proxy credentials. DEBUG records the failure kind, the safe message, and cause class names.
A failed Aviator user-login or admin-config validation leaves the existing session or admin config in place. SSC and FoD login behavior is unchanged.