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

Non-existing dependency-profiles cause multiple errors #68

Open
ida opened this issue Sep 10, 2018 · 3 comments
Open

Non-existing dependency-profiles cause multiple errors #68

ida opened this issue Sep 10, 2018 · 3 comments

Comments

@ida
Copy link
Contributor

ida commented Sep 10, 2018

Refs: #64, plone/Products.CMFPlone#2228.

The multiple errors still occur, I think the culprit lies in getProfileDependenciesChain, because it is calling itself recursively:

chain.extend(self.getProfileDependencyChain(dependency, seen))

And the try/except-block in _runImportStepsFromContext of where it's called initially, is masking this:

Probably because the first try succeeds and later an exception occurs from a recursive-call.

So, I tried raising an error explicitly in getProfileDependenciesChain, but that also doesn't stop the execution of further code.

The only solution I came up with, is to return None in getDependenciesForProfile for symbolizing dependencies are broken, like it was sugested in #64:
dd11374

That will cause the interpreter to raise a "not-iterable"-error in getProfileDependenciesChain and fail hard, as wished.

@tseaver, @icemac, @sunew, if you think this is feasible, I'd like to provide another PR.

@ida
Copy link
Contributor Author

ida commented Sep 12, 2018

Closing this because I don't have more time left to spend on this. Thanks anyways!

@ida ida closed this as completed Sep 12, 2018
@ida ida changed the title Non-existing dependencies cause multiple errors Non-existing dependency-profiles cause multiple errors Sep 17, 2018
@ida
Copy link
Contributor Author

ida commented Sep 17, 2018

Made a sketch for failing when rising the instance, if a profile-name has no registration in a zcml-file:
https://github.com/ida/Products.GenericSetup/commit/ca553414a9a9a6214c1328833ea70d6ea677b3d3

@tseaver As you are Zope-pioneer, I'd appreciate a lot your opinion, whether hooking into Products.GenericSetup.zcml.registerProfile, is rather a bad idea, or could be a way to go.

@sunew pinging you in case you're still on debugging the related issue in the Plone-repo.

@ida ida reopened this Sep 17, 2018
@sunew
Copy link

sunew commented Sep 17, 2018

@ida thanks - I had to take look at some other issues, but will return to this one during the week.

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