Skip to content

Use latest tag for KRM functions in E2E tests#4546

Open
aravindtga wants to merge 2 commits into
kptdev:mainfrom
Nordix:switch-e2e-tests-to-set-label-image-latest-tag
Open

Use latest tag for KRM functions in E2E tests#4546
aravindtga wants to merge 2 commits into
kptdev:mainfrom
Nordix:switch-e2e-tests-to-set-label-image-latest-tag

Conversation

@aravindtga
Copy link
Copy Markdown
Contributor

@aravindtga aravindtga commented May 29, 2026

Description

Switch set-namespace, set-annotations and set-labels KRM function images from pinned versions (v0.2.0/v0.4.1, v0.1. and v0.1.5) to :latest across E2E tests and unit test fixtures.

Updated expected test outputs to reflect behavioural changes in the latest image versions:

  • set-namespace no longer applies to non-namespaced resources
  • Both functions now emit structured result messages

Issues

Testing

  • Unit and E2E tests are passing

@netlify
Copy link
Copy Markdown

netlify Bot commented May 29, 2026

Deploy Preview for kptdocs ready!

Name Link
🔨 Latest commit 5de8204
🔍 Latest deploy log https://app.netlify.com/projects/kptdocs/deploys/6a1991f9acdb6200074f5e91
😎 Deploy Preview https://deploy-preview-4546--kptdocs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@aravindtga aravindtga self-assigned this May 29, 2026
Signed-off-by: Aravindhan Ayyanathan <aravindhan.a@est.tech>
@aravindtga aravindtga force-pushed the switch-e2e-tests-to-set-label-image-latest-tag branch from 8942069 to e41aa3e Compare May 29, 2026 07:14
@aravindtga aravindtga marked this pull request as ready for review May 29, 2026 07:30
Copilot AI review requested due to automatic review settings May 29, 2026 07:30
@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. area/fn-runtime KRM function runtime Testing labels May 29, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates test fixtures and expected outputs across the kpt e2e and unit tests to pin function references to the :latest tag of the krm-functions-catalog images (replacing pinned versions like v0.1.5, v0.2.0, and v0.4.1), and refreshes the corresponding expected diff/config outputs to match the new function behavior.

Changes:

  • Replace pinned set-namespace/set-labels image tags with :latest in Kptfiles and test scripts under e2e/testdata/fn-render, e2e/testdata/fn-eval, and pkg/lib/kptops.
  • Regenerate .expected/diff.patch, .expected/config.yaml, and .expected/results.yaml outputs to reflect new function output (e.g., added results blocks, removed namespace mutations on Kptfile metadata, removed spec.template block in Deployments).
  • Update copyright header ranges from 2021/2022 to 2021-2026/2022-2026 in updated expected files.

Reviewed changes

Copilot reviewed 266 out of 266 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pkg/lib/kptops/helpers_test.go, fs_test.go Update test runtime image keys/Kptfile fixtures to :latest.
e2e/testdata/fn-render/**/Kptfile Switch pipeline mutator/validator images to :latest.
e2e/testdata/fn-render/**/.expected/diff.patch Regenerate diffs to match new function outputs (no namespace on Kptfile/Custom, removed Deployment template labels).
e2e/testdata/fn-render/**/.expected/config.yaml Update expected stderr to include [Results] lines and renew copyright.
e2e/testdata/fn-eval/**/Kptfile, .expected/* Same :latest rollover and expected-output regeneration for fn-eval suite.
e2e/testdata/fn-render/no-fnconfig/.expected/* Behavior change: set-labels now passes with info result FunctionConfig is not given instead of failing with a config error.
e2e/testdata/fn-eval/missing-fn-config/.expected/config.yaml Behavior change: missing fn config now exits 0 with an error severity result, instead of failing with exit code 1.
Comments suppressed due to low confidence (4)

e2e/testdata/fn-render/save-on-render-failure/no-save-on-render-failure/Kptfile:1

  • Pinning test fixtures to the :latest tag makes these tests non-reproducible: any upstream change to set-namespace/set-labels will silently alter test behavior and likely break CI without a corresponding code change in this repo. This is already visible in this PR, where regenerated .expected/diff.patch files show behavioral drift (e.g., Kptfile namespace no longer set, Deployment spec.template.metadata.labels no longer applied, set-labels no longer fails when fnConfig is missing). Consider pinning to a specific released version (or a digest) instead of :latest, and bumping it intentionally when desired. This applies to every Kptfile, exec.sh, and expected-output file changed in this PR.
    e2e/testdata/fn-render/no-fnconfig/.expected/diff.patch:1
  • The expected result records severity info for \\FunctionConfig\ is not given while exit code is 1 and stderr is function failure. This inconsistency (a non-zero exit treated effectively as an info message) suggests the test is encoding a regression in the upstream function rather than asserting intended behavior. Pin the image to a known-good version and assert an error-severity result so the test fails clearly if upstream re-introduces the regression.
    e2e/testdata/fn-render/out-of-place-stdout/.expected/config.yaml:1
  • These annotation values changed from double-quoted (\"0\", \"resources.yaml\") to single-quoted in the expected output. Since the values are strings either way, this is purely a serializer formatting change caused by switching to :latest. Test assertions that depend on quote style are brittle; consider normalizing quoting via actualStripLines / a comparator, or pinning the function version so the YAML emitter's behavior is stable. Same observation applies to out-of-place-fnchain-stdout/.expected/config.yaml.
    e2e/testdata/fn-render/subpkg-has-invalid-kptfile/db/Kptfile:1
  • This file is intentionally malformed (per the comment), but the PR still updates only the image tags. Confirm whether the malformed structure is still triggering the same parse error path the test expects; if the expected error message has changed because of upstream function behavior, the corresponding .expected/* should be updated too. Nothing in this diff updates a corresponding expected error file for this fixture, so verify the test still asserts the intended failure.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread e2e/testdata/fn-eval/missing-fn-config/.expected/config.yaml
@aravindtga aravindtga added size:XXL This PR changes 1000+ lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels May 29, 2026
Signed-off-by: Aravindhan Ayyanathan <aravindhan.a@est.tech>
@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. and removed size:XXL This PR changes 1000+ lines, ignoring generated files. labels May 29, 2026
@aravindtga aravindtga changed the title Use latest tag for set-labels and set-namespace in E2E tests Use latest tag for KRM functions in E2E tests May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/fn-runtime KRM function runtime size:XS This PR changes 0-9 lines, ignoring generated files. Testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants