Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 17 additions & 7 deletions .github/workflows/global-ci-bundle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -465,21 +465,23 @@ jobs:
bundle_image: ${{ inputs.operator_bundle == '' && env.operator_bundle || inputs.operator_bundle }}
namespace: ${{ inputs.namespace }}
tackle_cr: ${{ inputs.tackle_cr }}
# end DRY

- name: Wait for Ingress and expose UI service
id: ui-url
run: |
kubectl wait \
kubectl wait
-n konveyor-tackle \
ingress/tackle \
--timeout=600s \
--for=jsonpath='{.status.loadBalancer.ingress[0].ip}'

ingress_ip=$(kubectl get ingress/tackle -n konveyor-tackle -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo "ingress is ready at: ${ingress_ip}"
echo "UI_URL=https://${ingress_ip}" >>$GITHUB_ENV
# end DRY
echo "ui_url=https://${ingress_ip}" >>"$GITHUB_OUTPUT"

- name: Extract pull request number from inputs or PR description
id: ui-tests-ref
shell: bash
env:
body: ${{ github.event.pull_request.body }}
Expand All @@ -489,12 +491,20 @@ jobs:
&& UI_TESTS_REF=${{ inputs.ui_tests_ref }} \
|| UI_TESTS_REF=refs/pull/$PULL_REQUEST_NUMBER/merge

echo "UI_TESTS_REF=${UI_TESTS_REF}" >>"$GITHUB_ENV"
echo "ref=${UI_TESTS_REF}" >>"$GITHUB_OUTPUT"
echo "Using UI_TESTS_REF \`${UI_TESTS_REF}\`" >>"$GITHUB_STEP_SUMMARY"

- name: "Checkout run-ui-tests action (ref: ${{ inputs.ui_tests_ref }})"
uses: actions/checkout@v4
with:
repository: konveyor/tackle2-ui
path: tackle2-ui
ref: ${{ inputs.ui_tests_ref }}
sparse-checkout: .github/actions/run-ui-tests
Comment on lines +497 to +503

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Critical: Checkout ref should use extracted PR reference, not default input.

The checkout step at line 502 uses ${{ inputs.ui_tests_ref }} (which defaults to "main"), but the extraction step immediately prior extracts a potentially different ref from the PR description (for testing modifications to the run-ui-tests action itself). This defeats the purpose of the extraction—the locally checked-out action will always be at the default ref, not the PR-specific changes.

Apply this diff:

       - name: "Checkout run-ui-tests action (ref: ${{ inputs.ui_tests_ref }})"
         uses: actions/checkout@v4
         with:
           repository: konveyor/tackle2-ui
           path: tackle2-ui
-          ref: ${{ inputs.ui_tests_ref }}
+          ref: ${{ steps.ui-tests-ref.outputs.ref }}
           sparse-checkout: .github/actions/run-ui-tests
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: "Checkout run-ui-tests action (ref: ${{ inputs.ui_tests_ref }})"
uses: actions/checkout@v4
with:
repository: konveyor/tackle2-ui
path: tackle2-ui
ref: ${{ inputs.ui_tests_ref }}
sparse-checkout: .github/actions/run-ui-tests
- name: "Checkout run-ui-tests action (ref: ${{ inputs.ui_tests_ref }})"
uses: actions/checkout@v4
with:
repository: konveyor/tackle2-ui
path: tackle2-ui
ref: ${{ steps.ui-tests-ref.outputs.ref }}
sparse-checkout: .github/actions/run-ui-tests
🤖 Prompt for AI Agents
.github/workflows/global-ci-bundle.yml lines 497-503: the checkout step
currently uses the static input `${{ inputs.ui_tests_ref }}` instead of the ref
extracted from the PR earlier; change the `ref` to use the output produced by
the extraction step (for example
`steps.<extract-step-id>.outputs.<output-name>`) so the locally checked-out
konveyor/tackle2-ui uses the PR-specific ref, and add a fallback to `${{
inputs.ui_tests_ref }}` if the extraction output is empty.


- name: Run UI tests
uses: konveyor/tackle2-ui/.github/actions/run-ui-tests@main
uses: ./tackle2-ui/.github/actions/run-ui-tests
with:
test_tags: ${{ inputs.ui_test_tags }}
tests_ref: ${{ env.UI_TESTS_REF }}
base_url: ${{ env.UI_URL }}
tests_ref: ${{ steps.ui-tests-ref.outputs.ref }}
base_url: ${{ steps.ui-url.outputs.ui_url }}
22 changes: 16 additions & 6 deletions .github/workflows/global-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,10 @@ jobs:
image-pull-policy: IfNotPresent
analyzer-container-memory: 0
analyzer-container-cpu: 0
# end DRY

- name: Wait for Ingress and expose UI service
id: ui-url
run: |
kubectl wait \
-n konveyor-tackle \
Expand All @@ -412,10 +414,10 @@ jobs:

ingress_ip=$(kubectl get ingress/tackle -n konveyor-tackle -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo "ingress is ready at: ${ingress_ip}"
echo "UI_URL=https://${ingress_ip}" >>$GITHUB_ENV
# end DRY
echo "ui_url=https://${ingress_ip}" >>"$GITHUB_OUTPUT"

- name: Extract pull request number from inputs or PR description
id: ui-tests-ref
shell: bash
env:
body: ${{ github.event.pull_request.body }}
Expand All @@ -425,12 +427,20 @@ jobs:
&& UI_TESTS_REF=${{ inputs.ui_tests_ref }} \
|| UI_TESTS_REF=refs/pull/$PULL_REQUEST_NUMBER/merge

echo "UI_TESTS_REF=${UI_TESTS_REF}" >>"$GITHUB_ENV"
echo "ref=${UI_TESTS_REF}" >>"$GITHUB_OUTPUT"
echo "Using UI_TESTS_REF \`${UI_TESTS_REF}\`" >>"$GITHUB_STEP_SUMMARY"

- name: "Checkout run-ui-tests action (ref: ${{ inputs.ui_tests_ref }})"
uses: actions/checkout@v4
with:
repository: konveyor/tackle2-ui
path: tackle2-ui
ref: ${{ inputs.ui_tests_ref }}
sparse-checkout: .github/actions/run-ui-tests
Comment on lines +433 to +439

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

cd /tmp && find . -name "global-ci.yml" -o -name "*.yml" 2>/dev/null | head -20

Repository: konveyor/ci

Length of output: 37


🏁 Script executed:

find . -path "*/.github/workflows/global-ci.yml" 2>/dev/null

Repository: konveyor/ci

Length of output: 88


🏁 Script executed:

ls -la .github/workflows/ 2>/dev/null | head -20

Repository: konveyor/ci

Length of output: 660


🏁 Script executed:

cat .github/workflows/global-ci.yml | head -100

Repository: konveyor/ci

Length of output: 4149


🏁 Script executed:

sed -n '400,450p' .github/workflows/global-ci.yml

Repository: konveyor/ci

Length of output: 1950


🏁 Script executed:

sed -n '1,100p' .github/workflows/global-ci.yml | grep -A 20 "ui_tests_ref"

Repository: konveyor/ci

Length of output: 1079


🏁 Script executed:

# Let's verify what tackle2-ui repository contains to understand the context better
git log --oneline -1 2>/dev/null || echo "Not a git repo, checking workflow structure"

Repository: konveyor/ci

Length of output: 129


🏁 Script executed:

sed -n '419,431p' .github/workflows/global-ci.yml

Repository: konveyor/ci

Length of output: 661


Use extracted UI tests ref for tackle2-ui checkout instead of ui_tests_ref input.

Line 438 uses ${{ inputs.ui_tests_ref }} for the tackle2-ui checkout ref, but the extraction step (lines 419-431) parses the PR description to extract an overridden ref and outputs it to steps.ui-tests-ref.outputs.ref. The checkout ignores this extracted output and uses the input directly, preventing the PR override mechanism from working. When a PR description specifies "UI tests PR: 123", the extraction correctly identifies it, but the tackle2-ui checkout still uses the default input value instead of the extracted ref.

Update line 438 to use the extracted ref:

  - name: "Checkout run-ui-tests action (ref: ${{ inputs.ui_tests_ref }})"
    uses: actions/checkout@v4
    with:
      repository: konveyor/tackle2-ui
      path: tackle2-ui
-     ref: ${{ inputs.ui_tests_ref }}
+     ref: ${{ steps.ui-tests-ref.outputs.ref }}
      sparse-checkout: .github/actions/run-ui-tests

Also update the step name to remove the now-inaccurate hardcoded input reference:

- name: "Checkout run-ui-tests action (ref: ${{ inputs.ui_tests_ref }})"
+ name: "Checkout run-ui-tests action"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: "Checkout run-ui-tests action (ref: ${{ inputs.ui_tests_ref }})"
uses: actions/checkout@v4
with:
repository: konveyor/tackle2-ui
path: tackle2-ui
ref: ${{ inputs.ui_tests_ref }}
sparse-checkout: .github/actions/run-ui-tests
- name: "Checkout run-ui-tests action"
uses: actions/checkout@v4
with:
repository: konveyor/tackle2-ui
path: tackle2-ui
ref: ${{ steps.ui-tests-ref.outputs.ref }}
sparse-checkout: .github/actions/run-ui-tests
🤖 Prompt for AI Agents
.github/workflows/global-ci.yml around lines 433 to 439: the checkout step for
konveyor/tackle2-ui currently uses the hardcoded input `${{ inputs.ui_tests_ref
}}` and a name that references that input; replace the ref with the extracted
output `steps.ui-tests-ref.outputs.ref` so the PR override works (i.e. set ref
to `steps.ui-tests-ref.outputs.ref`), and update the step name to remove the
hardcoded "ref: ${{ inputs.ui_tests_ref }}" wording so it accurately reflects
that it’s using the extracted UI tests ref.


- name: Run UI tests
uses: konveyor/tackle2-ui/.github/actions/run-ui-tests@main
uses: ./tackle2-ui/.github/actions/run-ui-tests
with:
test_tags: ${{ inputs.ui_test_tags }}
tests_ref: ${{ env.UI_TESTS_REF }}
base_url: ${{ env.UI_URL }}
tests_ref: ${{ steps.ui-tests-ref.outputs.ref }}
base_url: ${{ steps.ui-url.outputs.ui_url }}
Loading