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

🧹use slice filter to list frameworks #1392

Merged
merged 3 commits into from
Aug 6, 2024
Merged

Conversation

slntopp
Copy link
Member

@slntopp slntopp commented Jul 31, 2024

No description provided.

Copy link
Contributor

github-actions bot commented Jul 31, 2024

Test Results

  1 files  ±0   24 suites  ±0   19s ⏱️ ±0s
400 tests ±0  399 ✅ ±0  1 💤 ±0  0 ❌ ±0 
401 runs  ±0  400 ✅ ±0  1 💤 ±0  0 ❌ ±0 

Results for commit c6ae16d. ± Comparison against base commit f1a693a.

♻️ This comment has been updated with latest results.

@@ -20,7 +20,7 @@ type UpstreamFramework struct {
State mondoogql.ComplianceFrameworkState
}

func ListFrameworks(ctx context.Context, c *gql.MondooClient, scopeMrn string, state *mondoogql.ComplianceFrameworkState) ([]*UpstreamFramework, error) {
func ListFrameworks(ctx context.Context, c *gql.MondooClient, scopeMrn string, states *[]mondoogql.ComplianceFrameworkState) ([]*UpstreamFramework, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

this signature looks a bit weird, why not just pass a slice instead of a ptr to a slice?

Copy link
Member Author

Choose a reason for hiding this comment

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

Just what mondoogql expects. afaik if we make slice argument mandatory, then you'd have to send empty slice from the frontend to meet the schema

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we make this an implementation detail then? We can still pass the slice to the actual GQL call, but i think the arg in this function should be a states []mondoogql....

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated the implementation

@slntopp slntopp merged commit 99a4fa1 into main Aug 6, 2024
14 checks passed
@slntopp slntopp deleted the mik/framework-states-filter branch August 6, 2024 18:37
@github-actions github-actions bot locked and limited conversation to collaborators Aug 6, 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