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

fix(ci): py linter only runs on added or modified files (not on deleted) #12584

Merged
merged 1 commit into from Apr 28, 2022

Conversation

nstng
Copy link
Contributor

@nstng nstng commented Apr 28, 2022

Summary

#12291 refactored the changed files mechanics to using dorny/paths-filter filesChanged logic. The original --diff-filter=ACMRT was not taken over correctly. This causes python-workflow.yml to fail if a py file is deleted. See, e.g., https://github.com/magma/magma/runs/6195817220?check_suite_focus=true.

Solution Here

Use dorny/paths-filter with addition added|modified filter.

Test Plan

CI, see https://github.com/magma/magma/actions/runs/2238242192 for a run where a py file was deleted (dropped this test commit afterwards).

Additional Information

  • This change is backwards-breaking

@pull-request-size pull-request-size bot added the size/L Denotes a Pull Request that changes 100-499 lines. label Apr 28, 2022
@github-actions
Copy link
Contributor

Thanks for opening a PR! 💯

A couple initial guidelines

Howto

  • Reviews. The "Reviewers" listed for this PR are the Magma maintainers who will shepherd it.
  • Checks. All required CI checks must pass before merge.
  • Merge. Once approved and passing CI checks, use the ready2merge label to indicate the maintainers can merge your PR.

More info

Please take a moment to read through the Magma project's

If this is your first Magma PR, also consider reading

@github-actions github-actions bot added component: agw Access gateway-related issue component: ci All updates on CI (Jenkins/CircleCi/Github Action) labels Apr 28, 2022
@github-actions
Copy link
Contributor

Oops! Looks like you failed the Python Format Check.

Howto

@nstng nstng force-pushed the fix_py_linter_for_deleted_files branch from 71a8bde to ebbe7fb Compare April 28, 2022 09:02
Signed-off-by: Nils Semmelrock <nils.semmelrock@tngtech.com>
@github-actions
Copy link
Contributor

feg-workflow

    2 files  202 suites   38s ⏱️
371 tests 371 ✔️ 0 💤 0
385 runs  385 ✔️ 0 💤 0

Results for commit ebbe7fb.

@nstng nstng force-pushed the fix_py_linter_for_deleted_files branch from ebbe7fb to 5740c0d Compare April 28, 2022 09:15
@pull-request-size pull-request-size bot added size/XS Denotes a PR that changes 0-9 lines. and removed size/L Denotes a Pull Request that changes 100-499 lines. labels Apr 28, 2022
@github-actions github-actions bot removed the component: agw Access gateway-related issue label Apr 28, 2022
@nstng nstng marked this pull request as ready for review April 28, 2022 09:22
@nstng nstng requested a review from a team as a code owner April 28, 2022 09:22
Copy link
Member

@maxhbr maxhbr left a comment

Choose a reason for hiding this comment

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

looks good!

@nstng nstng enabled auto-merge (squash) April 28, 2022 09:27
@nstng nstng merged commit 5a36160 into magma:master Apr 28, 2022
Copy link
Member

@themarwhal themarwhal left a comment

Choose a reason for hiding this comment

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

nice catch and thanks for the fix!

emakeev pushed a commit to emakeev/magma that referenced this pull request Aug 5, 2022
…ed) (magma#12584)

Signed-off-by: Nils Semmelrock <nils.semmelrock@tngtech.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: ci All updates on CI (Jenkins/CircleCi/Github Action) size/XS Denotes a PR that changes 0-9 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants