-
Notifications
You must be signed in to change notification settings - Fork 27
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(*)!: Makes version optional #281
feat(*)!: Makes version optional #281
Conversation
This PR makes two major changes. The first, and most important, is that versions are now optional. If no version field is passed, wadm will automatically generate a ULID to use as its version. This means that listing versions can be done in order by sorting them lexographically. Second is an inversion of the delete behavior. Most of the time the delete endpoint in practice has been used to delete the whole application and not just a specific version. Now, by default, if you call the delete endpoint, it will delete all versions. You can still pass a now optional version to delete a single specific version. While I was in the handlers, I also removed an unused field for orphaning undeploys Signed-off-by: Taylor Thomas <[email protected]>
…ange see wasmCloud/wadm#281 Signed-off-by: Lachlan Heywood <[email protected]>
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.
Fully in support of making version optional, though I would request changing the commit to feat(*)!
because not providing a version now is destructive instead of an error. On the wash-lib
/ wash-cli
side we can still handle the --delete-all
flag gracefully, and perhaps provide a warning, but it won't break existing functionality since not providing a version previously is an error
@@ -312,10 +312,6 @@ impl<P: Publisher> Handler<P> { | |||
.await | |||
} | |||
|
|||
// NOTE(thomastaylor312): This is different than wadm 0.3. I found it remarkably confusing that |
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.
…ange see wasmCloud/wadm#281 Signed-off-by: Lachlan Heywood <[email protected]>
@brooksmtownsend I updated the PR and the commit message on the squash merge to have the |
This PR makes two major changes. The first, and most important, is that versions are now optional. If no version field is passed, wadm will automatically generate a ULID to use as its version. This means that listing versions can be done in order by sorting them lexographically.
Second is an inversion of the delete behavior. Most of the time the delete endpoint in practice has been used to delete the whole application and not just a specific version. Now, by default, if you call the delete endpoint, it will delete all versions. You can still pass a now optional version to delete a single specific version.
While I was in the handlers, I also removed an unused field for orphaning undeploys