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

Fix function signature for local_refresh #1100

Closed
dimaqq opened this issue Sep 17, 2024 · 3 comments · Fixed by #1114
Closed

Fix function signature for local_refresh #1100

dimaqq opened this issue Sep 17, 2024 · 3 comments · Fixed by #1114
Assignees
Labels
area/charm kind/bug indicates a bug in the project priority/normal normal priority

Comments

@dimaqq
Copy link
Contributor

dimaqq commented Sep 17, 2024

Description

The code assumes quite a lot about the arguments.
It seems that there are no users of the function today, because the arguments are kinda broken.

Folks work around by calling juju cli instead, e.g.:

# oidc-gatekeeper-operator/tests/integration/test_charm.py
149-        print("Try to refresh stable charm to locally built")
150-        # temporary measure while we don't have a solution for this:
151-        # * https://github.com/juju/python-libjuju/issues/881
152:        # Currently `application.local_refresh` doesn't work as expected.

Urgency

Casually reporting

Python-libjuju version

any

Juju version

any

Reproduce / Test

pyright
dimaqq added a commit to dimaqq/python-libjuju that referenced this issue Sep 17, 2024
@dimaqq
Copy link
Contributor Author

dimaqq commented Sep 17, 2024

See 0771a65 for an attempt to do this.

@Aflynn50 Aflynn50 added area/charm kind/feature suggests new feature or enhancement kind/bug indicates a bug in the project and removed kind/feature suggests new feature or enhancement labels Sep 20, 2024
@benhoyt
Copy link
Member

benhoyt commented Sep 22, 2024

@dimaqq Can you please be a bit more specific? What does it assume about the arguments, and what are the specific issues?

@benhoyt benhoyt added the priority/normal normal priority label Sep 22, 2024
@dimaqq
Copy link
Contributor Author

dimaqq commented Sep 23, 2024

Function has None defaults for parameters that are actually required.

Users work around this function by shelling out because they can’t get a working set of arguments together.

jujubot added a commit that referenced this issue Oct 9, 2024
#1114

Fixes #1100 

Closes #881 

Charmers already pass a Path to refresh() in integration tests.
This PR standardises that.

Making arguments to local_refresh() explicit, as charmer don't get the default values.

Existing integration test is updated.

Jira: https://warthogs.atlassian.net/browse/CHARMTECH-309
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/charm kind/bug indicates a bug in the project priority/normal normal priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants