| 1 | package console |
| 2 | |
| 3 | // swapCopyStrings is the console's copy for the zero-downtime surfaces (spec |
| 4 | // §9.2): the Deploys card on the app's settings page, and the installed and |
| 5 | // serving facts, failure hold and Retry action on an instance page. Every |
| 6 | // string is approved copy, pinned by the zero-downtime copy record. |
| 7 | type swapCopyStrings struct { |
| 8 | Heading string |
| 9 | Intro string |
| 10 | SwapLabel string |
| 11 | OverlapOption string |
| 12 | HoldOption string |
| 13 | ConcurrencyLabel string |
| 14 | MigrationsNote string |
| 15 | Saved string |
| 16 | Invalid string |
| 17 | StoreFailed string |
| 18 | RateLimited string |
| 19 | Unread string |
| 20 | NoBucket string |
| 21 | Installed string |
| 22 | Serving string |
| 23 | Hold string |
| 24 | HoldText string |
| 25 | HoldDownText string |
| 26 | HoldDeclinedText string |
| 27 | HoldDeclinedDownText string |
| 28 | PromoteRetry string |
| 29 | RetryButton string |
| 30 | Rolling string |
| 31 | Asleep string |
| 32 | RetryTitle string |
| 33 | RetryLine string |
| 34 | RetryLineDeclined string |
| 35 | RetryDone string |
| 36 | RetryFailed string |
| 37 | RetryLimited string |
| 38 | NotHeld string |
| 39 | Audit string |
| 40 | } |
| 41 | |
| 42 | var swapCopy = swapCopyStrings{ |
| 43 | Heading: "Deploys", |
| 44 | Intro: "When a new build reaches a running instance, the old instance keeps running until the new one is ready.", |
| 45 | SwapLabel: "Swap mode:", |
| 46 | OverlapOption: "overlap (default)", |
| 47 | HoldOption: "hold", |
| 48 | ConcurrencyLabel: "Instances that swap at once on each box:", |
| 49 | MigrationsNote: "With overlap, the old and new builds share the instance's database for a few seconds. Migrations need to be backward compatible to ensure the old version keeps working. Use hold when a release cannot do that.", |
| 50 | Saved: "Swap policy saved: %s, %d at a time on each box.", |
| 51 | Invalid: "Choose overlap or hold, and a whole number of 1 or more.", |
| 52 | StoreFailed: "Could not save the swap policy. Try again.", |
| 53 | RateLimited: "Too many changes. Try again in a minute.", |
| 54 | Unread: "This app's swap policy could not be read just now, so it cannot be changed here. Reload before concluding anything.", |
| 55 | NoBucket: "No deployment bucket on this host, so the swap policy cannot be changed here.", |
| 56 | Installed: "Installed build", |
| 57 | Serving: "Serving build", |
| 58 | Hold: "Failure hold", |
| 59 | HoldText: "Build %s failed on this box because %s. This instance stays on %s until you retry it or ship a newer build.", |
| 60 | // HoldDownText is the hold row when the failed attempt left the instance |
| 61 | // down (hold mode, attempt down): nothing serves it, so it stays on |
| 62 | // nothing (Astra plan 6 R1 #8). |
| 63 | HoldDownText: "Build %s failed in hold mode on this box, and nothing is serving this instance. Roll back with carlos rollback, or retry it.", |
| 64 | // HoldDeclinedText is the hold row for a box that declined the flag: it |
| 65 | // holds the failed build too, but it will not start the instance on it, |
| 66 | // so "stays on" would be untrue. The decline's Reason is empty there. |
| 67 | HoldDeclinedText: "Build %s failed on this box. This box cannot run two builds side by side, so it will not start this instance on that build. Retry it, or ship a newer build.", |
| 68 | // HoldDeclinedDownText is the hold row for a declined box whose failed |
| 69 | // attempt left the instance down: such a box stops then starts because it |
| 70 | // cannot run two builds side by side, whatever the member's swap policy, |
| 71 | // so it is not "in hold mode". |
| 72 | HoldDeclinedDownText: "Build %s failed on this box, and nothing is serving this instance. This box cannot run two builds side by side. Roll back with carlos rollback, or retry it.", |
| 73 | PromoteRetry: "To try it again on every box: carlos promote --app %s --retry %s %s", |
| 74 | RetryButton: "Retry", |
| 75 | Rolling: "Build %s is installed and rolling out. Build %s serves until the new one passes its health check.", |
| 76 | Asleep: "Build %s is installed and starts on the next request.", |
| 77 | RetryTitle: "Retry build {build} on {host}?", |
| 78 | RetryLine: "This clears the failure hold on {host}. Its next attempt at {build} runs as a canary. If that fails too, {host} is held again.", |
| 79 | // RetryLineDeclined is the confirmation for a declined box: no canary |
| 80 | // runs there, the next start runs the build as it always has. |
| 81 | RetryLineDeclined: "This clears the failure hold on {host}. Its box cannot run two builds side by side, so its next start runs {build} the old way, with no canary.", |
| 82 | RetryDone: "Retry requested for {host}.", |
| 83 | RetryFailed: "The retry request failed. Try again.", |
| 84 | RetryLimited: "Too many retry requests. Try again later.", |
| 85 | NotHeld: "{host} is no longer held back by a failed build, so there is nothing to retry.", |
| 86 | Audit: "Retry of build {build} requested for {host}.", |
| 87 | } |
| 88 | |
| 89 | func (p page) SwapCopy() swapCopyStrings { return swapCopy } |
| 90 | |