Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

feat: upgrade go agent to v2 #3845

Merged
merged 4 commits into from
Jul 9, 2024
Merged

Conversation

kruskall
Copy link
Member

What does this PR do?

go.elastic.co/apm v1 has been deprecated for a while. Update the dependency to v2.

Why is it important?

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have run the Unit tests (make unit-test), and they are passing locally
  • I have run the End-2-End tests for the suite I'm working on, and they are passing locally
  • I have noticed new Go dependencies (run make notice in the proper directory)

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

go.elastic.co/apm v1 has been deprecated for a while. Update the dependency
to v2.
@kruskall kruskall added enhancement New feature or request dependency labels Jun 14, 2024
Copy link
Contributor

mergify bot commented Jun 14, 2024

This pull request does not have a backport label. Could you fix it @kruskall? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v./d./d./d is the label to automatically backport to the 7./d branch. /d is the digit
    NOTE: backport-skip has been added to this pull request.

@mergify mergify bot added the backport-skip Skip notification from the automated backport with mergify label Jun 14, 2024
gopkg.in/src-d/go-git.v4 v4.13.1
gopkg.in/yaml.v2 v2.4.0
gotest.tools/gotestsum v1.9.0
)

require (
Copy link
Member

Choose a reason for hiding this comment

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

This is a surprising number of additional dependencies.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is caused by module pruning (https://go.dev/ref/mod#graph-pruning) introduced in go 1.17.

The dependencies listed here are indirect dependencies. They were always there in a sense but now they are explicitly mentioned in go.mod because go is pruning unnecessary transitive dependencies.
This is also the reason why the go.sum has way entries.

Copy link
Member

Choose a reason for hiding this comment

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

Ah I only skimmed this and missed the // indirect. Thanks!

Copy link
Member

@cmacknz cmacknz left a comment

Choose a reason for hiding this comment

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

Changes look good, the large number of additional dependencies in go.mod is a bit suspicious though.

@kruskall kruskall enabled auto-merge (squash) July 9, 2024 20:53
@kruskall kruskall merged commit 6d6c0c2 into elastic:main Jul 9, 2024
5 checks passed
@kruskall kruskall deleted the drop/old-apm-agent branch July 9, 2024 20:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport-skip Skip notification from the automated backport with mergify dependency enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants