Skip to content

feat: merge feature/pro-sources into main#812

Draft
clay-lake wants to merge 22 commits intocanonical:mainfrom
clay-lake:feature/pro-sources_updates
Draft

feat: merge feature/pro-sources into main#812
clay-lake wants to merge 22 commits intocanonical:mainfrom
clay-lake:feature/pro-sources_updates

Conversation

@clay-lake
Copy link

Note: Currently in draft!

Linostar and others added 22 commits September 18, 2024 08:16
* add functions to get host token and request guest tokens

* fix linting issues

* handle exceptions and add logging

* add unit tests

* add unit tests for request_pro_guest_token

* fix ruff errors

* move the code to separate class

* use pytest paramterization

* enhance readability of unit tests

* add integration test for retrieve_pro_host_token
* build(deps): update bugfixes

* build(deps): update bugfixes

* build(deps): update dependency pyright to v1.1.380

* build(deps): update dependency sphinx-autobuild to v2024.9.3 (canonical#654)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* add attach_pro_subscription function

* add unit tests for attach_pro_subscription

* fix lint errors

* add integration test of attach_pro_subscription

* fix integration test

* fix unit tests

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* add enable_pro_service function

* add unit tests for enable_pro_service

* add integration test for enable_pro_service

* change enable_pro_service signature so it accepts multiple services as arg
* add install_pro_client and is_pro_installed functions

* add unit tests

* add integration test for install_pro_client

* add/adjust tests to take into account whether the pro client is installed

* fix integration tests

* address review comments

* build(deps): bump canonical-sphinx to 0.2.0 (canonical#676)

Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>

---------

Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>
Co-authored-by: Callahan <callahan.kovacs@canonical.com>
* add install_pro_client and is_pro_installed functions

* add unit tests

* add integration test for install_pro_client

* add/adjust tests to take into account whether the pro client is installed

* fix integration tests

* address review comments

* switch to new guest token endpoint

* use dataclass instead of tuple

* Fix TRY300 ruff warning

* build(deps): bump canonical-sphinx to 0.2.0 (canonical#676)

Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>

---------

Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>
Co-authored-by: Callahan <callahan.kovacs@canonical.com>
…ks in Rockcraft. (canonical#721)

* ci: install lxd on ubuntu 24.04

Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>

* ci: install lxd from the candidate channel

Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>

* docs: remove starter pack submodule (canonical#713)

Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>

* fix: use Multipass-compatible instance names (canonical#712)

Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>

* feat: upstream snap hooks (canonical#710)

* feat: add hookutil from downstream repo

Lightly modified to remove proprietary identifiers, not functional in this
state.

* feat: make hookutil work generically

* chore: disable lint check - may change approach later

* feat: add unit tests from downstream

* chore: linter issues

* fix: craft-providers CI doesn't have lxd, mock it out

* chore(style): rename per code review

* chore(style): rename per code review

* chore(style): rename per code review

* chore: update changed names in test

* refactor: remove globals, let LXDInstances keep project_name

* chore: autoformat

* fix: compat tag structure had been dependent on craft-application

- This way is also simpler in the code, with a slight performance hit for the
  regex.
- There's no way to get the full compat tag without having a fully-instantiated
  application.
- Also fixed some debug output.

* feat(tests): add configure hook integration test

* feat: added remove hook test and beefed up configure hook test

* chore: autoformat

* fix: unit tests for changed interface

* chore: autoformat, this time with the other tool!

* chore: autoformat the third

* fix: use the superior is-installed check from c-prov proper

* fix: lint

* feat: mknod intercepts now configurable from LXDProvider (canonical#717)

* feat: mknod intercepts now configurable from LXDProvider

* fix: unit test

* fix: lint

* docs: update changelog (also includes item from canonical#710)

* feat: add modify_file method to Executor class

* feat: add properties for getting setting pro services applied to environment

* feat: make pull optional in Executor.modify_file

* fix(LXDInstance): missing pro_services file returns none

* trigger ci

* refactor: adjustments to satisfy linters

---------

Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>
Co-authored-by: Callahan Kovacs <callahan.kovacs@canonical.com>
Co-authored-by: Matt Culler <matt.culler@canonical.com>
* add functions to get host token and request guest tokens

* fix linting issues

* handle exceptions and add logging

* add unit tests

* add unit tests for request_pro_guest_token

* fix ruff errors

* move the code to separate class

* use pytest paramterization

* enhance readability of unit tests

* add integration test for retrieve_pro_host_token
* build(deps): update bugfixes

* build(deps): update bugfixes

* build(deps): update dependency pyright to v1.1.380

* build(deps): update dependency sphinx-autobuild to v2024.9.3 (canonical#654)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* add attach_pro_subscription function

* add unit tests for attach_pro_subscription

* fix lint errors

* add integration test of attach_pro_subscription

* fix integration test

* fix unit tests

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* add enable_pro_service function

* add unit tests for enable_pro_service

* add integration test for enable_pro_service

* change enable_pro_service signature so it accepts multiple services as arg
* add install_pro_client and is_pro_installed functions

* add unit tests

* add integration test for install_pro_client

* add/adjust tests to take into account whether the pro client is installed

* fix integration tests

* address review comments

* build(deps): bump canonical-sphinx to 0.2.0 (canonical#676)

Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>

---------

Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>
Co-authored-by: Callahan <callahan.kovacs@canonical.com>
* add install_pro_client and is_pro_installed functions

* add unit tests

* add integration test for install_pro_client

* add/adjust tests to take into account whether the pro client is installed

* fix integration tests

* address review comments

* switch to new guest token endpoint

* use dataclass instead of tuple

* Fix TRY300 ruff warning

* build(deps): bump canonical-sphinx to 0.2.0 (canonical#676)

Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>

---------

Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>
Co-authored-by: Callahan <callahan.kovacs@canonical.com>
…ks in Rockcraft. (canonical#721)

* ci: install lxd on ubuntu 24.04

Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>

* ci: install lxd from the candidate channel

Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>

* docs: remove starter pack submodule (canonical#713)

Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>

* fix: use Multipass-compatible instance names (canonical#712)

Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>

* feat: upstream snap hooks (canonical#710)

* feat: add hookutil from downstream repo

Lightly modified to remove proprietary identifiers, not functional in this
state.

* feat: make hookutil work generically

* chore: disable lint check - may change approach later

* feat: add unit tests from downstream

* chore: linter issues

* fix: craft-providers CI doesn't have lxd, mock it out

* chore(style): rename per code review

* chore(style): rename per code review

* chore(style): rename per code review

* chore: update changed names in test

* refactor: remove globals, let LXDInstances keep project_name

* chore: autoformat

* fix: compat tag structure had been dependent on craft-application

- This way is also simpler in the code, with a slight performance hit for the
  regex.
- There's no way to get the full compat tag without having a fully-instantiated
  application.
- Also fixed some debug output.

* feat(tests): add configure hook integration test

* feat: added remove hook test and beefed up configure hook test

* chore: autoformat

* fix: unit tests for changed interface

* chore: autoformat, this time with the other tool!

* chore: autoformat the third

* fix: use the superior is-installed check from c-prov proper

* fix: lint

* feat: mknod intercepts now configurable from LXDProvider (canonical#717)

* feat: mknod intercepts now configurable from LXDProvider

* fix: unit test

* fix: lint

* docs: update changelog (also includes item from canonical#710)

* feat: add modify_file method to Executor class

* feat: add properties for getting setting pro services applied to environment

* feat: make pull optional in Executor.modify_file

* fix(LXDInstance): missing pro_services file returns none

* trigger ci

* refactor: adjustments to satisfy linters

---------

Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>
Co-authored-by: Callahan Kovacs <callahan.kovacs@canonical.com>
Co-authored-by: Matt Culler <matt.culler@canonical.com>
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.

2 participants