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

Load examples manifest via HTTP #4391

Merged
merged 29 commits into from
Dec 1, 2023
Merged

Load examples manifest via HTTP #4391

merged 29 commits into from
Dec 1, 2023

Conversation

jprochazk
Copy link
Member

@jprochazk jprochazk commented Nov 29, 2023

What

  • Stop including examples_manifest.json as part of the binary in favor of downloading it from app.rerun.io
  • Move re_viewer/build.rs logic to a separate binary crate
  • Native: Manifest URL override via a runtime env var
  • Web: Manifest URL override via query param (manifest_url)
  • CI: Build and upload examples_manifest.json together with every build of the web app for:
    • /commit
    • /pr
    • /version/nightly
    • /version/{tag}
    • /prerelease
    • /latest
  • PR template: Link to app using both nightly and PR examples manifest

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
    • Full build: app.rerun.io
    • Partial build: app.rerun.io - Useful for quick testing when changes do not affect examples in any way
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG

@jprochazk jprochazk added 🕸️ web regarding running the viewer in a browser include in changelog 🚢 CI labels Nov 30, 2023
@jprochazk jprochazk marked this pull request as ready for review November 30, 2023 11:43
@emilk emilk self-requested a review November 30, 2023 14:28
Copy link
Member

@emilk emilk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall, but I don't understand why there are two links in the new PR description template

Comment on lines 18 to 20
* [ ] I have tested the web demo (if applicable):
* [Nightly](https://app.rerun.io/pr/{{ pr.number }}/index.html?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json)
* [PR](https://app.rerun.io/pr/{{ pr.number }}/index.html)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be elaborated on. As it reads now I would assume the first link would test the nightly version of the viewer, which makes little sense.

Both are using the viewer from this PR afaict, but the first one links to example rrds from the "nightly" build, and the second one links to examples from… what exactly?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to add some more information here

web_viewer/index.html Outdated Show resolved Hide resolved
@@ -221,15 +291,15 @@ impl ExamplePage {
});
});

self.examples.iter().for_each(|example| {
for example in examples {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 - it's a bit surprising that clippy::needless_for_each doesn't catch this

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what I changed, but at some point while I was working on this, the lint finally popped up which prompted me to change this

crates/re_viewer/src/ui/welcome_screen/example_page.rs Outdated Show resolved Hide resolved
crates/re_viewer/src/ui/welcome_screen/example_page.rs Outdated Show resolved Hide resolved
crates/re_build_examples_manifest/src/main.rs Outdated Show resolved Hide resolved
Cargo.toml Outdated Show resolved Hide resolved
@jprochazk
Copy link
Member Author

I pulled in an unrelated change, prettier v3 expects lowercase doctype, but prettier v2 expects it uppercased. The vscode extension has yet to update to prettier v3, so the solution for now is to downgrade the version in pixi.toml to v2.

prettier/prettier#15476

@jprochazk jprochazk merged commit 52ce18d into main Dec 1, 2023
40 checks passed
@jprochazk jprochazk deleted the jan/online-manifest branch December 1, 2023 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
include in changelog 🚢 CI 🕸️ web regarding running the viewer in a browser
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Speed up web build on PRs Update the example manifest from the web
2 participants