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

return model summaries with new model owner #1367

Merged
merged 3 commits into from
Sep 18, 2024

Conversation

kian99
Copy link
Contributor

@kian99 kian99 commented Sep 16, 2024

Description

This PR intends to fix an inconsistency in JIMM between the ModelInfo and ModelSummaries methods. The latter takes each JIMM dbmodel.Model object that a user has access to and converts into into a model summary.
The former makes an API call to the Juju controller and returns the modelInfo object to the user after replacing some JIMM specific fields like userAccess.

One issue is that the modelOwner field was not being replaced in the modelInfo call. But this value is unique when using JIMM. In a similar vein, the modelOwner may be different in JIMM versus the Juju controller, particularly when importing a model.

Full list of changes:

  • refactor ModelInfo slightly to use a separate function where we merge the juju model info with JIMM specific data
  • refactor the test for ModelInfo to reduce duplication
  • tweak the test dialer to have less surprising behavior

Partially fixes CSS-10592

Engineering checklist

Check only items that apply

  • Documentation updated
  • Covered by unit tests
  • Covered by integration tests

@kian99 kian99 requested a review from a team as a code owner September 16, 2024 09:32
- refactor ModelInfo slightly to use a separate function where we merge the juju model info with JIMM specific data
- refactor the test for ModelInfo to reduce duplication
- tweak the test dialer to have less surprising behavior
@kian99 kian99 force-pushed the return-model-info-with-jimm-data branch from d0a5be3 to ec44b6b Compare September 17, 2024 07:54
Copy link
Member

@babakks babakks left a comment

Choose a reason for hiding this comment

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

LGTM. It's an S.

Copy link
Contributor

@pkulik0 pkulik0 left a comment

Choose a reason for hiding this comment

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

lgtm, size s

@kian99 kian99 merged commit 7dfac5a into canonical:v3 Sep 18, 2024
4 checks passed
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.

3 participants