-
Notifications
You must be signed in to change notification settings - Fork 14
ci: This PR is to trigger periodic CI testing #227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
systemroller
wants to merge
151
commits into
main
Choose a base branch
from
weekly-ci
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
151 commits
Select commit
Hold shift + click to select a range
3d53bc1
ci: This PR is to trigger periodic CI testing
github-actions[bot] 976d9c1
ci: This PR is to trigger periodic CI testing
github-actions[bot] 0706d1f
ci: This PR is to trigger periodic CI testing
github-actions[bot] 4987df2
ci: This PR is to trigger periodic CI testing
github-actions[bot] c7d3b99
ci: This PR is to trigger periodic CI testing
github-actions[bot] 0c6d710
ci: This PR is to trigger periodic CI testing
github-actions[bot] 74cf53d
ci: This PR is to trigger periodic CI testing
github-actions[bot] b34f452
ci: This PR is to trigger periodic CI testing
github-actions[bot] 82487f6
ci: This PR is to trigger periodic CI testing
github-actions[bot] a0e510f
ci: This PR is to trigger periodic CI testing
github-actions[bot] 32ff8ef
ci: This PR is to trigger periodic CI testing
github-actions[bot] b4d6dd6
ci: This PR is to trigger periodic CI testing
github-actions[bot] e50ce4a
ci: This PR is to trigger periodic CI testing
github-actions[bot] e6f869e
ci: This PR is to trigger periodic CI testing
github-actions[bot] 7d83115
ci: This PR is to trigger periodic CI testing
github-actions[bot] 96dc51d
ci: This PR is to trigger periodic CI testing
github-actions[bot] fd9f58b
ci: This PR is to trigger periodic CI testing
github-actions[bot] 9cc967b
ci: This PR is to trigger periodic CI testing
github-actions[bot] 4d7ee83
ci: This PR is to trigger periodic CI testing
github-actions[bot] d249da3
ci: This PR is to trigger periodic CI testing
github-actions[bot] 94ab306
ci: This PR is to trigger periodic CI testing
github-actions[bot] b4c08ee
ci: This PR is to trigger periodic CI testing
github-actions[bot] 8e03345
ci: This PR is to trigger periodic CI testing
github-actions[bot] 084f242
ci: This PR is to trigger periodic CI testing
github-actions[bot] bc59cc8
ci: This PR is to trigger periodic CI testing
github-actions[bot] aa7c069
ci: This PR is to trigger periodic CI testing
github-actions[bot] 0372b06
ci: This PR is to trigger periodic CI testing
github-actions[bot] a7940ab
ci: This PR is to trigger periodic CI testing
github-actions[bot] a1258c9
ci: This PR is to trigger periodic CI testing
github-actions[bot] 78039b2
ci: This PR is to trigger periodic CI testing
github-actions[bot] e504cc7
ci: This PR is to trigger periodic CI testing
github-actions[bot] 20a1760
ci: This PR is to trigger periodic CI testing
github-actions[bot] 5125658
ci: This PR is to trigger periodic CI testing
github-actions[bot] a0dc760
ci: This PR is to trigger periodic CI testing
github-actions[bot] d351934
ci: This PR is to trigger periodic CI testing
github-actions[bot] 68c0675
ci: This PR is to trigger periodic CI testing
github-actions[bot] 8e026f7
ci: This PR is to trigger periodic CI testing
github-actions[bot] 4fa847f
ci: This PR is to trigger periodic CI testing
github-actions[bot] 90ac8f1
ci: This PR is to trigger periodic CI testing
github-actions[bot] f353f96
ci: This PR is to trigger periodic CI testing
github-actions[bot] afbec45
ci: This PR is to trigger periodic CI testing
github-actions[bot] 1df86c0
ci: This PR is to trigger periodic CI testing
github-actions[bot] dc2ba2c
ci: This PR is to trigger periodic CI testing
github-actions[bot] 24beeb3
ci: This PR is to trigger periodic CI testing
github-actions[bot] 3af6d7c
ci: This PR is to trigger periodic CI testing
github-actions[bot] 8f3f80c
ci: This PR is to trigger periodic CI testing
github-actions[bot] 5680432
ci: This PR is to trigger periodic CI testing
github-actions[bot] a347509
ci: This PR is to trigger periodic CI testing
github-actions[bot] 54ffd9f
ci: This PR is to trigger periodic CI testing
github-actions[bot] 1160a9d
ci: This PR is to trigger periodic CI testing
github-actions[bot] 14a85c3
ci: This PR is to trigger periodic CI testing
github-actions[bot] 34c805f
ci: This PR is to trigger periodic CI testing
github-actions[bot] c581072
ci: This PR is to trigger periodic CI testing
github-actions[bot] acd8594
ci: This PR is to trigger periodic CI testing
github-actions[bot] 3f2a2b2
ci: This PR is to trigger periodic CI testing
github-actions[bot] f84a697
ci: This PR is to trigger periodic CI testing
github-actions[bot] ad28cb1
ci: This PR is to trigger periodic CI testing
github-actions[bot] 236e19a
ci: This PR is to trigger periodic CI testing
github-actions[bot] cb03f32
ci: This PR is to trigger periodic CI testing
github-actions[bot] fead703
ci: This PR is to trigger periodic CI testing
github-actions[bot] 1ca2ff2
ci: This PR is to trigger periodic CI testing
github-actions[bot] 34ef9ea
ci: This PR is to trigger periodic CI testing
github-actions[bot] a1da48e
ci: This PR is to trigger periodic CI testing
github-actions[bot] 337cd3b
ci: This PR is to trigger periodic CI testing
github-actions[bot] 3418ea6
ci: This PR is to trigger periodic CI testing
github-actions[bot] fe3f77a
ci: This PR is to trigger periodic CI testing
github-actions[bot] 288974f
ci: This PR is to trigger periodic CI testing
github-actions[bot] 59caa15
ci: This PR is to trigger periodic CI testing
github-actions[bot] 7e02f56
ci: This PR is to trigger periodic CI testing
github-actions[bot] 596f567
ci: This PR is to trigger periodic CI testing
github-actions[bot] 92732ef
ci: This PR is to trigger periodic CI testing
github-actions[bot] 23672b9
ci: This PR is to trigger periodic CI testing
github-actions[bot] 1c858c4
ci: This PR is to trigger periodic CI testing
github-actions[bot] 22db3f7
ci: This PR is to trigger periodic CI testing
github-actions[bot] dde93a4
ci: This PR is to trigger periodic CI testing
github-actions[bot] 65d2b70
ci: This PR is to trigger periodic CI testing
github-actions[bot] 457dd9d
ci: This PR is to trigger periodic CI testing
github-actions[bot] 4b6024f
ci: This PR is to trigger periodic CI testing
github-actions[bot] 7ee072e
ci: This PR is to trigger periodic CI testing
github-actions[bot] a118cc1
ci: This PR is to trigger periodic CI testing
github-actions[bot] a151bf0
ci: This PR is to trigger periodic CI testing
github-actions[bot] 4c39663
ci: This PR is to trigger periodic CI testing
github-actions[bot] 332f931
ci: This PR is to trigger periodic CI testing
github-actions[bot] 77c6c8b
ci: This PR is to trigger periodic CI testing
github-actions[bot] 0509a74
ci: This PR is to trigger periodic CI testing
github-actions[bot] 43257f6
ci: This PR is to trigger periodic CI testing
github-actions[bot] 45da4fa
ci: This PR is to trigger periodic CI testing
github-actions[bot] ee39a8f
ci: This PR is to trigger periodic CI testing
github-actions[bot] 840b19d
ci: This PR is to trigger periodic CI testing
github-actions[bot] a5ec4c6
ci: This PR is to trigger periodic CI testing
github-actions[bot] bc6a771
ci: This PR is to trigger periodic CI testing
github-actions[bot] dca756f
ci: This PR is to trigger periodic CI testing
github-actions[bot] 194c05c
ci: This PR is to trigger periodic CI testing
github-actions[bot] 8980ecd
ci: This PR is to trigger periodic CI testing
github-actions[bot] 12a6f5a
ci: This PR is to trigger periodic CI testing
github-actions[bot] 576b660
ci: This PR is to trigger periodic CI testing
github-actions[bot] 429d408
ci: This PR is to trigger periodic CI testing
github-actions[bot] f0be79f
ci: This PR is to trigger periodic CI testing
github-actions[bot] de2e4bc
ci: This PR is to trigger periodic CI testing
github-actions[bot] fcf3d29
ci: This PR is to trigger periodic CI testing
github-actions[bot] 9709099
ci: This PR is to trigger periodic CI testing
github-actions[bot] 766e26f
ci: This PR is to trigger periodic CI testing
github-actions[bot] 7bbcf56
ci: This PR is to trigger periodic CI testing
github-actions[bot] b43672f
ci: This PR is to trigger periodic CI testing
github-actions[bot] 0b77f61
ci: This PR is to trigger periodic CI testing
github-actions[bot] 0bc7660
ci: This PR is to trigger periodic CI testing
github-actions[bot] becb92a
ci: This PR is to trigger periodic CI testing
github-actions[bot] b027f37
ci: This PR is to trigger periodic CI testing
github-actions[bot] 312abc9
ci: This PR is to trigger periodic CI testing
github-actions[bot] f5f735e
ci: This PR is to trigger periodic CI testing
github-actions[bot] 2649e74
ci: This PR is to trigger periodic CI testing
github-actions[bot] 6d624ab
ci: This PR is to trigger periodic CI testing
github-actions[bot] b213ed8
ci: This PR is to trigger periodic CI testing
github-actions[bot] a4b15e1
ci: This PR is to trigger periodic CI testing
github-actions[bot] 98ef32d
ci: This PR is to trigger periodic CI testing
github-actions[bot] ea147f7
ci: This PR is to trigger periodic CI testing
github-actions[bot] 5335a5d
ci: This PR is to trigger periodic CI testing
github-actions[bot] 9850dbe
ci: This PR is to trigger periodic CI testing
github-actions[bot] 1ba3d88
ci: This PR is to trigger periodic CI testing
github-actions[bot] 35b7423
ci: This PR is to trigger periodic CI testing
github-actions[bot] c0f19ef
ci: This PR is to trigger periodic CI testing
github-actions[bot] 028e622
ci: This PR is to trigger periodic CI testing
github-actions[bot] 505aa4e
ci: This PR is to trigger periodic CI testing
github-actions[bot] d800b3e
ci: This PR is to trigger periodic CI testing
github-actions[bot] 7567a73
ci: This PR is to trigger periodic CI testing
github-actions[bot] eb559e9
ci: This PR is to trigger periodic CI testing
github-actions[bot] 4e357dc
ci: This PR is to trigger periodic CI testing
github-actions[bot] 3e01f9c
ci: This PR is to trigger periodic CI testing
github-actions[bot] f896147
ci: This PR is to trigger periodic CI testing
github-actions[bot] 536423f
ci: This PR is to trigger periodic CI testing
github-actions[bot] 4fb62b6
ci: This PR is to trigger periodic CI testing
github-actions[bot] ebebb38
ci: This PR is to trigger periodic CI testing
github-actions[bot] d42075f
ci: This PR is to trigger periodic CI testing
github-actions[bot] 52beca9
ci: This PR is to trigger periodic CI testing
github-actions[bot] a8bfce0
ci: This PR is to trigger periodic CI testing
github-actions[bot] c1721ef
ci: This PR is to trigger periodic CI testing
github-actions[bot] deb3860
ci: This PR is to trigger periodic CI testing
github-actions[bot] a6f0bb3
ci: This PR is to trigger periodic CI testing
github-actions[bot] 29ad43b
ci: This PR is to trigger periodic CI testing
github-actions[bot] 15f833c
ci: This PR is to trigger periodic CI testing
github-actions[bot] c2dc268
ci: This PR is to trigger periodic CI testing
github-actions[bot] 15f90f5
ci: This PR is to trigger periodic CI testing
github-actions[bot] 18ee64a
ci: This PR is to trigger periodic CI testing
github-actions[bot] 7a4738f
ci: This PR is to trigger periodic CI testing
github-actions[bot] e377e9b
ci: This PR is to trigger periodic CI testing
github-actions[bot] 5b36195
ci: This PR is to trigger periodic CI testing
github-actions[bot] 04e1eb0
ci: This PR is to trigger periodic CI testing
github-actions[bot] 1a37200
ci: This PR is to trigger periodic CI testing
github-actions[bot] 5adb701
ci: This PR is to trigger periodic CI testing
github-actions[bot] aecdb37
ci: This PR is to trigger periodic CI testing
github-actions[bot] f2ec2cd
ci: This PR is to trigger periodic CI testing
github-actions[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| # -*- coding: utf-8 -*- | ||
| # Copyright (C) 2023, Red Hat, Inc. | ||
| # SPDX-License-Identifier: MIT | ||
|
|
||
| from __future__ import absolute_import, division, print_function | ||
|
|
||
| __metaclass__ = type | ||
|
|
||
| DOCUMENTATION = """ | ||
| author: Rich Megginson | ||
| name: dump_packages | ||
| type: aggregate | ||
| short_description: dump arguments to package module | ||
| description: | ||
| - Dump arguments to package module to get list of packages. | ||
| - Used in conjunction with CI testing to get the packages used | ||
| - with all combinations of: distribution/version/role arguments | ||
| - Used to generate lists of packages for ostree image builds. | ||
| requirements: | ||
| - None | ||
| """ | ||
|
|
||
| from ansible.plugins.callback import CallbackBase # noqa: E402 | ||
|
|
||
|
|
||
| class CallbackModule(CallbackBase): | ||
| """ | ||
| Dump packages. | ||
| """ | ||
|
|
||
| CALLBACK_VERSION = 2.0 | ||
| CALLBACK_TYPE = "aggregate" | ||
| CALLBACK_NAME = "dump_packages" | ||
| # needed for 2.9 compatibility | ||
| CALLBACK_NEEDS_WHITELIST = False # wokeignore:rule=whitelist | ||
| CALLBACK_NEEDS_ENABLED = False | ||
|
|
||
| def __init__(self, *args, **kwargs): | ||
| super(CallbackModule, self).__init__(*args, **kwargs) | ||
|
|
||
| def v2_runner_on_ok(self, result): | ||
| fields = result._task_fields | ||
| if ( | ||
| fields["action"] in ["package", "dnf", "yum"] | ||
| and fields["args"].get("state") != "absent" | ||
| ): | ||
| packages = set() | ||
| if "invocation" in result._result: | ||
| results = [result._result] | ||
| elif "results" in result._result and isinstance( | ||
| result._result["results"], list | ||
| ): | ||
| results = result._result["results"] | ||
| for item in results: | ||
| pkgs = item["invocation"]["module_args"]["name"] | ||
| if isinstance(pkgs, list): | ||
| for ii in pkgs: | ||
| packages.add(ii) | ||
| else: | ||
| packages.add(pkgs) | ||
| # tell python black that this line is ok | ||
| # fmt: off | ||
| self._display.display("lsrpackages: " + " ".join(sorted(list(packages)))) | ||
| # fmt: on | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check failure
Code scanning / CodeQL
Potentially uninitialized local variable
Copilot Autofix
AI 7 months ago
In general, to fix a “potentially uninitialized local variable” problem, either (1) initialize the variable to a safe default before any conditional assignments or (2) ensure all control-flow paths that reach its use have definitely assigned it (for example, by adding
elsecases or early returns).Here, the safest change without altering existing behavior is:
resultsto an empty list before theif/elifchain.resultsif it is non-empty; otherwise, simply skip the loop so noUnboundLocalErrorcan occur.This preserves current behavior when
resultsis defined as before, while making the code no-op (rather than crash) in the rare case that neither condition is met.Concretely in
tests/callback_plugins/dump_packages.py:CallbackModule.v2_runner_on_ok, addresults = []right afterpackages = set().for item in results:loop and subsequent package processing in anif results:guard so it only executes whenresultshas been set to something meaningful.No new imports or helper methods are required.