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

Failed to copy artifacts filter spec fix #1830 #1834

Closed
douph1 opened this issue Jun 8, 2020 · 18 comments
Closed

Failed to copy artifacts filter spec fix #1830 #1834

douph1 opened this issue Jun 8, 2020 · 18 comments
Assignees
Labels
bug Issues that are problems in the code as reported by the community installer Issues that relate to our installer jobs or installer repo
Milestone

Comments

@douph1
Copy link
Contributor

douph1 commented Jun 8, 2020

About this failed build https://ci.adoptopenjdk.net/job/build-scripts/job/jobs/job/jdk11u/job/jdk11u-windows-x64-openj9-windowsXL/364/

06:44:54  Copied 0 artifacts from "build-scripts » release » create_installer_windows" build number 4410
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] echo
06:44:54  Execution error: Failed to copy artifacts from build-scripts/release/create_installer_windows with filter: wix/ReleaseDir/OpenJDK*jdk_*_windows_*.msi

https://ci.adoptopenjdk.net/job/build-scripts/job/release/job/create_installer_windows/4410/console
had produce : OpenJDK11U-jdk_x64_windows_openj9_windowsXL_2020-06-05-23-31.msi

At the begining I was thinking the filter was bad because I have only see _windowsXL doesn't match _windows_ .. but there is a _windows_ before _windowsXL .. so the filter must have been matched.

Why OpenJDK*jdk_*_windows_*.msi havn't matched OpenJDK11U-jdk_x64_windows_openj9_windowsXL_2020-06-05-23-31.msi

seeing copyArtifacts filter doc : https://www.jenkins.io/doc/pipeline/steps/copyartifact/

See the @includes of Ant fileset for the exact format.

I have juste tested with ant :

<project name="TestProject" default="testfilter" basedir=".">
    <target name="testfilter">
        <copy todir="/tmp/dst" overwrite="true" verbose="true">
                <fileset dir="/tmp/src" includes="wix/ReleaseDir/OpenJDK*jdk_*_windows_*.msi" />
        </copy>
    </target>
</project>

ant


testfilter:
     [copy] Copying 1 file to /tmp/dst
     [copy] Copying /tmp/src/wix/ReleaseDir/OpenJDK11U-jdk_x64_windows_openj9_windowsXL_2020-06-05-23-31.msi to /tmp/dst/wix/ReleaseDir/OpenJDK11U-jdk_x64_windows_openj9_windowsXL_2020-06-05-23-31.msi

BUILD SUCCESSFUL
Total time: 0 seconds

Either copyartifact don't exactly use exact filter format as Ant fileset @includes
either the filter was not the problem.

@douph1 douph1 added the question Issues that are queries about the code base or potential problems that have been spotted label Jun 8, 2020
@douph1
Copy link
Contributor Author

douph1 commented Jun 8, 2020

I thinking it must have matched like this when there was the first error : OpenJDK(11U-)jdk_(x64)_windows_(openj9_windowsXL_2020-06-05-23-31).msi

@M-Davies M-Davies added the installer Issues that relate to our installer jobs or installer repo label Jun 8, 2020
@karianna karianna added this to TODO in temurin-build via automation Jun 8, 2020
@karianna karianna added this to the June 2020 milestone Jun 8, 2020
@karianna karianna moved this from TODO to In Progress in temurin-build Jun 8, 2020
@M-Davies
Copy link
Contributor

M-Davies commented Jun 9, 2020

For the record, the failed match was on build-azure-win2012r2-x64-2. Later builds seem to be doing better, one on the same machine which passed.

@karianna was changing up how we copy artefacts from build to build yesterday. It's possible this may have fixed it. I'll keep an eye on it over the next week to see if this reoccurs

@M-Davies
Copy link
Contributor

Later builds look ok. I'm going to put this under "fixed by copy artifact" changes. This can always be reopened if we see it again

temurin-build automation moved this from In Progress to Done Jun 10, 2020
@M-Davies
Copy link
Contributor

M-Davies commented Jun 11, 2020

This is strange. It seems to be an intermittent problem I'm seeing in the build scripts.

I've seen two instances of this in the nightlies last night

04:37:24  Execution error: Failed to copy artifacts from build-scripts/release/create_installer_windows with filter: wix/ReleaseDir/OpenJDK*jdk_*_windows*.msi

But a build two days before that, passed https://ci.adoptopenjdk.net/view/Failing%20Builds/job/build-scripts/job/jobs/job/jdk14u/job/jdk14u-windows-x64-openj9/103/console

Keeping in mind my changes to windows installer went in over a week ago (except for #1830), I don't think it's due to that.

A cause could be the filter path. I'm seeing

Done Adding Additional Store
Successfully signed: ReleaseDir\OpenJDK11-jdk_x64_windows_openj9-11.0.8.6.msi

Done Adding Additional Store
Successfully signed: ReleaseDir\OpenJDK11-jdk_x64_windows_openj9-11.0.8.6.msi

in https://ci.adoptopenjdk.net/job/build-scripts/job/release/job/create_installer_windows/4565/console and

Done Adding Additional Store
Successfully signed: ReleaseDir\OpenJDK14-jdk_x64_windows_openj9-14.0.1.7.msi

Done Adding Additional Store
Successfully signed: ReleaseDir\OpenJDK14-jdk_x64_windows_openj9-14.0.1.7.msi

in https://ci.adoptopenjdk.net/job/build-scripts/job/release/job/create_installer_windows/4563/console (the same installer jobs ran for the builds I linked above).

So to resolve this, I'm guessing I would need to update the filter to be ReleaseDir/OpenJDK*jdk_*_windows*.msi but that doesn't explain why other jobs, like this one manage to copy the artifacts over fine.

@douph1 Any ideas?

@M-Davies
Copy link
Contributor

I'm testing the theory I mentioned above with a temp PR #1856

@karianna
Copy link
Contributor

Also see #1858

@M-Davies
Copy link
Contributor

I'm testing the theory I mentioned above with a temp PR #1856

Test theory wasn't successful

@M-Davies M-Davies added bug Issues that are problems in the code as reported by the community and removed question Issues that are queries about the code base or potential problems that have been spotted labels Jun 11, 2020
@M-Davies
Copy link
Contributor

M-Davies commented Jun 16, 2020

https://ci.adoptopenjdk.net/view/Failing%20Builds/job/build-scripts/job/jobs/job/jdk8u/job/jdk8u-windows-x64-hotspot/641/console
https://ci.adoptopenjdk.net/view/Failing%20Builds/job/build-scripts/job/jobs/job/jdk14u/job/jdk14u-windows-x86-32-hotspot/109/console

22:35:58  Copied 0 artifacts from "build-scripts » release » create_installer_windows" build number 4769
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] echo
22:35:58  Execution error: Failed to copy artifacts from build-scripts/release/create_installer_windows with filter: wix/ReleaseDir/*

@karianna
Copy link
Contributor

Is that because of permissions or something else though...

@douph1
Copy link
Contributor Author

douph1 commented Jun 17, 2020

I have see lot of this error "Failed to copy artifacts" on internet with a stacktrace .. I don't know how but did you think we can print stacktrace together with the error message ?

@M-Davies
Copy link
Contributor

M-Davies commented Jun 19, 2020

@douph1 It doesn't look like it is printing the full trace 😭
https://ci.adoptopenjdk.net/view/Failing%20Builds/job/build-scripts/job/jobs/job/jdk14u/job/jdk14u-windows-x64-openj9/116/console

08:18:25  Scheduling project: build-scripts » release » create_installer_windows
08:18:33  Starting building: build-scripts » release » create_installer_windows #4896
[Pipeline] copyArtifacts
08:24:18  Copied 0 artifacts from "build-scripts » release » create_installer_windows" build number 4896
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] echo
08:24:18  Execution error: hudson.AbortException: Failed to copy artifacts from build-scripts/release/create_installer_windows with filter: wix/ReleaseDir/*

@douph1
Copy link
Contributor Author

douph1 commented Jun 19, 2020

I'm not a groovy export, I have just seen this syntax in the script using ${e} and I don't have made my homeworks :(
Maybe context.println "Execution error: " + e.printStackTrace()
is better ?

@M-Davies
Copy link
Contributor

It's worth a shot 🤷

@douph1
Copy link
Contributor Author

douph1 commented Jun 19, 2020

wait
see https://issues.apache.org/jira/browse/GROOVY-3947
https://issues.jenkins-ci.org/browse/JENKINS-44808

System.err of the Jenkins JVM is not the same as the build log.

Pipeline scripts by default run in a sandbox.

but fails in a Jenkinsfile with Scripts not permitted to use method java.lang.Throwable getStackTrace

We must first know if

this to use this "unsecure" function to work in a jenkinsfile script or pipeline dsl library,

douph1 added a commit that referenced this issue Jun 19, 2020
karianna pushed a commit that referenced this issue Jun 20, 2020
* try re-throw exception to see full stacktrace

to help debug/understand #1834

* fix indent
@douph1
Copy link
Contributor Author

douph1 commented Jun 22, 2020

it will be harder after next jenkins update to see stactrace for non-administrator :

https://www.jenkins.io/changelog-stable/
Suppress error stack traces for non-administrator users as core capability. (issue 60410)
https://issues.jenkins-ci.org/browse/JENKINS-60410
Hopefully, this is probably not the job stacktrace
Internal stack traces exposed to users

@M-Davies
Copy link
Contributor

https://ci.adoptopenjdk.net/view/Failing%20Builds/job/build-scripts/job/jobs/job/jdk11u/job/jdk11u-windows-x64-openj9/649/console

05:13:33  Copied 0 artifacts from "build-scripts » release » create_installer_windows" build number 5075
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] echo
05:13:33  Execution error: hudson.AbortException: Failed to copy artifacts from build-scripts/release/create_installer_windows with filter: wix/ReleaseDir/*
[Pipeline] }
[Pipeline] // timeout
[Pipeline] }
[Pipeline] // timestamps
[Pipeline] End of Pipeline
ERROR: Failed to copy artifacts from build-scripts/release/create_installer_windows with filter: wix/ReleaseDir/*

Still no stacktrace unfortunately. Could we perhaps roll it back and just do printstacktrace and get admin permission to do so?

M-Davies pushed a commit to M-Davies/openjdk-build that referenced this issue Jun 24, 2020
karianna pushed a commit that referenced this issue Jun 24, 2020
@douph1 douph1 mentioned this issue Jun 30, 2020
@M-Davies M-Davies changed the title question about copy artifacts filter spec fix #1830 Failed to copy artifacts filter spec fix #1830 Jun 30, 2020
@M-Davies
Copy link
Contributor

Renamed to make it more appropriate as this no longer a question

douph1 added a commit that referenced this issue Jun 30, 2020
@karianna karianna modified the milestones: June 2020, July 2020 Jul 1, 2020
@M-Davies
Copy link
Contributor

M-Davies commented Jul 8, 2020

I suspect @andrew-m-leonard fixed this when he increased the job retention as I haven't seen this for a while now. I'll close this but we can always reopen if it reappears

@M-Davies M-Davies closed this as completed Jul 8, 2020
temurin-build automation moved this from In Progress to Done Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that are problems in the code as reported by the community installer Issues that relate to our installer jobs or installer repo
Projects
No open projects
temurin-build
  
Done
Development

No branches or pull requests

3 participants