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

infra: pgjdbc, migrate Maven -> Gradle #7783

Merged
merged 1 commit into from Mar 30, 2020
Merged

Conversation

vlsi
Copy link
Contributor

@vlsi vlsi commented Mar 4, 2020

See pgjdbc/pgjdbc#1726 (comment)

when pgjdbc/pgjdbc#1627 is merged this PR be ready for merge.

@vlsi vlsi force-pushed the pgjdbc_gradle branch 3 times, most recently from a923bb5 to da45283 Compare March 4, 2020 22:48
@rnveach
Copy link
Member

rnveach commented Mar 9, 2020

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':postgresql:checkstyleMain'.
> Could not resolve all files for configuration ':postgresql:checkstyle'.
   > Could not find com.puppycrawl.tools:checkstyle:8.31-SNAPSHOT.
     Searched in the following locations:
       - file:/root/.m2/repository/com/puppycrawl/tools/checkstyle/8.31-SNAPSHOT/maven-metadata.xml
       - file:/root/.m2/repository/com/puppycrawl/tools/checkstyle/8.31-SNAPSHOT/checkstyle-8.31-SNAPSHOT.pom
       - https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.31-SNAPSHOT/maven-metadata.xml
       - https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.31-SNAPSHOT/checkstyle-8.31-SNAPSHOT.pom
     Required by:
         project :postgresql

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

@vlsi
Copy link
Contributor Author

vlsi commented Mar 9, 2020

@rnveach , thanks.
Do you have access to the filesystem?

The build log says it attempted to resolve Checkstyle snapshot from Maven local repository, however, it looks like the snapshot is not there:

Searched in the following locations:
  - file:/root/.m2/repository/com/puppycrawl/tools/checkstyle/8.31-SNAPSHOT/maven-metadata.xml
  - file:/root/.m2/repository/com/puppycrawl/tools/checkstyle/8.31-SNAPSHOT/checkstyle-8.31-SNAPSHOT.pom

Can you please check if Checkstyle is installed properly?

@rnveach
Copy link
Member

rnveach commented Mar 9, 2020

https://github.com/checkstyle/checkstyle/blob/master/wercker.yml#L58
the first thing wercker does is install the snapshot version for use with every run.

[INFO] --- maven-install-plugin:2.5.2:install (default-install) @ checkstyle ---
[INFO] Installing /pipeline/source/target/checkstyle-8.31-SNAPSHOT.jar to /pipeline/cache/com/puppycrawl/tools/checkstyle/8.31-SNAPSHOT/checkstyle-8.31-SNAPSHOT.jar
[INFO] Installing /pipeline/source/pom.xml to /pipeline/cache/com/puppycrawl/tools/checkstyle/8.31-SNAPSHOT/checkstyle-8.31-SNAPSHOT.pom
[INFO] Installing /pipeline/source/target/checkstyle-8.31-SNAPSHOT-tests.jar to /pipeline/cache/com/puppycrawl/tools/checkstyle/8.31-SNAPSHOT/checkstyle-8.31-SNAPSHOT-tests.jar

@pzygielo
Copy link

pzygielo commented Mar 9, 2020

Should this

export MAVEN_OPTS="-Dmaven.repo.local=${WERCKER_CACHE_DIR}"
be considered/set for new gradle call as well?

It seems maven installs to /pipeline/cache but gradle is looking in /root/.m2/repository.

@vlsi
Copy link
Contributor Author

vlsi commented Mar 9, 2020

I see there's

ln -s ${WERCKER_CACHE_DIR} /root/.m2/repository

Is that command executed?

Frankly speaking, the command looks suspicious to me. I guess it should be ln -s ${WERCKER_CACHE_DIR} /root/.m2

I've pushed a commit that would list files in /root/.m2.
Can you please show the output from the latest wercker build?

@pzygielo
Copy link

pzygielo commented Mar 9, 2020

My fault,

I see there's

ln -s ${WERCKER_CACHE_DIR} /root/.m2/repository

I didn't ☹️

@vlsi
Copy link
Contributor Author

vlsi commented Mar 9, 2020

wercker shows 401 for me.

Is there a way I can get permission to watch CI logs?

It is really painful to debug CI jobs which show 401 :-/

/cc @rnveach , @romani ?

.ci/wercker.sh Outdated Show resolved Hide resolved
@vlsi
Copy link
Contributor Author

vlsi commented Mar 10, 2020

@rnveach, can you please help me with the new logs? (a04eb6a and 408ffa7)
That is the output of ls .. commands and the output of ./gradlew. I think it should pick GRADLE_OPTS, and it should pick -Dmaven.repo.local

@vlsi vlsi force-pushed the pgjdbc_gradle branch 2 times, most recently from 3982021 to f48b971 Compare March 10, 2020 11:58
@rnveach
Copy link
Member

rnveach commented Mar 10, 2020

@vlsi Wercker passed.

@romani
Copy link
Member

romani commented Mar 11, 2020

looks good, thanks a lot for update.

@rnveach
Copy link
Member

rnveach commented Mar 18, 2020

@vlsi PR is still listed as draft. Will you be finalizing this at some time? If so, please rebase this on the latest master to ensure it will not conflict with other changes being made.

@vlsi
Copy link
Contributor Author

vlsi commented Mar 18, 2020

The PR is still draft as the upstream pgjdbc is not migrated to Gradle yet.
My estimation is the switch will happen on the next week or so.

@vlsi vlsi marked this pull request as ready for review March 30, 2020 12:36
@vlsi
Copy link
Contributor Author

vlsi commented Mar 30, 2020

@romani , @rnveach , pgjdbc has switched from Maven to Gradle, so please update wercker configuration.

Copy link
Member

@romani romani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok to merge if CI pass

@romani
Copy link
Member

romani commented Mar 30, 2020

this is become an issue for master build of wercker - https://app.wercker.com/checkstyle/checkstyle/runs/build/5e81e9a8765d2a000763f7ce?step=5e81ea05ee64ed00087ab0fc

This PR should be expedited.

@romani romani merged commit 7242c34 into checkstyle:master Mar 30, 2020
@romani
Copy link
Member

romani commented Mar 30, 2020

wercker is passed, all other major validation are passed, I merged without waiting for all pass state.

@romani
Copy link
Member

romani commented Mar 30, 2020

@vlsi , thanks a lot for update!

@romani
Copy link
Member

romani commented Apr 1, 2020

@vlsi , I am not sure what happened but pgjdbc is still on maven in master branch.
I did revert of your commit - 522795b, to unblock all our PRs.

Please explain what happened.

@vlsi
Copy link
Contributor Author

vlsi commented Apr 1, 2020

@romani , there was a regression in the previous release, so we did a rollback and re-released pgjdbc. Sorry for the inconvenience.

Now maven->gradle is re-applied to pgjdbc.

PS. We don't expect to rollback once again, however, it would probably make sense to use shell-script-like integration to avoid disruptions when the command line to run checkstyle changes.

@rnveach
Copy link
Member

rnveach commented Apr 1, 2020

@vlsi Is there a central issue to track conversion to gradle so we can watch and know if something goes wrong again?

@vlsi
Copy link
Contributor Author

vlsi commented Apr 1, 2020

It is not related to Gradle.

The issue was with a couple of fixes that were released, however, one of them introduced regressions, and another was too big to include into a minor release.

So we tried to play safe and reverted the whole thing.
Apparently, we did not expect it would ripple in the failures elsewhere.

@romani
Copy link
Member

romani commented Apr 1, 2020

we switched back to gradle , wercker is passing - https://app.wercker.com/checkstyle/checkstyle/runs/build/5e849f9c7b63df001af7d8fb?step=5e849fdc1ccc9800081d78ce

@vlsi , thanks a lot for help.

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

Successfully merging this pull request may close these issues.

None yet

4 participants