-
Notifications
You must be signed in to change notification settings - Fork 257
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: provisioner idempotence changes #1795
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
cd61f41
feat: add state to resource response
oddgrd 26e8b21
feat: move resourcestate to common, add state to db output
oddgrd 559547f
feat: remove resourcestate, response from backends
oddgrd 7a5a4c6
feat: make res req clone
oddgrd c2a8ba9
refactor: remove deleted state
oddgrd 403272a
Merge remote-tracking branch 'upstream/main' into feat/provisioning-i…
oddgrd b4f52bd
fix: make resourcestate optional
oddgrd f8e4481
feat: backend types for provisioning
oddgrd a5835c0
revert: remove loadresponse
oddgrd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
use serde::{Deserialize, Serialize}; | ||
|
||
/// Used by the runner service to send requests to control plane, where the requested resources | ||
/// will be provisioned. | ||
#[derive(Serialize, Deserialize)] | ||
pub struct ResourceRequest { | ||
/// The resource input returned from the runtime::load call. | ||
pub resources: Vec<Vec<u8>>, | ||
/// Used by the control plane to return provisioned resource data to the runner. | ||
#[derive(Serialize, Deserialize, Clone)] | ||
pub struct ResourceResponse { | ||
/// The resource output returned from provisioning. | ||
pub resource: Vec<u8>, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: Feels like there should be a better way to do this. 🤔 Not a must.
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.
The better way to do it would be to use an
enum
on Postgres I feel like.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.
Or doesn't https://users.rust-lang.org/t/sqlx-how-to-deserialize-an-enum-value/107215/4 work ? Though it has to be repeated in the query, so not ideal..
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.
I'll reconsider this as I implement RDS. We could use an enum, I just want to see if we need to add more states in the RDS PR first (I don't expect that, but it doesn't hurt to wait).