Windows tests should not checkout main
branch and merge the PR branch
#6175
Labels
area/testing
Issues or PRs related to testing, Quality Assurance or Quality Engineering
area/Windows
Issues or PRs specific to Windows
kind/bug
Categorizes issue or PR as related to a bug.
Milestone
/kind bug
/area testing
/area Windows
What versions of software are you using?
Output of
odo version
:Actual behavior
Currently, Windows tests checkout the
main
branch and then merge the PR branch into the localmain
branch:odo/.ibm/pipelines/windows-test-script.ps1
Lines 31 to 34 in f78096d
This can lead to potential issues for several reasons:
main
, withmain
containing changes not conflicting with the PR branch, themerge
operation would succeed. But this would give a local branch with changes coming from bothmain
and the PR branch. I think this explains the behavior I observed and reported in check if namespace is created instead of project #6108 (comment) (where a given test spec had run, but the PR branch had no reference to that test spec) and which led me to file Display Git commit ID in output ofodo
commands where the version is shown #6131 (for better traceability).main
and the PR branch, the whole Windows test would not pass.main
, likerelease/v3.0.0
.To me, the test should run with what is exactly in the PR branch, and not attempt to merge anything (or if this intended, it should be a dedicated stage in the Pipeline). We already have the OpenShift CI bot reporting potential conflicts and requesting to rebase PRs.
Expected behavior
Just like what is done in Kubernetes and OpenShift tests, Windows tests should rely on the code already checked out by IBM Cloud.
We could
scp
the current folder to the Windows machine, as we do with the PowerShell script: https://github.com/redhat-developer/odo/blob/main/.ibm/pipelines/windows-test.sh#L13.Or if the
scp
operation is too slow, the Windows test script could perform a shallow checkout of the right PR branch (rather than merging it into the localmain
branch).The text was updated successfully, but these errors were encountered: