-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Cockpit pcp python follow up #21056
Cockpit pcp python follow up #21056
Conversation
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! I'm really excited about this, it'll solve some long-standing downstream packaging trouble.
8fbc4a0
to
e6d0ca9
Compare
The PCP functionality is now part of the Python bridge which replaces the C cockpit-pcp binary.
We no longer run the PCP bridge.
e1f5a57
to
4447e3f
Compare
4447e3f
to
338882d
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.
Thanks! At least to me, the python3-pcp vs. pcp handling is still rather muddy -- I think if you do this deliberately, I'd need a high-level write-up which parts look at pcp
and the service, and which parts look at the py module, and why they have to disagree.
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 re-reviewed this from scratch after the previous discussions about the weird dependency direction in Fedora.
const os_release = await read_os_release(); | ||
const pcp_packages = ["pcp"]; | ||
|
||
// PCP contains the Python module on Arch Linux, for all other distro's it is split up. |
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.
For our future selves: Please document why we have to explicitly install both: That on Fedora, python3-pcp depends on pcp, and on Debian pcp depends on python3-pcp.
@@ -1789,8 +1805,10 @@ class MetricsHistory extends React.Component { | |||
this.setState({ | |||
loading: false, | |||
metricsAvailable: false, | |||
isPythonPCPInstalled: message?.message !== "python3-pcp not installed", |
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.
Please do message.problem === "not-supported"
? That's much better than this human string comparison. Also, your mock hack just does raise ChannelError('not-supported')
without a message.
(The ?
here is unnecessary -- you already asserted that message.problem exists)
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.
No, the mock is for a different scenario.
The python PCP bridge implementation is now the default in Cockpit and also supports the beiboot scenario as we can install pcp (and python3-pcp if required) as it does not pull in any cockpit* package) We depend on python3-pcp explicitly as Fedora's pcp package does not pull it in while Debian does.
This could likely already work fine on Arch as cockpit-pcp was split but our tests weren't adjusted.
338882d
to
c225f9d
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.
I really dislike the human error string comparison instead of the problem code, but I'm ok with that being a follow-up. Thanks!
Throwing this at CI, this still needs: