Skip to content
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

Extend the Profile class in profile_tool #12019

Merged

Conversation

marcusburghardt
Copy link
Member

Description:

I had to conduct some tests with variables in profiles and it became much easier when this class was expanded to also map variables instead of only rules. It was actually considered when the class was introduced but there was no concrete demand for this back in the time. Now there is a demand for assessment of profiles variables.

Rationale:

Much easier to assess profiles.

Review Hints:

Some small tests to make sure the existing behavior of profile_tool is not changed should be enough. e.g.:

$ ./build-scripts/profile_tool.py most-used-rules --products rhel9

I had to conduct some tests with variables in profiles and it became
much easier when this class was expanded to also map variables instead of
only rules. It was actually considered when the class was introduced but
there was no concrete demand for this back in the time. Now there is a
demand for assessment of profiles variables.
@marcusburghardt marcusburghardt added enhancement General enhancements to the project. usability Enhancements related to usability. labels May 23, 2024
@marcusburghardt marcusburghardt added this to the 0.1.74 milestone May 23, 2024
Copy link

Start a new ephemeral environment with changes proposed in this pull request:

Fedora Environment
Open in Gitpod

Oracle Linux 8 Environment
Open in Gitpod

Copy link

github-actions bot commented May 23, 2024

🤖 A k8s content image for this PR is available at:
ghcr.io/complianceascode/k8scontent:12019
This image was built from commit: 67365a7

Click here to see how to deploy it

If you alread have Compliance Operator deployed:
utils/build_ds_container.py -i ghcr.io/complianceascode/k8scontent:12019

Otherwise deploy the content and operator together by checking out ComplianceAsCode/compliance-operator and:
CONTENT_IMAGE=ghcr.io/complianceascode/k8scontent:12019 make deploy-local

Copy link
Collaborator

@Honny1 Honny1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the changes, but I have one suggestion regarding profile variables.

utils/profile_tool/profile.py Outdated Show resolved Hide resolved
It will improve the performance when interacting with profile variables.
Copy link

codeclimate bot commented May 23, 2024

Code Climate has analyzed commit 67365a7 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 59.4% (0.0% change).

View more on Code Climate.

@Honny1 Honny1 self-requested a review May 27, 2024 14:20
Copy link
Collaborator

@Honny1 Honny1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jan-cerny jan-cerny merged commit ba23956 into ComplianceAsCode:master May 28, 2024
112 of 113 checks passed
@marcusburghardt marcusburghardt deleted the extend_profile_class branch May 28, 2024 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement General enhancements to the project. usability Enhancements related to usability.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants