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

[CI] Avoid toolchain updates on make gotidy runs #35160

Closed
mx-psi opened this issue Sep 12, 2024 · 7 comments
Closed

[CI] Avoid toolchain updates on make gotidy runs #35160

mx-psi opened this issue Sep 12, 2024 · 7 comments
Assignees
Labels
ci-cd CI, CD, testing, build issues cmd/otelcontribcol otelcontribcol command cmd/oteltestbedcol priority:p3 Lowest

Comments

@mx-psi
Copy link
Member

mx-psi commented Sep 12, 2024

Component(s)

cmd/otelcontribcol, cmd/oteltestbedcol

Describe the issue you're reporting

Recent Go versions added the toolchain directive to indicate the Go version suggested for use.

This is annoying in that if running something like make gotidy locally the directive will be updated to reflect the local Go version, but the local Go version may not match the CI Go version on the specific job that checks this.

We could get the correct Go version from CI and manually sed for reverting any updates to the toolchain directives.

@mx-psi mx-psi added priority:p3 Lowest ci-cd CI, CD, testing, build issues cmd/otelcontribcol otelcontribcol command cmd/oteltestbedcol labels Sep 12, 2024
@Ali-Alnosairi
Copy link

@mx-psi , Can I take this one ?

@mx-psi
Copy link
Member Author

mx-psi commented Sep 13, 2024

Sure!

@Ali-Alnosairi
Copy link

@mx-psi
would you please guide me how to setup the environment so I can reproduce it then fix it .
I am new to this repo

@mowies
Copy link
Member

mowies commented Sep 17, 2024

this should be fixed with #34844

@mowies
Copy link
Member

mowies commented Sep 30, 2024

@mx-psi I created #35490 that somewhat also fixes this

mx-psi pushed a commit that referenced this issue Oct 1, 2024
**Description:** <Describe what has changed.>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->

This PR adds a new `remove-toolchain` make command which removes the
`toolchain` directive from all go.mod files.
The new make command is also added to the `update-otel` make target.

**Link to tracking Issue:** <Issue number if applicable>
- fixes
#33600
- could potentially also work for
#35160

**Testing:** <Describe what testing was performed and which tests were
added.>
- add a `toolchain go1.22.5` directive to any of the go.mod files in
this repo
- call `make remove-toolchain`
- check if the toolchain directive was removed

---------

Signed-off-by: Moritz Wiesinger <moritz.wiesinger@dynatrace.com>
jriguera pushed a commit to springernature/opentelemetry-collector-contrib that referenced this issue Oct 4, 2024
**Description:** <Describe what has changed.>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->

This PR adds a new `remove-toolchain` make command which removes the
`toolchain` directive from all go.mod files.
The new make command is also added to the `update-otel` make target.

**Link to tracking Issue:** <Issue number if applicable>
- fixes
open-telemetry#33600
- could potentially also work for
open-telemetry#35160

**Testing:** <Describe what testing was performed and which tests were
added.>
- add a `toolchain go1.22.5` directive to any of the go.mod files in
this repo
- call `make remove-toolchain`
- check if the toolchain directive was removed

---------

Signed-off-by: Moritz Wiesinger <moritz.wiesinger@dynatrace.com>
@mowies
Copy link
Member

mowies commented Oct 10, 2024

@mx-psi i think this should be fixed by #35490

@mx-psi
Copy link
Member Author

mx-psi commented Oct 10, 2024

Right, thanks!!

@mx-psi mx-psi closed this as completed Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-cd CI, CD, testing, build issues cmd/otelcontribcol otelcontribcol command cmd/oteltestbedcol priority:p3 Lowest
Projects
None yet
Development

No branches or pull requests

3 participants