I noticed that in the case of create_namespace() and create_tag() the argument update_if_exists was misleading. Adjusted it to skip_if_exists . The update if exist functionality is still possible through the get()/save() pattern.
Also found one more issue with the _deploy_namespaces() method of the project compile.
It was erroring out because of existing namespaces, example:
users.olek.project1.xp.source-controlled tag Tag users.olek.project1.xp.source-controlled successfully created (or updated)
users.olek.project1 namespace {'message': 'Node namespace `users.olek.project1` already exists'}
Test Plan
Unit test plus test deployments of my example YAML project.
Now getting a warning if the namespace exists:
XP Nodes
Deployment for Prefix: users.olek.project1
Name Type Message
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
users.olek.project1.xp.source-controlled tag Tag users.olek.project1.xp.source-controlled successfully created (or updated)
users.olek.project1 namespace Namespace users.olek.project1 already exists
users.olek.project1.xp namespace Namespace users.olek.project1.xp already exists
users.olek.project1.xp.foo-bar dimension Node users.olek.project1.foo-bar successfully created (or updated)
...
Summary
I noticed that in the case of create_namespace() and create_tag() the argument
update_if_exists
was misleading. Adjusted it toskip_if_exists
. The update if exist functionality is still possible through the get()/save() pattern.Also found one more issue with the _deploy_namespaces() method of the project compile. It was erroring out because of existing namespaces, example:
Test Plan
Unit test plus test deployments of my example YAML project.
Now getting a warning if the namespace exists:
make check
passesmake test
shows 100% unit test coverageDeployment Plan