Skip to content

[DPE-9669] Test full refresh workflow including router - #471

Merged
astrojuanlu merged 3 commits into
8.4/edgefrom
juanlu/8.4/full-refresh-router
Oct 7, 2026
Merged

astrojuanlu merged 3 commits into
8.4/edgefrom
juanlu/8.4/full-refresh-router

Conversation

@astrojuanlu

@astrojuanlu astrojuanlu commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

The tests themselves aren't difficult, but I've hesitated a lot on what to consolidate and refactor from other tests. There's already a lot of duplicity. I've attempted different things and walked them back because they ended up making the tests more obscure or more complex... Happy to take suggestions.

In particular I've decided to have 2 test files, even if they are almost identical. Having 1 test file to test 2 full refresh workflows involves resetting the model mid-test, which we don't do in other places. Parametrizing the test doesn't help, I think (we still need the test_deploy_.... And I decided against adding these to the existing test_upgrade.py as well, since the paths are different.

I've also decided to add a helper to refresh MySQL server - but not to make it more generic than that. The reason is that machines has some extra try...except that is not there in Kubernetes, and also that refreshing the single router unit seems to be simpler.

Finally, this also makes a minor update to the machines/poetry.lock, which was out of date.

Checklist

  • I have added or updated any relevant documentation.
  • I have cleaned any remaining cloud resources from my accounts.

@astrojuanlu astrojuanlu added the not bug or enhancement PR is not 'bug' or 'enhancement'. For release notes label Aug 28, 2026
@astrojuanlu
astrojuanlu force-pushed the juanlu/8.4/full-refresh-router branch from 80bc5fc to 02bab21 Compare August 28, 2026 13:14
@astrojuanlu
astrojuanlu marked this pull request as ready for review August 28, 2026 15:20
@paulomach

Copy link
Copy Markdown
Contributor

The tests themselves aren't difficult, but I've hesitated a lot on what to consolidate and refactor from other tests. There's already a lot of duplicity. I've attempted different things and walked them back because they ended up making the tests more obscure or more complex... Happy to take suggestions.

In particular I've decided to have 2 test files, even if they are almost identical. Having 1 test file to test 2 full refresh workflows involves resetting the model mid-test, which we don't do in other places. Parametrizing the test doesn't help, I think (we still need the test_deploy_.... And I decided against adding these to the existing test_upgrade.py as well, since the paths are different.

I've also decided to add a helper to refresh MySQL server - but not to make it more generic than that. The reason is that machines has some extra try...except that is not there in Kubernetes, and also that refreshing the single router unit seems to be simpler.

Finally, this also makes a minor update to the machines/poetry.lock, which was out of date.

Checklist

* [ ]  I have added or updated any relevant documentation.

* [ ]  I have cleaned any remaining cloud resources from my accounts.

Thanks for the explainer, it helps a lot.
The rational seems reasonable.

@paulomach paulomach left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looking good - failures are unrelated and I like the naming for new files/tests.

@astrojuanlu
astrojuanlu force-pushed the juanlu/8.4/full-refresh-router branch 2 times, most recently from b64b3cf to 52bd997 Compare September 16, 2026 14:34

@Soundarya03 Soundarya03 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good!

@sinclert-canonical sinclert-canonical left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good overall! One question though:

We already deploy MySQL Router and MySQL Test app on the vanilla upgrade test. AFAIK, deploying MySQL Router to just relate it to MySQL Server and do nothing to it does not serve any purpose. Furthermore, it is a very naive action compared to the two scenarios been introduced here.

Am I to understand that we can now simplify the vanilla upgrade tests?

charm=MYSQL_ROUTER_APP_NAME,
app=MYSQL_ROUTER_APP_NAME,
base="ubuntu@26.04",
channel="8.4/candidate",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Either we point at 8.4/edge like the rest of the tests, or 8.4/stable now that we promoted it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I now forgot why I had to use candidate... Will bump to stable.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You probably did that as 2 weeks ago we did not even had MySQL Router 8.4 in the 8.4/stable channel.

Not sure why you did not stick with 8.4/edge though.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah I remember now. The whole point of the test is to refresh the router from stable to edge. There was no stable, so I chose candidate.

Assisted-by: OpenRouter:z-ai/glm-5.2 opencode
Assisted-by: OpenRouter:z-ai/glm-5.2 opencode
@astrojuanlu
astrojuanlu force-pushed the juanlu/8.4/full-refresh-router branch from 52bd997 to 7f536b3 Compare October 7, 2026 10:45
@astrojuanlu

astrojuanlu commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor Author

We already deploy MySQL Router and MySQL Test app on the vanilla upgrade test.

Yes, this was done separately on #383.

I agree these tests now go beyond what's covered in the recently added test_relation_through_router in test_upgrade.py. @paulomach should I go ahead and remove that test? @sinclert-canonical Any other simplification you had in mind?

@paulomach

Copy link
Copy Markdown
Contributor

We already deploy MySQL Router and MySQL Test app on the vanilla upgrade test.

Yes, this was done separately on #383.

I agree these tests now go beyond what's covered in the recently added test_relation_through_router in test_upgrade.py. @paulomach should I go ahead and remove that test? @sinclert-canonical Any other simplification you had in mind?

This test purpose is exactly to ensure a new relation still works after the refresh. In the past, we could had catch issues if such a test, as simple as it looks, was in place.
E.g. we could bork a predefined role - this will show only when creating a new relation, not for the already established one.

@sinclert-canonical

Copy link
Copy Markdown
Contributor

This test purpose is exactly to ensure a new relation still works after the refresh. In the past, we could had catch issues if such a test, as simple as it looks, was in place.

Alright with me then.

@astrojuanlu
astrojuanlu merged commit f48ac49 into 8.4/edge Oct 7, 2026
162 of 172 checks passed
@astrojuanlu
astrojuanlu deleted the juanlu/8.4/full-refresh-router branch October 7, 2026 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

not bug or enhancement PR is not 'bug' or 'enhancement'. For release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants