Skip to content

Commit

Permalink
Check if we need to upgrade deps before rebuilding everything (#15033)
Browse files Browse the repository at this point in the history
Due to the order of checkes in selective_ci_checks.sh, we were never
eagerly upgrading deps on a Pull Reuqest, because we exited before
getting to `check_if_setup_files_changed`.

Previoulsy the output was this

```
Get changed files
Check if everything should be run

  Changed files matching the ^.github/workflows/|^Dockerfile|^scripts|^setup.py|^setup.cfg pattern:

  Dockerfile
  Dockerfile.ci
  setup.py

  Important environment files changed. Running everything
  ...
  image-build=true
  upgrade-to-newer-dependencies=false
```

And then it exited. By simply changing the order we set the right flag
_first_ and then exit.
  • Loading branch information
ashb authored Mar 26, 2021
1 parent 7320037 commit c5cc018
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/ci/selective_ci_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ function check_if_python_security_scans_should_be_run() {
}

function check_if_setup_files_changed() {
start_end::group_start "Check Python security scans"
start_end::group_start "Check setup.py/cfg changed"
local pattern_array=(
"^setup.cfg"
"^setup.py"
Expand Down Expand Up @@ -655,8 +655,8 @@ tests_needed="false"
kubernetes_tests_needed="false"

get_changed_files
run_all_tests_if_environment_files_changed
check_if_setup_files_changed
run_all_tests_if_environment_files_changed
check_if_any_py_files_changed
check_if_docs_should_be_generated
check_if_helm_tests_should_be_run
Expand Down

0 comments on commit c5cc018

Please sign in to comment.