Skip to content

Stop SCAP content validation if not necessary#12523

Merged
Mab879 merged 1 commit into
ComplianceAsCode:masterfrom
jan-cerny:stop_validating
Oct 22, 2024
Merged

Stop SCAP content validation if not necessary#12523
Mab879 merged 1 commit into
ComplianceAsCode:masterfrom
jan-cerny:stop_validating

Conversation

@jan-cerny
Copy link
Copy Markdown
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
@github-actions
Copy link
Copy Markdown

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

Fedora Environment
Open in Gitpod

Oracle Linux 8 Environment
Open in Gitpod

@qlty-cloud-legacy
Copy link
Copy Markdown

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
Copy Markdown
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
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