[autobackport: sssd-2-9-4] CI: don't specify 'push:'/'pull_request:' branches#8973
[autobackport: sssd-2-9-4] CI: don't specify 'push:'/'pull_request:' branches#8973sssd-bot wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request attempts to update the Fedora matrix retrieval logic in contrib/ci/get-matrix.py but introduces unresolved git conflict markers. The reviewer correctly notes that for this branch, we should retain the static Fedora matrix configuration rather than querying the Bodhi API dynamically, which would also clean up unused imports.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| import requests.adapters | ||
| import argparse | ||
| import os | ||
|
|
||
| import urllib3.util | ||
|
|
||
| <<<<<<< HEAD | ||
| def get_fedora_matrix(): | ||
| # Fedora 41 and up are using 2.10, F39 is going out of support | ||
| return ['fedora-40'] | ||
| ======= | ||
|
|
||
| def requests_session(): | ||
| s = requests.Session() | ||
| retry = urllib3.util.Retry( | ||
| total=3, | ||
| backoff_factor=1, | ||
| status_forcelist=[408, 429, 500, 502, 503, 504], | ||
| allowed_methods=["GET"], | ||
| ) | ||
| s.mount("https://", requests.adapters.HTTPAdapter(max_retries=retry)) | ||
| return s | ||
|
|
||
|
|
||
| def get_fedora_releases(session, type, exclude=[]): | ||
| r = session.get(f'https://bodhi.fedoraproject.org/releases?state={type}', timeout=(10, 30)) | ||
| r.raise_for_status() | ||
|
|
||
| versions = [x['version'] for x in r.json()['releases'] if x['id_prefix'] == 'FEDORA'] | ||
| versions = list(set(versions) - set(exclude)) | ||
| versions.sort() | ||
|
|
||
| return versions | ||
|
|
||
|
|
||
| def get_fedora_matrix(): | ||
| session = requests_session() | ||
| fedora_stable = get_fedora_releases(session, 'current') | ||
| fedora_devel = get_fedora_releases(session, 'pending', exclude=['eln']) | ||
| fedora_frozen = get_fedora_releases(session, 'frozen', exclude=['eln']) | ||
|
|
||
| matrix = [] | ||
| matrix.extend(['fedora-{0}'.format(x) for x in fedora_stable]) | ||
| matrix.extend(['fedora-{0}'.format(x) for x in fedora_devel]) | ||
| matrix.extend(['fedora-{0}'.format(x) for x in fedora_frozen]) | ||
|
|
||
| return matrix | ||
| >>>>>>> 6ffc60137 (CI: add retry logic to Bodhi API calls in get-matrix.py) |
There was a problem hiding this comment.
The backport contains unresolved git conflict markers (<<<<<<< HEAD, =======, >>>>>>>). Since this is the sssd-2-9-4 branch, we should keep the static Fedora matrix (['fedora-40']) and avoid querying the Bodhi API dynamically (which would pull in newer Fedora versions that use SSSD 2.10+). Resolving this conflict also allows us to remove the unused imports requests.adapters and urllib3.util.
import argparse
import os
def get_fedora_matrix():
# Fedora 41 and up are using 2.10, F39 is going out of support
return ['fedora-40']Reviewed-by: Pavel Březina <pbrezina@redhat.com> (cherry picked from commit b58482f)
780ad18 to
d476486
Compare
This is an automatic backport of PR#8954 CI: don't specify 'push:'/'pull_request:' branches to branch sssd-2-9-4, created by @alexey-tikhonov.
Caution
@alexey-tikhonov The patches did not apply cleanly. It is necessary to resolve conflicts before merging this pull request. Commits that introduced conflict are marked with
CONFLICT!.You can push changes to this pull request
Original commits
b58482f - CI: don't specify 'push:'/'pull_request:' branches
6ffc601 - CI: add retry logic to Bodhi API calls in get-matrix.py
Backported commits
Conflicting Files Information (check for deleted and re-added files)
On branch SSSD-sssd-backport-pr8954-to-sssd-2-9-4
You are currently cherry-picking commit 6ffc601.
(fix conflicts and run "git cherry-pick --continue")
(use "git cherry-pick --skip" to skip this patch)
(use "git cherry-pick --abort" to cancel the cherry-pick operation)
Unmerged paths:
(use "git add ..." to mark resolution)
both modified: contrib/ci/get-matrix.py
no changes added to commit (use "git add" and/or "git commit -a")