Skip to content

build: npm update, make update-lockfiles, cherry-pick various mintmaker updates#909

Open
mirekdlugosz wants to merge 8 commits intomainfrom
dependencies-roundup-moar
Open

build: npm update, make update-lockfiles, cherry-pick various mintmaker updates#909
mirekdlugosz wants to merge 8 commits intomainfrom
dependencies-roundup-moar

Conversation

@mirekdlugosz
Copy link
Copy Markdown
Contributor

@mirekdlugosz mirekdlugosz commented Apr 2, 2026

This is #908 + one commit. Gotta keep them separated to see CI results without messing with main PR.

Summary by Sourcery

Update container base images, Tekton task bundles, and minor UI behavior for the refresh button.

Enhancements:

  • Refresh the last-refresh label only passes translation context and value when a timestamp is available.
  • Refresh container base images for Node.js builder and Nginx runtime to newer UBI9 image digests.

Build:

  • Update Tekton apply-tags and rpms-signature-scan task bundle digests for pull request and push pipelines.
  • Update yq image digest in the generate-version-labels Tekton task.

Tests:

  • Regenerate snapshot for the refreshTimeButton component to reflect updated rendering behavior.

infinitewarp and others added 8 commits March 31, 2026 16:02
The TypeScript compiler was throwing error TS2345 because the translation
function expected specific types, but the use of logical AND (&&) operators
with a numeric value caused type inference issues.

Problem: When using `lastRefresh && 'load'`, TypeScript infers the type as
`0 | "load"` rather than `"load" | undefined`, because lastRefresh is a
number and the falsy value for numbers is 0, not undefined. The i18next
translation function's type signature doesn't accept 0 as a valid value
for these parameters.

Solution: Changed from logical AND operators to ternary operators
(`lastRefresh ? 'load' : undefined`) to ensure the types are explicitly
either the intended values or undefined, matching what the translation
library expects.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
The recent npm update (c49e86b) pulled in lodash 4.18.0, which contains
a bug in its template function where `assignWith` is not defined. This
caused html-webpack-plugin to fail during production builds with:
"ReferenceError: assignWith is not defined at template".

Fixed by adding a package override to pin lodash to the stable 4.17.23
version across all dependencies. This prevents the buggy 4.18.0 from
being installed and allows the build and integration tests to pass.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Signed-off-by: konflux-internal-p02 <170854209+konflux-internal-p02[bot]@users.noreply.github.com>
Signed-off-by: konflux-internal-p02 <170854209+konflux-internal-p02[bot]@users.noreply.github.com>
This functionally reverts d628ce2. We
can't use lodash 4.17.x beause it contains security issues that make npm
audit fail in CI.
@mirekdlugosz mirekdlugosz requested a review from a team as a code owner April 2, 2026 11:04
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai bot commented Apr 2, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates container base images and Tekton task bundles to newer digests, adjusts refresh-time button translation parameter handling, and refreshes associated lockfile and snapshot artifacts.

Flow diagram for refresh time button translation parameter handling

flowchart TD
  A["Render RefreshTimeButton"] --> B{lastRefresh > 0}
  B -- Yes --> C["context = load"]
  B -- No --> D["context = undefined"]

  B -- Yes --> E["refresh = refresh (formatted time)"]
  B -- No --> F["refresh = undefined"]

  C --> G["t(refresh-time-button.refreshed, params)"]
  D --> G
  E --> G
  F --> G

  G --> H["Render translated last refresh message in button"]
Loading

File-Level Changes

Change Details Files
Bump Tekton task bundle digests used in PR and push pipelines.
  • Update apply-tags task bundle digest while keeping version at 0.3
  • Update rpms-signature-scan task bundle digest while keeping version at 0.2
.tekton/discovery-ui-pull-request.yaml
.tekton/discovery-ui-push.yaml
Update container base image digests for Node.js build stage and Nginx runtime image.
  • Change ubi9/nodejs-22 image to a newer sha256 digest for the npm_builder stage
  • Change ubi9/nginx-124 image to a newer sha256 digest for the final runtime image
Containerfile
Fix conditional translation options for the refresh-time button to avoid passing falsey values into i18n options.
  • Replace logical AND usage with explicit ternaries for i18n context and refresh parameters so undefined is passed when lastRefresh is not set
  • Ensure behavior is clearer and less dependent on JavaScript truthiness in the translation call
src/components/refreshTimeButton/refreshTimeButton.tsx
Update Tekton generate-version-labels task image digest.
  • Bump quay.io/konflux-ci/yq image to a new sha256 digest while keeping the same repository
.tekton/task/generate-version-labels.yaml
Refresh dependency lockfile and Jest snapshot artifacts to align with implementation and dependency updates.
  • Regenerate package-lock.json to capture updated dependency tree from npm
  • Update Jest snapshot for refreshTimeButton to reflect new i18n output when lastRefresh is unset
package-lock.json
src/components/refreshTimeButton/__tests__/__snapshots__/refreshTimeButton.test.tsx.snap

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown

@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 - I've reviewed your changes and they look great!


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.

@mirekdlugosz mirekdlugosz changed the title Dependencies roundup moar build: npm update, make update-lockfiles, cherry-pick various mintmaker updates Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants