Merge lp://staging/~abentley/juju-release-tools/agents-stanzas-2 into lp://staging/juju-release-tools

Proposed by Aaron Bentley
Status: Merged
Merged at revision: 233
Proposed branch: lp://staging/~abentley/juju-release-tools/agents-stanzas-2
Merge into: lp://staging/juju-release-tools
Diff against target: 181 lines (+106/-36)
2 files modified
make-ubuntu-agent.bash (+2/-2) (+104/-34)
To merge this branch: bzr merge lp://staging/~abentley/juju-release-tools/agents-stanzas-2
Reviewer Review Type Date Requested Status
Curtis Hovey (community) code Approve
Review via email:

Commit message

Support all kinds of stanzas.

Description of the change

This branch adds support for alternate agent generation.

It supports Windows and Centos, but also supports using a single agent for all "living" ubuntus.

Because the number of parameters was getting unweildy, it creates a class to hold them. This class has various factory methods to support different generation approaches.

Since make_stanza can now make multiple stanzas, it is renamed to make_agent_json.

To post a comment you must log in.
Revision history for this message
Curtis Hovey (sinzui) wrote :

I have a few comments inline.

review: Needs Information (code)
237. By Aaron Bentley

Updates from review.

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

Hash: SHA256

I've pushed a new version with the changes you asked for.

>> + self.version_name ='%Y%m%d')
> Could this get weird if we build on machines in different
> timezones? maybe datetime.utcnow().strftime('%Y%m%d') is safer

The odds are low, because versions are only relevant if there are
competing item_names for a given content_id, and we don't do that.

Even if we did, items with the a given item_name will typically be built
on the same machine every time, so they will have the same timezone.

Still, there's no harm in using UTC time. Done.

>> + self.filename = filename + + @classmethod + def
>> for_ubuntu(cls, release, series, arch, version, revision_build,
> As an aside, I am constantly annoyed that debian calls the
> series/codename release, so when I work with lxc templates or
> scripts that make changelogs, I pass the series as the release.
> What we call a release is closer to debian version. While we don't
> see it often, I see that precise and trusty in the clouds are
> actually 12.04.5 and 14.04.2. There is no right ways to think about
> this.

The vagueness about release/series/codename bugs me, too. (And I can't
help wondering whether we really need both :-) Still, I tried to use
the terminology of the job. That meant that I had to do to do
"stanza['release'] = series" in make_stanzas(). Ugh.

> We need a single definition of this list that can be imported. Can
> you make this list a module level constant? I want formal
> definition of the series we support.

Version: GnuPG v2


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

Thank you.

review: Approve (code)

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