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

Rewrite package listing and ownership parts of release.sh in python #5629

Merged
merged 3 commits into from Mar 29, 2018

Conversation

Projects
None yet
2 participants
@illicitonion
Copy link
Contributor

illicitonion commented Mar 26, 2018

No description provided.

@stuhood
Copy link
Member

stuhood left a comment

Awesome: thanks @illicitonion !

@@ -813,8 +684,8 @@ while getopts "hdntcloepqw" opt; do
d) debug="true" ;;
n) dry_run="true" ;;
t) test_release="true" ;;
l) list_packages ; exit $? ;;
o) list_owners ; exit $? ;;
l) python "${ROOT}/build-support/bin/release.py list_packages" ; exit $? ;;

This comment has been minimized.

@stuhood

stuhood Mar 26, 2018

Member

It would be nice to actually define a target for this and to use pants, for two reasons: 1) it will attempt to locate an appropriate/stable version of python to use, 2) it will allow us to use pants' own utilities (although this doesn't appear to need any yet).

I bootstrapped one release-related tool under src/python/pants/releases/, so this could go there maybe?

This comment has been minimized.

@illicitonion

illicitonion Mar 27, 2018

Contributor

Pants writes a whole bunch of things to stdout which make ./pants run a pretty bad way to write little util scripts which output useful things.

Is there a way to make pants not do that?

pants$ ./pants run -q src/python/pants/releases:packages -- list 2>/dev/null

10:37:53 00:00 [main]
               (To run a reporting server: ./pants server)
10:37:53 00:00   [setup]
10:37:54 00:01     [parse]
               Executing tasks in goals: jvm-platform-validate -> bootstrap -> imports -> unpack-jars -> deferred-sources -> gen -> resolve -> resources -> compile -> pyprep -> binary -> run
10:37:55 00:02   [jvm-platform-validate]
10:37:55 00:02     [jvm-platform-validate]
10:37:55 00:02   [bootstrap]
10:37:55 00:02     [substitute-aliased-targets]
10:37:55 00:02     [jar-dependency-management]
10:37:55 00:02     [bootstrap-jvm-tools]
10:37:55 00:02     [provide-tools-jar]
10:37:55 00:02   [imports]
10:37:55 00:02     [ivy-imports]
10:37:55 00:02   [unpack-jars]
10:37:55 00:02     [unpack-jars]
10:37:55 00:02   [deferred-sources]
10:37:55 00:02     [deferred-sources]
10:37:55 00:02   [gen]
10:37:55 00:02     [antlr-java]
10:37:55 00:02     [antlr-py]
10:37:55 00:02     [jaxb]
10:37:55 00:02     [protoc]
10:37:56 00:03     [ragel]
10:37:56 00:03     [thrift-java]
10:37:56 00:03     [thrift-py]
10:37:56 00:03     [wire]
10:37:56 00:03     [avro-java]
10:37:56 00:03     [go-thrift]
10:37:56 00:03     [jax-ws]
10:37:56 00:03     [scrooge]
10:37:56 00:03     [thrifty]
10:37:56 00:03   [resolve]
10:37:56 00:03     [ivy]
10:37:56 00:03     [coursier]
10:37:56 00:03     [go]
10:37:56 00:03     [scala-js-compile]
10:37:56 00:03     [scala-js-link]
10:37:56 00:03     [node]
10:37:56 00:03   [resources]
10:37:56 00:03     [prepare]
10:37:56 00:03     [services]
10:37:56 00:03   [compile]
10:37:56 00:03     [node]
10:37:56 00:03     [compile-jvm-prep-command]
10:37:56 00:03       [jvm_prep_command]
10:37:56 00:03     [compile-prep-command]
10:37:56 00:03     [compile]
10:37:56 00:03     [zinc]
10:37:56 00:03     [jvm-dep-check]
10:37:56 00:03     [cpp]
10:37:56 00:03     [errorprone]
10:37:56 00:03     [findbugs]
10:37:56 00:03     [go]
10:37:56 00:03   [pyprep]
10:37:56 00:03     [interpreter]
10:37:56 00:03     [build-local-dists]
10:37:56 00:03     [requirements]
10:37:56 00:03     [sources]
10:37:56 00:03   [binary]
10:37:56 00:03     [binary-jvm-prep-command]
10:37:56 00:03       [jvm_prep_command]
10:37:56 00:03     [binary-prep-command]
10:37:56 00:03     [py]
                   created pex dist/packages.pex
10:37:57 00:04     [jvm]
10:37:57 00:04     [dup]
10:37:57 00:04     [cpplib]
10:37:57 00:04       [cpp-library]
10:37:57 00:04     [cpp]
10:37:57 00:04       [cpp-binary]
10:37:57 00:04     [go]
10:37:57 00:04   [run]
10:37:57 00:04     [py]
10:37:57 00:04       [run]
pantsbuild.pants
pantsbuild.pants.contrib.android
pantsbuild.pants.contrib.avro
pantsbuild.pants.contrib.buildgen
pantsbuild.pants.contrib.codeanalysis
pantsbuild.pants.contrib.confluence
pantsbuild.pants.contrib.cpp
pantsbuild.pants.contrib.errorprone
pantsbuild.pants.contrib.findbugs
pantsbuild.pants.contrib.go
pantsbuild.pants.contrib.googlejavaformat
pantsbuild.pants.contrib.jax_ws
pantsbuild.pants.contrib.mypy
pantsbuild.pants.contrib.node
pantsbuild.pants.contrib.python.checks
pantsbuild.pants.contrib.scalajs
pantsbuild.pants.contrib.scrooge
pantsbuild.pants.contrib.thrifty
pantsbuild.pants.testinfra

10:37:57 00:04     [jvm]
10:37:57 00:04     [cpp]
10:37:57 00:04     [go]
10:37:57 00:04     [node]
               Waiting for background workers to finish.
10:37:57 00:04   [complete]
               SUCCESS

This comment has been minimized.

@illicitonion

illicitonion Mar 27, 2018

Contributor

The best workaround I have is to ./pants binary >/dev/null && ./dist/foo.pex, which doesn't feel great...

This comment has been minimized.

@stuhood

This comment has been minimized.

@illicitonion

illicitonion Mar 28, 2018

Contributor

My invocation above includes -q...

This comment has been minimized.

@stuhood

stuhood Mar 28, 2018

Member

...oh boy. I believe that because it's not in a global position, it's only affecting the run.* tasks... which don't do much with it. ./pants -q run src/python/pants/releases:packages will get you want.

@illicitonion illicitonion force-pushed the twitter:dwagnerhall/releasepython-0 branch from 5831ed7 to afece1d Mar 29, 2018

@illicitonion illicitonion merged commit 5377f06 into pantsbuild:master Mar 29, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@illicitonion illicitonion deleted the twitter:dwagnerhall/releasepython-0 branch Apr 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment