Skip to content
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

Merged
merged 1 commit into from
May 15, 2024

Conversation

thomastaylor312
Copy link
Contributor

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

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]>
lachieh added a commit to wasmCloud/wasmCloud that referenced this pull request May 14, 2024
Copy link
Member

@brooksmtownsend brooksmtownsend left a 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
Copy link
Member

Choose a reason for hiding this comment

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

tenor-606073

lachieh added a commit to wasmCloud/wasmCloud that referenced this pull request May 15, 2024
@thomastaylor312 thomastaylor312 changed the title feat(*): Makes version optional feat(*)!: Makes version optional May 15, 2024
@thomastaylor312 thomastaylor312 enabled auto-merge (squash) May 15, 2024 19:49
@thomastaylor312
Copy link
Contributor Author

@brooksmtownsend I updated the PR and the commit message on the squash merge to have the !

@thomastaylor312 thomastaylor312 merged commit 74a71f3 into wasmCloud:main May 15, 2024
3 checks passed
@thomastaylor312 thomastaylor312 deleted the feat/no_version branch May 15, 2024 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants