Add a native engine release check. #4096

Merged
merged 1 commit into from Nov 29, 2016

Conversation

Projects
None yet
4 participants
@jsirois
Member

jsirois commented Nov 23, 2016

This adds a check for an already released set of native engine binaries
as a pre-requisite to running a pants release as well as exposing an
option to run the check on its own.

Add a native engine release check.
This adds a check for an already released set of native engine binaries
as a pre-requisite to running a pants release as well as exposing an
option to run the check on its own.
@jsirois

This comment has been minimized.

Show comment
Hide comment
@jsirois

jsirois Nov 23, 2016

Member

Tested the new check with:

$ ./build-support/bin/release.sh  -e

[== 00:00 Checking for native engine release version e76849344e66d98cb240d0196d0a3b07fcabb4ff ==]

  for linux/i386 -> https://dl.bintray.com/pantsbuild/bin/build-support/bin/native-engine/linux/i386/e76849344e66d98cb240d0196d0a3b07fcabb4ff/native-engine... OK
  for linux/x86_64 -> https://dl.bintray.com/pantsbuild/bin/build-support/bin/native-engine/linux/x86_64/e76849344e66d98cb240d0196d0a3b07fcabb4ff/native-engine... OK
  for mac/10.7 -> https://dl.bintray.com/pantsbuild/bin/build-support/bin/native-engine/mac/10.7/e76849344e66d98cb240d0196d0a3b07fcabb4ff/native-engine... OK
  for mac/10.8 -> https://dl.bintray.com/pantsbuild/bin/build-support/bin/native-engine/mac/10.8/e76849344e66d98cb240d0196d0a3b07fcabb4ff/native-engine... OK
  for mac/10.9 -> https://dl.bintray.com/pantsbuild/bin/build-support/bin/native-engine/mac/10.9/e76849344e66d98cb240d0196d0a3b07fcabb4ff/native-engine... OK
  for mac/10.10 -> https://dl.bintray.com/pantsbuild/bin/build-support/bin/native-engine/mac/10.10/e76849344e66d98cb240d0196d0a3b07fcabb4ff/native-engine... OK
  for mac/10.11 -> https://dl.bintray.com/pantsbuild/bin/build-support/bin/native-engine/mac/10.11/e76849344e66d98cb240d0196d0a3b07fcabb4ff/native-engine... OK
  for mac/10.12 -> https://dl.bintray.com/pantsbuild/bin/build-support/bin/native-engine/mac/10.12/e76849344e66d98cb240d0196d0a3b07fcabb4ff/native-engine... OK
$ NATIVE_ENGINE_VERSION=da39a3ee5e6b4b0d3255bfef95601890afd80709 ./build-support/bin/release.sh  -e

[== 00:00 Checking for native engine release version da39a3ee5e6b4b0d3255bfef95601890afd80709 ==]

  for linux/i386 -> https://dl.bintray.com/pantsbuild/bin/build-support/bin/native-engine/linux/i386/da39a3ee5e6b4b0d3255bfef95601890afd80709/native-engine... OK
  for linux/x86_64 -> https://dl.bintray.com/pantsbuild/bin/build-support/bin/native-engine/linux/x86_64/da39a3ee5e6b4b0d3255bfef95601890afd80709/native-engine... OK
  for mac/10.7 -> https://dl.bintray.com/pantsbuild/bin/build-support/bin/native-engine/mac/10.7/da39a3ee5e6b4b0d3255bfef95601890afd80709/native-engine... FAILURE

curl: (22) The requested URL returned error: 404 Not Found

  for mac/10.8 -> https://dl.bintray.com/pantsbuild/bin/build-support/bin/native-engine/mac/10.8/da39a3ee5e6b4b0d3255bfef95601890afd80709/native-engine... FAILURE

curl: (22) The requested URL returned error: 404 Not Found

  for mac/10.9 -> https://dl.bintray.com/pantsbuild/bin/build-support/bin/native-engine/mac/10.9/da39a3ee5e6b4b0d3255bfef95601890afd80709/native-engine... FAILURE

curl: (22) The requested URL returned error: 404 Not Found

  for mac/10.10 -> https://dl.bintray.com/pantsbuild/bin/build-support/bin/native-engine/mac/10.10/da39a3ee5e6b4b0d3255bfef95601890afd80709/native-engine... FAILURE

