-
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
feat: add support for cloud spec #119
Conversation
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.
Nice work!
@tonyandrewmeyer let me know what you think about the cloudspec dataclass ownership, we should make that decision once and for all if we didn't already :)
Thanks for the review, I have refactored according to your comments. Please take another look :) |
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.
Looks better! Thanks :)
One more round and I think we're there
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.
Added a few comments as well.
One other thing: I think it would be worth having the consistency checker validate that State.cloud_spec
is None if State.model.type == "kubernetes"
Co-authored-by: PietroPasotti <[email protected]>
Co-authored-by: PietroPasotti <[email protected]>
After discussion in standup, we decided to keep the CloudSpec dataclass in scenario but remove the |
Adding as a top-level comment as well to avoid it getting lost: it seems strange to me to have AuthType as an enum but not cloud type. I think we should do none or both, unless there's a good reason not to? It looks like we're leaning towards enums, so let's do enums for both. We should also link to the Juju source in a comment, for reference. |
After discussion in the standup today we decided to use |
I have done yet another refactoring according to your reviews, please take a look @tonyandrewmeyer @PietroPasotti. For the record, I still don't feel this is right, but I've done it anyway to try to make it consistent:
For another record, there are inconsistent code in Some places do: errors = []
warnings = []
# do something
return Results(errors, warnings) Other places do: errors = []
# do something
return Results(errors, []) I think the latter is less readable since I need to click into the definition of |
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.
Would you be able to add a short example into the README? Ideally, we have all of the state documented there.
README updated. Also made "to ops" methods "private". It makes sense to make them private; I thought one of them was used in the test but it wasn't, my bad. Only discussion left open: |
IMHO |
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.
Very close -- just a few nit comments now.
All updated, please take another look. |
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.
Great, thanks for the updates!
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.
Looks good to me - thanks! I would suggest that @PietroPasotti has a final review before it's merged, though, since I'm still pretty new to Scenario.
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.
Some thoughts on the defaults that need discussing, but the rest looks good! 👍
Co-authored-by: PietroPasotti <[email protected]>
@PietroPasotti can't reply you in one of your comment so I'm putting it here in another separate comment: Regarding enum vs str, there is a discussion in previous comments where we decided to make it consistent as str, so it's resolved. |
@IronCore864 @tonyandrewmeyer where are we on this PR? |
I thought everything had been resolved (merging is fine with me). @IronCore864 were you wanting a final review from @PietroPasotti ? |
Sorry for getting back at it so late, I just finished some other tasks and could only get back at it now. It seems all comments are resolved, and in my latest commit, I fixed the comment improvement specified by @PietroPasotti. @tonyandrewmeyer it's ready to be merged, I don't have write access to this repo. |
Add support for cloud spec with an e2e test.