twitter / scalding

A Scala API for Cascading
http://twitter.com/scalding
Apache License 2.0
3.48k stars 703 forks source link

Try sbt-publish-ci #1985

Closed daniel-sudz closed 2 years ago

daniel-sudz commented 2 years ago

it handles the GPG part nicely (should work with the exiting ENV variable). It might take some iterations to get this to work properly as it's hard to test.

testing

I created some dummy GPG creds that should simulate how to CI environment will look like:

# simulate keys that will exist in CI with a dummy keychain that I made
export LONG_ID=5E7939893DB7189A35E0FB7B8D866B98E9211F8F
export PGP_SECRET=`gpg --pinentry-mode loopback --passphrase test --armor --export-secret-keys $LONG_ID`
export PGP_PASSPHRASE="test"
export SONATYPE_PASSWORD="upload should fail"
export SONATYPE_USERNAME="upload should fail"

running ./sbt "ci-release"

It does not fail on GPG signing anymore. I do have some errors from sonatype network requests that look suspicious. I would expect something like "forbidden" on the network requests but I get:

Caused by: java.net.ProtocolException: Server redirected too many  times (20)

edit: I think this is because of malformed creds but I cannot confirm as I don't have real creds

sbt-denver

sbt-publish-ci still uses sbt-denver so the tag/snapshot workflow should still work. I kept my overrides for sbt-denver to disable adding timestamps to the snapshots because that will break tests.

codecov-commenter commented 2 years ago

Codecov Report

Merging #1985 (8c1b62f) into develop (e44f2f2) will increase coverage by 2.07%. The diff coverage is n/a.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #1985      +/-   ##
=============================================
+ Coverage      35.74%   37.82%   +2.07%     
- Complexity      1079     1116      +37     
=============================================
  Files            316      316              
  Lines          20941    21117     +176     
  Branches        2850     2924      +74     
=============================================
+ Hits            7485     7987     +502     
+ Misses         12557    12141     -416     
- Partials         899      989      +90     
Impacted Files Coverage Δ
...alization/runtime_helpers/TraversableHelpers.scala 96.00% <0.00%> (-1.34%) :arrow_down:
...rc/main/scala/com/twitter/scalding/TypedJson.scala 0.00% <0.00%> (ø)
...tter/scalding/db/macros/impl/JdbcFieldSetter.scala 0.00% <0.00%> (ø)
...lding/db/macros/impl/handler/DateTypeHandler.scala 0.00% <0.00%> (ø)
...ding/db/macros/impl/handler/AnnotationHelper.scala 0.00% <0.00%> (ø)
...ing/db/macros/impl/handler/StringTypeHandler.scala 0.00% <0.00%> (ø)
...ng/db/macros/impl/handler/NumericTypeHandler.scala 0.00% <0.00%> (ø)
.../db/macros/impl/ColumnDefinitionProviderImpl.scala 0.00% <0.00%> (ø)
...la/com/twitter/scalding/GeneratedConversions.scala 9.64% <0.00%> (+0.25%) :arrow_up:
...src/main/scala/com/twitter/scalding/JsonLine.scala 72.97% <0.00%> (+0.75%) :arrow_up:
... and 50 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update e44f2f2...8c1b62f. Read the comment docs.

daniel-sudz commented 2 years ago

@johnynek sorry if this takes a few iterations it is hard to test. But I think this should solve our GPG problem at the least

daniel-sudz commented 2 years ago

also if it would be possible to run ./sbt "ci-release" locally with real creds loaded for sonatype if might be helpful to debug any issues with a faster feedback loop here instead of constantly making new PRs.

johnynek commented 2 years ago

Unfortunately I'm away from my machine now.

daniel-sudz commented 2 years ago

Unfortunately I'm away from my machine now.

let's just merge and see what changes we need after that then. Can't break something that's not working anyways is my logic.

re tags: not sure I will look at the git history locally when I get the chance. Wild guess but the tag might be attributed to a different branch?

johnynek commented 2 years ago

pushed a tag: https://github.com/twitter/scalding/tree/v0.18.0-RC2

let's see if this works.

johnynek commented 2 years ago

publish action: https://github.com/twitter/scalding/actions/runs/2142743724

daniel-sudz commented 2 years ago

it's a miracle!!! https://oss.sonatype.org/content/repositories/snapshots/com/twitter/maple/0.18.0-RC2-1-64343489-SNAPSHOT/maple-0.18.0-RC2-1-64343489-SNAPSHOT-javadoc.jar

going to try these out next week I'm sure something might come up @johnynek

johnynek commented 2 years ago

It's not a miracle, it's your hard work! Thank you!