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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix ASF update action if there are no changes #9436

Merged
merged 1 commit into from Oct 23, 2023

Conversation

alexrashed
Copy link
Member

@alexrashed alexrashed commented Oct 23, 2023

Motivation

With https://github.com/localstack/localstack-ext/pull/2217, we changed to ruff which replaces a bunch of tools (flake8, isort, autoflake). Previously, these tools were directly called in the ASF scaffold and the result of the code generation was already perfectly formatted.
ruff cannot be called from Python code on in-memory strings, which is why we switched to our format-modified make target.
Turns out, the target does not work in case there are no changes (since then black does not get any input).
This PR slightly modifies the ASF update action such that this issue is prevented.

Changes

  • Changes the ASF Update action such that the format-modified target is only executed if there are changes in the repo.

Testing

@alexrashed alexrashed self-assigned this Oct 23, 2023
@alexrashed alexrashed added the semver: patch Non-breaking changes which can be included in patch releases label Oct 23, 2023
Copy link
Member

@dfangl dfangl left a comment

Choose a reason for hiding this comment

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

Good catch!

@alexrashed alexrashed merged commit 355041d into master Oct 23, 2023
20 checks passed
@alexrashed alexrashed deleted the fix-asf-update-wo-changes branch October 23, 2023 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver: patch Non-breaking changes which can be included in patch releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants