-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat(appliance): Change site-admin updates button to point to Appliance based on env var #64167
Changes from 6 commits
db70bff
776fc29
bc30f4d
0bb4551
8a0cac4
afa7a71
89b7ed6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -135,6 +135,13 @@ const maintenanceGroup: SiteAdminSideBarGroup = { | |
{ | ||
label: maintenanceGroupUpdatesItemLabel, | ||
to: '/site-admin/updates', | ||
condition: ({ applianceManaged }) => !applianceManaged, | ||
}, | ||
{ | ||
label: maintenanceGroupUpdatesItemLabel, | ||
// TODO: change this to point the appliance service | ||
to: 'http://localhost:8889/', | ||
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. This URL is wrong and will need to change to point to the ingress for maintenance UI. 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. (I'm not sure what it is?) 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. Currently, there is no separate ingress for the maintenance UI. Can we do same-domain / relative path redirects here? If so, We can figure out the exact ingress dance later: presumably, we'll need to add a route rule to direct HTTP requests to paths starting with There's always a chance we'll get this wrong and that our first upgrade will have to be configmap-driven, but this is the best we can do I think. WDYT? |
||
condition: ({ applianceManaged }) => applianceManaged, | ||
}, | ||
{ | ||
label: 'Documentation', | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,11 @@ package conf | |
|
||
import ( | ||
"encoding/hex" | ||
"os" | ||
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. CI is complaining that this file isn't go-fmt-ed |
||
stdlog "log" //nolint:logging // TODO move all logging to sourcegraph/log | ||
"net/url" | ||
"slices" | ||
"strconv" | ||
"strings" | ||
"time" | ||
|
||
|
@@ -533,6 +535,13 @@ func AuthPrimaryLoginProvidersCount() int { | |
return c | ||
} | ||
|
||
func IsApplianceManaged() bool { | ||
if v, _ := strconv.ParseBool(os.Getenv("APPLIANCE_MANAGED")); v { | ||
return v | ||
} | ||
return false | ||
} | ||
|
||
// SearchSymbolsParallelism returns 20, or the site config | ||
// "debug.search.symbolsParallelism" value if configured. | ||
func SearchSymbolsParallelism() int { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should maybe make this false for the integration test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that might even fix the failing test, but I agree we should do it anyway