-
Notifications
You must be signed in to change notification settings - Fork 356
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
fix: support ruamel.yaml==0.18.0 [DET-9913] #8228
Merged
Merged
Conversation
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
✅ Deploy Preview for determined-ui canceled.
|
rb-determined-ai
changed the title
fix: support ruamel.yaml==0.18.0
fix: support ruamel.yaml==0.18.0 [DET-9913]
Oct 23, 2023
@@ -43,8 +43,7 @@ | |||
"python-dateutil", | |||
"pytz", | |||
"tabulate>=0.8.3", | |||
# det preview-search "pretty-dumps" a sub-yaml with an API added in 0.15.29 |
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.
versions older than 0.15.78 don't install with python 3.8, so this pin is no longer relevant.
ioga
approved these changes
Oct 23, 2023
rb-determined-ai
force-pushed
the
rb/ruamel
branch
from
October 23, 2023 22:41
de43bb1
to
2ee2194
Compare
rb-determined-ai
added
the
to-cherry-pick
Pull requests that need to be cherry-picked into the current release
label
Oct 23, 2023
rb-determined-ai
removed
the
to-cherry-pick
Pull requests that need to be cherry-picked into the current release
label
Oct 24, 2023
rb-determined-ai
force-pushed
the
rb/ruamel
branch
from
October 24, 2023 17:44
2ee2194
to
9ba8377
Compare
stoksc
approved these changes
Oct 24, 2023
We pinned the ruamel.yaml<0.18.0 in a recent release as a hotfix, but this is the real fix.
rb-determined-ai
force-pushed
the
rb/ruamel
branch
from
October 24, 2023 18:22
9ba8377
to
5fcef5b
Compare
Comment on lines
+64
to
+81
# | ||
# This strategy isn't a documented API in ruamel.yaml, but it was recommended by the ruamel.yaml | ||
# author in stack overflow[1]. | ||
# | ||
# [1] https://stackoverflow.com/a/76870790 | ||
class IgnoreUnknownTagConstructor(yaml.SafeConstructor): | ||
def ignore_unknown(self, node: Any) -> None: | ||
return None | ||
|
||
|
||
LoaderIgnoreUnknown.add_constructor(None, LoaderIgnoreUnknown.ignore_unknown) | ||
IgnoreUnknownTagConstructor.add_constructor(None, IgnoreUnknownTagConstructor.ignore_unknown) | ||
|
||
|
||
def get_default_cf_parameter(deployment_object: DeterminedDeployment, parameter: str) -> Any: | ||
y = yaml.YAML(typ="safe", pure=True) | ||
y.Constructor = IgnoreUnknownTagConstructor | ||
with open(deployment_object.template_path) as fin: | ||
data = yaml.load(fin, Loader=LoaderIgnoreUnknown) | ||
data = y.load(fin) |
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.
@ioga please review this specifically
rb-determined-ai
added a commit
that referenced
this pull request
Oct 24, 2023
This reverts commit ae839a8.
3 tasks
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.
There was a breaking change in the ruamel.yaml API, which has the unfortunate effect on our cli of causing commands like
det e config
to emit absolutely no error message, just exit 1 silently.Test Plan