-
Notifications
You must be signed in to change notification settings - Fork 444
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
internal: add supported versions for v2 #3070
base: v2-dev
Are you sure you want to change the base?
Conversation
Datadog ReportBranch report: ✅ 0 Failed, 4076 Passed, 64 Skipped, 2m 49.19s Total Time |
# note: This will only run when there *are* changes to integration versions | ||
- name: Create Pull Request | ||
id: pr | ||
uses: peter-evans/create-pull-request@v6 |
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.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
steps: | ||
- uses: actions/checkout@v4 |
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.
@@ -0,0 +1,44 @@ | |||
name: Supported Versions | |||
on: | |||
workflow_run: |
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.
BenchmarksBenchmark execution time: 2025-01-10 19:09:39 Comparing candidate commit 1daec69 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 52 metrics, 1 unstable metrics. |
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.
Good work! this is looking pretty good :D
Left some minor comments / potential improvements
var mu sync.Mutex | ||
|
||
updatedModules := make([]ModuleVersion, 0, len(modules)) |
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.
var mu sync.Mutex | |
updatedModules := make([]ModuleVersion, 0, len(modules)) | |
updatedModules := make([]ModuleVersion, len(modules)) |
nit: you can avoid the mutex by assigning the slice by index instead of using append
updatedModules[i] = ...
@@ -844,3 +846,7 @@ func isAWSMessagingSendOp(awsService, awsOperation string) bool { | |||
} | |||
return false | |||
} | |||
|
|||
func GetPackages() map[Package]PackageInfo { | |||
return packages |
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.
hmm the point of making this variable unexported was so it cannot be modified from outside of this package. If we want to keep it being this way, this function should return a deep copy of this map.
cc @darccio any thoughts?
// Path to contrib/{packageName} | ||
contribPath := filepath.Join("contrib", packageName) | ||
goModPath := filepath.Join(contribPath, "go.mod") | ||
|
||
// Check if go.mod exists in directory | ||
if _, err := os.Stat(goModPath); os.IsNotExist(err) { | ||
return ModuleVersion{}, fmt.Errorf("go.mod not found in %s", contribPath) | ||
} |
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.
this means you are no longer using the integration_go.mod
file right? in that case then we can just remove it.
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.
yes, putting this in a separate PR: #3078, which will modify the 'check for new major version packages' workflow (which was what we needed integration_go.mod
for in the first place)
What does this PR do?
contrib/<package_name>/go.mod
, and the maximum fromgo list -m -versions <repository>
supported_versions.md
which states the package, minimum and maximum versions tested/supported, and whether it is auto-instrumented using this definition: https://github.com/DataDog/orchestrion#supported-librariesMotivation
Reviewer's Checklist
v2-dev
branch and reviewed by @DataDog/apm-go.Unsure? Have a question? Request a review!