Repository navigation
Guide the fix for a provider failure where it shows up - #2128
Merged
Merged
Conversation
A run that failed on a provider connection (a credential disconnected or refused, GitLab rejecting a token, an address that redirects, a push the remote refused) said so in a sentence nobody could act on: the run page printed it, the room sent people to their MODEL credentials because the sentence contains the word "credential", the Providers dialog hid every credential that was not Active, Re-link existed only for a repository already in Error, and a refused webhook delivery read as an unrecognised reason. The fix existed (reconnect in place, replace a token, re-link, correct the address); nothing connected the failure to it. A failure that a person can repair outside the run is now written down as what it is. The node's node.failed record, a bootstrap run.failed record and an agent run's stored result carry an additive failure object: its code and the identifiers it names, taken from the exception's own IFailure details and the repository the node declares it acts on. The git write nodes that word a provider 401 themselves keep the exception beside their sentence, so the failure is recorded without changing what they say or how they retry. Nothing is stored that the API response for the same failure did not already carry. No migration; an older reader ignores the key and an older row simply has none. The run's failure is the one the node that ENDED it recorded, or that node's agent run: a provider failure the run handled with an error edge, or one met before a run the reconciler abandoned, says nothing about why it ended. Read at request time, a remedy says what is wrong in plain language, names the credential and the repository, and lists what the asking person may do about it under the endpoints' own rules (re-link and a provider's address need repos.manage, replacing a pasted token needs the credential's own person or credentials.manage, reconnecting a sign-in needs credentials.manage because starting an OAuth connect does), with the Owners and Admins to ask when it is not theirs. It offers only a repair the server will accept: an address edit is offered when the update would be (nothing connected through the provider, or an http to https upgrade of the same host), else the sentence says what works. A renewal or a standing lookup the provider did not answer blames nobody; the refusal row keeps which lookup failed so the two are told apart. It reads "resolved" once the credential works again, so the page leads with Re-run. It is never cached with the room's turn, which carries only the failure's code. The run detail carries it, a lean read serves the room, and a repository's refused deliveries carry one for the two refusals that blame its credential. The run page shows a remediation card in the room's attention palette: only what the caller may press is a button, the rest is a line saying whose it is. The Providers dialog lists every credential with its health and how many repositories hang on it, a repository row on the team, project and repository pages says when its credential is not healthy whatever its status, and Re-link offers only the caller's own and the team's credentials, as Add Repository does.
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.
Summary
failurebeside its sentence, and the run detail answers with aremedycomputed for the caller: what is wrong in plain language, the credential and repository it names, and which fixes this person may press (Re-link, Reconnect, Replace token, Edit provider address, Open Providers, Re-run) or whom to ask. The page renders it as a remediation card in the warm theme; a refused webhook delivery gets the same card on the repository's delivery history.credentials.manage(as starting an OAuth connect does), replacing a pasted token needs the credential's own person orcredentials.manage, an address edit is offered only whenUpdateProviderInstanceCommandwould take it (nothing connected through the provider, or an http to https upgrade of the same host), otherwise the sentence says what works.Test plan
pnpm lint0 errors,tsc --noEmit -p tsconfig.app.json,pnpm build