The only property from elections-messages that does not conform to the fedora-messaging requirements was the "agent" property which needed to be changed to "agent_name".
rebased onto b41602921b747ff9292d0717f7f7ed31438a91fc
Hmm, I remember a discussion that for services like this one, the agent property should be kept around so existing users don’t break.
agent
There's a typo, should be agent_name.
agent_name
1 new commit added
For compat purposes, added agent property that references agent_name. Spelling error corrections in other files
Fixed the typo, pointed agent property to agent_name, included a deprecation warning for the agent property.
rebased onto 9b27c877972805096c212adfc7b5e34cbcb61e29
Should this return a list?
This should stay I guess.
Same here
… and here
… and here:
"properties": { "agent": {"type": "string"}, "agent_name": {"type": "string"}, "election": ELECTION_SCHEMA },
… and here 🙂
Additionally I'd add a test for the compat functionality, i.e. access the agent property, verify it's the same result object as the agent_name property returns and that a warning has been logged (see the caplog pytest fixture).
caplog
i test the warning in bodhi messages tests with pytest.warns
Good idea, that's probably less complicated than having to set the log level and grepping for the right message.
rebased onto 15b4615423814d20f00487920ab74a23160c33ad
Tests passed
Let's rather wrap the long strings above than bump the allowed line length. 😁
will do
rebased onto 1ad4688041b356d19d40caeb1eba1b97c9373ab6
Changes pushed
Looks good to me, would you trim the commit log message?
rebased onto 6f2703b71fc557c605695d5e5f333f30c0f953ae
Commit message trimmed
No idea why I didn’t notice it before, but why is self.agent_name wrapped in a list here? I assume agent was a string before and it’s declared that way below.
self.agent_name
rebased onto 7f02741dc6e8f9a80851e1ef470dbb59f9b27f57
You're right, changed it
Looks good to me, thanks!
@abompard, would you please merge?
Pull-Request has been merged by abompard
The only property from elections-messages that does not conform to the fedora-messaging requirements was the "agent" property which needed to be changed to "agent_name".