Skip to content

fix(build): fetch the contract jars from a pinned release, not latest - #27

Open
abhinavlenka wants to merge 1 commit into
risa-labs-inc:mainfrom
abhinavlenka:fix/pin-ipc-release
Open

abhinavlenka wants to merge 1 commit into
risa-labs-inc:mainfrom
abhinavlenka:fix/pin-ipc-release

Conversation

@abhinavlenka

Copy link
Copy Markdown

Fixes #26.

Problem

A clean checkout can't build. downloadDeps asks the latest BossConsole-Releases release for boss-ipc-<ipc.version>.jar, but ipc.version is pinned to 1.0.0, and from v9.5.20 onwards no release ships that jar (v9.5.20 ships 1.1.0, v9.5.21 and v9.5.22 ship 1.2.0). Reproduced on main:

↓ https://github.com/risa-labs-inc/BossConsole-Releases/releases/latest/download/boss-ipc-1.0.0.jar
> java.io.FileNotFoundException: .../releases/download/v9.5.22/boss-ipc-1.0.0.jar

Change

  • upstream.release.tag=v9.5.19 in gradle.properties: the newest release that ships boss-ipc-1.0.0.jar plus boss-ui-sdk, plugin-api-core and plugin-api-ipc at 1.0.0. It sits next to ipc.version, with a note to bump the two together.
  • downloadDeps defaults to that tag instead of latest. -Pupstream.source still overrides it.
  • Clear failure: a jar missing from the release fails with a message naming the jar, the release and the two properties to change, instead of a bare FileNotFoundException.
  • No half-downloaded jars: each file is written to <jar>.part and moved into place only when complete. Before, a download cut off part-way left a truncated jar that the already present check accepted on every later run.
  • release.yml is unchanged in behaviour: with no bossconsole_release_tag, it now passes /releases/latest/download explicitly, which is what it got before by default. A release run that overrides ipc_version to a version only latest ships keeps working.

Verification

From a clean build/ with CI=true:

  • ./gradlew downloadDeps fetches all four jars from v9.5.19.
  • ./gradlew build passes: BUILD SUCCESSFUL, 256 tests, 0 failures.
  • -Pupstream.release.tag=v9.5.22 fails with the new message and leaves no partial file behind.

Note for #21

#21 moves ipc.version to 1.1.0. With this change it also needs upstream.release.tag=v9.5.20, the release that ships boss-ipc-1.1.0.jar. Without that, the new error names exactly what to change.

A clean checkout could not build: downloadDeps asked the latest BossConsole-Releases
release for boss-ipc-<ipc.version>.jar, and from v9.5.20 on no release ships
boss-ipc-1.0.0.jar. The version was pinned while the release it came from floated.

- gradle.properties gains upstream.release.tag=v9.5.19, the newest release that ships
  boss-ipc-1.0.0 and the three 1.0.0 contract jars; bump it with ipc.version.
- downloadDeps defaults to that tag. -Pupstream.source still overrides it.
- A jar missing from the release now fails with a message naming the jar, the release
  and the two properties to change, instead of a bare FileNotFoundException.
- Each jar is written to a .part file and moved into place when complete, so a download
  cut off part-way no longer leaves a truncated jar that the "already present" check
  accepts on every later run.
- release.yml passes /releases/latest/download explicitly when no tag is given, so a
  release run behaves exactly as before, including one that overrides ipc_version.

Fixes risa-labs-inc#26
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.

A clean checkout cannot build: downloadDeps fetches boss-ipc-1.0.0 from the latest release, which ships 1.2.0

1 participant