-
Notifications
You must be signed in to change notification settings - Fork 42
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
Cast #915
base: main
Are you sure you want to change the base?
Cast #915
Conversation
c09fa4f
to
00621cc
Compare
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.
Looks good, mainly have clarifying questions before approval.
CHANGES/pulp-glue/+cast.feature
Outdated
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.
Can you remind me again how these named changelog entries work? Why not file an issue for them?
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.
They will appear without as link.
pulp-glue/tests/conftest.py
Outdated
|
||
|
||
class PulpTestContext(PulpContext): | ||
# TODO check if we can just make the base class ignore echo. |
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.
What does this mean, doesn't the base class raise a NotImplemented
error?
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.
It does, and that means, the PulpContext is unusable as is. I think that is a bad thing.
pulp-glue/tests/test_api_quirks.py
Outdated
from pulp_glue.common.context import _REGISTERED_API_QUIRKS, PulpContext | ||
|
||
pytestmark = pytest.mark.glue |
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.
Is this another pytest quirk? How does it work?
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.
It marks all tests in this scope. (Putting it in conftest did not work sadly.)
pytest_pulp_cli/__init__.py
Outdated
@pytest.fixture(scope="session") | ||
def pulp_cli_settings_path( |
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.
Nice refactor!
if hasattr(plugin, "mount"): | ||
plugin.mount() |
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.
Currently none of the pulp_glue plugins have a mount
method, do you see the need for one in the future?
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.
I'm not sure. This would be better "have" than "need".
@@ -33,6 +33,15 @@ documentation = "https://docs.pulpproject.org/pulp_cli/" | |||
repository = "https://github.com/pulp/pulp-cli" | |||
changelog = "https://docs.pulpproject.org/pulp_cli/CHANGES/" | |||
|
|||
[project.entry-points."pulp_glue.plugins"] |
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.
Have you opened up the corresponding PRs in our other cli-plugin repositories? They won't be registered as loaded until they have made this change.
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.
That is right, but i think it should be safe to fade this in slowly.
This allows to auto-detect and load all installed pulp-glue plugins. It is primarily useful for workflows where knowing all sub-types of an Entity is only important at runtime.
Review Checklist: