(GH-874) Use PDK Context root for PDK Convert and Update #877
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 #874
Blocking until #872 is merged due to possible merge conflicts
Previously the pdk update and convert CLI commands had a strange failure mode
where if a "module" was nested inside another "module" but only the parent had
a metadata.json. When a user tried to update or convert the child module, the
files would be put in the parent. This was due to the CLI using the lax
detection (in_module_root?) method to "find" the module, but use the strict
detection method (module_root) during the actual conversion.
This commit updates these CLI logic to use the new PDK.context object which
is far more consistent. This commit also adds a test for these scenarios in
PDK update and convert.