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

Fix content_diff when a rule is removed #11855

Merged
merged 1 commit into from Apr 30, 2024

Conversation

Mab879
Copy link
Member

@Mab879 Mab879 commented Apr 18, 2024

Description:

Fix content_diff when a rule is removed the code doesn't crash.
This only happened for DISA content.

Rationale:

So the script runs when a rule is removed.

@Mab879 Mab879 added the Infrastructure Our content build system label Apr 18, 2024
@Mab879 Mab879 added this to the 0.1.73 milestone Apr 18, 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 Apr 18, 2024

🤖 A k8s content image for this PR is available at:
ghcr.io/complianceascode/k8scontent:11855
This image was built from commit: 41bc802

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:11855

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

Copy link
Member

@ggbecker ggbecker left a comment

Choose a reason for hiding this comment

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

Apparently when the function was split in this pull request: https://github.com/ComplianceAsCode/content/pull/9634/files

The missing_rules declaration was left out.

But checking more thoroughly, this variable (missing_rules) doesn't seem to be used anywhere in this file, look for other occurrences in different functions.

I believe we can remove from everywhere in this file.

@jan-cerny
Copy link
Collaborator

@Mab879 it would be better to add into description that it affects the DISA content comparison only

@Mab879
Copy link
Member Author

Mab879 commented Apr 23, 2024

@Mab879 it would be better to add into description that it affects the DISA content comparison only

I can add something to the description about that.

@Mab879 Mab879 force-pushed the fix_content_diff_missing branch 2 times, most recently from dc2e908 to e6d3120 Compare April 24, 2024 15:07
Copy link

codeclimate bot commented Apr 25, 2024

Code Climate has analyzed commit 41bc802 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.2% (0.0% change).

View more on Code Climate.

@Mab879
Copy link
Member Author

Mab879 commented Apr 25, 2024

/packit build

@ggbecker ggbecker merged commit 1e0204a into ComplianceAsCode:master Apr 30, 2024
113 checks passed
@Mab879 Mab879 deleted the fix_content_diff_missing branch April 30, 2024 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Infrastructure Our content build system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants