Skip to content

chore: allow custom testing application and test repo#573

Open
odockal wants to merge 2 commits into
podman-desktop:mainfrom
odockal:issue-572
Open

chore: allow custom testing application and test repo#573
odockal wants to merge 2 commits into
podman-desktop:mainfrom
odockal:issue-572

Conversation

@odockal
Copy link
Copy Markdown
Contributor

@odockal odockal commented Jun 4, 2026

Fixes #572

@odockal odockal marked this pull request as ready for review June 4, 2026 14:50
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 4, 2026

Review Change Stack

Warning

Review limit reached

@odockal, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 56 minutes and 4 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5c7a49e2-bb01-4b45-9b41-cdcee890a9b3

📥 Commits

Reviewing files that changed from the base of the PR and between a7cc0b4 and 7c49d8a.

📒 Files selected for processing (8)
  • pde2e-image/Makefile
  • pde2e-image/README.md
  • pde2e-image/common/unix/common.sh
  • pde2e-image/common/windows/common.ps1
  • pde2e-image/lib/darwin/runner.sh
  • pde2e-image/lib/windows/runner.ps1
  • pde2e-image/tkn/task-rhel-display.yaml
  • pde2e-image/tkn/task.yaml
📝 Walkthrough

Walkthrough

This PR parameterizes the e2e container infrastructure to run tests from any repository against any podman-desktop-based application, supporting multiple git providers. It refactors shared utilities, runner scripts, and documentation to accept configurable repo, application name, and git-provider parameters instead of hardcoded Podman Desktop assumptions.

Changes

Application and repository parameterization

Layer / File(s) Summary
Common utilities for parameterized git and app handling
pde2e-image/common/unix/common.sh, pde2e-image/common/windows/common.ps1
Unix clone_checkout and Windows Clone-Checkout now accept optional local_git_provider_url/gitProviderUrl parameters (defaulting to GitHub). Windows utilities add generic Download-App helper and update environment variable setup to use configurable repo names.
macOS runner: configurable app/repo flow
pde2e-image/lib/darwin/runner.sh
Introduces configurable variables for repo, appName, and gitProviderUrl with CLI argument parsing and debug support. Replaces hardcoded Podman Desktop DMG handling with generic download_app() function and app-name-based installation logic. Updates process termination, repository checkout, and test execution to use parameters instead of fixed names.
Windows runner: configurable app/repo flow
pde2e-image/lib/windows/runner.ps1
Adds debug parameter and appNameSlugMap for flexible app-installation-path detection. Refactors Podman Desktop installation block to handle setup installers and direct binaries generically. Generalizes repository checkout and test preparation to work with any configured repo using fork/branch/gitProviderUrl parameters.

Version updates and documentation

Layer / File(s) Summary
Version bump across build and deployment artifacts
pde2e-image/Makefile, pde2e-image/tkn/task.yaml, pde2e-image/tkn/task-rhel-display.yaml
Makefile and Tekton task parameter defaults updated from 0.1.0 to 0.1.1, changing container image tags for all derived builds.
Documentation of parameterized runner usage
pde2e-image/README.md
Examples updated to use version 0.1.1 and document new macOS, RHEL, and Windows "without Podman" setup patterns and runner flags for custom repo and application parameters.

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main changes: parameterizing runners and scripts to support custom testing applications and repositories, moving away from hardcoded podman-desktop configurations.
Description check ✅ Passed The description references issue #572, which directly relates to the changes made to parameterize testing application and repository support.
Linked Issues check ✅ Passed The PR successfully implements all primary objectives from #572: parameterizes runners for custom repos/apps [darwin runner.sh, windows runner.ps1], supports git provider configuration [unix/common.sh, windows/common.ps1], handles different installers [darwin/runner.sh, windows/runner.ps1], and updates image versions consistently.
Out of Scope Changes check ✅ Passed All changes directly support the stated objective of parameterizing test runners for custom applications and repositories; version bumps (0.1.0→0.1.1) and README updates are in scope as they document and distribute the new functionality.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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


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
Copy Markdown

@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.

Actionable comments posted: 6

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
pde2e-image/README.md (1)

331-331: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Version inconsistency in Extension Testing Example.

This example still references v0.1.0 while all other examples in this file were updated to v0.1.1. This inconsistency could confuse users and cause them to pull an outdated image version.

