-
Notifications
You must be signed in to change notification settings - Fork 12
fix: improve robustness with nil-safe context handling and proper error propagation #664
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
45ab0dc
79470d8
aef5e33
24e818c
16d3870
a824232
ef494c3
9a1739d
096dac8
61bdac2
2dd4983
2b7a3b1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,22 @@ | ||
| package cliflags | ||
|
|
||
| import ( | ||
| "github.com/spf13/cobra" | ||
| "github.com/spf13/viper" | ||
| ) | ||
|
|
||
| func GetOutputKind(cmd *cobra.Command) string { | ||
| if jsonFlag, err := cmd.Root().PersistentFlags().GetBool(JSONFlag); err == nil && jsonFlag { | ||
| return "json" | ||
| } | ||
| return viper.GetString(OutputFlag) | ||
| } | ||
|
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. New exported function
|
||
|
|
||
| const ( | ||
| BaseURIDefault = "https://app.launchdarkly.com" | ||
| DevStreamURIDefault = "https://stream.launchdarkly.com" | ||
| PortDefault = "8765" | ||
| HostDefault = "127.0.0.1" | ||
|
|
||
| AccessTokenFlag = "access-token" | ||
| AnalyticsOptOut = "analytics-opt-out" | ||
|
|
@@ -15,6 +28,8 @@ const ( | |
| EmailsFlag = "emails" | ||
| EnvironmentFlag = "environment" | ||
| FlagFlag = "flag" | ||
| HostFlag = "host" | ||
| JSONFlag = "json" | ||
| OutputFlag = "output" | ||
| PortFlag = "port" | ||
| ProjectFlag = "project" | ||
|
|
@@ -29,6 +44,8 @@ const ( | |
| DevStreamURIDescription = "Streaming service endpoint that the dev server uses to obtain authoritative flag data. This may be a LaunchDarkly or Relay Proxy endpoint" | ||
| EnvironmentFlagDescription = "Default environment key" | ||
| FlagFlagDescription = "Default feature flag key" | ||
| HostFlagDescription = "Host for the dev server to bind to (default: 127.0.0.1). Use 0.0.0.0 to allow external connections" | ||
| JSONFlagDescription = "Output JSON format (shorthand for --output json)" | ||
| OutputFlagDescription = "Command response output format in either JSON or plain text" | ||
| PortFlagDescription = "Port for the dev server to run on" | ||
| ProjectFlagDescription = "Default project key" | ||
|
|
@@ -45,6 +62,7 @@ func AllFlagsHelp() map[string]string { | |
| DevStreamURIFlag: DevStreamURIDescription, | ||
| EnvironmentFlag: EnvironmentFlagDescription, | ||
| FlagFlag: FlagFlagDescription, | ||
| HostFlag: HostFlagDescription, | ||
| OutputFlag: OutputFlagDescription, | ||
| PortFlag: PortFlagDescription, | ||
| ProjectFlag: ProjectFlagDescription, | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.


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.
Slack failure notification silently removed and replaced with no-op
Medium Severity
The
on-failurejob that sent Slack notifications when the OpenAPI spec check failed has been completely removed and replaced withcontinue-on-error: trueat the job level. This silently swallows failures instead of alerting the team, meaning the team will no longer be notified when the OpenAPI spec changes and resources need updating.