ci: detect the latest Fedora stable version#4285
Conversation
|
/packit test |
There was a problem hiding this comment.
Code Review
This pull request replaces hardcoded Fedora versions with dynamic resolution using resolve-fedora-aliases in the test configuration and adds the python3-fedora-distro-aliases package to the client installation tasks. Feedback was provided to include validation for the resolved Fedora version to ensure it is a numeric value before performing arithmetic operations, which prevents potential script failures if the resolution command returns an unexpected result.
| FEDORA_VERSION=$(resolve-fedora-aliases fedora-latest-stable -o version) | ||
| PREV_FEDORA_VERSION=$(( FEDORA_VERSION - 1 )) |
There was a problem hiding this comment.
To make the script more robust, it's good practice to validate the output of resolve-fedora-aliases. This ensures that FEDORA_VERSION is a number before you perform arithmetic operations on it, preventing potential script failures if the command fails or returns an unexpected value.
| FEDORA_VERSION=$(resolve-fedora-aliases fedora-latest-stable -o version) | |
| PREV_FEDORA_VERSION=$(( FEDORA_VERSION - 1 )) | |
| FEDORA_VERSION=$(resolve-fedora-aliases fedora-latest-stable -o version) | |
| if ! [[ "$FEDORA_VERSION" =~ ^[0-9]+$ ]]; then | |
| echo "Error: Failed to resolve Fedora version to a number: '$FEDORA_VERSION'" >&2 | |
| exit 1 | |
| fi | |
| PREV_FEDORA_VERSION=$(( FEDORA_VERSION - 1 )) |
There was a problem hiding this comment.
I don't care; but if a human reviewer prefers, I will do.
|
Ok, we seem to have some serious trouble with tests on F44. I'm going to prepare a separate PR that would enforce F43 use. |
This is to work-around problems spotted by #4285 (Fedora 44 tests would need some fixes).
Packit automatically selects the latest Fedora version (currently F44), and our testsuite needs to automatically move to that version, too.
9b17447 to
97068ed
Compare
|
/packit test |
|
Why is Packit, all of a sudden, triggering tests against F43? (This morning it was F44). |
|
you did it on purpose, that the f44 tests are broken right now, no? https://github.com/fedora-copr/copr/pull/4286/changes |
|
and we have everything deployed on f43 at this time, so that is correct change in my eyes |
|
I want to switch the testsuite onto F44, by I believed this could work, but it was not - hence the temporary workaround is #4286 |
Packit automatically selects the latest Fedora version (currently F44), and our testsuite needs to automatically move to that version, too.