Skip to content

ROX-30454: Pass #2 at GraphQL for ImageV2#16556

Merged
ajheflin merged 4 commits intomasterfrom
ajheflin/imagev2-graphql-doublecheck
Sep 3, 2025
Merged

ROX-30454: Pass #2 at GraphQL for ImageV2#16556
ajheflin merged 4 commits intomasterfrom
ajheflin/imagev2-graphql-doublecheck

Conversation

@ajheflin
Copy link
Contributor

@ajheflin ajheflin commented Aug 27, 2025

Description

This PR catches some places that were missing from #16414. At a first glance it may seem like this PR duplicates a ton of code, which it definitely does. This is in an effort to make it easier for whoever the poor soul is that has to come back in the future (it will probably be me) and remove the Image V1 code once we do away with the previous storage.Image proto.

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

@red-hat-konflux
Copy link
Contributor

red-hat-konflux bot commented Aug 27, 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 27, 2025

Images are ready for the commit at 15dbb79.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.9.x-578-g15dbb79820.

@codecov
Copy link

codecov bot commented Aug 27, 2025

Codecov Report

❌ Patch coverage is 3.24324% with 358 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.01%. Comparing base (9626a79) to head (15dbb79).
⚠️ Report is 80 commits behind head on master.

Files with missing lines Patch % Lines
central/graphql/resolvers/image_vulnerabilities.go 0.69% 140 Missing and 2 partials ⚠️
central/graphql/resolvers/image_components.go 3.50% 54 Missing and 1 partial ⚠️
central/graphql/resolvers/image_scan.go 0.00% 47 Missing and 1 partial ⚠️
...entral/graphql/resolvers/vulnerability_requests.go 5.26% 34 Missing and 2 partials ⚠️
central/graphql/resolvers/vulnerabilities_v1.go 0.00% 20 Missing ⚠️
central/graphql/resolvers/images.go 28.00% 15 Missing and 3 partials ⚠️
central/graphql/resolvers/components_v1.go 0.00% 16 Missing ⚠️
central/graphql/resolvers/utils.go 0.00% 14 Missing ⚠️
central/graphql/resolvers/image_cve_core.go 0.00% 7 Missing ⚠️
central/graphql/resolvers/images_v2.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #16556      +/-   ##
==========================================
- Coverage   49.05%   49.01%   -0.05%     
==========================================
  Files        2645     2649       +4     
  Lines      196451   197008     +557     
==========================================
+ Hits        96378    96557     +179     
- Misses      92520    92888     +368     
- Partials     7553     7563      +10     
Flag Coverage Δ
go-unit-tests 49.01% <3.24%> (-0.05%) ⬇️

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
Copy link
Contributor Author

/retest

Copy link
Contributor

@dashrews78 dashrews78 left a comment

Choose a reason for hiding this comment

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

You probably could have skipped the imageCVEResolver and imageComponentResolver ones. But alas you did those so I would leave them.

@ajheflin
Copy link
Contributor Author

ajheflin commented Sep 2, 2025

/retest

@ajheflin ajheflin merged commit a75ff09 into master Sep 3, 2025
88 of 89 checks passed
@ajheflin ajheflin deleted the ajheflin/imagev2-graphql-doublecheck branch September 3, 2025 00:27
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.

4 participants