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
agent_archive.py (+6/-7) tests/test_agent_archive.py (+6/-6) |
To merge this branch: | bzr merge lp://staging/~sinzui/juju-release-tools/upload-different-agents |
Related bugs: |
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.
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.