Skip to content
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

spec-or-ref in policie spec causes circular dependency error #173

Open
AgentO3 opened this issue Mar 18, 2019 · 2 comments
Open

spec-or-ref in policie spec causes circular dependency error #173

AgentO3 opened this issue Mar 18, 2019 · 2 comments

Comments

@AgentO3
Copy link
Contributor

AgentO3 commented Mar 18, 2019

In the policy spec I have a need for a parameter to be able to take a spec-or-ref. This is because I want to use an xref parameter. However I can't simply use spec-or-ref in the crucible.policies namespace. This is because the spec-or-ref function is defined in the crucible.resources namespace. Referencing it in the crucible.policies namespace or any required namespaces in the crucible.policies causes a circular dependency.

We could move the spec-or-ref function out of the crucible.resources namespace but that would be a rather large change since the spec-or-ref function is used often. Also, it would mean a breaking change for anyone who has defined custom resources. I can't come up with a simple solution so I'm looking for any ideas. However, I think the right solution may need to move the spec-or-ref out of the crucible.resources.

@brabster
Copy link
Owner

Sorry you've hit this problem - my first thought is that we could copy the spec-or-ref function out to another namespace and deprecate the existing one. They just generate particular JSON structures so I think it'd be easy enough to add a few tests to ensure compatibility. Open to better ideas though!

@AgentO3
Copy link
Contributor Author

AgentO3 commented Mar 19, 2019

Oh, it's no problem, thanks for creating and maintaining this repo. Yeah, duplication would be the easiest solution. I wasn't sure which direction to go without some feedback first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants