- Notifications
You must be signed in to change notification settings - Fork928
fix: allow access to unhealthy/initializing apps#12086
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -198,11 +198,9 @@ func (p *DBTokenProvider) Issue(ctx context.Context, rw http.ResponseWriter, r * | ||||||
return nil, "", false | ||||||
} | ||||||
// This is where we used to check app health, but we don't do that anymore | ||||||
// in case there are bugs with the healthcheck code that lock users out of | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Suggested change
could be a lot of things: misconfiguration, app healthcheck endpoint could be misbehaving | ||||||
// their apps completely. | ||||||
// As a sanity check, ensure the token we just made is valid for this | ||||||
// request. | ||||||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -61,12 +61,16 @@ export const AppLink: FC<AppLinkProps> = ({ app, workspace, agent }) => { | ||
app, | ||
); | ||
// canClick is ONLY false when it's a subdomain app and the admin hasn't | ||
// enabled wildcard access URL or the session token is being fetched. | ||
// | ||
// To avoid bugs in the healthcheck code locking users out of apps, we no | ||
// longer block access to apps if they are unhealthy/initializing. | ||
spikecurtis marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
let canClick = true; | ||
let icon = <BaseIcon app={app} />; | ||
let primaryTooltip = ""; | ||
if (app.health === "initializing") { | ||
icon = ( | ||
// This is a hack to make the spinner appear in the center of the start | ||
// icon space | ||
@@ -85,7 +89,6 @@ export const AppLink: FC<AppLinkProps> = ({ app, workspace, agent }) => { | ||
primaryTooltip = "Initializing..."; | ||
} | ||
if (app.health === "unhealthy") { | ||
icon = <ErrorOutlineIcon css={{ color: theme.palette.warning.light }} />; | ||
primaryTooltip = "Unhealthy"; | ||
} | ||