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

Add support for autopublish and autodistribute #199

Merged
merged 1 commit into from
Apr 13, 2021

Conversation

daviddavis
Copy link
Contributor

fixes #155

@daviddavis daviddavis force-pushed the issue155 branch 2 times, most recently from 441fafc to 4b7c8fc Compare April 8, 2021 11:50
@daviddavis
Copy link
Contributor Author

If this looks good, I'll add in support for pulp_rpm.

@daviddavis daviddavis force-pushed the issue155 branch 9 times, most recently from 6729be8 to abee46a Compare April 8, 2021 17:14
update_options = [
click.option("--base-path"),
click.option("--publication"),
click.option("--repository", callback=_repository_callback),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@mdellweg
Copy link
Member

mdellweg commented Apr 8, 2021

This all looks good to me. And i believe the nightly is failing, because those changes will land there tomorrow!?

@daviddavis daviddavis force-pushed the issue155 branch 3 times, most recently from 87f80e1 to 16304c5 Compare April 12, 2021 19:20
@daviddavis daviddavis marked this pull request as ready for review April 12, 2021 19:26
@daviddavis daviddavis force-pushed the issue155 branch 3 times, most recently from 4c68c49 to 24b3086 Compare April 12, 2021 20:41
Copy link
Member

@mdellweg mdellweg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One uncertainty wrt the changelog.

click.option("--gpgcheck", type=click.Choice(("0", "1"))),
click.option("--repo-gpgcheck", type=click.Choice(("0", "1"))),
click.option("--sqlite-metadata/--no-sqlite-metadata", default=None),
click.option("--autopublish/--no-autopublish", default=None),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This kind of completes the repository options, not necessarily related to auto publish.
Do we want to reflect that in the changelog?

@mdellweg mdellweg added this to the 0.8.0 milestone Apr 13, 2021
update_options = [
click.option("--description"),
click.option("--remote", callback=_remote_callback),
click.option("--manifest"),
click.option("--autopublish/--no-autopublish", default=None),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO the default should simply be --no-autopublish.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an update_option. So if not specified, we should def not set (and then update) this option to False.
I think having None here, keeps it from being touched on update calls, and on create calls i'd rather let the server decide on the default.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I believe I misunderstood what it does then

Copy link
Contributor Author

@daviddavis daviddavis Apr 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree it should default to --no-autopublish. The dilemma is that this will cause autopublish to always be set in the requests which won't work for older versions of pulp_file/pulp_rpm and we support 5 versions back.

I could either:

  1. Check the version of pulp_file and if it's less than 1.7.0, silently strip out the autopublish key/value from the request.
  2. Keep the default as None which won't set autopublish in requests unless the user explicitly sets --autopublish or --no-autopublish. I could add a comment for us to change the default once we drop support for <1.7.0.

Thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welp, ignore my comment. I am too slow.

),
click.option("--gpgcheck", type=click.Choice(("0", "1"))),
click.option("--repo-gpgcheck", type=click.Choice(("0", "1"))),
click.option("--sqlite-metadata/--no-sqlite-metadata", default=None),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

@daviddavis daviddavis merged commit 857f90a into pulp:develop Apr 13, 2021
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

Successfully merging this pull request may close these issues.

Add support for autopublish and autodistribute
3 participants