Skip to content
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

Post-release cleanup #1726

Merged
merged 8 commits into from
Mar 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,11 @@ We now host an experimental and unpolished web-viewer at <https://app.rerun.io/>
- Add support for mesh vertex colors [#1671](https://github.com/rerun-io/rerun/pull/1671)

#### 🦀 Rust SDK
- Refactor: `re_sdk` no longer depends on `re_viewer` [#1507](https://github.com/rerun-io/rerun/pull/1507)
- Refactor `re_sdk::Session` [#1528](https://github.com/rerun-io/rerun/pull/1528)
- ⚠️ `Session::new` has been replaced with `SessionBuilder` [#1528](https://github.com/rerun-io/rerun/pull/1528)
- ⚠️ `session.spawn(…)` -> `rerun::native_viewer::spawn(session, …)` [#1507](https://github.com/rerun-io/rerun/pull/1507)
- ⚠️ `session.show()` -> `rerun::native_viewer::show(session)` [#1507](https://github.com/rerun-io/rerun/pull/1507)
- ⚠️ `session.serve(…)` -> `rerun::serve_web_viewer(session, …);` [#1507](https://github.com/rerun-io/rerun/pull/1507)
- ⚠️ `rerun::global_session` is now hidden behind the `global_session` feature flag [#1507](https://github.com/rerun-io/rerun/pull/1507)
- Add support for mesh vertex colors [#1671](https://github.com/rerun-io/rerun/pull/1671)

#### 🪳 Bug Fixes
Expand Down
38 changes: 24 additions & 14 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,34 +40,44 @@ Release builds of the Python Wheels are triggered by pushing a release tag to Gi
If we are doing a patch release, we do a branch off of the latest release tag (e.g. `v0.3.0`) and cherry-pick any fixes we want into that branch.

### Release checklist
Copy this checklist to the the PR description, go through it from top to bottom, and check each item before moving onto the next. This is a living document. Strive to improve it on each new release.
Go through this checklist from top to bottom, and check each item before moving onto the next.
This is a living document. Strive to improve it on each new release.

* [ ] Create a release branch called `release-0.x.y`
* [ ] If it is a patch release branch off `latest` and cherry-pick the commits that should be included
* [ ] For the draft PR description, add a:
* [ ] One-line summary of the release
* [ ] Update `CHANGELOG.md` with the new version number with:
* [ ] A one-line summary of the release
* [ ] A multi-line summary of the release
* [ ] A gif showing a major new feature
* [ ] Test the branch ([see below](#testing-a-release))
* [ ] Open the PR up for review with the `⛴ release` label
* [ ] `./scripts/publish_crates.sh --dry-run`
* [ ] Bump version number in root `Cargo.toml`.
* [ ] Update `CHANGELOG.md` with the new version number and the summary and the gif
* [ ] Run `pip install GitPython && scripts/generate_changelog.py`
* [ ] Edit PR descriptions/labels to improve the generated changelog
* [ ] Copy-paste the results into `CHANGELOG.md`.
* [ ] Editorialize the changelog if necessary
* [ ] Make sure the changelog includes instructions for handling any breaking changes
* [ ] Get the PR reviewed
* [ ] Make sure the changelog includes instructions for handling any breaking changes
* [ ] Commit and push the changelog
* [ ] Create a draft PR containing:
* [ ] One-line summary of the release
* [ ] A multi-line summary of the release
* [ ] A gif showing a major new feature
* [ ] Test the branch ([see below](#testing-a-release))
* [ ] Open the PR up for review with the `⛴ release` label
* [ ] Bump version number in root `Cargo.toml`.
* [ ] Check that CI is green
* [ ] Publish the crates (see below)
* [ ] `git tag -a v0.x.y -m 'Release 0.x.y - summary'`
* `git push --tags`
* This will trigger a PyPI release when pushed
* [ ] `git pull --tags && git tag -d latest && git tag -a latest -m 'Latest release' && git push --tags origin latest --force`
* [ ] `git pull --tags && git tag -d latest && git tag -a latest -m 'Latest release' && git push --tags origin latest --force`
* [ ] Manually trigger a new web viewer build and upload at https://github.com/rerun-io/rerun/actions/workflows/rust.yml
* [ ] Wait for CI to build release artifacts and publish them on GitHub and PyPI.
* [ ] Merge PR
* [ ] Wait for CI to build release artifacts and publish them on GitHub and PyPI. Verify this at https://github.com/rerun-io/rerun/releases/new.
* [ ] Edit the GitHub release at https://github.com/rerun-io/rerun/releases/edit/v0.x.0
* [ ] Mark it as as the latest release
* [ ] Paste in the `CHANGELOG.md`
* [ ] Wait for wheel to appear on https://pypi.org/project/rerun-sdk/
* [ ] Test the released Python and Rust libraries (see below)
* [ ] Wait for documentation to build: https://docs.rs/releases/queue
* [ ] Point <https://app.rerun.io/> to the latest release via instructions in <https://www.notion.so/rerunio/Ops-Notes-9232e436b80548a2b252c2312b4e4db6?pvs=4>.
* [ ] Post on:
* [ ] Community Discord
* [ ] Rerun Twitter
Expand All @@ -85,8 +95,8 @@ Before pushing the release tag:
* [ ] Mobile

After tagging and the CI has published:
* [ ] Test the Python packages from PyPI: `pip install rerun_sdk==0.3.0a1`
* [ ] Test rust install version: `cargo install -f rerun@0.3.0-alpha.1 -F web_viewer && rerun --web-viewer api.rrd`
* [ ] Test the Python packages from PyPI: `pip install rerun_sdk==0.x.0a1`
* [ ] Test rust install version: `cargo install -f rerun@0.x.0-alpha.1 -F web_viewer && rerun --web-viewer api.rrd`
* [ ] Test rust crate: Modify Cargo.toml of any example to not point to the workspace
* [ ] run with `--serve` to test web player

Expand Down
4 changes: 2 additions & 2 deletions crates/re_viewer/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1576,7 +1576,7 @@ fn recordings_menu(ui: &mut egui::Ui, app: &mut App) {
}
}

fn options_menu_ui(ui: &mut egui::Ui, frame: &mut eframe::Frame, options: &mut AppOptions) {
fn options_menu_ui(ui: &mut egui::Ui, _frame: &mut eframe::Frame, options: &mut AppOptions) {
ui.style_mut().wrap = Some(false);

if ui
Expand All @@ -1594,7 +1594,7 @@ fn options_menu_ui(ui: &mut egui::Ui, frame: &mut eframe::Frame, options: &mut A

egui_debug_options_ui(ui);
ui.separator();
debug_menu_options_ui(ui, frame);
debug_menu_options_ui(ui, _frame);
}
}

Expand Down
10 changes: 9 additions & 1 deletion crates/re_web_viewer_server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,15 @@ include = [
"../../LICENSE-MIT",
"**/*.rs",
"Cargo.toml",
"web_viewer/*",

# Matches the files in crates/re_web_viewer_server/src/lib.rs
"web_viewer/favicon.svg",
"web_viewer/index_bundled.html",
"web_viewer/re_viewer_bg.wasm",
"web_viewer/re_viewer_debug_bg.wasm",
"web_viewer/re_viewer_debug.js",
"web_viewer/re_viewer.js",
"web_viewer/sw.js",
]


Expand Down
55 changes: 27 additions & 28 deletions crates/re_web_viewer_server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,26 @@ use std::task::{Context, Poll};
use futures_util::future;
use hyper::{server::conn::AddrIncoming, service::Service, Body, Request, Response};

#[cfg(not(feature = "__ci"))]
mod data {
// If you add/remove/change the paths here, also update the include-list in `Cargo.toml`!
pub const INDEX_HTML: &[u8] = include_bytes!("../web_viewer/index_bundled.html");
pub const FAVICON: &[u8] = include_bytes!("../web_viewer/favicon.svg");
pub const SW_JS: &[u8] = include_bytes!("../web_viewer/sw.js");

#[cfg(debug_assertions)]
pub const VIEWER_JS_DEBUG: &[u8] = include_bytes!("../web_viewer/re_viewer_debug.js");

#[cfg(debug_assertions)]
pub const VIEWER_WASM_DEBUG: &[u8] = include_bytes!("../web_viewer/re_viewer_debug_bg.wasm");

#[cfg(not(debug_assertions))]
pub const VIEWER_JS_RELEASE: &[u8] = include_bytes!("../web_viewer/re_viewer.js");

#[cfg(not(debug_assertions))]
pub const VIEWER_WASM_RELEASE: &[u8] = include_bytes!("../web_viewer/re_viewer_bg.wasm");
}

struct Svc {
// NOTE: Optional because it is possible to have the `analytics` feature flag enabled
// while at the same time opting-out of analytics at run-time.
Expand Down Expand Up @@ -70,29 +90,14 @@ impl Service<Request<Body>> for Svc {
let response = Response::builder();

let (mime, bytes) = match req.uri().path() {
"/" | "/index.html" => (
"text/html",
&include_bytes!("../web_viewer/index_bundled.html")[..],
),
"/favicon.svg" => (
"image/svg+xml",
&include_bytes!("../web_viewer/favicon.svg")[..],
),
"/sw.js" => (
"text/javascript",
&include_bytes!("../web_viewer/sw.js")[..],
),
"/" | "/index.html" => ("text/html", data::INDEX_HTML),
"/favicon.svg" => ("image/svg+xml", data::FAVICON),
"/sw.js" => ("text/javascript", data::SW_JS),

#[cfg(debug_assertions)]
"/re_viewer.js" => (
"text/javascript",
&include_bytes!("../web_viewer/re_viewer_debug.js")[..],
),
"/re_viewer.js" => ("text/javascript", data::VIEWER_JS_DEBUG),
#[cfg(not(debug_assertions))]
"/re_viewer.js" => (
"text/javascript",
&include_bytes!("../web_viewer/re_viewer.js")[..],
),
"/re_viewer.js" => ("text/javascript", data::VIEWER_JS_RELEASE),

"/re_viewer_bg.wasm" => {
#[cfg(feature = "analytics")]
Expand All @@ -101,17 +106,11 @@ impl Service<Request<Body>> for Svc {
#[cfg(debug_assertions)]
{
re_log::info_once!("Serving DEBUG web-viewer");
(
"application/wasm",
&include_bytes!("../web_viewer/re_viewer_debug_bg.wasm")[..],
)
("application/wasm", data::VIEWER_WASM_DEBUG)
}
#[cfg(not(debug_assertions))]
{
(
"application/wasm",
&include_bytes!("../web_viewer/re_viewer_bg.wasm")[..],
)
("application/wasm", data::VIEWER_WASM_RELEASE)
}
}
_ => {
Expand Down
7 changes: 0 additions & 7 deletions rerun_py/src/python_session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,6 @@ impl PythonSession {
///
/// This function returns immediately.
/// Disconnect with [`Self::disconnect`].
///
/// ## Example:
///
/// ``` no_run
/// # let mut session = re_sdk::Session::new();
/// session.connect(re_sdk::default_server_addr());
/// ```
pub fn connect(&mut self, addr: SocketAddr) {
if !self.enabled {
re_log::debug!("Rerun disabled - call to connect() ignored");
Expand Down
7 changes: 4 additions & 3 deletions scripts/publish_crates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ if [ ${DRY_RUN} = ${EXECUTE} ]; then
exit 1
fi

FLAGS=""
FLAGS="--quiet"

if [ ${DRY_RUN} = true ]; then
FLAGS="--dry-run"
Expand All @@ -43,8 +43,6 @@ fi
echo $FLAGS


set -x

# IMPORTANT! we need to build an optimized .wasm that will be bundled when we publish `re_web_viewer_server`.
# Normally `re_web_viewer_server/build.rd` builds the wasm/js but during `cargo publish`
# we don't have normal access to the `re_viewer` crate, so the build-script fails,
Expand All @@ -56,6 +54,9 @@ set -x
# though, so unless you have tools set up to run build scripts with the `--release` flag, we _should_ be fine,
# but just in case:
echo "MAKE SURE RUST ANALYZER, BACON, CARGO-WATCH etc are all OFF!"

set -x

pkillexitstatus=0
sudo pkill -9 rust-analyzer bacon cargo cargo-watch || pkillexitstatus=$?
if [ $pkillexitstatus -eq 0 ]; then
Expand Down