-
Notifications
You must be signed in to change notification settings - Fork 1
Add container/cloud environment collectors and Go 1.24 bump #2
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
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
1a0a300
fix: bump Go from 1.23 to 1.24 to address crypto/tls CVE-2025-68121
vyruss 50673bb
feat: add container and cloud environment collectors
vyruss a8d3d37
docs: update with container and cloud collectors
vyruss e6c51d6
fix: bump golangci-lint to v1.64.8 for Go 1.24 support
vyruss a60b2a5
fix: restrict container-env collector to explicit safe variable names
vyruss 943c704
test: improve TestIsContainer assertions
vyruss 3c08b1c
docs: clarify best-effort behavior for cgroup/cloud/container collectors
vyruss 952965f
fix: make container collectors no-op-safe and document env var allowlist
vyruss ec9b33f
docs: add function docstrings
vyruss bce5985
fix: check if no data in summary, case for skip vs real errors
vyruss 7946624
feat: add PGPORT and PGDATABASE env var fallbacks
vyruss 37c4ed4
fix: move PGDATABASE fallback before skip-system validation
vyruss cf40409
fix: remove vestigial container-dockerenv task
vyruss File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| //go:build linux | ||
|
|
||
| /*------------------------------------------------------------------------- | ||
| * | ||
| * radar | ||
| * | ||
| * Portions copyright (c) 2026, pgEdge, Inc. | ||
| * This software is released under The PostgreSQL License | ||
| * | ||
| *------------------------------------------------------------------------- | ||
| */ | ||
|
|
||
| package main | ||
|
|
||
| import ( | ||
| "os" | ||
| "testing" | ||
| ) | ||
|
|
||
| func TestIsContainer(t *testing.T) { | ||
| _, err := os.Stat("/.dockerenv") | ||
| dockerExists := err == nil | ||
| got := isContainer() | ||
| if dockerExists && !got { | ||
| t.Fatalf("isContainer() = false, want true when /.dockerenv exists") | ||
| } | ||
| if !dockerExists && got { | ||
| t.Fatalf("isContainer() = true, want false on non-container host") | ||
| } | ||
| } | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
|
|
||
| func TestContainerCommandTasksStructure(t *testing.T) { | ||
| for i, task := range containerCommandTasks { | ||
| if task.Name == "" { | ||
| t.Errorf("containerCommandTasks[%d] missing Name", i) | ||
| } | ||
| if task.ArchivePath == "" { | ||
| t.Errorf("containerCommandTasks[%d] (%s) missing ArchivePath", i, task.Name) | ||
| } | ||
| if task.Command == "" { | ||
| t.Errorf("containerCommandTasks[%d] (%s) missing Command", i, task.Name) | ||
| } | ||
| } | ||
| } | ||
|
|
||
| func TestContainerCommandTasksAlphabeticalOrder(t *testing.T) { | ||
| for i := 1; i < len(containerCommandTasks); i++ { | ||
| if containerCommandTasks[i].Name < containerCommandTasks[i-1].Name { | ||
| t.Errorf("containerCommandTasks not alphabetically ordered: %q comes after %q", | ||
| containerCommandTasks[i].Name, containerCommandTasks[i-1].Name) | ||
| } | ||
| } | ||
| } | ||
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| module radar | ||
|
|
||
| go 1.23 | ||
| go 1.24 | ||
|
|
||
| require github.com/lib/pq v1.10.9 | ||
|
|
||
| require github.com/DATA-DOG/go-sqlmock v1.5.2 // indirect | ||
| require github.com/DATA-DOG/go-sqlmock v1.5.2 |
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.