🔧 Proposed fix
-  quay.io/odockal/pde2e-image:v0.1.0-darwin \
+  quay.io/odockal/pde2e-image:v0.1.1-darwin \
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pde2e-image/README.md` at line 331, Update the inconsistent image tag string
"quay.io/odockal/pde2e-image:v0.1.0-darwin" to the current version
"quay.io/odockal/pde2e-image:v0.1.1-darwin" so the Extension Testing Example
matches the other examples; locate the occurrence of the exact image reference
and replace the v0.1.0 tag with v0.1.1.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pde2e-image/common/unix/common.sh`:
- Around line 128-138: Quote all variable expansions and add error handling for
the directory change: use "$workingDir" in the cd and test expressions, quote
"$local_repo", "$local_git_provider_url" and "$local_fork" when building
repositoryURL, and check the exit status of cd (e.g., fail with an error log and
exit if cd "$workingDir" returns non-zero) so functions/variables like
workingDir, local_repo, local_git_provider_url, local_fork and repositoryURL are
used safely and cd failures are handled.

In `@pde2e-image/lib/darwin/runner.sh`:
- Around line 406-408: The script currently runs cd "$workingDir/$repo" after
clone_checkout without verifying success; if clone or checkout failed the script
continues in the wrong directory. After calling clone_checkout and before
proceeding, check that the target directory exists and that cd succeeds (e.g.,
test -d "$workingDir/$repo" and capture cd exit status), and if either check
fails call an error log and exit non‑zero; update the block around
clone_checkout, repo, workingDir and the cd command to perform these validations
and abort on failure.
- Around line 82-110: The if conditional uses an unquoted $debug which can lead
to word-splitting/globbing; in runner.sh update the check in the block starting
with if [ $debug == "1" ]; then to quote the variable and use a POSIX-safe
operator (e.g., if [ "$debug" = "1" ]; then) or switch to a bash test ([[
"$debug" == "1" ]]) so the debug variable is safely compared without
word-splitting.
- Around line 369-382: The script extracts version from pdUrl into the variable
version but doesn't validate it, so pdVolumePath search using "*${appName}
${version}*" can be malformed; modify runner.sh to check the extracted version
(variable version) immediately after the grep extraction (or use grep -q
beforehand), and if empty either (a) attempt a safe fallback find that searches
for volumes matching just "${appName}.app" or "${appName} *" explicitly, or (b)
fail fast with a clear error message referencing pdUrl and exit non‑zero; ensure
subsequent use of pdVolumePath and appName handles the chosen fallback/exit
path.

In `@pde2e-image/lib/windows/runner.ps1`:
- Around line 8-9: The parameter declaration for $resultsFolder in runner.ps1 is
marked Mandatory while also providing a default value "results"; remove the
contradiction by deleting the Mandatory attribute (or alternatively remove the
default if you intend it to be required). Update the
[Parameter(Mandatory,HelpMessage='Results folder')] line to
[Parameter(HelpMessage='Results folder')] (or drop the default assignment on
$resultsFolder) so the parameter metadata and the $resultsFolder default are
consistent.

In `@pde2e-image/README.md`:
- Line 177: The example URL in the README contains an embedded authentication
token (`?_auth_=1780583360_59f96afacf1215c49842f0911c8f0528`) which must be
removed; update the line containing the --pdUrl example so it uses a generic
placeholder (e.g.,
'https://access.cdn.redhat.com/<insert-your-download-url-here>' or similar) or
add a brief note directing users to obtain their own authenticated download URL
instead of embedding credentials directly in the example.

---

Outside diff comments:
In `@pde2e-image/README.md`:
- Line 331: Update the inconsistent image tag string
"quay.io/odockal/pde2e-image:v0.1.0-darwin" to the current version
"quay.io/odockal/pde2e-image:v0.1.1-darwin" so the Extension Testing Example
matches the other examples; locate the occurrence of the exact image reference
and replace the v0.1.0 tag with v0.1.1.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c880b343-24a1-4f8a-9c1f-6fa2d752e79e

📥 Commits

Reviewing files that changed from the base of the PR and between 77d4a1e and 51ef117.

📒 Files selected for processing (8)
  • pde2e-image/Makefile
  • pde2e-image/README.md
  • pde2e-image/common/unix/common.sh
  • pde2e-image/common/windows/common.ps1
  • pde2e-image/lib/darwin/runner.sh
  • pde2e-image/lib/windows/runner.ps1
  • pde2e-image/tkn/task-rhel-display.yaml
  • pde2e-image/tkn/task.yaml

Comment thread pde2e-image/common/unix/common.sh
Comment thread pde2e-image/lib/darwin/runner.sh Outdated
Comment thread pde2e-image/lib/darwin/runner.sh
Comment thread pde2e-image/lib/darwin/runner.sh Outdated
Comment thread pde2e-image/lib/windows/runner.ps1 Outdated
Comment thread pde2e-image/README.md Outdated
odockal and others added 2 commits June 4, 2026 18:22
Signed-off-by: Ondrej Dockal <odockal@redhat.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Ondrej Dockal <odockal@redhat.com>
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.

Allow to use any podman-desktop based application when running tests in the pde2e-image

2 participants