-
Notifications
You must be signed in to change notification settings - Fork 116
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
Switches plugin reporting to use Django name #1102
Switches plugin reporting to use Django name #1102
Conversation
7d55deb
to
196be42
Compare
This changes from
To
|
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.
Sounds good to me.
Just a coding style suggestion.
pulpcore/app/apps.py
Outdated
"pulpcore==3.10, plugins are required to define their version on the " | ||
"PulpPluginAppConfig subclass." | ||
) | ||
warnings.warn(msg, FutureWarning) | ||
raise ImproperlyConfigured(msg.format(self.label)) |
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.
👍
result["info"]["x-pulp-app-versions"] = {} | ||
for app in pulp_plugin_configs(): | ||
result["info"]["x-pulp-app-versions"][app.label] = app.version |
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.
result["info"]["x-pulp-app-versions"] = {} | |
for app in pulp_plugin_configs(): | |
result["info"]["x-pulp-app-versions"][app.label] = app.version | |
result["info"]["x-pulp-app-versions"] = { | |
app.label: app.version | |
for app in pulp_plugin_configs() | |
} |
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'd like to decline this change if that's alright. The list comprehension with the iterator at the end is less readable for me. What I wrote is a bit slower though.
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.
Thanks! Looks good to me.
@jlsherrill , FYI, this change is coming in 3.10. I think Katello uses the status endpoint to check pulp services state but I wonder if you check the installed plugins as well. |
] | ||
versions = [] | ||
for app in pulp_plugin_configs(): | ||
versions.append({"component": app.label, "version": app.version}) |
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 just realized, this changes the keys and not only the trailing "0" in the versions.
This will break the version check logic in the cli.
Can we get back to the old names`
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 also thought about this, but I don't see an easy way to. :/ What this change does is hand control over to the plugin for the name it provides. So it's up to the plugins really. Let's talk about it at the pulpcore meeting, I put an agenda item on there.
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.
And BTW. This is what breaks the CI here too.
This PR will become for 3.11. For 3.10 I've moved the non-breaking changes to this PR #1106 |
e1494d5
to
59e3887
Compare
@mdellweg any link on where I should look to fix the CI? Also is this something I'll need to also fix in the plugin template? |
https://github.com/pulp/pulpcore/blob/master/.ci/ansible/start_container.yaml#L87 is the check that fails. |
Thinking more about this: The check is really valuable, as it catches oops-we-updated-the-thing-to-test-from-pypi-because-of-dependencies mistakes. But it relies on the assumption that there is only one plugin in the repository. |
@mdellweg I agree it's valuable but we no longer have info required to perform it (right?). All I can think to do is to disable the check. What are our other options? Can you (or someone on the CI team) give me some advice? Thanks! |
For our well curated "single_plugins_in_one_repo" we should still able to find the information what version it is supposed to be, right? I really want to avoid testing a released version instead of failing for dependency issues. |
@mdellweg my apologies. I'm haven't looked into that CI check yet and I'm not up to speed on what it does. Can you elaborate a bit more? Thanks! |
Sure, it makes sure, that the code that is installed inside the container is the one we are supposed to test. |
59e3887
to
638262f
Compare
@@ -34,7 +34,7 @@ else | |||
fi | |||
mkdir .ci/ansible/vars || true | |||
echo "---" > .ci/ansible/vars/main.yaml | |||
echo "component_name: pulpcore" >> .ci/ansible/vars/main.yaml | |||
echo "component_name: pulp" >> .ci/ansible/vars/main.yaml |
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.
echo "component_name: pulp" >> .ci/ansible/vars/main.yaml | |
echo "component_name: core" >> .ci/ansible/vars/main.yaml |
template_config.yml
Outdated
@@ -19,7 +19,7 @@ deploy_daily_client_to_rubygems: true | |||
deploy_to_pypi: true | |||
docker_fixtures: true | |||
docs_test: true | |||
plugin_app_label: pulpcore | |||
plugin_app_label: pulp |
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.
plugin_app_label: pulp | |
plugin_app_label: core |
638262f
to
312a7b4
Compare
I'm about to say ACK here, but we need to merge |
312a7b4
to
ce4a8a6
Compare
@mdellweg I reapplied the plugin template from https://github.com/pulp/plugin_template/pull/341/files and pushed it here to see if this change will pass with that plugin template change. |
The Status API and the OpenAPI schema API now both use the Django name. This is a backwards incompatible change, but necessary to fix the bug which was using Python package names incorrectly instead. This also reapplies the plugin template changes required from the PR below: https://github.com/pulp/plugin_template/pull/341/files closes #8198
ce4a8a6
to
721c8d1
Compare
This accommodates for a change in pulpcore that will effect the CI. pulp/pulpcore#1102 [noissue]
This accommodates for a change in pulpcore that will effect the CI. pulp/pulpcore#1102 [noissue]
This accommodates for a change in pulpcore that will effect the CI. pulp/pulpcore#1102 [noissue]
This accommodates for a change in pulpcore that will effect the CI. pulp/pulpcore#1102 [noissue]
This accommodates for a change in pulpcore that will effect the CI. pulp/pulpcore#1102 [noissue]
This accommodates for a change in pulpcore that will effect the CI. pulp/pulpcore#1102 [noissue]
This accommodates for a change in pulpcore that will effect the CI. pulp/pulpcore#1102 [noissue]
This accommodates for a change in pulpcore that will effect the CI. pulp/pulpcore#1102 [noissue]
This accommodates for a change in pulpcore that will effect the CI. pulp/pulpcore#1102 [noissue]
This accommodates for a change in pulpcore that will effect the CI. pulp/pulpcore#1102 [noissue]
This accommodates for a change in pulpcore that will effect the CI. pulp/pulpcore#1102 [noissue]
This accommodates for a change in pulpcore that will effect the CI. pulp/pulpcore#1102 [noissue]
This accommodates for a change in pulpcore that will effect the CI. pulp/pulpcore#1102 [noissue]
This accommodates for a change in pulpcore that will effect the CI. pulp/pulpcore#1102 [noissue]
This accommodates for a change in pulpcore that will effect the CI. pulp/pulpcore#1102 [noissue]
This accommodates for a change in pulpcore that will effect the CI. pulp/pulpcore#1102 [noissue]
This accommodates for a change in pulpcore that will effect the CI. pulp/pulpcore#1102 [noissue]
This accommodates for a change in pulpcore that will effect the CI. pulp/pulpcore#1102 [noissue]
This accommodates for a change in pulpcore that will effect the CI. pulp/pulpcore#1102 [noissue]
This accommodates for a change in pulpcore that will effect the CI. pulp/pulpcore#1102 [noissue]
Attached issue: https://pulp.plan.io/issues/8198 |
The Status API and the OpenAPI schema API now both use the Django name.
This is a backwards incompatible change, but necessary to fix the bug
which was using Python package names incorrectly instead.
This also reapplies the plugin template changes required from the PR
below:
https://github.com/pulp/plugin_template/pull/341/files
closes #8198