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

JDK-Next git rev-list failing tags #1680

Closed
M-Davies opened this issue Apr 20, 2020 · 7 comments · Fixed by #1708
Closed

JDK-Next git rev-list failing tags #1680

M-Davies opened this issue Apr 20, 2020 · 7 comments · Fixed by #1708
Assignees
Labels
bug Issues that are problems in the code as reported by the community
Milestone

Comments

@M-Davies
Copy link
Contributor

Platform:
Windows
Architecture:
x64

https://ci.adoptopenjdk.net/view/Failing%20Builds/job/build-scripts/job/jobs/job/jdk/job/jdk-windows-x64-hotspot has been failing to pick up tags in the nightlies since 16/04/2020.

Failing code: https://github.com/AdoptOpenJDK/openjdk-build/blob/995c157903452e2c10751ab196567f281ff7fcd4/sbin/build.sh#L646

Pulling latest tags and getting the latest update version using git fetch -q --tags --depth=1
NOTE: This can take quite some time!  Please be patient
From /cygdrive/j/jenkins/tmp/workspace/./build//src
 * branch                  HEAD       -> FETCH_HEAD
usage: git rev-list [OPTION] <commit-id>... [ -- paths... ]
  limiting output:
    --max-count=<n>
    --max-age=<epoch>
    --min-age=<epoch>
    --sparse
    --no-merges
    --min-parents=<n>
    --no-min-parents
    --max-parents=<n>
    --no-max-parents
    --remove-empty
    --all
    --branches
    --tags
    --remotes
    --stdin
    --quiet
  ordering output:
    --topo-order
    --date-order
    --reverse
  formatting output:
    --parents
    --children
    --objects | --objects-edge
    --unpacked
    --header | --pretty
    --abbrev=<n> | --no-abbrev
    --abbrev-commit
    --left-right
    --count
  special purpose:
    --bisect
    --bisect-vars
    --bisect-all
WARNING: Failed to identify latest tag in the repository
Unable to detect git tag, exiting...
@karianna karianna added the bug Issues that are problems in the code as reported by the community label Apr 20, 2020
@karianna karianna added this to TODO in temurin-build via automation Apr 20, 2020
@karianna karianna added this to To do in Top Priorities via automation Apr 20, 2020
@karianna karianna added this to the April 2020 milestone Apr 20, 2020
@M-Davies
Copy link
Contributor Author

@karianna karianna moved this from TODO to In Progress in temurin-build Apr 21, 2020
@karianna
Copy link
Contributor

@M-Davies So it picked up the tag as you'd expect?

@M-Davies
Copy link
Contributor Author

It did. The build failed, but for a different reason. I'll leave this open till tomorrow as it may be an intermittent thing.

@karianna karianna moved this from To do to In progress in Top Priorities Apr 21, 2020
@M-Davies
Copy link
Contributor Author

@M-Davies
Copy link
Contributor Author

Next build failing with original error https://ci.adoptopenjdk.net/view/Failing%20Builds/job/build-scripts/job/jobs/job/jdk/job/jdk-windows-x64-hotspot/83/console

@Willsparker Can you take a look at this when you get min? 🙂

@Willsparker
Copy link
Contributor

I've had a brief look and the only reason I could find for it being intermittent is that it only fails when the build doesn't re-clone the src repository.
I'll have a bit more of an in-depth look when I get a chance :-)

@Willsparker
Copy link
Contributor

Alright - the reason for the error message is due to this:
https://github.com/AdoptOpenJDK/openjdk-build/blob/995c157903452e2c10751ab196567f281ff7fcd4/sbin/build.sh#L658

or more specifically, the line to try and find $firstMatchingNameFromRepo.

That returns nothing, as git describe --tags $revList returns a list of tags, all containing jdk-11 (which are therefore removed when the list is piped into grep "jdk-${BUILD_CONFIG[OPENJDK_FEATURE_NUMBER]}")

That's because it's the jdk11 repo: ( from https://ci.adoptopenjdk.net/view/Failing%20Builds/job/build-scripts/job/jobs/job/jdk/job/jdk-windows-x64-hotspot/83/console )

Retrieving cacerts file if needed
origin	https://github.com/adoptopenjdk/openjdk-jdk11u.git (fetch)
origin	https://github.com/adoptopenjdk/openjdk-jdk11u.git (push)
jdk
origin	https://github.com/adoptopenjdk/openjdk-jdk11u.git (fetch)
Resetting the git openjdk source repository at /cygdrive/j/jenkins/tmp/workspace/build/src in 10 seconds...

This repo is considered okay, and not removed because of this line :
https://github.com/AdoptOpenJDK/openjdk-build/blob/2041d51db738b741f2a630bc803ca1f038ef62b2/sbin/prepareWorkspace.sh#L52

Due to ${BUILD_CONFIG[OPENJDK_CORE_VERSION]} being jdk and "${BUILD_CONFIG[REPOSITORY]}" being openjdk-jdk, the openjdk-jdk11u repository fills out the criteria of that line, therefore isValidGitRepo is set to 0, and the src repository is attempted to be reset, causing the error.
Honestly, I have no idea why this has never been flagged before..

Proposed fix is to add a space after the repository variable, such as ..| grep "${BUILD_CONFIG[REPOSITORY]} "
This means the repository has to be openjdk-jdk, and openjdk-jdk11 wouldn't work.

temurin-build automation moved this from In Progress to Done Apr 24, 2020
Top Priorities automation moved this from In progress to Done Apr 24, 2020
@gdams gdams removed this from Done in Top Priorities Apr 27, 2021
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
Projects
No open projects
temurin-build
  
Done
Development

Successfully merging a pull request may close this issue.

3 participants