Merge lp://staging/~sinzui/juju-release-tools/upload-different-agents into lp://staging/juju-release-tools

Proposed by Curtis Hovey
Status: Merged
Merged at revision: 190
Proposed branch: lp://staging/~sinzui/juju-release-tools/upload-different-agents
Merge into: lp://staging/juju-release-tools
Diff against target: 86 lines (+12/-13)
2 files modified (+6/-7)
tests/ (+6/-6)
To merge this branch: bzr merge lp://staging/~sinzui/juju-release-tools/upload-different-agents
Reviewer Review Type Date Requested Status
Aaron Bentley (community) Approve
Review via email:

Description of the change

Allow us to upload centos and win agents of the same version

The rules to prevent overwriting a published agent are incorrect. After uploading the new win agents, I was prevented from uploading a centos agent because the agent's juju version was the same and the windows agent. The nested loop is wrong. After checking juju versions, we need to precisely check that the agent's full name is different. I added a test that demonstrates that a win-agent of the same juju version does not block uploading a centos agent.

To post a comment you must log in.
191. By Curtis Hovey

Look for match juju and os versions to decide if agents are published.

Revision history for this message
Curtis Hovey (sinzui) wrote :

I rethought the rule to match the intent of the rules used to copy agents.

We do not ever want to overwrite an agent. the rules are to upload one agent for a juju version and os version then copy it to 0 or more os "series". Thus we upload 1.2.3 win2012, and make 1.2.3 win2012r2 as well. centos7 is not copied, its list is empty, but the design is to one day put centos8 in the list.

The changed function gets a list of s2 matching juju version *and os*. Any match is a problem because of how the copy rule works. So the method raises an error. I removed the extra test I first proposed because the it matched test_add_agent_puts_centos() because the "ls" is empty.

Revision history for this message
Curtis Hovey (sinzui) wrote :

And as a bonus, where there is an overwrite error, I now see all the agents that would be overwritten.

Revision history for this message
Aaron Bentley (abentley) wrote :

Looks good!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.


People subscribed via source and target branches