-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add anonymous open environment routes #377
Conversation
431352f
to
9f1ce7e
Compare
cmd/esc/cli/client/client.go
Outdated
@@ -677,6 +685,16 @@ func (pc *client) GetOpenEnvironmentWithProject(ctx context.Context, orgName, pr | |||
return &resp, nil | |||
} | |||
|
|||
func (pc *client) GetAnonymousOpenEnvironment(ctx context.Context, orgName, openSessionID string) (*esc.Environment, error) { | |||
var resp esc.Environment | |||
path := fmt.Sprintf("/api/esc/environments/%v/yaml/open/%v", orgName, openSessionID) |
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.
Should this include project in the URL? As far as I understand, envName and project are not used, but eventually we will remove routes without project, right?
Also, nit - ideally should be more specific and use %s for strings, generic is always more bug-prone
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.
we will remove preview routes but this is a GA route. we decided that we don't need to include projects in this route for anonymous envs.
cmd/esc/cli/client/client.go
Outdated
} | ||
|
||
var resp esc.Value | ||
path := fmt.Sprintf("/api/esc/environments/%v/yaml/open/%v", orgName, openSessionID) |
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.
Same as above
9f1ce7e
to
9f2fd43
Compare
Adds methods for the anonymous open env routes so that the Pulumi CLI can use them