curl: (22) The requested URL returned error: 404 Not Found

  for mac/10.11 -> https://dl.bintray.com/pantsbuild/bin/build-support/bin/native-engine/mac/10.11/da39a3ee5e6b4b0d3255bfef95601890afd80709/native-engine... FAILURE

curl: (22) The requested URL returned error: 404 Not Found

  for mac/10.12 -> https://dl.bintray.com/pantsbuild/bin/build-support/bin/native-engine/mac/10.12/da39a3ee5e6b4b0d3255bfef95601890afd80709/native-engine... FAILURE

curl: (22) The requested URL returned error: 404 Not Found


Failed to find 6 releases of native engine version da39a3ee5e6b4b0d3255bfef95601890afd80709

And verified existing users of utils.sh still worked:

$ ./build-support/bin/native/generate-bintray-manifest.sh 
    Finished release [optimized] target(s) in 0.0 secs
    Finished release [optimized] target(s) in 0.0 secs
$ python -mjson.tool native-engine.bintray.json 
{
    "package": {
        "subject": "pantsbuild",
        "repo": "bin",
        "name": "native-engine",
        "desc": "The pants native engine library.",
        "website_url": "http://www.pantsbuild.org",
        "issue_tracker_url": "https://github.com/pantsbuild/pants/issues",
        "vcs_url": "https://github.com/pantsbuild/pants.git",
        "licenses": [
            "Apache-2.0"
        ],
        "public_download_numbers": true,
        "public_stats": true,
        "github_use_tag_release_notes": false,
        "attributes": [],
        "labels": []
    },
    "version": {
        "name": "e76849344e66d98cb240d0196d0a3b07fcabb4ff",
        "desc": "The native engine at sha1: e76849344e66d98cb240d0196d0a3b07fcabb4ff",
        "released": "2016-11-23",
        "vcs_tag": "56d77d661352f1fa664454b367080b780eab914c",
        "attributes": [],
        "gpgSign": false
    },
    "publish": true,
    "files": [
        {
            "includePattern": "/home/jsirois/dev/pantsbuild/jsirois-pants/src/rust/engine/target/i686-unknown-linux-gnu/release/libengine.so",
            "uploadPattern": "build-support/bin/native-engine/linux/i386/e76849344e66d98cb240d0196d0a3b07fcabb4ff/native-engine"
        },
        {
            "includePattern": "/home/jsirois/dev/pantsbuild/jsirois-pants/src/rust/engine/target/x86_64-unknown-linux-gnu/release/libengine.so",
            "uploadPattern": "build-support/bin/native-engine/linux/x86_64/e76849344e66d98cb240d0196d0a3b07fcabb4ff/native-engine"
        }
    ]
}
$ rm -rf ~/.cache/pants/bin/native-engine/
$ git clean -fdx src/rust/
warning: failed to remove src/rust/engine/target/i686-unknown-linux-gnu/debug/.fingerprint/engine-78c5dd4624be9f35/dep-lib-engine
warning: failed to remove src/rust/engine/target/i686-unknown-linux-gnu/debug/.fingerprint/engine-78c5dd4624be9f35/lib-engine
warning: failed to remove src/rust/engine/target/i686-unknown-linux-gnu/debug/.fingerprint/engine-78c5dd4624be9f35/lib-engine.json
Removing src/rust/engine/target/i686-unknown-linux-gnu/release
Removing src/rust/engine/target/x86_64-unknown-linux-gnu
Removing src/rust/engine/target/release
^$ ./pants
   Compiling fnv v1.0.3
   Compiling libc v0.2.15
   Compiling engine v0.0.1 (file:///home/jsirois/dev/pantsbuild/jsirois-pants/src/rust/engine)
    Finished release [optimized] target(s) in 9.16 secs
No goals specified.
Use `pants goals` to list goals.
Use `pants help` to get help.
^$ ./pants
No goals specified.
Use `pants goals` to list goals.
Use `pants help` to get help.
Member

jsirois commented Nov 23, 2016

Tested the new check with:

$ ./build-support/bin/release.sh  -e

[== 00:00 Checking for native engine release version e76849344e66d98cb240d0196d0a3b07fcabb4ff ==]

  for linux/i386 -> https://dl.bintray.com/pantsbuild/bin/build-support/bin/native-engine/linux/i386/e76849344e66d98cb240d0196d0a3b07fcabb4ff/native-engine... OK
  for linux/x86_64 -> https://dl.bintray.com/pantsbuild/bin/build-support/bin/native-engine/linux/x86_64/e76849344e66d98cb240d0196d0a3b07fcabb4ff/native-engine... OK
  for mac/10.7 -> https://dl.bintray.com/pantsbuild/bin/build-support/bin/native-engine/mac/10.7/e76849344e66d98cb240d0196d0a3b07fcabb4ff/native-engine... OK
  for mac/10.8 -> https://dl.bintray.com/pantsbuild/bin/build-support/bin/native-engine/mac/10.8/e76849344e66d98cb240d0196d0a3b07fcabb4ff/native-engine... OK
  for mac/10.9 -> https://dl.bintray.com/pantsbuild/bin/build-support/bin/native-engine/mac/10.9/e76849344e66d98cb240d0196d0a3b07fcabb4ff/native-engine... OK
  for mac/10.10 -> https://dl.bintray.com/pantsbuild/bin/build-support/bin/native-engine/mac/10.10/e76849344e66d98cb240d0196d0a3b07fcabb4ff/native-engine... OK
  for mac/10.11 -> https://dl.bintray.com/pantsbuild/bin/build-support/bin/native-engine/mac/10.11/e76849344e66d98cb240d0196d0a3b07fcabb4ff/native-engine... OK
  for mac/10.12 -> https://dl.bintray.com/pantsbuild/bin/build-support/bin/native-engine/mac/10.12/e76849344e66d98cb240d0196d0a3b07fcabb4ff/native-engine... OK
$ NATIVE_ENGINE_VERSION=da39a3ee5e6b4b0d3255bfef95601890afd80709 ./build-support/bin/release.sh  -e

[== 00:00 Checking for native engine release version da39a3ee5e6b4b0d3255bfef95601890afd80709 ==]

  for linux/i386 -> https://dl.bintray.com/pantsbuild/bin/build-support/bin/native-engine/linux/i386/da39a3ee5e6b4b0d3255bfef95601890afd80709/native-engine... OK
  for linux/x86_64 -> https://dl.bintray.com/pantsbuild/bin/build-support/bin/native-engine/linux/x86_64/da39a3ee5e6b4b0d3255bfef95601890afd80709/native-engine... OK
  for mac/10.7 -> https://dl.bintray.com/pantsbuild/bin/build-support/bin/native-engine/mac/10.7/da39a3ee5e6b4b0d3255bfef95601890afd80709/native-engine... FAILURE

curl: (22) The requested URL returned error: 404 Not Found

  for mac/10.8 -> https://dl.bintray.com/pantsbuild/bin/build-support/bin/native-engine/mac/10.8/da39a3ee5e6b4b0d3255bfef95601890afd80709/native-engine... FAILURE

curl: (22) The requested URL returned error: 404 Not Found

  for mac/10.9 -> https://dl.bintray.com/pantsbuild/bin/build-support/bin/native-engine/mac/10.9/da39a3ee5e6b4b0d3255bfef95601890afd80709/native-engine... FAILURE

curl: (22) The requested URL returned error: 404 Not Found

  for mac/10.10 -> https://dl.bintray.com/pantsbuild/bin/build-support/bin/native-engine/mac/10.10/da39a3ee5e6b4b0d3255bfef95601890afd80709/native-engine... FAILURE

curl: (22) The requested URL returned error: 404 Not Found

  for mac/10.11 -> https://dl.bintray.com/pantsbuild/bin/build-support/bin/native-engine/mac/10.11/da39a3ee5e6b4b0d3255bfef95601890afd80709/native-engine... FAILURE

curl: (22) The requested URL returned error: 404 Not Found

  for mac/10.12 -> https://dl.bintray.com/pantsbuild/bin/build-support/bin/native-engine/mac/10.12/da39a3ee5e6b4b0d3255bfef95601890afd80709/native-engine... FAILURE

curl: (22) The requested URL returned error: 404 Not Found


Failed to find 6 releases of native engine version da39a3ee5e6b4b0d3255bfef95601890afd80709

And verified existing users of utils.sh still worked:

$ ./build-support/bin/native/generate-bintray-manifest.sh 
    Finished release [optimized] target(s) in 0.0 secs
    Finished release [optimized] target(s) in 0.0 secs
$ python -mjson.tool native-engine.bintray.json 
{
    "package": {
        "subject": "pantsbuild",
        "repo": "bin",
        "name": "native-engine",
        "desc": "The pants native engine library.",
        "website_url": "http://www.pantsbuild.org",
        "issue_tracker_url": "https://github.com/pantsbuild/pants/issues",
        "vcs_url": "https://github.com/pantsbuild/pants.git",
        "licenses": [
            "Apache-2.0"
        ],
        "public_download_numbers": true,
        "public_stats": true,
        "github_use_tag_release_notes": false,
        "attributes": [],
        "labels": []
    },
    "version": {
        "name": "e76849344e66d98cb240d0196d0a3b07fcabb4ff",
        "desc": "The native engine at sha1: e76849344e66d98cb240d0196d0a3b07fcabb4ff",
        "released": "2016-11-23",
        "vcs_tag": "56d77d661352f1fa664454b367080b780eab914c",
        "attributes": [],
        "gpgSign": false
    },
    "publish": true,
    "files": [
        {
            "includePattern": "/home/jsirois/dev/pantsbuild/jsirois-pants/src/rust/engine/target/i686-unknown-linux-gnu/release/libengine.so",
            "uploadPattern": "build-support/bin/native-engine/linux/i386/e76849344e66d98cb240d0196d0a3b07fcabb4ff/native-engine"
        },
        {
            "includePattern": "/home/jsirois/dev/pantsbuild/jsirois-pants/src/rust/engine/target/x86_64-unknown-linux-gnu/release/libengine.so",
            "uploadPattern": "build-support/bin/native-engine/linux/x86_64/e76849344e66d98cb240d0196d0a3b07fcabb4ff/native-engine"
        }
    ]
}
$ rm -rf ~/.cache/pants/bin/native-engine/
$ git clean -fdx src/rust/
warning: failed to remove src/rust/engine/target/i686-unknown-linux-gnu/debug/.fingerprint/engine-78c5dd4624be9f35/dep-lib-engine
warning: failed to remove src/rust/engine/target/i686-unknown-linux-gnu/debug/.fingerprint/engine-78c5dd4624be9f35/lib-engine
warning: failed to remove src/rust/engine/target/i686-unknown-linux-gnu/debug/.fingerprint/engine-78c5dd4624be9f35/lib-engine.json
Removing src/rust/engine/target/i686-unknown-linux-gnu/release
Removing src/rust/engine/target/x86_64-unknown-linux-gnu
Removing src/rust/engine/target/release
^$ ./pants
   Compiling fnv v1.0.3
   Compiling libc v0.2.15
   Compiling engine v0.0.1 (file:///home/jsirois/dev/pantsbuild/jsirois-pants/src/rust/engine)
    Finished release [optimized] target(s) in 9.16 secs
No goals specified.
Use `pants goals` to list goals.
Use `pants help` to get help.
^$ ./pants
No goals specified.
Use `pants goals` to list goals.
Use `pants help` to get help.
@jsirois

This comment has been minimized.

Show comment
Hide comment
@jsirois

jsirois Nov 23, 2016

Member

Closes #4089

Member

jsirois commented Nov 23, 2016

Closes #4089

@stuhood

Thanks John.

@jsirois jsirois removed the reviewable label Nov 29, 2016

@jsirois jsirois merged commit e969478 into pantsbuild:master Nov 29, 2016

1 of 2 checks passed

coverage/coveralls Coverage pending from Coveralls.io
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@jsirois jsirois deleted the jsirois:jsirois/issues/4089 branch Nov 29, 2016

lenucksi added a commit to lenucksi/pants that referenced this pull request Apr 25, 2017

Add a native engine release check. (#4096)
This adds a check for an already released set of native engine binaries
as a pre-requisite to running a pants release as well as exposing an
option to run the check on its own.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment