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

If a database upgrade script is long running and silent we should log a "still working" message every so often #5094

Closed
michaelnoonan opened this issue Nov 15, 2018 · 2 comments

Comments

@michaelnoonan
Copy link
Contributor

commented Nov 15, 2018

We have had reports over the years where customers would upgrade their Octopus Server, and a database upgrade script would take a long time to run. This is OK if the script reports progress in a way the user knows something is happening.

However there are cases where TSQL is the best fit, and not all of those can report progress easily.

From a user's point of view it would be really nice if:

  1. We generally write some kind of reliable and informative progress messages.
  2. If a script goes silent, write a "Still working after X minutes..." style message
  3. Avoid being needlessly noisy if a script is reporting progress - we don't need to say "I just did X, oh and by the way, I'm still working..."

Mockup

Here's a mockup using a 1s interval. Perhaps 1m is a better default? :)

15/11/2018 12:03:57 PM 27 Info Executing .NET Database Server script 'Octopus.IntegrationTests.Octopus.Core.DatabaseUpgrades.DatabaseUpgradeFixture+LongRunningScript_NoProgressReporting.cs'
15/11/2018 12:03:57 PM 27 Info Checking whether journal table exists..
15/11/2018 12:03:57 PM 27 Info Creating the [dbo].[SchemaVersions] table
15/11/2018 12:03:57 PM 27 Info The [dbo].[SchemaVersions] table has been created
15/11/2018 12:03:58 PM 30 Info Still working after 1 second...
15/11/2018 12:03:59 PM 30 Info Still working after 2 seconds...
15/11/2018 12:04:00 PM 30 Info Still working after 3 seconds...
15/11/2018 12:04:01 PM 30 Info Still working after 4 seconds...
15/11/2018 12:04:02 PM 30 Info Still working after 5 seconds...
15/11/2018 12:04:02 PM 27 Info Executing post-upgrade scripts...
15/11/2018 12:04:02 PM 27 Info No new scripts need to be executed - completing.
@octoreleasebot

This comment has been minimized.

Copy link

commented Nov 15, 2018

Release Note: If a database upgrade script is running for a long time without showing any progress messages, we now log a "still working" message every minute until the script completes

@lock

This comment has been minimized.

Copy link

commented Feb 13, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. If you think you've found a related issue, please contact our support team so we can triage your issue, and make sure it's handled appropriately.

@lock lock bot locked as resolved and limited conversation to collaborators Feb 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants
You can’t perform that action at this time.