Crates.io | gazenot |
lib.rs | gazenot |
version | 0.3.3 |
source | src |
created_at | 2023-11-08 21:29:01.862144 |
updated_at | 2024-07-05 19:42:37.466294 |
description | Gaze Not Into The Abyss, Lest You Become A Release Engineer |
homepage | |
repository | https://github.com/axodotdev/gazenot |
max_upload_size | |
id | 1029452 |
size | 75,701 |
Gaze Not Into The Abyss, Lest You Become A Release Engineer
Gazenot is a client library for accessing Abyss, the heart of axo Releases.
Abyss is easiest to understand as a simple package registry for prebuilt binaries.
There are several objectives to its design:
It should be easy to "partially" run a "publish" to let end-users test their release process (via cargo-dist's pull-request CI)
It should be easy to "rollback" a release that failed part way through the process (e.g. because npm publish
failed)
Once a release is really complete ("Announced") it should become immutable-by-default
Make Something Better Than GitHub Releases
Something Something Software-Bill-Of-Materials Features
Abyss defines the following core concepts:
And these less-core-but-still-fundamental concepts:
cargo-dist defines a pipeline for releasing/announcing a package, which Abyss heavily models. The cargo-dist pipeline is:
The goal of separating Host, Publish, and Announce into separate steps is to allow us to get stable/pretty Release URLs live in case they should be used for things like an npm package that fetches from our hosting while still allowing the npm publish to fail. That is, by keeping the release "disconnected" or "permissions: only people with this URL can view it", we have the ability to still roll back the release without updating things like The Latest Release URL or The List Of All Releases.
Note 1: currently cargo-dist always bakes in the more ugly Set URL when generating installer impls, as the design of Abyss currently disallows cargo-dist from knowing the Release URL until it actually invokes create-release, even though cargo-dist knew it would want to from the start. That said, this uglier mode is necessary for Release Preview -> Release workflows, so it's good that works!
Note 2: there is currently no supported functionality for doing this kind of "Release rollback". The user needs to manually intervene to throw out a Disconnected Releases, which currently would be like, emailing us. The key point is that conceptually a Disconnected Release can be totally scrapped (making its Release URL go dead), while an Announced Release is ideally As Forever As Possible.
The following diagram depicts how Abyss's concepts map to this pipeline (and which endpoints cargo-dist invokes during each one).
flowchart LR
subgraph plan
create-artifact-set
check-auth["check-auth\n(technically feeds to Build too\nwith fake URLs, but not host)"]
end
subgraph build["build (not modeled by Abyss)"]
fake2([build apps\nbuild installers\n...])
end
subgraph host
upload-file["upload-file\n(many times)"]
create-release
create-release-preview
create-pr-preview
end
subgraph publish["publish (not modeled by Abyss)"]
fake1([publish to crates.io\npublish to npm\npublish to homebrew\n...])
end
subgraph announce
F[create-announcement]
end
create-artifact-set --> build
build --> upload-file
upload-file --> create-release
upload-file --> create-release-preview
upload-file --> create-pr-preview
create-release-preview --> create-release
create-release --> publish
publish --> announce
(Arguably create-release is a "the first publish step" but cargo-dist currently lumps it into "host" and that increasingly feels correct/simpler shrug...)
One of the core side-effects of Abyss is Making URLs You Can Download Artifacts From. Because it breaks the release process into multiple stages, there are many Kinds of Artifact Download URL. These all point to CDN hosting, and not Abyss.
A Set Url (https://myuser.artifacts.axodotdev.host/myapp/ax_UJl_tKCujZwxKL1n_K7TM
) is a permanent randomly
generated URL for downloading files from an ArtifactSet. It can be embedded in things like the bodies of curl-sh
installers made by cargo-dist, but ideally it should never be presented to end-users in things like curl-sh
expressions which show up on oranda websites, install widgets, or announcement posts.
A Release URL (https://myuser.artifacts.axodotdev.host/myapp/v1.0.0/
) is a permanent stable-format URL for
downloading files from a Release('s ArtifactSet). This is typically what should be presented in curl-sh expressions.
This URL may go dead if a Release is never Announced.
A Latest (Release) URL (https://myuser.artifacts.axodotdev.host/myapp/latest/
) is a mutable-destination
stable-format URL for downloading "whatever the latest Release('s ArtifactSet) is". This URL is appropriate for
linking in random docs which you don't want to update every time there's a release.
(Theoretically) A Release Preview URL ...
(Theoretically) A PR Preview URL ...
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
If you are interested in contributing, please read our [CONTRIBUTING notes] and our [Code of Conduct].