Conversation
f2d01db to
3dc2d2b
Compare
simonrw
left a comment
There was a problem hiding this comment.
I trust that this is an improvement, but I think there's a simpler way to support automerging. I think the issue is more that we don't have any branch protection rules, so the "auto merge" logic sees the tests pass, that no tests are required to pass, and therefore it merges the PR. If we put a protection rule on the main branch that states that PRs must be green and jobs a, b, and c are required to pass before the PR is green then the auto-merge system should work. WDYT?
| TEST_IMAGE_NAME: public.ecr.aws/lambda/nodejs:22 | ||
| NODE_VERSION: 22 |
There was a problem hiding this comment.
IDK if this works, but...
| TEST_IMAGE_NAME: public.ecr.aws/lambda/nodejs:22 | |
| NODE_VERSION: 22 | |
| NODE_VERSION: 22 | |
| TEST_IMAGE_NAME: public.ecr.aws/lambda/nodejs:${NODE_VERSION} |
|
The issue with adding branch protection rules, is that the auto-merge runs Looking a bit more into it now, we can instead use |
simonrw
left a comment
There was a problem hiding this comment.
This latest change is a security issue.
I don't fully understand your message about using protection rules. My understanding of the flow is:
- Dependabot creates a PR updating dependencies
- The
dependabot-automergeworkflow runs on this PR marking the PR as ready for merging once CI is green, but only if the actor is dependabot - The deps update PR actions finish (and are green), then GitHub auto-merges the PR
Do you mean there is a race condition between steps 2 and 3?
| name: Dependabot auto-merge | ||
| on: pull_request | ||
| on: | ||
| workflow_run: |
There was a problem hiding this comment.
oh, I was not aware of the --auto behavior. I was assuming it would try to merge right away, as it was the current behavior. Now your flow makes sense. 👍
a2e2644 to
41fbc47
Compare
|
@simonrw, Now that I understand the behavior of The changes to the file were to reflect the current recommended action |
simonrw
left a comment
There was a problem hiding this comment.
Looks great, thanks for pushing through my nits!
I reserve the right to be wrong however about anything I said!
| dependabot: | ||
| runs-on: ubuntu-latest | ||
| if: github.actor == 'dependabot[bot]' | ||
| if: github.actor == 'dependabot[bot]' && github.repository == 'localstack/appsync-utils' |
There was a problem hiding this comment.
nice additional safety check here!
I always give you that benefit 😉, but in this case, it turns out I was wrong 😨 🎉 Thanks for the diligence in your review, helping us keeping thing simple and secured 🙏 |


Motivation
I realized we had security warnings related to the cdk directory. It also lead me to realise that the ci has been broken for a long time. I had assumed the pr were auto merge only when the test were green so never really bothered to have a second look.
Along with #185 this pr fixes this issue
while #185 fixes the tests themselves as no longer compatible with latest versions, this pr aims to prevent this from happening again.
Changes
/cdk