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

Stop SCAP content validation if not necessary #12523

Merged
merged 1 commit into from
Oct 22, 2024

Conversation

jan-cerny
Copy link
Collaborator

@jan-cerny jan-cerny commented Oct 22, 2024

The SCAP content validation is very time consuming. The CTest test cases that perform the validation takes the most time of the CI runs. However, the likelihood of catching a serious problem by these tests is low. If anybody modifies an OVAL, they most likely try to run it in OpenSCAP or in Automatus tests and these tests would fail because of invalid OVAL.

We will introduce a new CMake option SSG_SCAP_VALIDATION_ENABLED. If this option is enable, CTest tests will contain validation of built SCAP content. The default behavior of the system doesn't change, the option is set to TRUE by default therefore the validation will be still turned on by default.

Then, we set this option to OFF in select GitHub Actions CI jobs which will stop executing SCAP content validation in these jobs.

The time of "Gate / Build, Test on Fedora Latest (Container) (pull_request)" reduced from 41 min to 26 min with this change.

The SCAP content validation is very time consuming. The CTest test cases
that perform the validation takes the most time of the CI runs. However,
the likelihood of catching a serious problem by these tests is low. If
anybody modifies an OVAL, they most likely try to run it in OpenSCAP or
in Automatus tests and these tests would fail because of invalid OVAL.

We will introduce a new CMake option SSG_SCAP_VALIDATION_ENABLED.  If
this option is enable, CTest tests will contain validation of built SCAP
content. The default behavior of the system doesn't change, the option
is set to TRUE by default therefore the validation will be still turned
on by default.

Then, we set this option to OFF in select GitHub Actions CI jobs which
will stop executing SCAP content validation in these jobs.
@jan-cerny jan-cerny added the Infrastructure Our content build system label Oct 22, 2024
@jan-cerny jan-cerny added this to the 0.1.75 milestone Oct 22, 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

codeclimate bot commented Oct 22, 2024

Code Climate has analyzed commit f2d5488 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 61.0% (0.0% change).

View more on Code Climate.

@Mab879 Mab879 self-assigned this Oct 22, 2024
Copy link
Member

@Mab879 Mab879 left a comment

Choose a reason for hiding this comment

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

Great improvement, thanks!

@Mab879 Mab879 merged commit c455adf into ComplianceAsCode:master Oct 22, 2024
103 of 104 checks passed
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.

2 participants