Skip to content

Conversation

@Juneezee
Copy link
Contributor

@Juneezee Juneezee commented Oct 3, 2025

Description

Part of #7729.

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 jobs

@Juneezee Juneezee requested review from a team as code owners October 3, 2025 15:42
@openshift-ci
Copy link

openshift-ci bot commented Oct 3, 2025

Hi @Juneezee. Thanks for your PR.

I'm waiting for a stackrox member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@github-actions github-actions bot added the external-contributor To put on issues and PRs from external contributors label Oct 3, 2025
@janisz
Copy link
Contributor

janisz commented Oct 7, 2025

@janisz janisz closed this Oct 7, 2025
@janisz janisz reopened this Oct 7, 2025
@janisz
Copy link
Contributor

janisz commented Oct 7, 2025

I'm sorry I accidentally closed this PR. I'm working on #17160 to make CI 🟢 Stay tuned 😅

Part of #7729.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
@janisz janisz force-pushed the chore/usestdlibvars branch from 3c1b58b to 0eeccbd Compare October 7, 2025 14:45
@janisz
Copy link
Contributor

janisz commented Oct 7, 2025

/ok-to-test

@red-hat-konflux
Copy link
Contributor

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 (has(body.pull_request.labels) && body.pull_request.labels.exists(l, l.name == \"konflux-build\"))\n ) && body.action != \"ready_for_review\"\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 (has(body.pull_request.labels) && body.pull_request.labels.exists(l, l.name == \"konflux-build\"))\n ) && body.action != \"ready_for_review\"\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 (has(body.pull_request.labels) && body.pull_request.labels.exists(l, l.name == \"konflux-build\"))\n ) && body.action != \"ready_for_review\"\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 (has(body.pull_request.labels) && body.pull_request.labels.exists(l, l.name == \"konflux-build\"))\n ) && body.action != \"ready_for_review\"\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 (has(body.pull_request.labels) && body.pull_request.labels.exists(l, l.name == \"konflux-build\"))\n ) && body.action != \"ready_for_review\"\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 (has(body.pull_request.labels) && body.pull_request.labels.exists(l, l.name == \"konflux-build\"))\n ) && body.action != \"ready_for_review\"\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 (has(body.pull_request.labels) && body.pull_request.labels.exists(l, l.name == \"konflux-build\"))\n ) && body.action != \"ready_for_review\"\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 (has(body.pull_request.labels) && body.pull_request.labels.exists(l, l.name == \"konflux-build\"))\n ) && body.action != \"ready_for_review\"\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 (has(body.pull_request.labels) && body.pull_request.labels.exists(l, l.name == \"konflux-build\"))\n ) && body.action != \"ready_for_review\"\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 (has(body.pull_request.labels) && body.pull_request.labels.exists(l, l.name == \"konflux-build\"))\n ) && body.action != \"ready_for_review\"\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 (has(body.pull_request.labels) && body.pull_request.labels.exists(l, l.name == \"konflux-build\"))\n ) && body.action != \"ready_for_review\"\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 (has(body.pull_request.labels) && body.pull_request.labels.exists(l, l.name == \"konflux-build\"))\n ) && body.action != \"ready_for_review\"\n)\n" failed to evaluate: no such key: pull_request

@janisz
Copy link
Contributor

janisz commented Oct 7, 2025

/ok-to-test

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes and they look great!

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location> `scanner/enricher/nvd/nvd.go:424` </location>
<code_context>
 		Str("nvd_message", req.Header.Get("message")).
 		Msg("NVD response")
-	if resp.StatusCode != 200 {
+	if resp.StatusCode != http.StatusOK {
 		_ = resp.Body.Close
 		return nil, fmt.Errorf("unexpected status code when querying %s: %d", req.URL.String(), resp.StatusCode)
</code_context>

<issue_to_address>
**issue (bug_risk):** The response body is not being closed properly on error.

'_ = resp.Body.Close' does not close the body; use 'resp.Body.Close()' to properly release resources.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@Juneezee
Copy link
Contributor Author

Juneezee commented Oct 7, 2025

@janisz Should I retest?

@janisz
Copy link
Contributor

janisz commented Oct 7, 2025

/retest

@openshift-ci
Copy link

openshift-ci bot commented Oct 7, 2025

@Juneezee: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/ocp-4-19-scanner-v4-install-tests 0eeccbd link false /test ocp-4-19-scanner-v4-install-tests
ci/prow/ocp-4-12-scanner-v4-install-tests 0eeccbd link false /test ocp-4-12-scanner-v4-install-tests

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@janisz janisz changed the title chore(lint): enable the "usestdlibvars" linter chore(lint): enable the usestdlibvars linter Oct 9, 2025
@janisz janisz added the auto-retest PRs with this label will be automatically retested if prow checks fails label Oct 9, 2025
@codecov
Copy link

codecov bot commented Oct 9, 2025

Codecov Report

❌ Patch coverage is 11.11111% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.83%. Comparing base (13ac26e) to head (8606d86).
⚠️ Report is 6 commits behind head on master.

Files with missing lines Patch % Lines
central/notifiers/jira/jira.go 0.00% 1 Missing and 1 partial ⚠️
central/cve/utils/httpops.go 0.00% 1 Missing ⚠️
central/notifiers/slack/slack.go 0.00% 1 Missing ⚠️
central/notifiers/teams/teams.go 0.00% 1 Missing ⚠️
pkg/notifiers/common.go 0.00% 1 Missing ⚠️
scanner/enricher/nvd/nvd.go 0.00% 0 Missing and 1 partial ⚠️
scanner/indexer/indexer.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master   #17129   +/-   ##
=======================================
  Coverage   48.83%   48.83%           
=======================================
  Files        2716     2716           
  Lines      203240   203240           
=======================================
+ Hits        99252    99254    +2     
+ Misses      96169    96168    -1     
+ Partials     7819     7818    -1     
Flag Coverage Δ
go-unit-tests 48.83% <11.11%> (+<0.01%) ⬆️

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.

@janisz
Copy link
Contributor

janisz commented Oct 9, 2025

/ok-to-test

@rhacs-bot
Copy link
Contributor

/retest

@janisz janisz merged commit 183764e into stackrox:master Oct 9, 2025
191 of 194 checks passed
@janisz
Copy link
Contributor

janisz commented Oct 9, 2025

@Juneezee Thank You! I'm sorry for the delayed merge 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review auto-retest PRs with this label will be automatically retested if prow checks fails external-contributor To put on issues and PRs from external contributors hacktoberfest hacktoberfest-accepted ok-to-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants