Skip to content
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

Open
wants to merge 15 commits into
base: v2-dev
Choose a base branch
from

Conversation

quinna-h
Copy link
Contributor

@quinna-h quinna-h commented Jan 8, 2025

What does this PR do?

  • Runs the script .github/workflows/apps/output_supported_versions.go
    • This finds the minimum version from contrib/<package_name>/go.mod, and the maximum version from github.
      - This fetches the maximum from go list -m -u -json <repository
    • Outputs to the table contrib/supported_versions.md with the module name, repository, minimum and maximum versions supported, and whether it is auto-instrumented using this definition: https://github.com/DataDog/orchestrion#supported-libraries
  • Adds the Supported Versions workflow which runs only after Smoke Tests successfully passes on main
    • This is since Smoke Tests tests that ddtrace works with the latest versions of the packages. So if Smoke Tests passed, we can safely assume that latest works.

Motivation

Reviewer's Checklist

  • Changed code has unit tests for its functionality at or near 100% coverage.
  • System-Tests covering this feature have been added and enabled with the va.b.c-dev version tag.
  • There is a benchmark for any new code, or changes to existing code.
  • If this interacts with the agent in a new way, a system test has been added.
  • Add an appropriate team label so this PR gets put in the right place for the release notes.
  • Non-trivial go.mod changes, e.g. adding new modules, are reviewed by @DataDog/dd-trace-go-guild.
  • For internal contributors, a matching PR should be created to the v2-dev branch and reviewed by @DataDog/apm-go.

Unsure? Have a question? Request a review!

@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Jan 8, 2025

Datadog Report

Branch report: quinna.halim/v2-add-supported-versions
Commit report: 402374a
Test service: dd-trace-go

✅ 0 Failed, 4084 Passed, 64 Skipped, 2m 49.72s 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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 Code Vulnerability

Workflow depends on a GitHub actions pinned by tag (...read more)

View in Datadog  Leave us feedback  Documentation

.github/workflows/supported-versions.yml Outdated Show resolved Hide resolved
.github/workflows/supported-versions.yml Outdated Show resolved Hide resolved
@quinna-h quinna-h requested a review from rarguelloF January 8, 2025 20:59
@pr-commenter
Copy link

pr-commenter bot commented Jan 8, 2025

Benchmarks

Benchmark execution time: 2025-01-15 17:58:09

Comparing candidate commit 8ce43a8 in PR branch quinna.halim/v2-add-supported-versions with baseline commit 89bfc59 in branch v2-dev.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 51 metrics, 2 unstable metrics.

@quinna-h quinna-h changed the title WIP: add supported versions for v2 internal: add supported versions for v2 Jan 9, 2025
Copy link
Contributor

@rarguelloF rarguelloF left a 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

.github/workflows/apps/output_supported_versions.go Outdated Show resolved Hide resolved
instrumentation/packages.go Outdated Show resolved Hide resolved
.github/workflows/apps/output_supported_versions.go Outdated Show resolved Hide resolved
.github/workflows/apps/output_supported_versions.go Outdated Show resolved Hide resolved
@@ -844,3 +844,11 @@ func isAWSMessagingSendOp(awsService, awsOperation string) bool {
}
return false
}

func GetPackages() map[Package]string {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@darccio @rarguelloF what do you think? I changed this to return a deep copy, and only store the values we need to use

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine to me.

Copy link
Contributor

@rarguelloF rarguelloF Jan 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, but in case you want the other public fields as well, you can use the json.Marshal / json.Unmarshal trick to do it easily (it's not performant at all, but for this use case it should be good enough)

@quinna-h quinna-h marked this pull request as ready for review January 13, 2025 19:55
@quinna-h quinna-h requested review from a team as code owners January 13, 2025 19:55
@rarguelloF rarguelloF requested a review from a team as a code owner January 15, 2025 15:16
@github-actions github-actions bot added the apm:ecosystem contrib/* related feature requests or bugs label Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apm:ecosystem contrib/* related feature requests or bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants