Skip to content

Updated workflows to use Pulp CLI#336

Merged
dralley merged 1 commit intopulp:masterfrom
gerrod3:cli_docs
Mar 10, 2021
Merged

Updated workflows to use Pulp CLI#336
dralley merged 1 commit intopulp:masterfrom
gerrod3:cli_docs

Conversation

@gerrod3
Copy link
Copy Markdown
Contributor

@gerrod3 gerrod3 commented Mar 9, 2021

fixes: #8364
https://pulp.plan.io/issues/8364

Pulp CLI next release should contain Pulp Python support, so updating these docs early to be contained in next release, hopefully later this week. The CLI has almost full coverage of the REST API (missing from_bandersnatch endpoint) for the Python plugin, so I want to get people using it ASAP, especially since we've been getting a lot of interest lately.


# Poll the task (here we use a function defined in docs/_scripts/base.sh)
wait_until_task_finished $BASE_ADDR$TASK_URL
pulp python repository add --name foo --filename "shelf-reader-0.1.tar.gz"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is a little unintuitive, we're saying repository add --name foo but it's not creating a repository, it's adding content to a repository.

Does a reverse order work? pulp python repository --foo add --filename "shelf-reader-0.1.tar.gz"

Or maybe the names could be changed slightly?

pulp python repository add-content --repo-name foo --filename "shelf-reader-0.1.tar.gz"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We discussed a schema, where you specified the repository to work on before the action to do.
Think: pulp file repository --name "foo" update --description "bar"
We termed it the "interspersed args design" and folks said, it was unintuitive. So we moved all the args to the end.

If you look at the recently merged PR about "nested lookup options" this might be a way to call them --repository and alternatively --repository-href.

@gerrod3 gerrod3 force-pushed the cli_docs branch 5 times, most recently from 0f4b98c to 317fc96 Compare March 9, 2021 19:58
Comment thread docs/_scripts/artifact.sh
@@ -1,12 +1,6 @@
# Get a Python package or choose your own
curl -O https://repos.fedorapeople.org/pulp/pulp/fixtures/python-pypi/packages/shelf-reader-0.1.tar.gz
curl -O https://fixtures.pulpproject.org/python-pypi/packages/shelf-reader-0.1.tar.gz
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1

Copy link
Copy Markdown
Contributor

@dralley dralley left a comment

Choose a reason for hiding this comment

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

This is a solid improvement, thanks for all of the CLI work @gerrod3 and @mdellweg

@dralley
Copy link
Copy Markdown
Contributor

dralley commented Mar 10, 2021

@mdellweg Do you want to review this separately or am we good to merge?

Copy link
Copy Markdown
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.

I skimmed over this one, and didn't see anything frightening.
@dralley Feel free too judge about merging.

@dralley dralley merged commit 100d50e into pulp:master Mar 10, 2021
@gerrod3 gerrod3 deleted the cli_docs branch March 10, 2021 14:25
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.

3 participants