Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

internal/server/state: project put should not modify applications #1027

Merged
merged 2 commits into from
Jan 27, 2021

Conversation

mitchellh
Copy link
Contributor

We document that project-related APIs cannot be used for applications,
but previously we didn't preserve existing applications. If a user
called UpsertProject to modify an existing project it'd blow away all
their applications.

This couldn't be hit in the real world unless the user was using the API
directly, since waypoint init -update is the only thing that calls
this API and it always registers applications again.

But with future changes such as introducing server side waypoint.hcl and
future UI changes to modify projects, this would've become a big issue.

We document that project-related APIs cannot be used for applications,
but previously we didn't preserve existing applications. If a user
called UpsertProject to modify an existing project it'd blow away all
their applications.

This couldn't be hit in the real world unless the user was using the API
directly, since `waypoint init -update` is the only thing that calls
this API and it always registers applications again.

But with future changes such as introducing server side waypoint.hcl and
future UI changes to modify projects, this would've become a big issue.
@mitchellh mitchellh requested a review from a team January 27, 2021 18:28
@github-actions github-actions bot added the core label Jan 27, 2021
Copy link
Contributor

@krantzinator krantzinator left a comment

Choose a reason for hiding this comment

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

good catch

internal/server/singleprocess/state/project_test.go Outdated Show resolved Hide resolved
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants