Skip to content

workflow: l4lb: pass correct path for PR checkout #20007

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

Merged
merged 1 commit into from
May 30, 2022
Merged

Conversation

jibi
Copy link
Member

@jibi jibi commented May 30, 2022

Passing ${{ github.workspace }}/pull-request to the init.sh script as
path of the PR checkout is incorrect, as inside the VM the repository
will be under a different path.

Instead of that, pass the correct absolute path for the PR checkout.

Moreover, checkout first the upstream repo (under cilium/cilium) and
only after that the PR one (under cilium/cilium/pull-request), as
otherwise the upstream checkout will nuke the directory with PR one.

Fixes: #19953

@jibi jibi added kind/bug/CI This is a bug in the testing code. release-note/ci This PR makes changes to the CI. labels May 30, 2022
@jibi jibi requested a review from nbusseneau May 30, 2022 11:28
@jibi jibi requested review from a team as code owners May 30, 2022 11:28
Copy link
Member

@nbusseneau nbusseneau left a comment

Choose a reason for hiding this comment

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

I would suggest we pass in the whole path (../../pull-request/install/kubernetes/cilium) as a proper HELM_CHART_DIR arg to the script, to help make the script and execution context independents, but this works as-is.

@jibi jibi force-pushed the pr/jibi/l4lb-helm-fix branch from c674a3b to f6bce0e Compare May 30, 2022 11:44
@jibi jibi requested review from a team and joamaki May 30, 2022 11:44
@jibi jibi force-pushed the pr/jibi/l4lb-helm-fix branch from f6bce0e to a80b93e Compare May 30, 2022 12:00
@jibi jibi marked this pull request as draft May 30, 2022 12:13
@jibi jibi force-pushed the pr/jibi/l4lb-helm-fix branch 6 times, most recently from 1337966 to 447291b Compare May 30, 2022 12:56
@jibi jibi marked this pull request as ready for review May 30, 2022 12:58
@jibi jibi requested a review from nbusseneau May 30, 2022 12:58
@jibi jibi force-pushed the pr/jibi/l4lb-helm-fix branch from 447291b to 74b9232 Compare May 30, 2022 13:00
@jibi
Copy link
Member Author

jibi commented May 30, 2022

CI is green: https://github.com/cilium/cilium/runs/6655411820?check_suite_focus=true

related changes:
v1.10: #20008
v1.11: #20009

Copy link
Member

@nbusseneau nbusseneau left a comment

Choose a reason for hiding this comment

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

LGTM, one nit.

@@ -4,7 +4,7 @@ set -eux

IMG_OWNER=${1:-cilium}
IMG_TAG=${2:-latest}
PULL_REQUEST_CHECKOUT=${3:-../..}
HELM_CHART_DIR=${3:-/vagrant/pull-request/install/kubernetes/cilium}
Copy link
Member

Choose a reason for hiding this comment

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

For backward compatibility:

Suggested change
HELM_CHART_DIR=${3:-/vagrant/pull-request/install/kubernetes/cilium}
HELM_CHART_DIR=${3:-/vagrant/install/kubernetes/cilium}

@@ -4,7 +4,7 @@ set -eux

IMG_OWNER=${1:-cilium}
IMG_TAG=${2:-latest}
PULL_REQUEST_CHECKOUT=${3:-../..}
HELM_CHART_DIR=${3:-/vagrant/pull-request/install/kubernetes/cilium}
Copy link
Member

Choose a reason for hiding this comment

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

Likewise.

@jibi jibi force-pushed the pr/jibi/l4lb-helm-fix branch from 74b9232 to ecaf703 Compare May 30, 2022 14:21
Passing ${{ github.workspace }}/pull-request to the init.sh script as
path of the PR checkout is incorrect, as inside the VM the repository
will be under a different path.

Instead of that, pass the correct absolute path for the PR checkout.

Moreover, checkout first the upstream repo (under cilium/cilium) and
only after that the PR one (under cilium/cilium/pull-request), as
otherwise the upstream checkout will nuke the directory with PR one.

Fixes: #19953
Signed-off-by: Gilberto Bertin <jibi@cilium.io>
@jibi jibi force-pushed the pr/jibi/l4lb-helm-fix branch from ecaf703 to af5273a Compare May 30, 2022 14:21
jibi added a commit that referenced this pull request May 30, 2022
Passing ${{ github.workspace }}/pull-request to the init.sh script as
path of the PR checkout is incorrect, as inside the VM the repository
will be under a different path.

Instead of that, pass the correct absolute path for the PR checkout.

Moreover, checkout first the upstream repo (under cilium/cilium) and
only after that the PR one (under cilium/cilium/pull-request), as
otherwise the upstream checkout will nuke the directory with PR one.

This PR includes only the changes related to test/l4lb/test.sh, as the
workflow is being updated on the master PR #20007.

Fixes: #20004
Signed-off-by: Gilberto Bertin <jibi@cilium.io>
jibi added a commit that referenced this pull request May 30, 2022
Passing ${{ github.workspace }}/pull-request to the init.sh script as
path of the PR checkout is incorrect, as inside the VM the repository
will be under a different path.

Instead of that, pass the correct absolute path for the PR checkout.

Moreover, checkout first the upstream repo (under cilium/cilium) and
only after that the PR one (under cilium/cilium/pull-request), as
otherwise the upstream checkout will nuke the directory with PR one.

This PR includes only the changes related to test/l4lb/test.sh, as the
workflow is being updated on the master PR #20007.

Fixes: #20003
Signed-off-by: Gilberto Bertin <jibi@cilium.io>
jibi added a commit that referenced this pull request May 30, 2022
Passing ${{ github.workspace }}/pull-request to the init.sh script as
path of the PR checkout is incorrect, as inside the VM the repository
will be under a different path.

Instead of that, pass the correct absolute path for the PR checkout.

Moreover, checkout first the upstream repo (under cilium/cilium) and
only after that the PR one (under cilium/cilium/pull-request), as
otherwise the upstream checkout will nuke the directory with PR one.

This PR includes only the changes related to test/l4lb/test.sh, as the
workflow is being updated on the master PR #20007.

Fixes: #20003
Signed-off-by: Gilberto Bertin <jibi@cilium.io>
@jibi jibi added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label May 30, 2022
jibi added a commit that referenced this pull request May 30, 2022
Passing ${{ github.workspace }}/pull-request to the init.sh script as
path of the PR checkout is incorrect, as inside the VM the repository
will be under a different path.

Instead of that, pass the correct absolute path for the PR checkout.

Moreover, checkout first the upstream repo (under cilium/cilium) and
only after that the PR one (under cilium/cilium/pull-request), as
otherwise the upstream checkout will nuke the directory with PR one.

This PR includes only the changes related to test/l4lb/test.sh, as the
workflow is being updated on the master PR #20007.

Fixes: #20004
Signed-off-by: Gilberto Bertin <jibi@cilium.io>
@jibi jibi merged commit e1f3de9 into master May 30, 2022
@jibi jibi deleted the pr/jibi/l4lb-helm-fix branch May 30, 2022 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug/CI This is a bug in the testing code. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/ci This PR makes changes to the CI.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants