-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
[vcpkg-ci] Add AZP logging markup for skipped ports #19259
Conversation
This comment has been minimized.
This comment has been minimized.
Works now as intented, but includes a POC commit which must be removed before merge. |
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.
This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!
After committing all other changes, the version database must be updated
git add -u && git commit
git checkout 6bc4362fb49e53f1fff7f51e4e27e1946755ecc6 -- versions
./vcpkg x-add-version --all
Diff
diff --git a/versions/baseline.json b/versions/baseline.json
index 94f34ac..02a5321 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -5530,7 +5530,7 @@
},
"raylib": {
"baseline": "3.7.0",
- "port-version": 1
+ "port-version": 2
},
"rbdl": {
"baseline": "2.6.0",
diff --git a/versions/r-/raylib.json b/versions/r-/raylib.json
index 493c251..70bc6a8 100644
--- a/versions/r-/raylib.json
+++ b/versions/r-/raylib.json
@@ -1,5 +1,10 @@
{
"versions": [
+ {
+ "git-tree": "a6e75fbb346a36aecf774e698ac01e7d9122632b",
+ "version-semver": "3.7.0",
+ "port-version": 2
+ },
{
"git-tree": "e27352fbab2a4e815a478265032a4faa60d34060",
"version-semver": "3.7.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.
This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!
After committing all other changes, the version database must be updated
git add -u && git commit
git checkout 6bc4362fb49e53f1fff7f51e4e27e1946755ecc6 -- versions
./vcpkg x-add-version --all
Diff
diff --git a/versions/baseline.json b/versions/baseline.json
index 94f34ac..02a5321 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -5530,7 +5530,7 @@
},
"raylib": {
"baseline": "3.7.0",
- "port-version": 1
+ "port-version": 2
},
"rbdl": {
"baseline": "2.6.0",
diff --git a/versions/r-/raylib.json b/versions/r-/raylib.json
index 493c251..7f97573 100644
--- a/versions/r-/raylib.json
+++ b/versions/r-/raylib.json
@@ -1,5 +1,10 @@
{
"versions": [
+ {
+ "git-tree": "8ea2085bf2813963d5e4a881b09dab3017bf92b3",
+ "version-semver": "3.7.0",
+ "port-version": 2
+ },
{
"git-tree": "e27352fbab2a4e815a478265032a4faa60d34060",
"version-semver": "3.7.0",
This now also covers skipped ports which depend on changed ports. It should be reviewed and (after removal of the POC commits) merged for the benefit of all contributors. |
@dg0yt, I will ask other members to review this PR! Sorry for the delay! |
Ping for hints how to move this forward. |
@ras0219 @ras0219-msft @BillyONeal, could you please take a look again? |
$changedPorts | ForEach-Object { | ||
if ($skippedPorts -contains $_) { | ||
$port = $_ | ||
Write-Host "##vso[task.logissue type=error]$port`: build skipped, reason: CI baseline file." |
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.
Write-Host "##vso[task.logissue type=error]$port`: build skipped, reason: CI baseline file." | |
Write-Host "##vso[task.logissue type=error]$port`: skipped by ci.baseline.txt." | |
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.
I think it would be good to use the file name here so that contributors can find it more easily.
|
||
$current_port_and_features = ':' | ||
& "./vcpkg$executableExtension" ci $Triplet --x-xunit=$xmlFile --exclude=$skipList --failure-logs=$failureLogs @hostArgs @commonArgs ` | ||
| ForEach-Object { |
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.
For other reviewers: I expected this to hang the run until all the output was collected but it didn't seem to do that in testing.
| ForEach-Object { | ||
$_ | ||
if ($LogSkippedPorts) { | ||
if ($_ -match '^ *([^ :]+):[^:]*: *cascade:' -and $changedPorts -contains $Matches[1]) { |
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.
I'm a little concerned about making this "output intended for human consumption" load bearing in this way. Not an over my dead body issue but a better solution would be to have the tool do this processing and report it in the output so that changes in the tool don't cause silent failure of the infrastructure.
That said, while that is a solution I prefer, this solution is better than the status quo and such failure would only degrade things to the status quo, so I would not block merging over that.
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.
if ($_ -match '^ *([^ :]+):[^:]*: *cascade:' -and $changedPorts -contains $Matches[1]) { | |
# Parse the ports ABI hash list at the start of output looking for ports vcpkg ci wants to build | |
# (denoted by *) which are marked "cascade" because one of their dependencies were in | |
# ci.baseline.txt. | |
if ($_ -match '^ *([^ :]+):[^:]*: *cascade:' -and $changedPorts -contains $Matches[1]) { | |
if ($LogSkippedPorts) { | ||
if ($_ -match '^ *([^ :]+):[^:]*: *cascade:' -and $changedPorts -contains $Matches[1]) { | ||
$port = $Matches[1] | ||
Write-Host "##vso[task.logissue type=error]$port`: build skipped, reason: cascade from CI baseline file." |
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.
Write-Host "##vso[task.logissue type=error]$port`: build skipped, reason: cascade from CI baseline file." | |
Write-Host "##vso[task.logissue type=error]$port`: build skipped because a dependency is skipped in ci.baseline.txt." | |
if ($_ -match '^([^:[]+)[:[]' -and $changedPorts -contains $Matches[1]) { | ||
$port = $Matches[1] | ||
if ($current_port_and_features -notmatch "^$port[:[]") { | ||
Write-Host "##vso[task.logissue type=error]$port`: build of depending port '$current_port_and_features' skipped due to missing dependencies." |
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.
One reason it might be a good idea to move this into the tool is that it would be easier to describe which dependency failed.
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.
I don't duplicate the port name in my suggested edit; I'm on the fence about whether we should avoid the duplication or not.
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.
Oh, I see, I had this backwards. It isn't a repeated port name, the actual output is something like:
freexl: build of depending port 'libspatialite[core]:x86-windows' skipped due to missing dependencies.
as in, "freexl failed, and that made libspatialite cascade"
How about:
Write-Host "##vso[task.logissue type=error]$port`: build failure caused '$current_port_and_features' skip due to missing dependencies."
?
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.
Note that we cannot be sure that a freexl
build failure causes libspatialite[core]:x86-windows
to be skipped. All we know is that:
freexl
is direct or transitive dependency oflibspatialite[core]:x86-windows
.- one of the dependencies of
libspatialite[core]:x86-windows
failed to build.
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.
How about:
Write-Host "##vso[task.logissue type=error]$current_port_and_features`: not attempted because '$port' is unavailable."
I poked other maintainers to point out that despite this P/R being "failing" that is intentional right now to demonstrate output. |
$current_port_and_features = $Matches[1] | ||
} | ||
elseif ($_ -match 'failed with: CASCADED_DUE_TO_MISSING_DEPENDENCIES') { | ||
& "./vcpkg$executableExtension" depend-info $current_port_and_features | ForEach-Object { |
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.
We should save these and process them at the end of the build -- otherwise this is performing concurrent vcpkg calls which is a big no-no.
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.
Alternatively: this might be appropriate to add to the original ci command
@@ -1,3 +1,5 @@ | |||
message(FATAL_ERROR "Simulate failure") |
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.
I may misunderstand the purpose of this machinery, but I think the failures this is intended to capture are when something is moving to skip -- i.e. when the supports field or the ci.baseline.txt is modified. If a port fails to build, we'll already see that error as part of the main CI output. It's the reaction to that (add to ci.baseline.txt or change supports) that causes these "invisible" failures.
Therefore, I think it would be a better test of this machinery would be to change freexl's supports clause.
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.
The case which I wanted to cover here is not obious in the proof-of-concept change:
- Independent port A is modified by a PR.
- Independent port B fails for some other reason.
- Port C which depends on A and B is skipped because of B failing.
@BillyONeal That's why the output pattern is:
A: build of depending port 'C' skipped due to missing dependencies."
-- I'm looking at C, I know that it depends on A, and I know that A was modified.
(In the proof of concept, A = B.)
I admit that this might generate a lot of output if A and B are frequently used ports, in particular if A = B.
Now I could also collect failed ports, and thus identify that B caused C to be skipped.
In addition, it might be possible to directly mark B as "unrelated" error if not modified and not depending on a modified port. However, this doesn't work when modifying maintainer functions in scripts
.
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.
Our policy is that we do not generally merge PRs with B failing -- we will wait for another PR to fix B or fix B in this PR. Given that policy, what does this additional check catch?
(In exceptional circumstances we do merge PRs with a port failing, but in those cases we perform additional manual review to ensure that we aren't in the A+B=C case you've outlined)
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.
Our policy is that we do not generally merge PRs with B failing -- we will wait for another PR to fix B or fix B in this PR. Given that policy, what does this additional check catch?
Okay.
With regard to independent ports, the information which would be immediately helpful instead is whether a failing port is unrelated to modified ports. This would reduce workload for contributors and reviewers.
Examples: #20136 (comment)
However, this information would be needed next to the existing message:
##[error]REGRESSION: python3:x64-osx. If expected, add python3:x64-osx=fail to .\scripts\ci.baseline.txt.
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.
The "unrelated ports" are now better resolved by microsoft/vcpkg-tool#210.
I won't continue this PR. The changes for AZP test result upload (via |
What does your PR fix?
Occassionally, skipped builds (in particular "cascade") for changed ports went unnoticed.
Based on changed
ports
andversions
files in git, this change adds AZP error messages (but not job failures) for skipped ports, making them more visible in Github.Which triplets are supported/not supported? Have you updated the CI baseline?
all, not needed
Does your PR follow the maintainer guide?
yes
If you have added/updated a port: Have you run
./vcpkg x-add-version --all
and committed the result?not needed