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: check for new majors in v2 #3078

Draft
wants to merge 2 commits into
base: v2-dev
Choose a base branch
from

Conversation

quinna-h
Copy link
Contributor

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

What does this PR do?

Checks for new major versions on github in v2

TODO: address the cases where the contrib directory path ends in a suffix.
examples:
labstack/echo -> contrib/labstack/echo.v4 (but it's looking for contrib/labstack/echo)
emicklei/go-restful -> contrib/emicklei/go-restful.v3

Motivation

In the original PR, we used a hardcoded, manual integration_go.mod to detect if new major versions (corresponding to new packages) have been released. However, in v2 each package will be treated as its own contrib with its own corresponding go.mod. We want to parse these go.mod files to check the current latest major, and detect if a new major is available.

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 10, 2025

Datadog Report

Branch report: quinna.halim/v2-output-new-major-versions
Commit report: 54e9f4b
Test service: dd-trace-go

✅ 0 Failed, 4076 Passed, 64 Skipped, 2m 48.67s Total Time

@pr-commenter
Copy link

pr-commenter bot commented Jan 10, 2025

Benchmarks

Benchmark execution time: 2025-01-10 18:14:32

Comparing candidate commit 4c2acee in PR branch quinna.halim/v2-output-new-major-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.


var version string
scanner := bufio.NewScanner(file)
for scanner.Scan() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

TODO: change this to use modfile parsing

@quinna-h quinna-h requested a review from rarguelloF January 10, 2025 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant