Skip to content

ROX-30454: GraphQL Updates for ImageV2#16414

Merged
ajheflin merged 19 commits intomasterfrom
ajheflin/image-v2-graphql
Aug 25, 2025
Merged

ROX-30454: GraphQL Updates for ImageV2#16414
ajheflin merged 19 commits intomasterfrom
ajheflin/image-v2-graphql

Conversation

@ajheflin
Copy link
Contributor

@ajheflin ajheflin commented Aug 14, 2025

Description

This PR adds the GraphQL resolvers for Image V2s, as well as adds logic to make other resolvers that are dependent on images to be able to use either the Image V1 Resolvers, or the Image V2 Resolvers, dependent on whether or not the new image data model is enabled.

User-facing documentation

Testing and quality

  • the change is production ready: the change is GA, or otherwise the functionality is gated by a feature flag
  • CI results are inspected

Automated testing

  • added unit tests
  • added e2e tests
  • added regression tests
  • added compatibility tests
  • modified existing tests

How I validated my change

CI

@openshift-ci
Copy link

openshift-ci bot commented Aug 14, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@red-hat-konflux
Copy link
Contributor

red-hat-konflux bot commented Aug 14, 2025

Caution

There are some errors in your PipelineRun template.

PipelineRun Error
central-db-on-push CEL expression evaluation error: expression "(\n event == \"push\" && target_branch.matches(\"^(master|release-.*|refs/tags/.*)$\")\n) || (\n event == \"pull_request\" && (\n target_branch.startsWith(\"release-\") ||\n source_branch.matches(\"(konflux|renovate|appstudio|rhtap)\") ||\n body.pull_request.labels.exists(l, l.name == \"konflux-build\")\n )\n)\n" failed to evaluate: no such key: pull_request
main-on-push CEL expression evaluation error: expression "(\n event == \"push\" && target_branch.matches(\"^(master|release-.*|refs/tags/.*)$\")\n) || (\n event == \"pull_request\" && (\n target_branch.startsWith(\"release-\") ||\n source_branch.matches(\"(konflux|renovate|appstudio|rhtap)\") ||\n body.pull_request.labels.exists(l, l.name == \"konflux-build\")\n )\n)\n" failed to evaluate: no such key: pull_request
operator-on-push CEL expression evaluation error: expression "(\n event == \"push\" && target_branch.matches(\"^(master|release-.*|refs/tags/.*)$\")\n) || (\n event == \"pull_request\" && (\n target_branch.startsWith(\"release-\") ||\n source_branch.matches(\"(konflux|renovate|appstudio|rhtap)\") ||\n body.pull_request.labels.exists(l, l.name == \"konflux-build\")\n )\n)\n" failed to evaluate: no such key: pull_request
operator-bundle-on-push CEL expression evaluation error: expression "(\n event == \"push\" && target_branch.matches(\"^(master|release-.*|refs/tags/.*)$\")\n) || (\n event == \"pull_request\" && (\n target_branch.startsWith(\"release-\") ||\n source_branch.matches(\"(konflux|renovate|appstudio|rhtap)\") ||\n body.pull_request.labels.exists(l, l.name == \"konflux-build\")\n )\n)\n" failed to evaluate: no such key: pull_request
retag-collector CEL expression evaluation error: expression "(\n event == \"push\" && target_branch.matches(\"^(master|release-.*|refs/tags/.*)$\")\n) || (\n event == \"pull_request\" && (\n target_branch.startsWith(\"release-\") ||\n source_branch.matches(\"(konflux|renovate|appstudio|rhtap)\") ||\n body.pull_request.labels.exists(l, l.name == \"konflux-build\")\n )\n)\n" failed to evaluate: no such key: pull_request
retag-scanner-db-slim CEL expression evaluation error: expression "(\n event == \"push\" && target_branch.matches(\"^(master|release-.*|refs/tags/.*)$\")\n) || (\n event == \"pull_request\" && (\n target_branch.startsWith(\"release-\") ||\n source_branch.matches(\"(konflux|renovate|appstudio|rhtap)\") ||\n body.pull_request.labels.exists(l, l.name == \"konflux-build\")\n )\n)\n" failed to evaluate: no such key: pull_request
retag-scanner-db CEL expression evaluation error: expression "(\n event == \"push\" && target_branch.matches(\"^(master|release-.*|refs/tags/.*)$\")\n) || (\n event == \"pull_request\" && (\n target_branch.startsWith(\"release-\") ||\n source_branch.matches(\"(konflux|renovate|appstudio|rhtap)\") ||\n body.pull_request.labels.exists(l, l.name == \"konflux-build\")\n )\n)\n" failed to evaluate: no such key: pull_request
retag-scanner-slim CEL expression evaluation error: expression "(\n event == \"push\" && target_branch.matches(\"^(master|release-.*|refs/tags/.*)$\")\n) || (\n event == \"pull_request\" && (\n target_branch.startsWith(\"release-\") ||\n source_branch.matches(\"(konflux|renovate|appstudio|rhtap)\") ||\n body.pull_request.labels.exists(l, l.name == \"konflux-build\")\n )\n)\n" failed to evaluate: no such key: pull_request
retag-scanner CEL expression evaluation error: expression "(\n event == \"push\" && target_branch.matches(\"^(master|release-.*|refs/tags/.*)$\")\n) || (\n event == \"pull_request\" && (\n target_branch.startsWith(\"release-\") ||\n source_branch.matches(\"(konflux|renovate|appstudio|rhtap)\") ||\n body.pull_request.labels.exists(l, l.name == \"konflux-build\")\n )\n)\n" failed to evaluate: no such key: pull_request
roxctl-on-push CEL expression evaluation error: expression "(\n event == \"push\" && target_branch.matches(\"^(master|release-.*|refs/tags/.*)$\")\n) || (\n event == \"pull_request\" && (\n target_branch.startsWith(\"release-\") ||\n source_branch.matches(\"(konflux|renovate|appstudio|rhtap)\") ||\n body.pull_request.labels.exists(l, l.name == \"konflux-build\")\n )\n)\n" failed to evaluate: no such key: pull_request
scanner-v4-on-push CEL expression evaluation error: expression "(\n event == \"push\" && target_branch.matches(\"^(master|release-.*|refs/tags/.*)$\")\n) || (\n event == \"pull_request\" && (\n target_branch.startsWith(\"release-\") ||\n source_branch.matches(\"(konflux|renovate|appstudio|rhtap)\") ||\n body.pull_request.labels.exists(l, l.name == \"konflux-build\")\n )\n)\n" failed to evaluate: no such key: pull_request
scanner-v4-db-on-push CEL expression evaluation error: expression "(\n event == \"push\" && target_branch.matches(\"^(master|release-.*|refs/tags/.*)$\")\n) || (\n event == \"pull_request\" && (\n target_branch.startsWith(\"release-\") ||\n source_branch.matches(\"(konflux|renovate|appstudio|rhtap)\") ||\n body.pull_request.labels.exists(l, l.name == \"konflux-build\")\n )\n)\n" failed to evaluate: no such key: pull_request

