[openstack-dev] [release][ptl] new "linter" rules for openstack/releases repository

Doug Hellmann doug at doughellmann.com
Tue Aug 1 19:45:17 UTC 2017


Excerpts from Alex Schultz's message of 2017-08-01 12:55:15 -0600:
> On Tue, Aug 1, 2017 at 12:07 PM, Doug Hellmann <doug at doughellmann.com> wrote:
> > The release team is working on a series of patches to improve the
> > data validation within openstack/releases. Part of that work is to
> > apply consistent formatting rules for all of the YAML files, so it
> > is easier to build tools that automatically update those files. To
> > enable those consistent rules, we have had to "normalize" the use
> > of whitespace in a bunch of the existing files.
> >
> > These changes mean that if you have built your own automation for
> > adding new releases, you might have to make adjustments. If you do,
> > please take the time to look at the tools within the repo (in
> > particular the new-release, interactive-release, and edit-deliverable
> > commands) to see if they meet your needs, or can be extended to do
> > so. There's not much point in all of us building our own tools. :-)
> >
> > If you're curious about the actual changes, you can have a look at the
> > patch series for "queens-indentation" at
> > https://review.openstack.org/#/q/project:openstack/releases+topic:queens-indentation
> >
> 
> Was the linting rules applied via templates or is this something that
> can be done programatically via pyyaml/ruamel.yaml or some other
> library?  I know for the puppet release files I was using ruamel.yaml

We're using yamllint and jsonschema. The whitepsace rules are enforced
by yamllint, and now also by the yamlutils module in the releases repo
which configures PyYAML to emit YAML that matches the linter rules.

Doug

> to match up with what was being generated but this new formatting
> seems to diverge from what it generates.   The last time I went
> looking the tooling provided seemed to be using templates which didn't
> match anything if you were trying to manage the files via normal yaml
> objects which was kinda the problem.
> 
> Thanks,
> -Alex
> 
> > Doug
> >
> > __________________________________________________________________________
> > OpenStack Development Mailing List (not for usage questions)
> > Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> 



More information about the OpenStack-dev mailing list