Repository navigation
sdk: python: Fix inconsistencies in passing IDs to fields - #4195
Merged
Merged
Conversation
helderco
force-pushed
the
python/codegen
branch
3 times, most recently
from
December 14, 2022 14:05
9d1fb4b to
6fc1f2c
Compare
Contributor
Author
|
Rebased. |
helderco
force-pushed
the
python/codegen
branch
2 times, most recently
from
December 14, 2022 14:51
82e6175 to
11339c9
Compare
Signed-off-by: Helder Correia <[email protected]>
helderco
force-pushed
the
python/codegen
branch
from
December 14, 2022 15:09
11339c9 to
d6107e7
Compare
grouville
approved these changes
Dec 15, 2022
Member
There was a problem hiding this comment.
Works as expected 😇
Tested locally on local engine (built it + pushed it to local registry) + local SDK
Top level fields now accept ids, it's so much clearer !
If:
-> you want to create a directory from scratch, you either specify nothing or a directoryID.
-> You want to append a dir to a container, you add directly a dir
It makes a lot of sense and fits well with the global API.
Example of:
- creation of a directory from a directoryID
- mount of the directory on the python container
Coupled with the runtime checks, it works well. Here, trying to use the id to add the dir to the container:

It fails, as expected, with the proper error message
LGTM, tested on most of the changes present on API. Great DX improvement 👏
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Fixes #4191
Breaking change
Container.with_rootfs(id)no longer accepts aDirectoryID. Only aDirectoryobject.idargument and return its object, no longer accept an object as argument. Only an ID.See PR's diff for all changes.