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

Insights Compliance integration (HMS-3829) #2440

Merged
merged 15 commits into from
Sep 25, 2024

Conversation

croissanne
Copy link
Member

@croissanne croissanne commented Sep 16, 2024

The current state:

compliance-radio-.2.mp4

One thing worth discussing is how we want to expose the compliance step. Should we show it alongside the existing openscap step? Should the steps be merged?

Since it would only be in preview, how about we just show both steps for now, knowing that they might conflict?

@croissanne croissanne force-pushed the compliance-integration branch 2 times, most recently from 40435e3 to c639dcf Compare September 16, 2024 12:15
Copy link

codecov bot commented Sep 16, 2024

Codecov Report

Attention: Patch coverage is 94.30605% with 32 lines in your changes missing coverage. Please review.

Project coverage is 83.88%. Comparing base (1a7350e) to head (aca2bd3).
Report is 2177 commits behind head on main.

Files with missing lines Patch % Lines
...Components/CreateImageWizard/steps/Oscap/Oscap.tsx 91.48% 16 Missing ⚠️
api/config/compliance.ts 0.00% 12 Missing and 1 partial ⚠️
...Components/CreateImageWizard/steps/Oscap/index.tsx 97.89% 2 Missing ⚠️
src/test/mocks/handlers.js 92.30% 1 Missing ⚠️

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2440      +/-   ##
==========================================
+ Coverage   75.71%   83.88%   +8.17%     
==========================================
  Files          33      157     +124     
  Lines         597    17694   +17097     
  Branches      144     1747    +1603     
==========================================
+ Hits          452    14843   +14391     
- Misses        139     2830    +2691     
- Partials        6       21      +15     
Files with missing lines Coverage Δ
...Components/CreateImageWizard/CreateImageWizard.tsx 99.41% <100.00%> (ø)
...ageWizard/steps/FileSystem/FileSystemPartition.tsx 95.45% <100.00%> (ø)
...mageWizard/steps/Oscap/OscapProfileInformation.tsx 100.00% <100.00%> (ø)
...ents/CreateImageWizard/steps/Review/ReviewStep.tsx 92.94% <100.00%> (ø)
...teImageWizard/steps/Review/ReviewStepTextLists.tsx 93.91% <100.00%> (ø)
...nents/CreateImageWizard/utilities/requestMapper.ts 94.85% <100.00%> (ø)
src/constants.ts 100.00% <100.00%> (ø)
src/store/complianceApi.ts 100.00% <100.00%> (ø)
src/store/emptyComplianceApi.ts 100.00% <100.00%> (ø)
src/store/imageBuilderApi.ts 86.51% <ø> (ø)
... and 9 more

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a796630...aca2bd3. Read the comment docs.

@ochosi
Copy link
Contributor

ochosi commented Sep 16, 2024

We could show the OpenSCAP step as fallback, if a customer hasn't set up any policy yet.

And then we could show a huge throbbing notice that they can easily create a policy if they want tailoring?

@croissanne croissanne marked this pull request as ready for review September 17, 2024 12:30
Copy link
Collaborator

@regexowl regexowl left a comment

Choose a reason for hiding this comment

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

This looks awesome so far! Added a few comments that should help with the noise in test outputs.

"radio buttoning" between compliance and Oscap will be great in eliminating the overlap

@croissanne croissanne force-pushed the compliance-integration branch 7 times, most recently from 7f40f8c to f0a06a2 Compare September 19, 2024 12:16
Copy link
Collaborator

@regexowl regexowl left a comment

Choose a reason for hiding this comment

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

Looks great with the radio! Added a few nitpicks.

@croissanne croissanne force-pushed the compliance-integration branch 2 times, most recently from 10bc820 to 87a4608 Compare September 20, 2024 10:39
@croissanne
Copy link
Member Author

/retest

1 similar comment
@croissanne
Copy link
Member Author

/retest

@regexowl
Copy link
Collaborator

failed on teardown with "wait_for.TimedOutError: Could not do 'lambda defined as `ret, _ = wait_for(lambda: self.is_displayed, timeout=timeout, delay=delay)`' at /iqe_venv/lib/python3.11/site-packages/widgetastic/widget/base.py:533 in time"

is currently an expected failure. @jrusz is looking into it. Since the PR failed on the final cleanup, pr_check shouldn't need any adjustment.

Merges all the compliance related state into a single compliance object.
Reuses the existing oscap profile information.
Let's reuse this component for the compliance step.
The Insights compliance support reuses most of the existing OpenSCAP
step.

Depending on the state of the feature flag, it will show radio buttons
allowing users to switch between regular openscap and Insights
compliance.
The title is changed depending on the flag, to make it easier to change
the IQE tests.
When switching between openscap and insights compliance, clear the data
so the profile information isn't showing anymore.
Copy link
Collaborator

@regexowl regexowl left a comment

Choose a reason for hiding this comment

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

Thank you! Looks and works great ✨

@jrusz
Copy link
Collaborator

jrusz commented Sep 25, 2024

/retest

@regexowl regexowl merged commit cbb9598 into osbuild:main Sep 25, 2024
4 of 5 checks passed
@croissanne croissanne deleted the compliance-integration branch September 25, 2024 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants