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

[chore] [CI] Fix automation making a release #18043

Merged
merged 1 commit into from
Jan 26, 2023

Conversation

dmitryax
Copy link
Member

@dmitryax dmitryax commented Jan 26, 2023

Last time release automation failed on the last step trying to create a Github release with the following error:

/home/runner/work/_temp/d189ca92-b6ea-46f8-ab7b-1afdb560e1cd.sh: line 2: ghr: command not found
Error: Process completed with exit code [12](https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/3992250363/jobs/6848426043#step:10:13)7.

See https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/3992250363/jobs/6848426043

This change should fix it

@dmitryax dmitryax requested review from a team and mx-psi January 26, 2023 00:05
@runforesight
Copy link

runforesight bot commented Jan 26, 2023

Foresight Summary

    
Major Impacts

build-and-test-windows duration(5 seconds) has decreased 40 minutes 45 seconds compared to main branch avg(40 minutes 50 seconds).
View More Details

⭕  changelog workflow has finished in 4 seconds (2 minutes less than main branch avg.) and finished at 26th Jan, 2023.


Job Failed Steps Tests
changelog -     🔗  N/A See Details

⭕  build-and-test-windows workflow has finished in 5 seconds (40 minutes 45 seconds less than main branch avg.) and finished at 26th Jan, 2023.


Job Failed Steps Tests
windows-unittest-matrix -     🔗  N/A See Details
windows-unittest -     🔗  N/A See Details

✅  telemetrygen workflow has finished in 54 seconds (1 minute 30 seconds less than main branch avg.) and finished at 26th Jan, 2023.


Job Failed Steps Tests
build-dev -     🔗  N/A See Details
publish-latest -     🔗  N/A See Details
publish-stable -     🔗  N/A See Details

✅  check-links workflow has finished in 59 seconds (50 seconds less than main branch avg.) and finished at 26th Jan, 2023.


Job Failed Steps Tests
changed files -     🔗  N/A See Details
check-links -     🔗  N/A See Details

✅  tracegen workflow has finished in 59 seconds (1 minute 26 seconds less than main branch avg.) and finished at 26th Jan, 2023.


Job Failed Steps Tests
publish-latest -     🔗  N/A See Details
build-dev -     🔗  N/A See Details
publish-stable -     🔗  N/A See Details

✅  build-and-test workflow has finished in 36 minutes 55 seconds (15 minutes 10 seconds less than main branch avg.) and finished at 26th Jan, 2023.


Job Failed Steps Tests
unittest-matrix (1.18, internal) -     🔗  ✅ 561  ❌ 0  ⏭ 0    🔗 See Details
unittest-matrix (1.19, internal) -     🔗  ✅ 561  ❌ 0  ⏭ 0    🔗 See Details
unittest-matrix (1.19, processor) -     🔗  ✅ 1471  ❌ 0  ⏭ 0    🔗 See Details
correctness-metrics -     🔗  ✅ 2  ❌ 0  ⏭ 0    🔗 See Details
unittest-matrix (1.19, extension) -     🔗  ✅ 547  ❌ 0  ⏭ 0    🔗 See Details
unittest-matrix (1.18, extension) -     🔗  ✅ 547  ❌ 0  ⏭ 0    🔗 See Details
correctness-traces -     🔗  ✅ 17  ❌ 0  ⏭ 0    🔗 See Details
unittest-matrix (1.18, processor) -     🔗  ✅ 1471  ❌ 0  ⏭ 0    🔗 See Details
unittest-matrix (1.19, receiver-0) -     🔗  ✅ 2567  ❌ 0  ⏭ 0    🔗 See Details
unittest-matrix (1.18, receiver-0) -     🔗  ✅ 2567  ❌ 0  ⏭ 0    🔗 See Details
unittest-matrix (1.18, exporter) -     🔗  ✅ 2416  ❌ 0  ⏭ 0    🔗 See Details
unittest-matrix (1.19, exporter) -     🔗  ✅ 2416  ❌ 0  ⏭ 0    🔗 See Details
unittest-matrix (1.18, receiver-1) -     🔗  ✅ 1944  ❌ 0  ⏭ 0    🔗 See Details
unittest-matrix (1.19, receiver-1) -     🔗  ✅ 1944  ❌ 0  ⏭ 0    🔗 See Details
unittest-matrix (1.19, other) -     🔗  ✅ 4659  ❌ 0  ⏭ 0    🔗 See Details
unittest-matrix (1.18, other) -     🔗  ✅ 4659  ❌ 0  ⏭ 0    🔗 See Details
integration-tests -     🔗  ✅ 55  ❌ 0  ⏭ 0    🔗 See Details
setup-environment -     🔗  N/A See Details
checks -     🔗  N/A See Details
check-collector-module-version -     🔗  N/A See Details
lint-matrix (receiver-0) -     🔗  N/A See Details
lint-matrix (receiver-1) -     🔗  N/A See Details
lint-matrix (processor) -     🔗  N/A See Details
lint-matrix (exporter) -     🔗  N/A See Details
lint-matrix (extension) -     🔗  N/A See Details
lint-matrix (internal) -     🔗  N/A See Details
lint-matrix (other) -     🔗  N/A See Details
build-examples -     🔗  N/A See Details
check-codeowners -     🔗  N/A See Details
lint -     🔗  N/A See Details
unittest (1.19) -     🔗  N/A See Details
unittest (1.18) -     🔗  N/A See Details
cross-compile (darwin, amd64) -     🔗  N/A See Details
cross-compile (darwin, arm64) -     🔗  N/A See Details
cross-compile (linux, 386) -     🔗  N/A See Details
cross-compile (linux, amd64) -     🔗  N/A See Details
cross-compile (linux, arm) -     🔗  N/A See Details
cross-compile (linux, arm64) -     🔗  N/A See Details
cross-compile (linux, ppc64le) -     🔗  N/A See Details
cross-compile (windows, 386) -     🔗  N/A See Details
cross-compile (windows, amd64) -     🔗  N/A See Details
build-package (deb) -     🔗  N/A See Details
build-package (rpm) -     🔗  N/A See Details
windows-msi -     🔗  N/A See Details
publish-check -     🔗  N/A See Details
publish-dev -     🔗  N/A See Details
publish-stable -     🔗  N/A See Details

✅  prometheus-compliance-tests workflow has finished in 3 minutes 20 seconds (4 minutes 13 seconds less than main branch avg.) and finished at 26th Jan, 2023.


Job Failed Steps Tests
prometheus-compliance-tests -     🔗  ✅ 21  ❌ 0  ⏭ 0    🔗 See Details

✅  load-tests workflow has finished in 8 minutes 30 seconds (5 minutes 39 seconds less than main branch avg.) and finished at 26th Jan, 2023.


Job Failed Steps Tests
loadtest (TestTraceAttributesProcessor) -     🔗  ✅ 3  ❌ 0  ⏭ 0    🔗 See Details
loadtest (TestIdleMode) -     🔗  ✅ 1  ❌ 0  ⏭ 0    🔗 See Details
loadtest (TestMetric10kDPS|TestMetricsFromFile) -     🔗  ✅ 6  ❌ 0  ⏭ 0    🔗 See Details
loadtest (TestTraceNoBackend10kSPS|TestTrace1kSPSWithAttrs) -     🔗  ✅ 8  ❌ 0  ⏭ 0    🔗 See Details
loadtest (TestMetricResourceProcessor|TestTrace10kSPS) -     🔗  ✅ 12  ❌ 0  ⏭ 0    🔗 See Details
loadtest (TestTraceBallast1kSPSWithAttrs|TestTraceBallast1kSPSAddAttrs) -     🔗  ✅ 10  ❌ 0  ⏭ 0    🔗 See Details
loadtest (TestBallastMemory|TestLog10kDPS) -     🔗  ✅ 19  ❌ 0  ⏭ 0    🔗 See Details
setup-environment -     🔗  N/A See Details

🔎 See details on Foresight

*You can configure Foresight comments in your organization settings page.

@dmitryax
Copy link
Member Author

@codeboten PTAL as you recently made a change there as well

Copy link
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

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

Based on the error message, it seems the ghr binary wasn't found, or am i missing something?

@dmitryax
Copy link
Member Author

dmitryax commented Jan 26, 2023

Based on the error message, it seems the ghr binary wasn't found, or am i missing something?

Yes, it's installed as tools in the setup-environment job, but we are missing Download Binaries in this job to fetch it AFAIU

Copy link
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

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

I think the problem is that ghr is no longer installed since 15f51ec. You can see in that PR that the reference to installing it from install-tools was removed but not added anywhere else.

@dmitryax
Copy link
Member Author

Oh, I see. Makes sense. But do we still need to bring back Download Binaries even when ghr is restored?

@codeboten
Copy link
Contributor

Oh, I see. Makes sense. But do we still need to bring back Download Binaries even when ghr is restored?

I don't think it's necessary as the binaries are not uploaded with the release. They're only available in the releases repo

@dmitryax
Copy link
Member Author

dmitryax commented Jan 26, 2023

Actually, ghr is still installed with make install-tools. The tools to install are read from import section in https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/internal/tools/tools.go with https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/17849/files#diff-42d381ee1180be37a0b2dda045820c2550ec5cffcdf35b2423e9ccff01b5dfc1R37-R44

opentelemetry-collector-contrib git:(fix-release-automation) ✗ make install-tools
go: downloading github.com/pkg/sftp v1.13.5
go: downloading github.com/kr/fs v0.1.0
cd /Users/danoshin/Projects/opentelemetry-collector-contrib/internal/tools && go build -o /Users/danoshin/Projects/opentelemetry-collector-contrib/.tools/misspell -trimpath github.com/client9/misspell/cmd/misspell
cd /Users/danoshin/Projects/opentelemetry-collector-contrib/internal/tools && go build -o /Users/danoshin/Projects/opentelemetry-collector-contrib/.tools/gci -trimpath github.com/daixiang0/gci
cd /Users/danoshin/Projects/opentelemetry-collector-contrib/internal/tools && go build -o /Users/danoshin/Projects/opentelemetry-collector-contrib/.tools/golangci-lint -trimpath github.com/golangci/golangci-lint/cmd/golangci-lint
cd /Users/danoshin/Projects/opentelemetry-collector-contrib/internal/tools && go build -o /Users/danoshin/Projects/opentelemetry-collector-contrib/.tools/addlicense -trimpath github.com/google/addlicense
cd /Users/danoshin/Projects/opentelemetry-collector-contrib/internal/tools && go build -o /Users/danoshin/Projects/opentelemetry-collector-contrib/.tools/porto -trimpath github.com/jcchavezs/porto/cmd/porto
cd /Users/danoshin/Projects/opentelemetry-collector-contrib/internal/tools && go build -o /Users/danoshin/Projects/opentelemetry-collector-contrib/.tools/go-junit-report -trimpath github.com/jstemmer/go-junit-report
cd /Users/danoshin/Projects/opentelemetry-collector-contrib/internal/tools && go build -o /Users/danoshin/Projects/opentelemetry-collector-contrib/.tools/ghr -trimpath github.com/tcnksm/ghr
cd /Users/danoshin/Projects/opentelemetry-collector-contrib/internal/tools && go build -o /Users/danoshin/Projects/opentelemetry-collector-contrib/.tools/checkdoc -trimpath go.opentelemetry.io/build-tools/checkdoc
...

@codeboten
Copy link
Contributor

Actually, ghr is still installed with make install-tools. The tools to install are read from import section in https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/internal/tools/tools.go with all the regexp parsing made in https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/17849/files#diff-42d381ee1180be37a0b2dda045820c2550ec5cffcdf35b2423e9ccff01b5dfc1R37-R44

opentelemetry-collector-contrib git:(fix-release-automation) ✗ make install-tools
go: downloading github.com/pkg/sftp v1.13.5
go: downloading github.com/kr/fs v0.1.0
cd /Users/danoshin/Projects/opentelemetry-collector-contrib/internal/tools && go build -o /Users/danoshin/Projects/opentelemetry-collector-contrib/.tools/misspell -trimpath github.com/client9/misspell/cmd/misspell
cd /Users/danoshin/Projects/opentelemetry-collector-contrib/internal/tools && go build -o /Users/danoshin/Projects/opentelemetry-collector-contrib/.tools/gci -trimpath github.com/daixiang0/gci
cd /Users/danoshin/Projects/opentelemetry-collector-contrib/internal/tools && go build -o /Users/danoshin/Projects/opentelemetry-collector-contrib/.tools/golangci-lint -trimpath github.com/golangci/golangci-lint/cmd/golangci-lint
cd /Users/danoshin/Projects/opentelemetry-collector-contrib/internal/tools && go build -o /Users/danoshin/Projects/opentelemetry-collector-contrib/.tools/addlicense -trimpath github.com/google/addlicense
cd /Users/danoshin/Projects/opentelemetry-collector-contrib/internal/tools && go build -o /Users/danoshin/Projects/opentelemetry-collector-contrib/.tools/porto -trimpath github.com/jcchavezs/porto/cmd/porto
cd /Users/danoshin/Projects/opentelemetry-collector-contrib/internal/tools && go build -o /Users/danoshin/Projects/opentelemetry-collector-contrib/.tools/go-junit-report -trimpath github.com/jstemmer/go-junit-report
cd /Users/danoshin/Projects/opentelemetry-collector-contrib/internal/tools && go build -o /Users/danoshin/Projects/opentelemetry-collector-contrib/.tools/ghr -trimpath github.com/tcnksm/ghr
cd /Users/danoshin/Projects/opentelemetry-collector-contrib/internal/tools && go build -o /Users/danoshin/Projects/opentelemetry-collector-contrib/.tools/checkdoc -trimpath go.opentelemetry.io/build-tools/checkdoc
...

Could be a path issue then? Is internal/tools in the path of the job?

@dmitryax
Copy link
Member Author

I don't think it's necessary as the binaries are not uploaded with the release. They're only available in the releases repo

We don't need to upload binary, but we still need to create a Github release here with no assets

@dmitryax
Copy link
Member Author

Could be a path issue then? Is internal/tools in the path of the job?

Probably, yes. It's installed in .tools now.

@dmitryax dmitryax force-pushed the fix-release-automation branch from 826d2c9 to 8c49621 Compare January 26, 2023 19:48
@dmitryax
Copy link
Member Author

@codeboten, I updated path of the ghr. It's installed in .tools directory now instead of go bin

Copy link
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

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

👍🏻 thanks @dmitryax!

@codeboten codeboten merged commit ca4bafb into open-telemetry:main Jan 26, 2023
@dmitryax dmitryax deleted the fix-release-automation branch January 26, 2023 22:15
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.

3 participants