Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forgetting to add is_other_project to results in some strange behavior #104

Open
briantist opened this issue Mar 11, 2023 · 2 comments
Open

Comments

@briantist
Copy link
Contributor

I was attempting to bootstrap a non-Ansible project, by copying my config from a collection and modifying a few things.
I forgot to add is_other_project and tried to generate the changelog, using:

antsibull-changelog release --version <ver> --date <date>

In this case it could not find galaxy.yml of course and it did warn about that, but it also completely ignored --version and used a version it discovered from ansible itself (the version of core, or in the case of 2.9, it used 2.9.27 or whatever it was). I think the date was correct.

The warning led me toward adding --is-collection to the command line which was confusing because I never had to do it before, thought it might have been new, but this was not the right direction for this situation (and it still ignored --version) :)

It took me quite a bit of time to figure out what was going on, I thought there might have been a bug with the new-ish functionality for automatically reading versions from python-based projects.

Of course it was my error, but I wonder if there might be a better way to catch or warn about this.

@felixfontein
Copy link
Collaborator

Actually, there's a bug, the warning/error should say --is-collection yes and not --is-collection no (for a collection without galaxy.yml). With --is-collection no, it basically assumes you are doing a release for ansible-core itself, and only accepts --version if also --codename is supplied.

In any case, it's somewhat hard to distinguish between a collection without galaxy.yml, and another project. In any case, it is probably a good idea to error out if it tries to do a ansible-core release where only one of --codename and --version is specified.

@felixfontein
Copy link
Collaborator

#105 should fix the things I commented on above.

gotmax23 pushed a commit that referenced this issue Mar 13, 2023
…d `--codename` is supplied for an ansible-core release (#105)

* Fix boolean error.

* Don't ignore --version or --codename when only one is supplied for an ansible-core release.

* Remove unnecessary pylint ignore.

Relates: #104
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants