cluster: Fix kubevirtci clone storm#2619
Conversation
oshoval
left a comment
There was a problem hiding this comment.
Interesting, wasn't the state, seems a regression
i wonder if it works also for someone that doesn't have ssh key / gh logged in etc ?
worth to check please if possible
|
/lgtm cancel also worth to check please as previous comment says |
Devs should be logged in to GH in order to contribute for this project, CI will clone it anyways. |
Looks like these errors coming from kubeadm kubevirtci use to create the cluster. I have no clue why though.. |
|
@oshoval why do we even bother to remove _kubevirtci dir, cant we just leave it? EDIT: |
4ea8d21 to
182700d
Compare
a user might want to clone without creating PRs, we should allow it |
|
nice thanks, /lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: oshoval The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Done |
|
Thanks |
|
btw we might suffer from the same on more network repos, since they have common scripts in this area |
cluster::install checks whether the existing kubevirtci clone matches the requested one by comparing both the remote URL and the tag. The remote URL check fails when the clone was done via SSH (git@github.com:...) because the stored KUBEVIRTCI_REPO uses HTTPS (https://github.com/...). The mismatch causes kubevirtci to be deleted and re-cloned on every invocation, wiping the cluster kubeconfig and breaking the dev workflow. Remove the remote URL check and keep only the tag comparison. Derived from: kubevirt/cluster-network-addons-operator#2619 Assisted-by: Cursor (claude-4.6-sonnet-medium-thinking) Signed-off-by: Or Shoval <oshoval@redhat.com>
cluster::install checks whether the existing kubevirtci clone matches the requested one by comparing both the remote URL and the tag. The remote URL check fails when the clone was done via SSH (git@github.com:...) because the stored KUBEVIRTCI_REPO uses HTTPS (https://github.com/...). The mismatch causes kubevirtci to be deleted and re-cloned on every invocation, wiping the cluster kubeconfig and breaking the dev workflow. Remove the remote URL check and keep only the tag comparison. Derived from: kubevirt/cluster-network-addons-operator#2619 Assisted-by: Cursor (claude-4.6-sonnet-medium-thinking) Signed-off-by: Or Shoval <oshoval@redhat.com>
cluster::install checks whether the existing kubevirtci clone matches the requested one by comparing both the remote URL and the tag. The remote URL check fails when the clone was done via SSH (git@github.com:...) because the stored KUBEVIRTCI_REPO uses HTTPS (https://github.com/...). The mismatch causes kubevirtci to be deleted and re-cloned on every invocation, wiping the cluster kubeconfig and breaking the dev workflow. Remove the remote URL check and keep only the tag comparison. Derived from: kubevirt/cluster-network-addons-operator#2619 Assisted-by: Cursor (claude-4.6-sonnet-medium-thinking) Signed-off-by: Or Shoval <oshoval@redhat.com>
|
bridge-marker: kubevirt/bridge-marker#98 The change should be safe, once it pass on CI we are good to go imho |
cluster::install checks whether the existing kubevirtci clone matches the requested one by comparing both the remote URL and the tag. The remote URL check fails when the clone was done via SSH (git@github.com:...) because the stored KUBEVIRTCI_REPO uses HTTPS (https://github.com/...). The mismatch causes kubevirtci to be deleted and re-cloned on every invocation, wiping the cluster kubeconfig and breaking the dev workflow. Remove the remote URL check and keep only the tag comparison. Drop the now-unused KUBEVIRTCI_REPO variable. Derived from: kubevirt/cluster-network-addons-operator#2619 Assisted-by: Cursor (claude-4.6-sonnet-medium-thinking) Signed-off-by: Or Shoval <oshoval@redhat.com>
cluster::install checks whether the existing kubevirtci clone matches the requested one by comparing both the remote URL and the tag. The remote URL check fails when the clone was done via SSH (git@github.com:...) because the stored KUBEVIRTCI_REPO uses HTTPS (https://github.com/...). The mismatch causes kubevirtci to be deleted and re-cloned on every invocation, wiping the cluster kubeconfig and breaking the dev workflow. Remove the remote URL check and keep only the tag comparison. Drop the now-unused KUBEVIRTCI_REPO variable. Derived from: kubevirt/cluster-network-addons-operator#2619 Assisted-by: Cursor (claude-4.6-sonnet-medium-thinking) Signed-off-by: Or Shoval <oshoval@redhat.com>
cluster::install checks whether the existing kubevirtci clone matches the requested one by comparing both the remote URL and the tag. The remote URL check fails when the clone was done via SSH (git@github.com:...) because the stored KUBEVIRTCI_REPO uses HTTPS (https://github.com/...). The mismatch causes kubevirtci to be deleted and re-cloned on every invocation, wiping the cluster kubeconfig and breaking the dev workflow. Remove the remote URL check and keep only the tag comparison. Drop the now-unused KUBEVIRTCI_REPO variable. Derived from: kubevirt/cluster-network-addons-operator#2619 Assisted-by: Cursor (claude-4.6-sonnet-medium-thinking) Signed-off-by: Or Shoval <oshoval@redhat.com>
Every time cluster/ scrips are called, it checks if kubevirtci repo exist. The check expects for kubevirtci repo remote to be: https://github.com/... In practice when git clone a repository the default origin remote URL will be in SSH form: git@github.com:... The result is kubevirtci clone is being deleted along with the cluster kubeconfig, and then cloned again. Making the dev env cluster in-accessible and the dev workflow impossible. cluster::install checks the clone remote URL and commit. There is no actual need to check the clone remote URL because it clone kubevirtci upstream. The project should not account for tinkering with the clone dir. Hence: Change cluster::install check to look for the clone commit diff only. This change should avoid cluster/ scripts to mistakenly remove kubevirtci clones. Signed-off-by: Or Mergi <ormergi@redhat.com>
|
|
Thanks |
cluster::install checks whether the existing kubevirtci clone matches the requested one by comparing both the remote URL and the tag. The remote URL check fails when the clone was done via SSH (git@github.com:...) because the stored KUBEVIRTCI_REPO uses HTTPS (https://github.com/...). The mismatch causes kubevirtci to be deleted and re-cloned on every invocation, wiping the cluster kubeconfig and breaking the dev workflow. Remove the remote URL check and keep only the tag comparison. Drop the now-unused KUBEVIRTCI_REPO variable. Derived from: kubevirt/cluster-network-addons-operator#2619 Assisted-by: Cursor (claude-4.6-sonnet-medium-thinking) Signed-off-by: Or Shoval <oshoval@redhat.com>
cluster::install checks whether the existing kubevirtci clone matches the requested one by comparing both the remote URL and the tag. The remote URL check fails when the clone was done via SSH (git@github.com:...) because the stored KUBEVIRTCI_REPO uses HTTPS (https://github.com/...). The mismatch causes kubevirtci to be deleted and re-cloned on every invocation, wiping the cluster kubeconfig and breaking the dev workflow. Remove the remote URL check and keep only the tag comparison. Drop the now-unused KUBEVIRTCI_REPO variable. Derived from: kubevirt/cluster-network-addons-operator#2619 Assisted-by: Cursor (claude-4.6-sonnet-medium-thinking) Signed-off-by: Or Shoval <oshoval@redhat.com>
cluster::install checks whether the existing kubevirtci clone matches the requested one by comparing both the remote URL and the tag. The remote URL check fails when the clone was done via SSH (git@github.com:...) because the stored KUBEVIRTCI_REPO uses HTTPS (https://github.com/...). The mismatch causes kubevirtci to be deleted and re-cloned on every invocation, wiping the cluster kubeconfig and breaking the dev workflow. Remove the remote URL check and keep only the tag comparison. Drop the now-unused KUBEVIRTCI_REPO variable. Derived from: kubevirt/cluster-network-addons-operator#2619 Assisted-by: Cursor (claude-4.6-sonnet-medium-thinking) Signed-off-by: Or Shoval <oshoval@redhat.com>



What this PR does / why we need it:
Every time cluster/ scrips are called, it checks if kubevirtci repo exist.
The check expects for kubevirtci repo remote to be
In practice when git clone a repository the default origin remote URL will be in SSH form:
The result is kubevirtci clone is being deleted along with the cluster kubeconfig, and then cloned again.
Making the dev env cluster in-accessible and the dev workflow impossible.
Change clone existence check to look for the clone commit diff only and not the remote URL.
This change should avoid cluster/ scripts to mistakenly remove kubevirtci clones.
Special notes for your reviewer:
Release note: