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

Remove go 1.19 support, bump minimum to go 1.20 and add testing for 1.21 #8208

Merged
merged 8 commits into from
Aug 11, 2023

Conversation

mx-psi
Copy link
Member

@mx-psi mx-psi commented Aug 9, 2023

Fixes #8207

@codecov
Copy link

codecov bot commented Aug 9, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (c46704a) 90.27% compared to head (150b4f4) 90.27%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8208   +/-   ##
=======================================
  Coverage   90.27%   90.27%           
=======================================
  Files         301      301           
  Lines       15581    15581           
=======================================
  Hits        14065    14065           
  Misses       1227     1227           
  Partials      289      289           
Files Changed Coverage Δ
cmd/builder/internal/builder/main.go 60.82% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mx-psi mx-psi marked this pull request as ready for review August 9, 2023 12:03
@mx-psi mx-psi requested review from a team and djaglowski August 9, 2023 12:03
@mx-psi
Copy link
Member Author

mx-psi commented Aug 9, 2023

There is a builder test consistently failing on this PR that is not failing on main

--- FAIL: TestSkipGenerate (1.75s)
    testing.go:1206: TempDir RemoveAll cleanup: remove C:\Users\RUNNER~1\AppData\Local\Temp\TestSkipGenerate2118395261\001: The process cannot access the file because it is being used by another process.
FAIL
FAIL	go.opentelemetry.io/collector/cmd/builder/internal/builder	1.836s
FAIL

@mx-psi
Copy link
Member Author

mx-psi commented Aug 9, 2023

I think the error is related to actions/runner-images/issues/712, although I am not sure why this only happens with Go 1.20.

@mx-psi
Copy link
Member Author

mx-psi commented Aug 9, 2023

I decided to skip the test and just list it on #5403 together with the other test that is already failing because of the same reason

Copy link
Member

@djaglowski djaglowski left a comment

Choose a reason for hiding this comment

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

LGTM.

To handle the required 1.19 check, I assume we remove the check, merge, and then add 1.21 check.

cmd/builder/internal/builder/main_test.go Show resolved Hide resolved
@@ -133,7 +133,7 @@ jobs:
unittest:
strategy:
matrix:
go-version: ["1.20", 1.19] # 1.20 needs quotes otherwise it's interpreted as 1.2
go-version: ["1.21", "1.20"] # 1.20 needs quotes otherwise it's interpreted as 1.2
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this also use the ~ convention to force min version? Aligning across actions could make search and replace easier in the future.

Copy link
Member Author

Choose a reason for hiding this comment

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

Happy to do that, but I am worried that ~ is not a supported character on cache keys and since we use this variable here

key: unittest-${{ runner.os }}-go-build-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}
it would break things, so I would prefer to work on this on a separate PR.

@dmitryax
Copy link
Member

dmitryax commented Aug 9, 2023

Apparently, I cannot update the protected branch rules. Submitted open-telemetry/community#1636

@mx-psi
Copy link
Member Author

mx-psi commented Aug 11, 2023

This is blocked by #8218

@arminru
Copy link
Member

arminru commented Aug 11, 2023

Apparently, I cannot update the protected branch rules. Submitted open-telemetry/community#1636

Branch rule updated:
image

dmitryax added a commit that referenced this pull request Aug 11, 2023
To not update required jobs every time a new go version is released.

Needed for
#8208
@dmitryax dmitryax closed this Aug 11, 2023
@dmitryax dmitryax reopened this Aug 11, 2023
@dmitryax dmitryax merged commit 81242fa into open-telemetry:main Aug 11, 2023
@codeboten codeboten added this to the v0.83.0 milestone Aug 24, 2023
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.

Add testing for Go 1.21, drop testing for Go 1.19
6 participants