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

feat: automate adding new go-libp2p versions to perf #256

Merged
merged 2 commits into from
Sep 2, 2023
Merged

Conversation

galargh
Copy link
Contributor

@galargh galargh commented Aug 11, 2023

This PR implements the process described here: libp2p/go-libp2p#2442 (comment)

Additionally:

  • it finds the latest go-libp2p version itself
  • updates Go in the go.mod file to the latest stable version

Automatically created PR: #255
Automatically triggered perf run: https://github.com/libp2p/test-plans/actions/runs/5836370405

Copy link
Contributor

@marten-seemann marten-seemann left a comment

Choose a reason for hiding this comment

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

Very nice work @galargh! Thank you!!

.github/workflows/add-new-impl-versions.yml Outdated Show resolved Hide resolved
id: remote
env:
GITHUB_TOKEN: ${{ github.token }}
run: gh api repos/$REPO/releases/latest --jq '.tag_name' | xargs -I{} echo "version={}" | tee -a $GITHUB_OUTPUT
Copy link
Contributor

Choose a reason for hiding this comment

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

Have you considered using go list -m -versions github.com/libp2p/go-libp2p@latest?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, didn't know about this one. If you prefer, this should behave the same.

Suggested change
run: gh api repos/$REPO/releases/latest --jq '.tag_name' | xargs -I{} echo "version={}" | tee -a $GITHUB_OUTPUT
run: go list -m github.com/$REPO@latest | cut -d' ' -f2 | xargs -I{} echo "version={}" | tee -a $GITHUB_OUTPUT

Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

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

Thank you Piotr! Ready to merge from my end.


clean:
rm perf
rm .cache
rm v0.28
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 created when one runs go build .. That said, fine to remove it.

perf/impl/go-libp2p/v0.28/.gitignore Show resolved Hide resolved
perf/impl/go-libp2p/v0.28/Dockerfile Outdated Show resolved Hide resolved
git commit -m "chore: add go-libp2p@$REMOTE_VERSION to $DIR"
git push origin $BRANCH --force
gh pr create --title "chore: add go-libp2p@$REMOTE_VERSION to $DIR" --body "This PR adds go-libp2p@$REMOTE_VERSION to $DIR" --head $BRANCH --base $GITHUB_REF
gh workflow run perf.yml --ref $BRANCH
Copy link
Member

Choose a reason for hiding this comment

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

🙏

@galargh galargh marked this pull request as ready for review August 16, 2023 09:54
@BigLep
Copy link
Contributor

BigLep commented Aug 21, 2023

Sweet! What's needed to merge this?
@mxinden : will you create something similar for rust-libp2p and js-libp2p?

Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

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

Ready to merge from my end.

@mxinden
Copy link
Member

mxinden commented Sep 1, 2023

@mxinden : will you create something similar for rust-libp2p and js-libp2p?

Ideally. That said, it is not high on my priority list. E.g. I am prioritizing #261

@galargh galargh merged commit 2980863 into master Sep 2, 2023
2 checks passed
@galargh galargh deleted the ci/go branch September 2, 2023 08:16
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.

4 participants