-
Notifications
You must be signed in to change notification settings - Fork 13
Adding kind in place of minikube #147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
* The networking in minikube seems to be causing me problems locally I can only assume this is happening in CI Signed-off-by: Shawn Hurley <[email protected]>
WalkthroughThis PR introduces a new GitHub Actions workflow for Konveyor that orchestrates end-to-end API and UI integration tests. The workflow accepts configurable inputs for operator tags, component images, and test references, provisions a Kubernetes environment (kind cluster or Minikube), installs the tackle2 operator, and executes tests with conditional logic supporting multiple operator versions. Changes
Sequence Diagram(s)sequenceDiagram
participant Trigger as Workflow<br/>(Input Parameters)
participant API as e2e-api-<br/>integration-tests
participant UI as e2e-ui-<br/>integration-tests
participant Env as Environment<br/>(kind/Minikube)
participant Operator as Tackle2<br/>Operator
participant Tests as Tests<br/>(Go/Cypress)
Trigger->>API: Extract PR ref from description
Trigger->>UI: Extract PR ref from description
API->>Env: Setup kind cluster
UI->>Env: Setup Minikube
Note over Env: Conditional based on operator_tag<br/>(v0.7 / v0.8 / latest)
API->>Operator: Install operator version
UI->>Operator: Install operator + Java provider
API->>Tests: Run Go API tests (tiers)
UI->>Tests: Run Cypress UI tests
Tests-->>Trigger: Generate test summaries & artifacts
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 9
🧹 Nitpick comments (1)
.github/workflows/kind-global-ci.yml (1)
315-315: Simplify pull request extraction regex patterns.Lines 182 and 315 use case-insensitive character classes
[A|a],[P|p], etc., which are unnecessary and harder to read. Use theiflag for case-insensitive matching instead:- PULL_REQUEST_NUMBER=$(echo ${body} | grep -oP '[A|a][P|p][I|i] [T|t]ests [P|p][R|r]:\s*\K\d+' || true) + PULL_REQUEST_NUMBER=$(echo ${body} | grep -oiP 'api tests pr:\s*\K\d+' || true)Similarly for the UI extraction on line 315.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/kind-global-ci.yml(1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.8)
.github/workflows/kind-global-ci.yml
266-266: the runner of "actions/setup-go@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
333-333: the runner of "docker/setup-buildx-action@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
459-459: property "test-tags" is not defined in object type {api_hub_tests_ref: string; api_tests_ref: string; api_tests_tiers: string; component_name: string; operator_tag: string; run_api_tests: bool; run_ui_tests: bool; tag: string; ui_test_tags: string; ui_tests_ref: string}
(expression)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Verify api and ui tests run via
global-ci-bundle.ymlwith default input / e2e-api-integration-tests - GitHub Check: Verify api and ui tests run via
global-ci-bundle.ymlwith default input / e2e-ui-integration-tests - GitHub Check: Verify api and ui tests run via
global-ci.ymlwith default inputs / e2e-api-integration-tests - GitHub Check: Verify api and ui tests run via
global-ci.ymlwith default inputs / e2e-ui-integration-tests
🔇 Additional comments (2)
.github/workflows/kind-global-ci.yml (2)
296-297: Clarify scope mismatch: UI tests still use Minikube, not kind.The PR objective states "Adding kind in place of minikube," but the e2e-ui-integration-tests job still uses Minikube (line 336–352) rather than kind. Is this intentional (e.g., UI tests require Minikube-specific features), or should UI tests migrate to kind as well?
Please clarify whether UI tests should also migrate to kind or if using Minikube is a deliberate choice. This affects the broader validation of the PR's goal.
349-349: Fix nonsensical string matching for latest operator tag.Line 349 checks
startsWith(inputs.operator_tag, 'latest'), which will never be true for the string"latest". Compare line 255, which correctly uses equality:inputs.operator_tag == 'latest'.- if: "${{ startsWith(inputs.operator_tag, 'latest') }}" + if: "${{ inputs.operator_tag == 'latest' }}"Likely an incorrect or invalid review comment.
| - uses: actions/setup-go@v4 | ||
| with: | ||
| go-version: 1.21 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Update outdated GitHub Actions.
Line 266: actions/setup-go@v4 is outdated per static analysis. Update to v5 or the latest stable version.
🌐 Web query:
What is the latest version of actions/setup-go?
💡 Result:
The latest version is actions/setup-go v6.0.0 (current as of Oct 31, 2025). [1][2]
Sources:
[1] actions/setup-go releases on GitHub.
[2] actions/setup-go package page (latest: 6.0.0).
Update actions/setup-go to the latest version.
Line 266: actions/setup-go@v4 should be updated to v6.0.0, the latest stable version.
- uses: actions/setup-go@v6
with:
go-version: 1.21
🧰 Tools
🪛 actionlint (1.7.8)
266-266: the runner of "actions/setup-go@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🤖 Prompt for AI Agents
In .github/workflows/kind-global-ci.yml around lines 266 to 268, the workflow
uses actions/setup-go@v4 which should be updated to the latest stable v6
release; change the action reference to actions/setup-go@v6 (or
actions/[email protected]) so the workflow uses the current major version while
keeping the existing go-version: 1.21 configuration.
|
|
||
| - name: Build and run golang API tests | ||
| run: | | ||
| export HUB_BASE_URL="http://$(minikube ip)/hub" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix hardcoded minikube IP command in kind-based API test job.
Line 277 exports HUB_BASE_URL using minikube ip, but the e2e-api-integration-tests job runs on a kind cluster (line 201), not Minikube. This will fail at runtime. Use kind-appropriate commands to retrieve the cluster IP or service endpoint.
For kind clusters, retrieve the control plane IP using:
export HUB_BASE_URL="http://$(kubectl get node -o jsonpath='{.items[0].status.addresses[?(@.type=="InternalIP")].address}'):8080/hub"Alternatively, if the Hub service is exposed via a LoadBalancer or port-forward, adjust accordingly.
🤖 Prompt for AI Agents
.github/workflows/kind-global-ci.yml around line 277: the workflow exports
HUB_BASE_URL using minikube ip which is wrong for the kind-based
e2e-api-integration-tests job; replace the minikube-specific command with a
kind-appropriate approach — obtain the control-plane node internal IP via
kubectl (jsonpath to
.items[0].status.addresses[?(@.type=="InternalIP")].address) and build the URL
with the Hub port and /hub path, or alternatively set HUB_BASE_URL to the
service endpoint if the Hub is exposed via LoadBalancer or use kubectl
port-forward to expose the Hub and point HUB_BASE_URL to the forwarded localhost
URL.
| # TODO Should DRY this | ||
| - name: set up docker buildx | ||
| if: "${{ inputs.component_name != '' }}" | ||
| uses: docker/setup-buildx-action@v2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Update outdated GitHub Actions.
Line 333: docker/setup-buildx-action@v2 is outdated per static analysis. Update to v3 or the latest stable version.
🌐 Web query:
What is the latest version of docker/setup-buildx-action?
💡 Result:
The latest release is docker/setup-buildx-action v3.11.1 (released June 18, 2025). [1][2]
Sources:
[1] GitHub releases — docker/setup-buildx-action.
[2] GitHub repo README / Marketplace entry for docker/setup-buildx-action.
🏁 Script executed:
#!/bin/bash
# Check the actual version of docker/setup-buildx-action in the workflow file
sed -n '330,336p' .github/workflows/kind-global-ci.ymlLength of output: 269
Update outdated GitHub Actions.
Line 333: docker/setup-buildx-action@v2 is outdated. Update to v3 or the latest stable version (v3.11.1, released June 18, 2025).
🧰 Tools
🪛 actionlint (1.7.8)
333-333: the runner of "docker/setup-buildx-action@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🤖 Prompt for AI Agents
In .github/workflows/kind-global-ci.yml around line 333, the workflow references
docker/setup-buildx-action@v2 which is outdated; update the action reference to
the latest stable version (for example docker/setup-buildx-action@v3 or
docker/[email protected]). Edit the workflow line to replace the v2
tag with the chosen v3 tag, run a quick workflow syntax/lint check, and push the
change so CI uses the updated action.
| - name: start minikube | ||
| uses: konveyor/tackle2-operator/.github/actions/[email protected] | ||
| if: "${{ startsWith(inputs.operator_tag, 'v0.7') }}" | ||
| with: | ||
| memory: 'max' | ||
| cpus: 'max' | ||
| - name: start minikube | ||
| uses: konveyor/tackle2-operator/.github/actions/[email protected] | ||
| if: "${{ startsWith(inputs.operator_tag, 'v0.8') }}" | ||
| with: | ||
| memory: 'max' | ||
| cpus: 'max' | ||
| - name: start minikube | ||
| uses: konveyor/tackle2-operator/.github/actions/start-minikube@main | ||
| if: "${{ startsWith(inputs.operator_tag, 'latest') }}" | ||
| with: | ||
| memory: 'max' | ||
| cpus: 'max' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion | 🟠 Major
Extract repeated Minikube startup logic into a reusable action or step.
Lines 335–352 contain three nearly identical start-minikube steps conditioned on operator version (v0.7, v0.8, latest). This violates DRY and increases maintenance risk. Use a matrix strategy, a composite action, or a single conditional with version-parameterized inputs.
🤖 Prompt for AI Agents
.github/workflows/kind-global-ci.yml around lines 335 to 352: the three
start-minikube steps are duplicated with only the action ref and if-condition
differing; replace them with a single reusable approach—either use a matrix over
the three operator_tag cases, create a small composite action that accepts the
operator tag and delegates to the appropriate ref, or consolidate into one step
that computes the correct action ref from inputs.operator_tag and passes memory
and cpus once—ensure the chosen solution preserves the conditional behavior for
v0.7, v0.8 and latest and keeps memory:'max' and cpus:'max'.
| - name: install konveyor | ||
| uses: konveyor/tackle2-operator/.github/actions/[email protected] | ||
| if: "${{ startsWith(inputs.operator_tag, 'v0.7') }}" | ||
| with: | ||
| operator-bundle-image: "quay.io/konveyor/tackle2-operator-bundle:${{ inputs.operator_tag }}" | ||
| hub-image: "quay.io/konveyor/tackle2-hub:${{ inputs.tag }}" | ||
| ui-image: "quay.io/konveyor/tackle2-ui:${{ inputs.tag }}" | ||
| addon-analyzer-image: "quay.io/konveyor/tackle2-addon-analyzer:${{ inputs.tag }}" | ||
| java-provider-image: "quay.io/konveyor/java-external-provider:${{ inputs.tag }}" | ||
| image-pull-policy: IfNotPresent | ||
| analyzer-container-memory: 0 | ||
| analyzer-container-cpu: 0 | ||
| - name: install konveyor | ||
| uses: konveyor/tackle2-operator/.github/actions/[email protected] | ||
| if: "${{ startsWith(inputs.operator_tag, 'v0.8') }}" | ||
| with: | ||
| operator-bundle-image: "quay.io/konveyor/tackle2-operator-bundle:${{ inputs.operator_tag }}" | ||
| hub-image: "quay.io/konveyor/tackle2-hub:${{ inputs.tag }}" | ||
| ui-image: "quay.io/konveyor/tackle2-ui:${{ inputs.tag }}" | ||
| addon-analyzer-image: "quay.io/konveyor/tackle2-addon-analyzer:${{ inputs.tag }}" | ||
| java-provider-image: "quay.io/konveyor/java-external-provider:${{ inputs.tag }}" | ||
| image-pull-policy: IfNotPresent | ||
| analyzer-container-memory: 0 | ||
| analyzer-container-cpu: 0 | ||
| - name: install konveyor | ||
| uses: konveyor/tackle2-operator/.github/actions/install-tackle@main | ||
| if: "${{ inputs.operator_tag == 'latest'}}" | ||
| with: | ||
| operator-bundle-image: "quay.io/konveyor/tackle2-operator-bundle:${{ inputs.operator_tag }}" | ||
| hub-image: "quay.io/konveyor/tackle2-hub:${{ inputs.tag }}" | ||
| ui-image: "quay.io/konveyor/tackle2-ui:${{ inputs.tag }}" | ||
| addon-analyzer-image: "quay.io/konveyor/tackle2-addon-analyzer:${{ inputs.tag }}" | ||
| java-provider-image: "quay.io/konveyor/java-external-provider:${{ inputs.tag }}" | ||
| image-pull-policy: IfNotPresent | ||
| analyzer-container-memory: 0 | ||
| analyzer-container-cpu: 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion | 🟠 Major
Extract repeated operator installation logic into a reusable action or step.
Lines 375–410 contain three nearly identical install-tackle steps conditioned on operator version, mirroring the duplication in lines 232–263. Consolidate using the same refactoring strategy applied to the API tests job.
🤖 Prompt for AI Agents
.github/workflows/kind-global-ci.yml lines 375-410: three nearly identical
"install konveyor" steps conditional on operator_tag should be consolidated;
extract the common inputs into a single reusable step (either a composite action
in .github/actions or a workflow-level reusable job/step) and drive the operator
ref via a parameter or a conditional expression (use a single uses:
konveyor/tackle2-operator/.github/actions/install-tackle@<ref> where <ref> is
computed from inputs.operator_tag or pass operator ref as an input), then
replace the three blocks with one step that supplies operator-bundle-image,
hub-image, ui-image, addon-analyzer-image, java-provider-image,
image-pull-policy, analyzer-container-memory and analyzer-container-cpu from
variables/inputs to avoid duplication.
| uses: actions/upload-artifact@v4 | ||
| if: always() | ||
| with: | ||
| name: tackle-ui-test-reports-${{ inputs.test-tags }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix undefined input property reference.
Line 459 references inputs.test-tags, but the input is named ui_test_tags (line 78). This will cause a runtime error.
- name: tackle-ui-test-reports-${{ inputs.test-tags }}
+ name: tackle-ui-test-reports-${{ inputs.ui_test_tags }}🧰 Tools
🪛 actionlint (1.7.8)
459-459: property "test-tags" is not defined in object type {api_hub_tests_ref: string; api_tests_ref: string; api_tests_tiers: string; component_name: string; operator_tag: string; run_api_tests: bool; run_ui_tests: bool; tag: string; ui_test_tags: string; ui_tests_ref: string}
(expression)
🤖 Prompt for AI Agents
In .github/workflows/kind-global-ci.yml around line 459, the step name uses an
undefined input reference `inputs.test-tags`; replace it with the correct input
`inputs.ui_test_tags` to match the input declared at line 78 so the workflow
resolves the value at runtime (update any other occurrences of
`inputs.test-tags` in this file to `inputs.ui_test_tags` as well).
Summary by CodeRabbit