Skip to content

Conversation

@aufi
Copy link
Member

@aufi aufi commented Jul 31, 2025

Adding CLI tier0 tests job to the global CI workflows.

Summary by CodeRabbit

  • Tests

    • Added an optional CLI end-to-end test suite in CI that can be toggled on demand. Supports selecting the test repository reference/tag and runs alongside existing image checks.
  • Chores

    • Updated nightly failure Slack notification wording from “E2E API” to “E2E” for clearer reporting.

@coderabbitai
Copy link

coderabbitai bot commented Jul 31, 2025

Walkthrough

Adds a toggleable e2e CLI tests job to global CI workflows via new inputs, including a cli_tests_ref in the bundle workflow. The job conditionally runs after image checks, checks out the kantra-cli-tests repo at a dynamic ref, and executes its test-suite. Nightly Slack message label adjusted.

Changes

Cohort / File(s) Summary of changes
Global CI Bundle: CLI tests gating and job
.github/workflows/global-ci-bundle.yml
Added inputs: run_cli_tests (boolean) to workflow_call and workflow_dispatch; cli_tests_ref (string) to workflow_call. Introduced e2e-cli-tests job (needs: check-images; if: inputs.run_cli_tests) that checks out konveyor/kantra-cli-tests at dynamic ref and runs test-suite.yaml with placeholders (image , tag latest, tier TIER0). Includes placeholder step to extract image URI.
Global CI: CLI tests gating and job
.github/workflows/global-ci.yml
Added run_cli_tests input to workflow_call and workflow_dispatch. Added e2e-cli-tests job (gated by run_cli_tests) that checks out konveyor-ecosystem/kantra-cli-tests at dynamic ref and runs test-suite.yaml with tag and tier TIER0.
Nightly main: Slack label tweak
.github/workflows/nightly-main.yaml
Updated Slack failure payload test field from “E2E API” to “E2E”. No logic changes.

Sequence Diagram(s)

sequenceDiagram
  participant Trigger as Workflow Trigger
  participant CI as Global CI Workflow
  participant Check as check-images Job
  participant CLI as e2e-cli-tests Job
  participant Repo as kantra-cli-tests Repo
  participant Suite as test-suite.yaml

  Trigger->>CI: Dispatch / workflow_call (with run_cli_tests, tag, cli_tests_ref*)
  CI->>Check: Run image checks
  Check-->>CI: Completed
  alt inputs.run_cli_tests == true
    CI->>CLI: Start e2e-cli-tests
    CLI->>CLI: Extract Kantra image URI (placeholder)
    CLI->>Repo: Checkout at dynamic ref (main if tag==latest else tag/cli_tests_ref)
    CLI->>Suite: Invoke test-suite.yaml (image, tag, tier=TIER0)
  else
    CI-->>Trigger: Skip CLI tests
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

A whisk of ears, a tap-tap key,
New tests hop in, conditionally.
We fetch the suite, ref set just right,
TIER0 moons glow in the night.
Slack now chirps a shorter plea—
“E2E,” it squeaks with glee.
Thump-thump, shipped! 🐇✨

✨ Finishing Touches
🧪 Generate unit tests
  • 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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

aufi added a commit to aufi/kantra-cli-tests that referenced this pull request Aug 7, 2025
Updating tets-suite workflow to accept full URL of kantra image that
should be tested. This hsould allow use image built e.g. from bundle or
not-yet-released image to quay.io.

Required by konveyor/ci#106

Signed-off-by: Marek Aufart <[email protected]>
aufi added a commit to aufi/kantra-cli-tests that referenced this pull request Aug 7, 2025
Updating tets-suite workflow to accept full URL of kantra image that
should be tested. This hsould allow use image built e.g. from bundle or
not-yet-released image to quay.io.

Required by konveyor/ci#106

Signed-off-by: Marek Aufart <[email protected]>
@aufi aufi closed this Aug 11, 2025
@aufi aufi reopened this Aug 11, 2025
@aufi aufi marked this pull request as ready for review August 11, 2025 11:54
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.

Actionable comments posted: 0

🔭 Outside diff range comments (2)
.github/workflows/global-ci.yml (1)

469-484: Address invalid step-level workflow uses and other Actionlint errors

The following workflows still invoke a reusable workflow at the step level, which isn’t supported. You need to convert these to job-level uses (or a composite action) and also resolve the other Actionlint warnings:

• .github/workflows/global-ci.yml (around line 480)
• .github/workflows/global-ci-bundle.yml (around line 543)

Actionlint also reports:

  • Outdated actions: docker/setup-buildx-action@v2, actions/setup-go@v4 – bump to the latest supported minor/major versions.
  • Exceeded 10 inputs for workflow_dispatch in global-ci.yml – reduce to 10 or fewer.
  • Undefined properties in expressions (tag, test-tags) – align inputs in workflow_dispatch with expressions used in your jobs.

Minimal fix for each occurrence (example for global-ci.yml):

-  e2e-cli-tests:
-    if: ${{ inputs.run_cli_tests }}
-    runs-on: ubuntu-latest
-    steps:
-    - name: Checkout kantra-cli-tests repo...
-      uses: actions/checkout@v4
-      with:
-        repository: konveyor-ecosystem/kantra-cli-tests
-        ref: ${{ inputs.tag == 'latest' && 'main' || inputs.tag }}
-        path: kantra-cli-tests
-
-    - uses: ./kantra-cli-tests/.github/workflows/test-suite.yaml
-      with:
-        tag: ${{ inputs.tag }}
-        tier: TIER0
+  e2e-cli-tests:
+    if: ${{ inputs.run_cli_tests }}
+    uses: konveyor-ecosystem/kantra-cli-tests/.github/workflows/test-suite.yaml@main
+    with:
+      tag: ${{ inputs.tag }}
+      tier: TIER0

Apply the same change in global-ci-bundle.yml. If you need dynamic refs, either call the workflow at a fixed ref and handle branching inside it, or expose a composite action in kantra-cli-tests and invoke that after checkout.

.github/workflows/global-ci-bundle.yml (1)

528-548: e2e-cli-tests job still fails actionlint checks: missing run/uses, undefined input, invalid step-level workflow invocation

The e2e-cli-tests job in .github/workflows/global-ci-bundle.yml still contains the same errors:

  • Line 533: placeholder step has neither run nor uses
  • Line 540: references inputs.tag, which isn’t defined (should be inputs.cli_tests_ref)
  • Line 543: step-level uses: ./kantra-cli-tests/.github/workflows/test-suite.yaml – reusable workflows can only be invoked at the job level, not within steps

Proposed fix (replace entire job with a job-level reusable workflow call):

 e2e-cli-tests:
   needs: check-images
   if: ${{ inputs.run_cli_tests }}
-  runs-on: ubuntu-latest
-  steps:
-  - name: extract kantra image URI from bundle
-    # TODO HERE
-
-  - name: Checkout kantra-cli-tests repo to use dynamically on target (release) branch
-    uses: actions/checkout@v4
-    with:
-        repository: konveyor-ecosystem/kantra-cli-tests
-        ref: ${{ inputs.tag == 'latest' && 'main' || inputs.tag }}
-        path: kantra-cli-tests
-
-  - uses: ./kantra-cli-tests/.github/workflows/test-suite.yaml
-    with:
-      image: <TBD> # take from bundle and the full image url
-      tag: latest # take from bundle tag
-      tier: TIER0
+  uses: konveyor-ecosystem/kantra-cli-tests/.github/workflows/test-suite.yaml@main
+  with:
+    tag: ${{ inputs.cli_tests_ref == 'latest' && 'latest' || inputs.cli_tests_ref }}
+    tier: TIER0

If you need to extract the image URI dynamically and invoke a local composite action, switch to a composite action approach:

   runs-on: ubuntu-latest
   steps:
-  - name: extract kantra image URI from bundle
-    # TODO HERE
+  - name: Extract kantra image URI
+    run: |
+      # implement your bundle-parsing logic here, e.g.:
+      echo "KANTRA_IMAGE=$(bundle-tool get-kantra-image)" >> $GITHUB_ENV
+
     - name: Checkout kantra-cli-tests repo to use dynamically on target (release) branch
       uses: actions/checkout@v4
       with:
-        ref: ${{ inputs.tag == 'latest' && 'main' || inputs.tag }}
+        ref: ${{ inputs.cli_tests_ref == 'latest' && 'main' || inputs.cli_tests_ref }}
         path: kantra-cli-tests
 
-  - uses: ./kantra-cli-tests/.github/workflows/test-suite.yaml
+  - uses: ./kantra-cli-tests/.github/actions/test-suite
     with:
-      image: <TBD>
-      tag: latest
+      image: ${{ env.KANTRA_IMAGE }}
+      tag: ${{ inputs.cli_tests_ref == 'latest' && 'latest' || inputs.cli_tests_ref }}
       tier: TIER0

These changes will:

  • Remove the empty step
  • Replace inputs.tag with inputs.cli_tests_ref
  • Eliminate the invalid step-level workflow invocation
🧹 Nitpick comments (2)
.github/workflows/nightly-main.yaml (1)

29-31: Slack label changed to “E2E” — confirm intent

Semantics look fine; just ensure consumers of the Slack message expect the new label.

.github/workflows/global-ci-bundle.yml (1)

114-121: Input cli_tests_ref — LGTM, but consider defaulting to “main”

Defaulting to latest and mapping it to a branch later is okay. Alternatively, default “main” to reduce indirection.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 364fa2a and 4beb3a2.

📒 Files selected for processing (3)
  • .github/workflows/global-ci-bundle.yml (4 hunks)
  • .github/workflows/global-ci.yml (3 hunks)
  • .github/workflows/nightly-main.yaml (1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/global-ci-bundle.yml

533-533: step must run script with "run" section or run action with "uses" section

(syntax-check)


540-540: property "tag" is not defined in object type {addon_analyzer: string; addon_discovery: string; api_hub_tests_ref: string; api_tests_ref: string; api_tests_tiers: string; artifact: string; cli_tests_ref: string; keycloak_init: string; keycloak_sso: string; namespace: string; oauth_proxy: string; operator_bundle: string; run_api_tests: bool; run_cli_tests: bool; run_ui_tests: bool; tackle_cr: string; tackle_hub: string; tackle_postgres: string; tackle_ui: string; ui_test_tags: string; ui_tests_ref: string}

(expression)


540-540: property "tag" is not defined in object type {addon_analyzer: string; addon_discovery: string; api_hub_tests_ref: string; api_tests_ref: string; api_tests_tiers: string; artifact: string; cli_tests_ref: string; keycloak_init: string; keycloak_sso: string; namespace: string; oauth_proxy: string; operator_bundle: string; run_api_tests: bool; run_cli_tests: bool; run_ui_tests: bool; tackle_cr: string; tackle_hub: string; tackle_postgres: string; tackle_ui: string; ui_test_tags: string; ui_tests_ref: string}

(expression)

🔇 Additional comments (4)
.github/workflows/global-ci.yml (2)

40-45: Input run_cli_tests (workflow_call) — LGTM

Boolean toggle with sensible default. No issues.


128-133: Input run_cli_tests (workflow_dispatch) — LGTM

Consistent with workflow_call. No issues.

.github/workflows/global-ci-bundle.yml (2)

82-87: Input run_cli_tests — LGTM

Toggle looks consistent with other test toggles.


175-180: Input run_cli_tests (workflow_dispatch) — LGTM

Consistent with workflow_call.

aufi added a commit to aufi/kantra-cli-tests that referenced this pull request Oct 2, 2025
Updating tets-suite workflow to accept full URL of kantra image that
should be tested. This hsould allow use image built e.g. from bundle or
not-yet-released image to quay.io.

Required by konveyor/ci#106

Signed-off-by: Marek Aufart <[email protected]>
aufi added a commit to konveyor/kantra-cli-tests that referenced this pull request Oct 2, 2025
Updating tets-suite workflow to accept full URL of kantra image that
should be tested. This hsould allow use image built e.g. from bundle or
not-yet-released image to quay.io.

Required by konveyor/ci#106

Signed-off-by: Marek Aufart <[email protected]>
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.

1 participant