Skip to content

Comments

🐛 Update the testing so that addon-analyzer is built correctly#1109

Merged
shawn-hurley merged 1 commit intokonveyor:mainfrom
shawn-hurley:update-addon-image-with-correct-analyzer
Feb 18, 2026
Merged

🐛 Update the testing so that addon-analyzer is built correctly#1109
shawn-hurley merged 1 commit intokonveyor:mainfrom
shawn-hurley:update-addon-image-with-correct-analyzer

Conversation

@shawn-hurley
Copy link
Contributor

@shawn-hurley shawn-hurley commented Feb 18, 2026

Currently, the addon image is built from the latest on all workflows; it should be built from the image under test.

Summary by CodeRabbit

  • Chores
    • Updated build workflow configuration for image handling.

…image that is under test

Signed-off-by: Shawn Hurley <shawn@hurley.page>
@coderabbitai
Copy link

coderabbitai bot commented Feb 18, 2026

📝 Walkthrough

Walkthrough

The demo-testing workflow is modified to replace the Dockerfile base image reference during the build step, changing it from a remote public registry image to a locally-tagged image generated from the current build's image tag.

Changes

Cohort / File(s) Summary
Workflow Build Configuration
.github/workflows/demo-testing.yml
Adds sed command to update Dockerfile base image FROM instruction to use locally-tagged image variant instead of remote registry image.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 Sed whispers softly through the flow,
Replace the image, watch it grow!
From distant quay to localhost home,
No more to docker's far clouds roam,
The build hops faster, swift and fleet,
A local victory, quite sweet!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title references a bug fix for addon-analyzer building, which directly aligns with the PR objective of ensuring the addon image is built from the analyzer-lsp image under test rather than the latest image.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
.github/workflows/demo-testing.yml (1)

331-332: The sed pattern will successfully match the actual FROM line; consider adding explicit verification for robustness

The tackle2-addon-analyzer Dockerfile contains exactly FROM quay.io/konveyor/analyzer-lsp:latest on line 6, so the sed substitution will succeed. The pattern is correct.

However, two minor improvements:

  1. The \. in the regex pattern is unnecessary; . in quay.io and konveyor are unescaped and match any character rather than a literal dot (though unlikely to cause issues in practice).
  2. The \: escape is redundant; : doesn't require escaping in sed.

While the substitution will work with the external repository as currently configured, adding an explicit check that the replacement occurred (e.g., grep -q "FROM localhost/konveyor-analyzer-lsp:...") would prevent silent failures if the Dockerfile is updated in the future to use a different tag, digest, or build-stage alias.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/demo-testing.yml around lines 331 - 332, The sed
replacement using the command that targets the Dockerfile (the line with FROM
quay.io/konveyor/analyzer-lsp:latest) should be followed by an explicit
verification step to ensure the substitution actually occurred; after running
the sed command that edits Dockerfile, run a check (e.g., grep -q for the
expected "FROM localhost/konveyor-analyzer-lsp:${{
needs.detect-changes.outputs.image_tag }}" string) and fail the job if the grep
does not find the replacement, so the subsequent IMG=... make image-podman
invocation does not proceed on a silent no-op; keep the existing sed target but
add the verification and non-zero exit on failure.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.github/workflows/demo-testing.yml:
- Around line 331-332: The sed replacement using the command that targets the
Dockerfile (the line with FROM quay.io/konveyor/analyzer-lsp:latest) should be
followed by an explicit verification step to ensure the substitution actually
occurred; after running the sed command that edits Dockerfile, run a check
(e.g., grep -q for the expected "FROM localhost/konveyor-analyzer-lsp:${{
needs.detect-changes.outputs.image_tag }}" string) and fail the job if the grep
does not find the replacement, so the subsequent IMG=... make image-podman
invocation does not proceed on a silent no-op; keep the existing sed target but
add the verification and non-zero exit on failure.

- name: Build addon and push images
working-directory: tackle2-addon-analyzer
run: |
sed -i "s,FROM quay.io/konveyor/analyzer-lsp\:latest,FROM localhost/konveyor-analyzer-lsp:${{ needs.detect-changes.outputs.image_tag }}," Dockerfile
Copy link
Contributor

Choose a reason for hiding this comment

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

I think using a build arg is probably the better way to do this but minor nit

Copy link
Contributor

Choose a reason for hiding this comment

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

LGTM if you want to just get it in

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree with you, I do have a action item for myself to have some org wide thing that will make this more standard to make the image build process's easier

@shawn-hurley shawn-hurley merged commit e0470a1 into konveyor:main Feb 18, 2026
29 checks passed
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.

3 participants