@rhacs-bot
Copy link
Contributor

rhacs-bot commented Aug 15, 2025

Images are ready for the commit at 0fc779b.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.9.x-514-g0fc779b392.

@ajheflin ajheflin force-pushed the ajheflin/image-v2-graphql branch from 4d86aa4 to e02d43f Compare August 15, 2025 15:48
@codecov
Copy link

codecov bot commented Aug 18, 2025

Codecov Report

❌ Patch coverage is 13.44668% with 560 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.06%. Comparing base (2aebffc) to head (0fc779b).
⚠️ Report is 76 commits behind head on master.

Files with missing lines Patch % Lines
central/graphql/resolvers/images_v2.go 14.34% 203 Missing ⚠️
central/graphql/resolvers/generated.go 14.50% 171 Missing ⚠️
central/graphql/resolvers/images.go 10.12% 68 Missing and 3 partials ⚠️
central/graphql/resolvers/components_v1.go 0.00% 53 Missing ⚠️
central/graphql/resolvers/vulnerabilities_v1.go 0.00% 20 Missing ⚠️
...entral/graphql/resolvers/vulnerability_requests.go 0.00% 14 Missing ⚠️
central/graphql/resolvers/resolver.go 0.00% 7 Missing ⚠️
central/graphql/resolvers/search.go 57.14% 2 Missing and 4 partials ⚠️
...lityrequest/manager/querymgr/query_manager_impl.go 0.00% 6 Missing ⚠️
central/graphql/resolvers/deployments.go 55.55% 3 Missing and 1 partial ⚠️
... and 5 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #16414      +/-   ##
==========================================
- Coverage   49.07%   49.06%   -0.02%     
==========================================
  Files        2640     2645       +5     
  Lines      195598   196449     +851     
==========================================
+ Hits        95989    96378     +389     
- Misses      92102    92519     +417     
- Partials     7507     7552      +45     
Flag Coverage Δ
go-unit-tests 49.06% <13.44%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ajheflin ajheflin marked this pull request as ready for review August 19, 2025 13:43
@ajheflin ajheflin requested a review from a team as a code owner August 19, 2025 13:43
@ajheflin
Copy link
Contributor Author

/retest

Copy link
Contributor

@clickboo clickboo left a comment

Choose a reason for hiding this comment

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

left few comments

Copy link
Contributor

@clickboo clickboo left a comment

Choose a reason for hiding this comment

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

left some comments, but lgtm. Would also like @charmik-redhat to review given more subject matter expertise in this area.

@ajheflin
Copy link
Contributor Author

/retest

@ajheflin ajheflin merged commit 5eb0398 into master Aug 25, 2025
97 of 98 checks passed
@ajheflin ajheflin deleted the ajheflin/image-v2-graphql branch August 25, 2025 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants