CFE-3635: Prototyped dnf_appstream custom promise type - #117
Merged
Conversation
olehermanse
self-requested a review
November 12, 2025 19:50
larsewi
requested changes
Jan 7, 2026
nickanderson
force-pushed
the
CFE-3635/master
branch
from
January 7, 2026 18:45
af7b8f4 to
568afb1
Compare
larsewi
requested changes
Jan 9, 2026
Member
Author
|
ok @larsewi 🫣 |
nickanderson
force-pushed
the
CFE-3635/master
branch
from
January 23, 2026 00:12
2c33c57 to
a1d6535
Compare
larsewi
previously requested changes
Jan 23, 2026
nickanderson
force-pushed
the
CFE-3635/master
branch
from
March 27, 2026 22:47
d336e98 to
bdfd6b2
Compare
Member
Author
|
OK fixed up review comments, renamed to just appstreams, ready for review again. |
nickanderson
force-pushed
the
CFE-3635/master
branch
2 times, most recently
from
March 27, 2026 22:55
e1bd74c to
a5be74c
Compare
larsewi
approved these changes
Mar 31, 2026
larsewi
left a comment
Contributor
There was a problem hiding this comment.
The promise type LGTM 🚀 The pytests are written with a framework that I don't know.
Comment on lines
+57
to
+68
| if value not in ( | ||
| "enabled", | ||
| "disabled", | ||
| "installed", | ||
| "removed", | ||
| "default", | ||
| "reset", | ||
| ): | ||
| raise ValidationError( | ||
| "State attribute must be 'enabled', 'disabled', 'installed', " | ||
| "'removed', 'default', or 'reset'" | ||
| ) |
Contributor
There was a problem hiding this comment.
Consider:
Suggested change
| if value not in ( | |
| "enabled", | |
| "disabled", | |
| "installed", | |
| "removed", | |
| "default", | |
| "reset", | |
| ): | |
| raise ValidationError( | |
| "State attribute must be 'enabled', 'disabled', 'installed', " | |
| "'removed', 'default', or 'reset'" | |
| ) | |
| accepted = ( | |
| "enabled", | |
| "disabled", | |
| "installed", | |
| "removed", | |
| "default", | |
| "reset", | |
| ) | |
| if value not in accepted: | |
| raise ValidationError( | |
| f"State attribute must be '{"', '".join(accepted)}'" | |
| ) |
|
|
||
| def _validate_module_name(self, name): | ||
| # Validate module name to prevent injection | ||
| if not re.match(r"^[a-zA-Z0-9_.-]+$", name): |
Contributor
There was a problem hiding this comment.
re.match always anchors to the start of the string. Hence, the ^ is redundant. However, it does not hurt to be explicit. You can also consider using re.fullmatch (it reads better):
Suggested change
| if not re.match(r"^[a-zA-Z0-9_.-]+$", name): | |
| if not re.fullmatch(r"[a-zA-Z0-9_.-]+", name): |
A CFEngine custom promise type for managing AppStream modules (https://www.redhat.com/en/blog/introduction-appstreams-and-modules-red-hat-enterprise-linux) on compatible systems. - Enable, disable, install, and remove AppStream modules - Support for specifying streams and profiles Ticket: CFE-3653
nickanderson
force-pushed
the
CFE-3635/master
branch
from
April 2, 2026 21:47
519a84c to
39bda6c
Compare
Member
Author
|
OK @larsewi ready for another round of review |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Ticket: CFE-3635