diff --git a/.packit.yaml b/.packit.yaml index 5a1762a..3a28d24 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -26,6 +26,7 @@ jobs: - epel-9-x86_64 - epel-9-aarch64 enable_net: false + osh_diff_scan_after_copr_build: false actions: create-archive: - hatch build -t sdist @@ -48,6 +49,7 @@ jobs: - epel-9-x86_64 - epel-9-aarch64 enable_net: false + osh_diff_scan_after_copr_build: false list_on_homepage: true preserve_project: true release_suffix: "{PACKIT_PROJECT_BRANCH}" diff --git a/newa/__init__.py b/newa/__init__.py index 1809beb..1c3f918 100644 --- a/newa/__init__.py +++ b/newa/__init__.py @@ -122,6 +122,16 @@ def render_template( raise Exception("Could not render template.") from exc +def global_request_counter() -> Iterator[int]: + i = 1 + while True: + yield i + i += 1 + + +gen_global_request_counter = global_request_counter() + + @define class Settings: """ Class storing newa settings """ @@ -790,8 +800,9 @@ def merge_combination_data( # now build Request instances total = len(filtered_combinations) for combination in filtered_combinations: - yield Request(id=f'REQ-{next(recipe_id_gen)}.{total}', - **combination) + yield Request( + id=f'REQ-{next(recipe_id_gen)}.{total}.{next(gen_global_request_counter)}', + **combination) @define diff --git a/newa/cli.py b/newa/cli.py index 5496334..f3dbb20 100644 --- a/newa/cli.py +++ b/newa/cli.py @@ -1038,7 +1038,7 @@ def cmd_report(ctx: CLIContext) -> None: launch_description += f'{jira_id}: ' launch_description += f'{len(jira_execute_job_mapping[jira_id])} request(s) in total:' jira_description = launch_description.replace('
', '\n') - for req in sorted(results.keys()): + for req in sorted(results.keys(), key=lambda x: int(x.split('.')[-1])): # it would be nice to use hyperlinks in launch description however we # would hit description length limit. Therefore using plain text launch_description += "
{id}: {state}, {result}".format(**results[req])