superset icon indicating copy to clipboard operation
superset copied to clipboard

fix: improve change detection for GHAs

Open mistercrunch opened this issue 1 year ago • 1 comments

SUMMARY

Recently with https://github.com/apache/superset/pull/27867 (upgrading) pylint, we discovered that many python-related checks that should have run didn't run. The conditional execution system was uneven and showing different issues.

This PR streamline the whole conditional execution of github actions across the board.

The problem:

  • many, imperfect ways to do file change detection
    • native GHA paths triggers that are incompatible with "required checks" (and require no-op.yml, to the script)
    • a shell script that's a bit cryptic and a bit verbose and error-prone
  • actions that should be conditional but aren't set up that way

The solution:

  • creation of a single reusable action for all file-based conditional execution
  • introducing scripts/change_detector.py, a simple script inspired by scripts/ci_check_no_file_changes.sh, but more advanced and readable, handling both the pull_request and push context
  • moving all actions with file-related triggers to using this
  • getting rid of the no-op.yml hack altogether

TESTING

A fair amount of manual testing here, triggering with/without python/frontend/docker changes and making sure that the right steps get executed or skippped

mistercrunch avatar Apr 04 '24 15:04 mistercrunch

Now I'm realizing that some of the files I touched here use ./scripts/ci_check_no_file_changes.sh and others the "if/no-op" pattern, which is not super elegant but pretty functional and DRY. Let me standardize one way or another here.

mistercrunch avatar Apr 04 '24 19:04 mistercrunch

I'll merge since we had 3 reviewers looking into this one so far. I will be monitoring master and upcoming PRs to make sure the right jobs are ran or skipped.

mistercrunch avatar Apr 08 '24 23:04 mistercrunch

Hello there, can anyone help me? I want to add new currency by overwriting config file, where I can see the list of all currencies or locales

Shoki52 avatar Apr 09 '24 09:04 Shoki52

Please open a new issue. You start by searching the codebase for currency-related terms or symbol.

mistercrunch avatar Apr 09 '24 15:04 mistercrunch