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

draft: Add support for branch in the channel name #1253

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

theoctober19th
Copy link

@theoctober19th theoctober19th commented Feb 5, 2025

Description

This PR adds support for allowing model to deploy with track/risk/branch. Currently libjuju supports deploying only track/risk.

Fixes: #1195

QA Steps

<Commands / tests / steps to run to verify that the change works:>

tox -e py3 -- tests/unit/...
tox -e integration -- tests/integration/...

All CI tests need to pass.

<Please note that most likely an additional test will be required by the reviewers for any change that's not a one liner to land.>

Notes & Discussion

<Additional notes for the reviewers if needed. Please delete section if not applicable.>

@theoctober19th theoctober19th changed the title Add support for branch in the channel name draft: Add support for branch in the channel name Feb 6, 2025
Comment on lines +97 to +100
elif len(p) == 3:
track = p[0]
risk = p[1]
branch = p[2]
Copy link
Contributor

Choose a reason for hiding this comment

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

Python built-in would be more elegant:

Suggested change
elif len(p) == 3:
track = p[0]
risk = p[1]
branch = p[2]
elif len(p) == 3:
track, risk, branch = p

Copy link
Contributor

Choose a reason for hiding this comment

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

Or, alternatively something like:

match parts:
    ...
    case [track, risk, branch]:
        pass

Ofc. refactoring is only possible if the function is covered by unit tests.

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.

Allow model to deploy with track/list/branch
2 participants