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

feat: create-track command #2024

Merged
merged 9 commits into from
Dec 16, 2024
Merged

feat: create-track command #2024

merged 9 commits into from
Dec 16, 2024

Conversation

lengau
Copy link
Collaborator

@lengau lengau commented Dec 11, 2024

Adds a create-track command right in time for Christmas for @addyess

Requires canonical/craft-store#240

CRAFT-3424

@lengau lengau force-pushed the work/1901/CRAFT-3387 branch from 2c7c1e4 to f0f3545 Compare December 11, 2024 01:30
@lengau lengau requested review from mr-cal and bepri December 11, 2024 01:33
@lengau lengau linked an issue Dec 11, 2024 that may be closed by this pull request
@addyess
Copy link
Contributor

addyess commented Dec 11, 2024

🎄

@lengau lengau requested review from dariuszd21 and removed request for mr-cal December 11, 2024 15:57
@lengau lengau force-pushed the work/1901/CRAFT-3387 branch from f0f3545 to f049aa9 Compare December 11, 2024 17:51
@lengau
Copy link
Collaborator Author

lengau commented Dec 11, 2024

(Rebased on main to fix conflicts)

@addyess
Copy link
Contributor

addyess commented Dec 11, 2024

thanks for working on this @lengau ... dumb question. I'm hoping this is an "easy" port to snapcraft too?

@lengau
Copy link
Collaborator Author

lengau commented Dec 11, 2024

@addyess I'm not actually sure, as I don't know how snapcraft currently generates its store macaroon. If it does it in a way that's easily compatible with the publisher gateway, it should be fairly easy.

Do you have an open feature request on the snapcraft side where I could pop this PR so we don't reinvent the wheel when we do it?

@addyess
Copy link
Contributor

addyess commented Dec 11, 2024

Do you have an open feature request on the snapcraft side where I could pop this PR so we don't reinvent the wheel when we do it?

oof -- nope i don't have anything like that open. I suppose i can always go write one :D

@lengau lengau marked this pull request as ready for review December 11, 2024 21:47
requirements-dev.txt Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
Comment on lines 2389 to 2396
For example:

$ charmcraft create-track my-charm track-1 track-2
Name Created at Automatic phasing percentage
--------- -------------------- ------------------------------
track-1 2024-12-10T23:48:40Z
track-2 2024-12-11T00:14:24Z
latest 2023-04-17T23:55:07Z
Copy link
Contributor

@dariuszd21 dariuszd21 Dec 12, 2024

Choose a reason for hiding this comment

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

If you want to satisfy RST.
However, from what I know general suggestion is not to put examples in the overview

Suggested change
For example:
$ charmcraft create-track my-charm track-1 track-2
Name Created at Automatic phasing percentage
--------- -------------------- ------------------------------
track-1 2024-12-10T23:48:40Z
track-2 2024-12-11T00:14:24Z
latest 2023-04-17T23:55:07Z
For example::
$ charmcraft create-track my-charm track-1 track-2
Name Created at Automatic phasing percentage
--------- -------------------- ------------------------------
track-1 2024-12-10T23:48:40Z
track-2 2024-12-11T00:14:24Z
latest 2023-04-17T23:55:07Z

Copy link
Contributor

Choose a reason for hiding this comment

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

I believe doing this will subsequently mess up command-line help messages and we'll have another task à la canonical/craft-cli#306. So maybe it would be easier to remove this altogether and move the example into docs if it's wanted

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point. I've adjusted instead to tell people how to request a track guardrail.

charmcraft/application/commands/store.py Outdated Show resolved Hide resolved
charmcraft/application/commands/store.py Show resolved Hide resolved
@lengau lengau force-pushed the work/1901/CRAFT-3387 branch from 4d64ae4 to c42741d Compare December 12, 2024 23:11
@lengau lengau requested review from dariuszd21 and bepri December 12, 2024 23:12
Copy link
Contributor

@bepri bepri left a comment

Choose a reason for hiding this comment

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

Nice work!

@lengau lengau force-pushed the work/1901/CRAFT-3387 branch from f98c801 to 499690c Compare December 13, 2024 19:11
Copy link
Contributor

@dariuszd21 dariuszd21 left a comment

Choose a reason for hiding this comment

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

Looks good to me!

tests/spread/store/charm-upload-and-release/task.yaml Outdated Show resolved Hide resolved
charmcraft/application/commands/store.py Show resolved Hide resolved
charmcraft/services/store.py Outdated Show resolved Hide resolved
@lengau lengau enabled auto-merge December 13, 2024 20:57
@lengau lengau added this pull request to the merge queue Dec 13, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Dec 13, 2024
@lengau lengau merged commit 7615a1c into main Dec 16, 2024
25 of 26 checks passed
@lengau lengau deleted the work/1901/CRAFT-3387 branch December 16, 2024 15:47
lengau added a commit to tmihoc/charmcraft that referenced this pull request Dec 19, 2024
Adds a create-track command right in time for Christmas for @addyess

Requires canonical/craft-store#240

CRAFT-3424
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.

create-track command
4 participants