forked from evergreen-ci/evergreen
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DEVPROD-4507 Redact secrets from OTEL traces and Splunk logs for all …
…graphql requests (evergreen-ci#7556)
- Loading branch information
Showing
24 changed files
with
542 additions
and
26 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"os" | ||
|
||
"github.com/99designs/gqlgen/codegen/config" | ||
|
||
"github.com/evergreen-ci/evergreen/graphql" | ||
) | ||
|
||
func main() { | ||
fmt.Println("Generating gqlgen secret fields code...") | ||
|
||
// Load the gqlgen config from file | ||
cfg, err := config.LoadConfigFromDefaultLocations() | ||
if err != nil { | ||
fmt.Printf("Failed to load gqlgen config: %v", err) | ||
// Exit with a non-zero status code to indicate failure | ||
os.Exit(1) | ||
} | ||
|
||
if err := cfg.LoadSchema(); err != nil { | ||
fmt.Println("failed to load schema: %w", err) | ||
os.Exit(1) | ||
|
||
} | ||
|
||
if err := cfg.Init(); err != nil { | ||
fmt.Println("generating core failed: %w", err) | ||
os.Exit(1) | ||
} | ||
|
||
err = graphql.GenerateSecretFields(cfg) | ||
if err != nil { | ||
fmt.Printf("Failed to generate secret fields: %v", err) | ||
os.Exit(1) | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.