Skip to content

Commit 1c12938

Browse files
authored
Post-release cleanup (#1726)
* re_web_viewer_server: be explicit with what gets bundled in the crate * Fix a warning in release builds * Publish the crates quietly to better follow their progress * Update the RELEASES.md checklist * Highlight all breaking changes * Improve RELEASES.md * Remove dead doctest * Build-fix
1 parent af7d3b1 commit 1c12938

File tree

7 files changed

+71
-57
lines changed

7 files changed

+71
-57
lines changed

CHANGELOG.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,11 @@ We now host an experimental and unpolished web-viewer at <https://app.rerun.io/>
3030
- Add support for mesh vertex colors [#1671](https://github.com/rerun-io/rerun/pull/1671)
3131

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

3740
#### 🪳 Bug Fixes

RELEASES.md

+24-14
Original file line numberDiff line numberDiff line change
@@ -40,34 +40,44 @@ Release builds of the Python Wheels are triggered by pushing a release tag to Gi
4040
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.
4141

4242
### Release checklist
43-
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.
43+
Go through this checklist from top to bottom, and check each item before moving onto the next.
44+
This is a living document. Strive to improve it on each new release.
4445

4546
* [ ] Create a release branch called `release-0.x.y`
4647
* [ ] If it is a patch release branch off `latest` and cherry-pick the commits that should be included
47-
* [ ] For the draft PR description, add a:
48-
* [ ] One-line summary of the release
48+
* [ ] Update `CHANGELOG.md` with the new version number with:
49+
* [ ] A one-line summary of the release
4950
* [ ] A multi-line summary of the release
5051
* [ ] A gif showing a major new feature
51-
* [ ] Test the branch ([see below](#testing-a-release))
52-
* [ ] Open the PR up for review with the `⛴ release` label
53-
* [ ] `./scripts/publish_crates.sh --dry-run`
54-
* [ ] Bump version number in root `Cargo.toml`.
55-
* [ ] Update `CHANGELOG.md` with the new version number and the summary and the gif
5652
* [ ] Run `pip install GitPython && scripts/generate_changelog.py`
5753
* [ ] Edit PR descriptions/labels to improve the generated changelog
5854
* [ ] Copy-paste the results into `CHANGELOG.md`.
5955
* [ ] Editorialize the changelog if necessary
60-
* [ ] Make sure the changelog includes instructions for handling any breaking changes
61-
* [ ] Get the PR reviewed
56+
* [ ] Make sure the changelog includes instructions for handling any breaking changes
57+
* [ ] Commit and push the changelog
58+
* [ ] Create a draft PR containing:
59+
* [ ] One-line summary of the release
60+
* [ ] A multi-line summary of the release
61+
* [ ] A gif showing a major new feature
62+
* [ ] Test the branch ([see below](#testing-a-release))
63+
* [ ] Open the PR up for review with the `⛴ release` label
64+
* [ ] Bump version number in root `Cargo.toml`.
6265
* [ ] Check that CI is green
6366
* [ ] Publish the crates (see below)
6467
* [ ] `git tag -a v0.x.y -m 'Release 0.x.y - summary'`
6568
* `git push --tags`
6669
* This will trigger a PyPI release when pushed
67-
* [ ] `git pull --tags && git tag -d latest && git tag -a latest -m 'Latest release' && git push --tags origin latest --force`
70+
* [ ] `git pull --tags && git tag -d latest && git tag -a latest -m 'Latest release' && git push --tags origin latest --force`
71+
* [ ] Manually trigger a new web viewer build and upload at https://github.com/rerun-io/rerun/actions/workflows/rust.yml
72+
* [ ] Wait for CI to build release artifacts and publish them on GitHub and PyPI.
6873
* [ ] Merge PR
69-
* [ ] 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.
74+
* [ ] Edit the GitHub release at https://github.com/rerun-io/rerun/releases/edit/v0.x.0
75+
* [ ] Mark it as as the latest release
76+
* [ ] Paste in the `CHANGELOG.md`
77+
* [ ] Wait for wheel to appear on https://pypi.org/project/rerun-sdk/
78+
* [ ] Test the released Python and Rust libraries (see below)
7079
* [ ] Wait for documentation to build: https://docs.rs/releases/queue
80+
* [ ] Point <https://app.rerun.io/> to the latest release via instructions in <https://www.notion.so/rerunio/Ops-Notes-9232e436b80548a2b252c2312b4e4db6?pvs=4>.
7181
* [ ] Post on:
7282
* [ ] Community Discord
7383
* [ ] Rerun Twitter
@@ -85,8 +95,8 @@ Before pushing the release tag:
8595
* [ ] Mobile
8696

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

crates/re_viewer/src/app.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1576,7 +1576,7 @@ fn recordings_menu(ui: &mut egui::Ui, app: &mut App) {
15761576
}
15771577
}
15781578

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

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

15951595
egui_debug_options_ui(ui);
15961596
ui.separator();
1597-
debug_menu_options_ui(ui, frame);
1597+
debug_menu_options_ui(ui, _frame);
15981598
}
15991599
}
16001600

crates/re_web_viewer_server/Cargo.toml

+9-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,15 @@ include = [
1515
"../../LICENSE-MIT",
1616
"**/*.rs",
1717
"Cargo.toml",
18-
"web_viewer/*",
18+
19+
# Matches the files in crates/re_web_viewer_server/src/lib.rs
20+
"web_viewer/favicon.svg",
21+
"web_viewer/index_bundled.html",
22+
"web_viewer/re_viewer_bg.wasm",
23+
"web_viewer/re_viewer_debug_bg.wasm",
24+
"web_viewer/re_viewer_debug.js",
25+
"web_viewer/re_viewer.js",
26+
"web_viewer/sw.js",
1927
]
2028

2129

crates/re_web_viewer_server/src/lib.rs

+27-28
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,26 @@ use std::task::{Context, Poll};
1212
use futures_util::future;
1313
use hyper::{server::conn::AddrIncoming, service::Service, Body, Request, Response};
1414

15+
#[cfg(not(feature = "__ci"))]
16+
mod data {
17+
// If you add/remove/change the paths here, also update the include-list in `Cargo.toml`!
18+
pub const INDEX_HTML: &[u8] = include_bytes!("../web_viewer/index_bundled.html");
19+
pub const FAVICON: &[u8] = include_bytes!("../web_viewer/favicon.svg");
20+
pub const SW_JS: &[u8] = include_bytes!("../web_viewer/sw.js");
21+
22+
#[cfg(debug_assertions)]
23+
pub const VIEWER_JS_DEBUG: &[u8] = include_bytes!("../web_viewer/re_viewer_debug.js");
24+
25+
#[cfg(debug_assertions)]
26+
pub const VIEWER_WASM_DEBUG: &[u8] = include_bytes!("../web_viewer/re_viewer_debug_bg.wasm");
27+
28+
#[cfg(not(debug_assertions))]
29+
pub const VIEWER_JS_RELEASE: &[u8] = include_bytes!("../web_viewer/re_viewer.js");
30+
31+
#[cfg(not(debug_assertions))]
32+
pub const VIEWER_WASM_RELEASE: &[u8] = include_bytes!("../web_viewer/re_viewer_bg.wasm");
33+
}
34+
1535
struct Svc {
1636
// NOTE: Optional because it is possible to have the `analytics` feature flag enabled
1737
// while at the same time opting-out of analytics at run-time.
@@ -70,29 +90,14 @@ impl Service<Request<Body>> for Svc {
7090
let response = Response::builder();
7191

7292
let (mime, bytes) = match req.uri().path() {
73-
"/" | "/index.html" => (
74-
"text/html",
75-
&include_bytes!("../web_viewer/index_bundled.html")[..],
76-
),
77-
"/favicon.svg" => (
78-
"image/svg+xml",
79-
&include_bytes!("../web_viewer/favicon.svg")[..],
80-
),
81-
"/sw.js" => (
82-
"text/javascript",
83-
&include_bytes!("../web_viewer/sw.js")[..],
84-
),
93+
"/" | "/index.html" => ("text/html", data::INDEX_HTML),
94+
"/favicon.svg" => ("image/svg+xml", data::FAVICON),
95+
"/sw.js" => ("text/javascript", data::SW_JS),
8596

8697
#[cfg(debug_assertions)]
87-
"/re_viewer.js" => (
88-
"text/javascript",
89-
&include_bytes!("../web_viewer/re_viewer_debug.js")[..],
90-
),
98+
"/re_viewer.js" => ("text/javascript", data::VIEWER_JS_DEBUG),
9199
#[cfg(not(debug_assertions))]
92-
"/re_viewer.js" => (
93-
"text/javascript",
94-
&include_bytes!("../web_viewer/re_viewer.js")[..],
95-
),
100+
"/re_viewer.js" => ("text/javascript", data::VIEWER_JS_RELEASE),
96101

97102
"/re_viewer_bg.wasm" => {
98103
#[cfg(feature = "analytics")]
@@ -101,17 +106,11 @@ impl Service<Request<Body>> for Svc {
101106
#[cfg(debug_assertions)]
102107
{
103108
re_log::info_once!("Serving DEBUG web-viewer");
104-
(
105-
"application/wasm",
106-
&include_bytes!("../web_viewer/re_viewer_debug_bg.wasm")[..],
107-
)
109+
("application/wasm", data::VIEWER_WASM_DEBUG)
108110
}
109111
#[cfg(not(debug_assertions))]
110112
{
111-
(
112-
"application/wasm",
113-
&include_bytes!("../web_viewer/re_viewer_bg.wasm")[..],
114-
)
113+
("application/wasm", data::VIEWER_WASM_RELEASE)
115114
}
116115
}
117116
_ => {

rerun_py/src/python_session.rs

-7
Original file line numberDiff line numberDiff line change
@@ -156,13 +156,6 @@ impl PythonSession {
156156
///
157157
/// This function returns immediately.
158158
/// Disconnect with [`Self::disconnect`].
159-
///
160-
/// ## Example:
161-
///
162-
/// ``` no_run
163-
/// # let mut session = re_sdk::Session::new();
164-
/// session.connect(re_sdk::default_server_addr());
165-
/// ```
166159
pub fn connect(&mut self, addr: SocketAddr) {
167160
if !self.enabled {
168161
re_log::debug!("Rerun disabled - call to connect() ignored");

scripts/publish_crates.sh

+4-3
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ if [ ${DRY_RUN} = ${EXECUTE} ]; then
3434
exit 1
3535
fi
3636

37-
FLAGS=""
37+
FLAGS="--quiet"
3838

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

4545

46-
set -x
47-
4846
# IMPORTANT! we need to build an optimized .wasm that will be bundled when we publish `re_web_viewer_server`.
4947
# Normally `re_web_viewer_server/build.rd` builds the wasm/js but during `cargo publish`
5048
# we don't have normal access to the `re_viewer` crate, so the build-script fails,
@@ -56,6 +54,9 @@ set -x
5654
# though, so unless you have tools set up to run build scripts with the `--release` flag, we _should_ be fine,
5755
# but just in case:
5856
echo "MAKE SURE RUST ANALYZER, BACON, CARGO-WATCH etc are all OFF!"
57+
58+
set -x
59+
5960
pkillexitstatus=0
6061
sudo pkill -9 rust-analyzer bacon cargo cargo-watch || pkillexitstatus=$?
6162
if [ $pkillexitstatus -eq 0 ]; then

0 commit comments

Comments
 (0)