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

🧹 Allow printing data queries without an assessment #4693

Merged
merged 1 commit into from
Sep 25, 2024
Merged

Conversation

jaym
Copy link
Contributor

@jaym jaym commented Sep 25, 2024

Boolean data queries will have an assessment. When we display them as data queries, we do not want an assessment

Boolean data queries will have an assessment. When we display them as
data queries, we do not want an assessment
Copy link
Contributor

Test Results

3 099 tests  ±0   3 098 ✅ ±0   1m 20s ⏱️ -6s
  371 suites ±0       1 💤 ±0 
   28 files   ±0       0 ❌ ±0 

Results for commit 343486f. ± Comparison against base commit 77779d0.

return print.Assessment(bundle, assessment)
}

return print.Datas(bundle, results)
Copy link
Contributor

@preslavgerchev preslavgerchev Sep 25, 2024

Choose a reason for hiding this comment

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

just to double check: is this PR just a restructure/cleanup or are there functional changes?

from what I see the only thing that happens here is that we've moved the for loop into its own Datas func that still gets called if assessment is nil

Copy link
Contributor

Choose a reason for hiding this comment

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

ah, i see the use case in mondoohq/cnspec#1438 for extracting that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This just splits the function into 2 so that it can be used from cnspec

@jaym jaym merged commit 78405c5 into main Sep 25, 2024
15 checks passed
@jaym jaym deleted the jdm/data-printer branch September 25, 2024 14:14
@github-actions github-actions bot locked and limited conversation to collaborators Sep 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants