-
Notifications
You must be signed in to change notification settings - Fork 68
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
Add Periodic MetalLB Bump workflow #341
Conversation
@@ -256,7 +256,6 @@ bump_metallb: ## Bumps metallb commit ID and creates manifests. It also validate | |||
hack/bump_metallb.sh | |||
$(MAKE) bin | |||
$(MAKE) bundle-release | |||
$(MAKE) test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this was removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Also deleted the make test from the bump_metallb, because we want the workflow not to fail and to open PR even if the unit tests are failing, so we could catch and fix that."
.github/workflows/bump_metallb.yml
Outdated
commit-message: | | ||
Bump MetalLB | ||
|
||
This commit bumps MetalLB from `${{ steps.old-commit-info.outputs.commit_sha }}` to `${{ steps.new-commit-info.outputs.commit_sha }}`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to close any existing already opened pr?
Thinking about a scenario where we bump metallb multiple times but we wait to bump the operator.
Ideally, only the most recent one should be open
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that could be nice. Need to figure out how to query the open PR and check if it should be kept or closed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fedepaol the workflow will periodically override old PRs with the latest metallb. so I think it could work for us.
ac0f8be
to
a986206
Compare
please remove the .idea/workspace.xml file. It'd be nice if we add it to .gitignore |
sure will do. |
6357ccd
to
887f44e
Compare
@fedepaol I pushed my working workflow to here, running twice a day. BUT for this to work we must create a dedicated personal auth token for metallb |
Also, note that I count on us being able to checkout into the automated sync PR and resolve conflicts if need with force-push. |
Sorry for the delay. There's one thing that I am maybe missing. This won't bump anything, it will just file a pr. So, why the token is required? And if it is required because we change it on a local branch, can we change the workflow so it will read from a file (which we can treat as the source of truth) so we can avoid the extra permission? |
it won't just file a pr. it will run the metallb bump script that includes the bin and bundle-release. Regarding the special token, we need that for allowing this workflow to change the metallb ref under |
Adding an example of how an auto-gen bump MetalLB PR will look like: liornoy#43 |
The reason for changing the e2e workflow is because the commit id is embedded in the file. What I am suggesting here is, change the workflow so that it reads a file. In this way the pr will bump the file instead of the workflow and we'll avoid the extra permission. |
But it won't bump it directly on main right? It will file a pr with the bump so we can just accept it as in liornoy#43 ? |
oh I get it. will do. |
yes. under "bumpmetallb" branch |
7b05bfe
to
5c45334
Compare
@fedepaol Done |
I just realised that I don't must use this github action to read the metallb ref file, but just use a "run" block with bash script. |
5c45334
to
3b6c179
Compare
This commit adds a new workflow to periodically align with the upstream MetalLB repository. This is setup to run daily at 7AM and 7PM (GMT+2 clock), run the make `bump_metallb` and if differences exist, then open a PR with the bump, and on the commit message added details of the old commit, and the new commit, just so it will be easier for developers to maintain and keep track of changes. Created metallb_ref.txt as single source of truth for the metallb commit hash. Also deleted the `make test` from the bump_metallb, because we want the workflow not to fail and to open PR even if the unit tests are failing, so we could catch and fix that. Notice: Every time this workflow runs it fetches latest metallb and force-push to already open pr under the "bumpmetallb" branch. Signed-off-by: liornoy <lnoy@redhat.com>
This commit adds .idea/ to the .gitignore in order to help developers using Goland. Signed-off-by: liornoy <lnoy@redhat.com>
3b6c179
to
66ade5e
Compare
- name: Checkout MetalLB | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: metallb/metallb | ||
path: metallb | ||
ref: 1424dbaef1313b8bb20df136e8eacd2dbacdae02 | ||
ref: "${{ steps.metallb_ref.outputs.content }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
neat!
lgtm |
It failed because of the BGP large communities commit. |
@fedepaol do you want me to add another commit to bump metallb to be aligned? |
Merged. Let's see if it works |
This commit adds a new workflow to periodically align
with the upstream MetalLB repository.
This is setup to run daily at 7AM and 7PM (GMT+2 clock),
run the make
bump_metallb
and if differences exist,then open a PR with the bump,
and on the commit message added details of the old commit,
and the new commit, just so it will be easier
for developers to maintain and keep track of changes.
Created metallb_ref.txt as the single source of truth for
the metallb commit hash.
Also deleted the
make test
from the bump_metallb, because we wantthe workflow not to fail and to open PR even if the unit tests are
failing, so we could catch and fix that.
Notice: Every time this workflow runs it fetches latest metallb
and force-push to already open PR under the "bumpmetallb" branch.
Signed-off-by: liornoy lnoy@redhat.com