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

get the config dir resolve logic into one place #555

Merged
merged 2 commits into from
Oct 12, 2021

Conversation

cderici
Copy link
Contributor

@cderici cderici commented Oct 5, 2021

Description

This PR introduces two utility functions juju_config_dir and juju_ssh_pey_paths that holds the logic of discovering the configuration directory and the ssh keys in one place. It works by 1) checking JUJU_DATA env variable, 2) checking XDG_DATA_HOME variable, 3) manually sets it to ~/.local/share/juju (in this order). Anyone wants to use a custom directory have multiple different options.

QA Steps

tox -e py3 -- tests/unit/test_utils.py
tox -e integration -- tests/integration/test_machine.py
tox -e integration -- tests/integration/test_unit.py

Notes & Discussion

Fixes #554

Copy link
Contributor

@juanmanuel-tirado juanmanuel-tirado left a comment

Choose a reason for hiding this comment

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

LG2M

@cderici
Copy link
Contributor Author

cderici commented Oct 7, 2021

$$merge$$

@cderici
Copy link
Contributor Author

cderici commented Oct 7, 2021

!!build!!

@cderici
Copy link
Contributor Author

cderici commented Oct 8, 2021

$$merge$$

2 similar comments
@cderici
Copy link
Contributor Author

cderici commented Oct 8, 2021

$$merge$$

@cderici
Copy link
Contributor Author

cderici commented Oct 8, 2021

$$merge$$

@cderici
Copy link
Contributor Author

cderici commented Oct 12, 2021

... to be actual unit tests (as opposed to being integration tests
that tests the actual setup in which it's being run)
@cderici cderici force-pushed the resolve-config-dir-better branch from 2106cd3 to a71bb34 Compare October 12, 2021 15:16
@SimonRichardson
Copy link
Member

$$merge$$

1 similar comment
@SimonRichardson
Copy link
Member

$$merge$$

@jujubot jujubot merged commit 19fcb31 into juju:master Oct 12, 2021
SimonRichardson added a commit to SimonRichardson/python-libjuju that referenced this pull request Oct 12, 2021
2.9.4
^^^^^

Tuesday October 12 2021

* Charmhub deploy charm by @SimonRichardson in juju#483
* add wait_for_status instead of wait_for_active by @sed-i in juju#517
* Adds resource support for charmhub deployments by @tlm in juju#516
* Fix bug juju#519 and juju#522: Add local resources for bundles by @davigar15 in juju#520
* Patching some missing kwargs by @cderici in juju#527
* Implementing `backup` functionality by @cderici in juju#536
* Fix issue 532: Set the default_series properly by @davigar15 in juju#533
* A random small bug fix by @cderici in juju#541
* Allow ApplicationFacade set_config with non-string values by @cderici in juju#540
* Skip macaroon tests issue 534 by @cderici in juju#542
* Fix issue 530: Check the controller for unsynched models by @cderici in juju#539
* Upgrade setup-python action. by @juanmanuel-tirado in juju#543
* Fix integration tests by @cderici in juju#544
* Bring juju/juju.py into life by @cderici in juju#546
* Extract resources info from apps in locally deployed bundle by cderici in juju#552
* Fix for simple bug in bundle deployment code self.charm -> self['charm'] by @jnsgruk in ttps://github.com/juju/pull/558
* Fix integration tests continued by @cderici in ttps://github.com/juju/pull/547
* Get the config dir resolve logic into one place by @cderici in ttps://github.com/juju/pull/555
* Complete the backups functionality by @cderici in ttps://github.com/juju/pull/556
jujubot added a commit that referenced this pull request Oct 12, 2021
#561

2.9.4
^^^^^

Tuesday October 12 2021

* Charmhub deploy charm by @SimonRichardson in #483
* add wait_for_status instead of wait_for_active by @sed-i in #517
* Adds resource support for charmhub deployments by @tlm in #516
* Fix bug #519 and #522: Add local resources for bundles by @davigar15 in #520
* Patching some missing kwargs by @cderici in #527
* Implementing `backup` functionality by @cderici in #536
* Fix issue 532: Set the default_series properly by @davigar15 in #533
* A random small bug fix by @cderici in #541
* Allow ApplicationFacade set_config with non-string values by @cderici in #540
* Skip macaroon tests issue 534 by @cderici in #542
* Fix issue 530: Check the controller for unsynched models by @cderici in #539
* Upgrade setup-python action. by @juanmanuel-tirado in #543
* Fix integration tests by @cderici in #544
* Bring juju/juju.py into life by @cderici in #546
* Extract resources info from apps in locally deployed bundle by cderici in #552
* Fix for simple bug in bundle deployment code self.charm -> self['charm'] by @jnsgruk in ttps://github.com//pull/558
* Fix integration tests continued by @cderici in ttps://github.com//pull/547
* Get the config dir resolve logic into one place by @cderici in ttps://github.com//pull/555
* Complete the backups functionality by @cderici in ttps://github.com//pull/556
@cderici cderici deleted the resolve-config-dir-better branch February 16, 2022 18:23
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.

Machine.ssh and Machine._scp do not use JUJU_DATA if set
4 participants