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
feat(self-hosted): Add alpha-stage workstations command #69802
Conversation
""" | ||
|
||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | ||
s.bind(("", 0)) |
Check warning
Code scanning / CodeQL
Binding a socket to all network interfaces Medium
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will this be a problem? potentially if a self-hosted user decides to execute this command for some reason
4b6f380
to
ddb322f
Compare
ddb322f
to
fe324bf
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #69802 +/- ##
===========================================
+ Coverage 50.37% 79.83% +29.46%
===========================================
Files 6461 6500 +39
Lines 287621 289071 +1450
Branches 49563 49777 +214
===========================================
+ Hits 144881 230776 +85895
+ Misses 142316 57870 -84446
- Partials 424 425 +1 |
`workstations` command requires that the `gcloud` command line utility be installed and visible | ||
from its `$PATH`. | ||
|
||
The tool requires two configuration values: a `project` specifying the GCP project that owns the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to provide a default GCP project for Sentry users to use here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it's an alpha stage tool. We'd need to manually add them to the project anyway for now, so best to have anyone who wants to use this come to us.
localhost_port = _get_open_port() | ||
subprocess.Popen( | ||
[ | ||
GCLOUD, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Would prefer "gcloud" over GCLOUD since it is more clear what this is doing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed it to GCLOUD_BIN
.
permissions from the OSPO team to spin up a workstation. Please reach out to us on | ||
#discuss-self-hosted - we'd be happy to get you set up! :) | ||
|
||
This command is primarily intended for Sentry employees working on self-hosted. The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps it would be useful to link to https://github.com/getsentry/self-hosted/blob/master/workstation/README.md somewhere in the help section for the command?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
""" | ||
Create a bespoke Google Cloud Workstation instance. | ||
|
||
NOTE: THIS IS CURRENTLY AN ALPHA STAGE COMMAND! If you are a Sentry dev, you'll need explicit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to add a note along the lines of using a newer version of gcloud, I was on version 455.0 and the workstatations create command failed. After upgrading to 474.0 things started to go through.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a note further down.
This allows users who opt into the alpha test (by contacting the self-hosted team) to utilize the remote self-hosted instances setup we've been working on.
This is alpha-stage and quite under-tested, but we'll expand the coverage as we get more feedback.
Related: getsentry/self-hosted#2968