Skip to content
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

[Bug]: Appveyor test setup fails on some PRs #35564

Closed
3 tasks done
matthewloft opened this issue Sep 2, 2022 · 2 comments
Closed
3 tasks done

[Bug]: Appveyor test setup fails on some PRs #35564

matthewloft opened this issue Sep 2, 2022 · 2 comments
Labels

Comments

@matthewloft
Copy link
Contributor

matthewloft commented Sep 2, 2022

Preflight Checklist

Electron Version

20.0.0

What operating system are you using?

Windows

Operating System Version

Windows 10 20H2

What arch are you using?

x64

Last Known Working Electron version

No response

Expected Behavior

Pull requests are subject to automated AppVeyor tasks to verify the PR on Windows ia32 and x64.

The AppVeyor task is broken down into "build" and "test" stages. Both stages should pass for the task to succeed, and for the PR to progress.

Actual Behavior

Some PRs are failing in ways that don't seem to relate to the PR changes.
It seems the initial environment setup is failing.

[00:01:34] # Download build artifacts
[00:01:34] $apiUrl = 'https://ci.appveyor.com/api'             
[00:01:34] $build_info = Invoke-RestMethod -Method Get -Uri "$apiUrl/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/builds/$env:APPVEYOR_BUILD_ID"
[00:01:34] $artifacts_to_download = @('dist.zip','shell_browser_ui_unittests.exe','chromedriver.zip','ffmpeg.zip','node_headers.zip','mksnapshot.zip','electron.lib','builtins-pgo.zip')
[00:01:34] foreach ($job in $build_info.build.jobs) {
[00:01:34]   if ($job.name -eq "Build") {
[00:01:34]     $jobId = $job.jobId
[00:01:34]     foreach($artifact_name in $artifacts_to_download) {
[00:01:34]       if ($artifact_name -eq 'shell_browser_ui_unittests.exe' -Or $artifact_name -eq 'electron.lib') {
[00:01:34]         $outfile = "src\out\Default\$artifact_name"
[00:01:34]       } else {
[00:01:34]         $outfile = $artifact_name
[00:01:34]       }
[00:01:34]       Invoke-RestMethod -Method Get -Uri "$apiUrl/buildjobs/$jobId/artifacts/$artifact_name" -OutFile $outfile
[00:01:34]     }
[00:01:34]   }
[00:01:34] }
[00:01:34] 
[00:01:35] 
[00:01:35] 
[00:01:35]     Directory: C:\projects\src\out
[00:01:35] 
[00:01:35] 
[00:01:35] Mode                LastWriteTime         Length Name                                                                                                                                                                                
[00:01:35] ----                -------------         ------ ----                                                                                                                                                                                
[00:01:35] d-----        8/30/2022  12:21 AM                Default                                                                                                                                                                             
[00:01:37] Invoke-RestMethod : {"message":"Artifact not found or access denied."}
[00:01:37] At line:17 char:7
[00:01:37] +       Invoke-RestMethod -Method Get -Uri "$apiUrl/buildjobs/$jobId/ar ...
[00:01:37] +       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[00:01:37]     + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
[00:01:37]     + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
[00:01:37] Invoke-RestMethod : {"message":"Artifact not found or access denied."}

(and repeated another 7 times)
[00:01:38] Command executed with exception: The remote server returned an error: (404) Not Found.
[00:01:38] if exist electron\electron.log ( appveyor-retry appveyor PushArtifact electron\electron.log )

Examples PRs are:
#35374
#35538

Comparing to other PRs that get further than this step I can see some differences in how the source code is initially cloned.

From the failing PRs (#35374)

[00:00:01] git clone -q https://github.com/electron/electron.git C:\projects\src\electron
[00:00:15] git fetch -q origin +refs/pull/35374/merge:
[00:00:17] git checkout -qf FETCH_HEAD

Compared to a (more) successful PR (#35531)

[00:00:01] git clone -q --branch=deprecate-scroll-touch-events https://github.com/electron/electron.git C:\projects\src\electron
[00:00:16] git checkout -qf 36cc3c051ceae85828b05da5dc7f7a03b3d10b62

It seems the successful tests are setup from branches on the main electron repo, whereas the failing tests are from merged PRs.
This issue is effectively blocking some PRs from completing their tasks.

Testcase Gist URL

No response

Additional Information

No response

@matthewloft
Copy link
Contributor Author

Could this be related to #35377 ?
@jkleinsc what do you think?

@matthewloft
Copy link
Contributor Author

Fixed by PR #35593
Thanks @jkleinsc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant