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

Only check abi go bindings for diff #74

Merged
merged 4 commits into from
Oct 26, 2023

Conversation

geoff-vball
Copy link
Contributor

@geoff-vball geoff-vball commented Oct 26, 2023

Why this should be merged

Fixes failing abi check for dependabot branches.

How this works

Dependabot branches were failing this check because they do not update go.work.sum. This was causing the global diff to always fail. This check should only check if any of our Go ABI bindings have changes and not been commited.

This only checks diffs for files that match abi-bindings/**.go

git --no-pager diff will print the diff
git --no-pager diff --quiet will return a failed exit code if there is a diff

I tried adding a step for dependabot to commit the changes to go.work.sum, but this results in an unverified commit.

How this was tested

I've updated gomega in the PR to show that this change eliminates the false-positives.

How is this documented

@@ -39,7 +39,10 @@ jobs:
./scripts/abi_bindings.sh

- name: Check for clean branch
run: .github/workflows/check_clean_branch.sh
run: |
git --no-pager diff -- abi-bindings/**.go

Choose a reason for hiding this comment

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

can you add the comments you have in PR description for these commands

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Split into two steps and named them by what they're doing

Copy link
Contributor

@cam-schultz cam-schultz left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for fixing this

@geoff-vball geoff-vball merged commit 71df96d into main Oct 26, 2023
9 of 11 checks passed
@geoff-vball geoff-vball deleted the gstuart/only-abi-check-abi-files branch October 26, 2023 18:06
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