Skip to content

chore: add site flag to buildinfo #14868

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

Merged
merged 2 commits into from
Oct 1, 2024
Merged

chore: add site flag to buildinfo #14868

merged 2 commits into from
Oct 1, 2024

Conversation

ethanndickson
Copy link
Member

@ethanndickson ethanndickson commented Sep 30, 2024

As of #14761, the access URL is automatically opened in the browser when running coder server. This becomes annoying when running versions of Coder without a frontend during development.

This PR skips opening the URL in the browser when there is no frontend embedded into the binary. Since this is different from a slim build of Coder (i.e. a true slim build is ~40mb, this build is ~120mb), it wouldn't make sense to set the existing slim flag to true. The solution is to add a new site flag, and a hasSite function to buildinfo that can be used to detect frontendless builds.

Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @ethanndickson and the rest of your teammates on Graphite Graphite

@ethanndickson ethanndickson marked this pull request as ready for review September 30, 2024 08:07
@ethanndickson ethanndickson changed the title chore: add site flag to buildinfo chore: add site flag to buildinfo Sep 30, 2024
Copy link
Contributor

@dannykopping dannykopping left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for addressing this.

Side-note: coder/internal#54 (which you addressed in the previous PR) says to only open the browser on the first run. This happens on every run currently, and I think we ought to mention how to disable this.

Perhaps like this?

╔═══════════════════════════════════════════════╗
║               View the Web UI:                ║
║   https://et23ntkhpueak.pit-1.try.coder.app   ║
║   Disable auto-open with `--no-open`          ║
╚═══════════════════════════════════════════════╝

Or only do so when the first user has not been created?

@ethanndickson
Copy link
Member Author

The database doesn't get initialised until a fair bit after we print the access URL, after which a bunch of logs will have streamed in.
I think a message advertising no-open is very much appropriate, will add!

Copy link
Contributor

@dannykopping dannykopping left a comment

Choose a reason for hiding this comment

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

LGTM, thanks 👍

@ethanndickson ethanndickson enabled auto-merge (squash) September 30, 2024 12:36
@ethanndickson ethanndickson force-pushed the ethan/buildinfo-site branch 2 times, most recently from 03ac0f8 to 7fa8132 Compare October 1, 2024 07:29
@ethanndickson ethanndickson merged commit 35a5475 into main Oct 1, 2024
27 checks passed
@ethanndickson ethanndickson deleted the ethan/buildinfo-site branch October 1, 2024 10:01
@github-actions github-actions bot locked and limited conversation to collaborators Oct 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants