-
Notifications
You must be signed in to change notification settings - Fork 26
Speed up bootstrap #413
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
Speed up bootstrap #413
Conversation
Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #413 +/- ##
==========================================
+ Coverage 69.21% 69.78% +0.56%
==========================================
Files 11 11
Lines 2865 2866 +1
Branches 507 507
==========================================
+ Hits 1983 2000 +17
+ Misses 781 761 -20
- Partials 101 105 +4 ☔ View full report in Codecov by Sentry. |
…strap Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
…strap Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
…strap Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
…strap Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
…strap Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
…rlier Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! BTW sorry about the hidden unit test, that was probably me during the migration to pytest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes here really have positive effect on the start time.
Minimal changes which are promising! Thank you!
1 unit deployment:
23:48:28 - juju deploy
23:50:36 - the first event (lxc ready)
23:50:37 - Installing snap charmed-postgresql, revision 115, tracking 14/stable
23:51:08 - The snap installation completed successfully
23:51:58 - Completed.
3 units is a bit longer... but still good enough.
Let's move forward from here.
P.S. I am surprised to see no 503 Patroni API responces.
P.P.S. the datetime.now() is only necessary on CI/CD, as it duplicated juju debug-log timing:
unit-postgresql-4: 00:20:07 DEBUG unit.postgresql/4.juju-log Install start time: 2024-06-24 22:20:07.010192
unit-postgresql-4: 00:20:59 DEBUG unit.postgresql/4.juju-log Active workload time: 2024-06-24 22:20:59.474757
Anyway LGTM as it is WAY better the the current edge. Thank you!
I am merging this to test beta and promote candidate for Mohamed. |
Issue
The PostgreSQL charm takes 9-10 minutes to start (be in an
Active
state).Solution
Active
state.test_set_primary_status_message
). It was not being executed because of indentation in the test function.Debug logs when using this PR charm (58 seconds from the beginning of the
install
hook until the workload is ready):