Skip to content

fix: default series selection#1190

Closed
dimaqq wants to merge 36 commits intojuju:mainfrom
dimaqq:fix-default-series-selection
Closed

fix: default series selection#1190
dimaqq wants to merge 36 commits intojuju:mainfrom
dimaqq:fix-default-series-selection

Conversation

@dimaqq
Copy link
Copy Markdown
Contributor

@dimaqq dimaqq commented Nov 15, 2024

Needs to be rebased after #1186 is merged

Review change:, pls 883012f

  • series are ordered best first, correct the code
  • enable juju 3.6 in integration tests
  • expand python versions in unit tests

@dimaqq
Copy link
Copy Markdown
Contributor Author

dimaqq commented Nov 15, 2024

Model has default-series property, which should be preferred.

2024-11-15T07:17:22.3274079Z DEBUG    juju.client.connection:connection.py:553 connection id: 139979195264080 ---> {
2024-11-15T07:17:22.3275008Z   "type": "ModelManager",
2024-11-15T07:17:22.3275493Z   "request": "ListModelSummaries",
2024-11-15T07:17:22.3276013Z   "version": 9,
2024-11-15T07:17:22.3276389Z   "params": {
2024-11-15T07:17:22.3276746Z     "all": false,
2024-11-15T07:17:22.3277205Z     "user-tag": "user-admin"
2024-11-15T07:17:22.3277651Z   },
2024-11-15T07:17:22.3278021Z   "request-id": 7
2024-11-15T07:17:22.3278393Z }
2024-11-15T07:17:22.3296108Z DEBUG    juju.client.connection:connection.py:579 connection id : 139979195264080 <--- {'request-id': 7, 'response': {'results': [{'result': {'name': 'controller', 'uuid': '0be8c9d6-aa7e-4189-8c6f-4c47132ebb38', 'type': 'iaas', 'controller-uuid': '184b1b79-b689-4e9e-883d-38f146d7bc9c', 'is-controller': True, 'provider-type': 'lxd', 'default-series': 'jammy', 'cloud-tag': 'cloud-localhost', 'cloud-region': 'localhost', 'cloud-credential-tag': 'cloudcred-localhost_admin_localhost', 'owner-tag': 'user-admin', 'life': 'alive', 'status': {'status': 'available', 'info': '', 'since': '2024-11-15T06:37:56.983809719Z'}, 'user-access': 'admin', 'last-connection': '2024-11-15T06:43:16Z', 'counts': [{'entity': 'machines', 'count': 1}, {'entity': 'cores', 'count': 2}, {'entity': 'units', 'count': 1}], 'sla': {'level': '', 'owner': 'admin'}, 'agent-version': '3.3.7'}}, {'result': {'name': 'test-667d-test-local-refresh-8419', 'uuid': 'eee2731f-a422-4c5e-82de-ded24a426a99', 'type': 'iaas', 'controller-uuid': '184b1b79-b689-4e9e-883d-38f146d7bc9c', 'is-controller': False, 'provider-type': 'lxd', 'default-series': 'jammy', 'cloud-tag': 'cloud-localhost', 'cloud-region': 'localhost', 'cloud-credential-tag': 'cloudcred-localhost_admin_localhost', 'owner-tag': 'user-admin', 'life': 'alive', 'status': {'status': 'available', 'info': '', 'since': '2024-11-15T06:43:15.643090205Z'}, 'user-access': 'admin', 'last-connection': '2024-11-15T06:43:16Z', 'counts': [], 'sla': {'level': '', 'owner': 'admin'}, 'agent-version': '3.3.7'}}, {'result': {'name': 'test-667d-test-upgrade-charm-resource-same-rev-no-update-7856', 'uuid': '5227ad3f-ecb3-45cb-8544-18f5b369ab8f', 'type': 'iaas', 'controller-uuid': '184b1b79-b689-4e9e-883d-38f146d7bc9c', 'is-controller': False, 'provider-type': 'lxd', 'default-series': 'jammy', 'cloud-tag': 'cloud-localhost', 'cloud-region': 'localhost', 'cloud-credential-tag': 'cloudcred-localhost_admin_localhost', 'owner-tag': 'user-admin', 'life': 'dying', 'status': {'status': 'destroying', 'info': 'tearing down cloud environment', 'since': '2024-11-15T06:43:12.6874687Z'}, 'user-access': 'admin', 'last-connection': '2024-11-15T06:43:04Z', 'counts': [], 'sla': {'level': '', 'owner': 'admin'}, 'agent-version': 

The order of supported series depends on the charm, client should not be relying on it: https://matrix.to/#/!wJiiHsLipVywuWOyNi:ubuntu.com/$ThCB6fttzzzWAVfaQYlxDmNN-tFTRWdw0Rcv4i7Kbig?via=ubuntu.com&via=matrix.org

@dimaqq
Copy link
Copy Markdown
Contributor Author

dimaqq commented Nov 19, 2024

Closing, as it's not possible to naively fix series selection based on series declared by a charm:

  • those can be any order (up to charm author)
  • I couldn't find a way to get a list of supported series for this controller/model

there's default series for the model, but that's just one series, not a set.

going to close this, and focus on optionally passing base= instead:

  • new facade version, autodetected
  • don't guess the default client-side
  • less worry about breaking things, I think

@dimaqq dimaqq closed this Nov 19, 2024
@dimaqq dimaqq deleted the fix-default-series-selection branch January 6, 2025 06:47
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.

1 participant