console: each settings section reads only what it shows
settingsSectionReads names the parts of the settings record a section renders (domains, gates, deployEmpty, envs, store, mail, features), and assembleSettings fetches only those. Environments and Storage no longer read each environment's store twice. appDeployEmpty asks each prefix for one key through ListPage, falling back to List. Warm S3 calls: General 25 -> 2, Environments 24 -> 5, Storage 24 -> 4, Email 24 -> 1, Feature flags 24 -> 1; Domains 24 -> 12. Scripted session 322.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
6 files changed,
+326
−42
internal/console/appsettings.go+51 −22internal/console/appsettings_sections_test.go+15 −4internal/console/appsettings_test.go+1 −1internal/console/perfquickwins_test.go+223 −0internal/console/server.go+34 −13internal/console/testdata/perf-budgets.txt+2 −2
CI failed — run details
diff --git a/internal/console/appsettings.go b/internal/console/appsettings.go| index a80d1da93..2be5921e4 100644 |
| --- a/internal/console/appsettings.go |
| +++ b/internal/console/appsettings.go |
| @@ -326,7 +326,12 @@ type MailStandaloneView struct { |
| // assembleSettings fills the Settings tab's view. Best-effort by design: a |
| // bucket hiccup here blocks the rename form (fail closed — an unverifiable |
| // emptiness claim must not enable an identity change) and never the page. |
| -func (s *Server) assembleSettings(ctx context.Context, p *page, acct *Account) *SettingsView { |
| +// |
| +// reads names the parts to fetch (settingsSectionReads): each remote read |
| +// runs only when its flag is set, so a section view pays for what it shows. |
| +// The control-plane flag, the route-based channel question and the account |
| +// mismatch are local and always filled. |
| +func (s *Server) assembleSettings(ctx context.Context, p *page, acct *Account, reads settingsSectionReads) *SettingsView { |
| sv := &SettingsView{} |
| // Domains, its derived OnlyPlatformDomain, and NeedsChannel are all |
| // read-only against the registry/claims and owe nothing to the |
| @@ -339,7 +344,9 @@ func (s *Server) assembleSettings(ctx context.Context, p *page, acct *Account) * |
| } else { |
| sv.ControlPlane = cp |
| } |
| - sv.Domains = s.settingsDomains(ctx, acct, p.AppName, p.Detail.Domains) |
| + if reads.domains { |
| + sv.Domains = s.settingsDomains(ctx, acct, p.AppName, p.Detail.Domains) |
| + } |
| sv.OnlyPlatformDomain = len(sv.Domains) > 0 |
| for _, d := range sv.Domains { |
| // Prefix, not equality: domainView appends " · canary/<name>" AFTER |
| @@ -365,30 +372,42 @@ func (s *Server) assembleSettings(ctx context.Context, p *page, acct *Account) * |
| } else { |
| sv.NeedsChannel = route == "" |
| } |
| - sv.Gates, sv.GatesUnavailable = s.settingsGates(ctx, acct, p.AppName) |
| + if reads.gates { |
| + sv.Gates, sv.GatesUnavailable = s.settingsGates(ctx, acct, p.AppName) |
| + } |
| if s.cfg.Releases == nil { |
| sv.NoBucket = true |
| sv.RenameBlocked = "No deployment bucket on this host, so the never-shipped check cannot run." |
| return sv |
| } |
| - switch empty, err := s.appDeployEmpty(ctx, acct.Sqid, p.AppName); { |
| - case err != nil: |
| - sv.RenameBlocked = "Could not check the deployment bucket, so renaming is off until it can be." |
| - case len(p.Detail.Routes) > 0: |
| - sv.RenameBlocked = "This app is wired to a host — its name is its address, in routes and bucket keys alike." |
| - case !empty: |
| - sv.RenameBlocked = "This app has shipped — its name is baked into its releases' bucket keys." |
| - default: |
| - sv.CanRename = true |
| - } |
| - sv.Envs, sv.EnvsUnavailable = s.envCards(ctx, acct, p.AppName, p.Detail.Routes) |
| - sv.Store = s.storeCard(ctx, acct, p.AppName) |
| - sv.StoreEnvs = s.storeEnvCards(ctx, acct, p.AppName) |
| - sv.Mail = s.mailCard(ctx, acct, p.AppName) |
| - sv.Features = s.featuresCard(ctx, acct, p.AppName) |
| - sv.StoreUnavailable = sv.Store == nil |
| - sv.MailUnavailable = sv.Mail == nil |
| - sv.FeaturesUnavailable = sv.Features == nil |
| + if reads.deployEmpty { |
| + switch empty, err := s.appDeployEmpty(ctx, acct.Sqid, p.AppName); { |
| + case err != nil: |
| + sv.RenameBlocked = "Could not check the deployment bucket, so renaming is off until it can be." |
| + case len(p.Detail.Routes) > 0: |
| + sv.RenameBlocked = "This app is wired to a host — its name is its address, in routes and bucket keys alike." |
| + case !empty: |
| + sv.RenameBlocked = "This app has shipped — its name is baked into its releases' bucket keys." |
| + default: |
| + sv.CanRename = true |
| + } |
| + } |
| + if reads.envs { |
| + sv.Envs, sv.EnvsUnavailable = s.envCards(ctx, acct, p.AppName, p.Detail.Routes) |
| + } |
| + if reads.store { |
| + sv.Store = s.storeCard(ctx, acct, p.AppName) |
| + sv.StoreEnvs = s.storeEnvCards(ctx, acct, p.AppName) |
| + sv.StoreUnavailable = sv.Store == nil |
| + } |
| + if reads.mail { |
| + sv.Mail = s.mailCard(ctx, acct, p.AppName) |
| + sv.MailUnavailable = sv.Mail == nil |
| + } |
| + if reads.features { |
| + sv.Features = s.featuresCard(ctx, acct, p.AppName) |
| + sv.FeaturesUnavailable = sv.Features == nil |
| + } |
| if ra := p.Detail.RouteAccount; ra != "" && p.Detail.AllMismatched { |
| sv.MismatchTarget = ra |
| if target, err := s.store.AccountBySqid(ra); err == nil && target != nil { |
| @@ -749,9 +768,19 @@ func (s *Server) settingsDomains(ctx context.Context, acct *Account, app string, |
| // appDeployEmpty reports whether the bucket holds ANYTHING under the app's |
| // prefix — account-qualified or legacy-unqualified. One key is enough to |
| // refuse a rename; the caller never needs the listing itself. |
| +// |
| +// It asks each prefix for a single key (release.PageLister) when the store can |
| +// page, and lists the prefix when not, so a long-shipped app's releases are |
| +// not enumerated to answer a yes or no. |
| func (s *Server) appDeployEmpty(ctx context.Context, acct, app string) (bool, error) { |
| for _, prefix := range []string{release.AppPrefix(acct, app), release.LegacyAppPrefix(app)} { |
| - keys, err := s.cfg.Releases.List(ctx, prefix) |
| + var keys []string |
| + var err error |
| + if pl, ok := s.cfg.Releases.(release.PageLister); ok { |
| + keys, err = pl.ListPage(ctx, prefix, "", 1) |
| + } else { |
| + keys, err = s.cfg.Releases.List(ctx, prefix) |
| + } |
| if err != nil { |
| return false, err |
| } |
diff --git a/internal/console/appsettings_sections_test.go b/internal/console/appsettings_sections_test.go| index 2d72bb064..0e2cbfbb6 100644 |
| --- a/internal/console/appsettings_sections_test.go |
| +++ b/internal/console/appsettings_sections_test.go |
| @@ -271,7 +271,7 @@ func TestSettingsSectionsReadOnlyWhatTheyShow(t *testing.T) { |
| Detail: &AppView{App: "shop"}, |
| } |
| setAppSettingsSection(&p, section) |
| - if reads.record { |
| + if reads.record() { |
| p.Settings = &SettingsView{} |
| } |
| var buf bytes.Buffer |
| @@ -280,12 +280,23 @@ func TestSettingsSectionsReadOnlyWhatTheyShow(t *testing.T) { |
| } |
| } |
| for _, section := range []string{"placement", "errors-analytics", "delete"} { |
| - if settingsSectionReadsFor(section).record { |
| + if settingsSectionReadsFor(section).record() { |
| t.Errorf("section %s builds the whole settings record it never shows", section) |
| } |
| } |
| - if r := settingsSectionReadsFor("general"); !r.record || !r.swap || r.telemetry { |
| - t.Errorf("general reads %+v, want the record and the swap policy only", r) |
| + if r := settingsSectionReadsFor("general"); r != (settingsSectionReads{deployEmpty: true, swap: true}) { |
| + t.Errorf("general reads %+v, want the never-shipped check and the swap policy only", r) |
| + } |
| + for section, want := range map[string]settingsSectionReads{ |
| + "domains": {domains: true, gates: true}, |
| + "environments": {envs: true}, |
| + "storage": {store: true}, |
| + "email": {mail: true}, |
| + "features": {features: true}, |
| + } { |
| + if got := settingsSectionReadsFor(section); got != want { |
| + t.Errorf("%s reads %+v, want %+v", section, got, want) |
| + } |
| } |
| if r := settingsSectionReadsFor("errors-analytics"); !r.telemetry || r.swap || r.placement { |
| t.Errorf("errors-analytics reads %+v, want telemetry only", r) |
diff --git a/internal/console/appsettings_test.go b/internal/console/appsettings_test.go| index ac9a97a7a..2934a3b2c 100644 |
| --- a/internal/console/appsettings_test.go |
| +++ b/internal/console/appsettings_test.go |
| @@ -1137,7 +1137,7 @@ func TestAssembleSettingsListsRoutedDomainsWithoutABucket(t *testing.T) { |
| } |
| p := &page{AppName: "kass", Detail: detail} |
| - sv := fx.srv.assembleSettings(context.Background(), p, acct) |
| + sv := fx.srv.assembleSettings(context.Background(), p, acct, settingsSectionReads{domains: true, gates: true, deployEmpty: true, envs: true, store: true, mail: true, features: true}) |
| if !sv.NoBucket || sv.StoreUnavailable || sv.MailUnavailable || sv.FeaturesUnavailable { |
| t.Fatalf("bucketless settings flags = NoBucket %v, unavailable %v/%v/%v", sv.NoBucket, |
| sv.StoreUnavailable, sv.MailUnavailable, sv.FeaturesUnavailable) |
diff --git a/internal/console/perfquickwins_test.go b/internal/console/perfquickwins_test.go| index 752ab679b..028e91967 100644 |
| --- a/internal/console/perfquickwins_test.go |
| +++ b/internal/console/perfquickwins_test.go |
| @@ -11,7 +11,9 @@ import ( |
| "testing" |
| "time" |
| + "github.com/carlosframework/platform/internal/objstore" |
| "github.com/carlosframework/platform/internal/provision" |
| + "github.com/carlosframework/platform/internal/release" |
| "github.com/carlosframework/platform/internal/status" |
| ) |
| @@ -347,3 +349,224 @@ func TestReqMemoOnlyOnViews(t *testing.T) { |
| }) |
| } |
| } |
| + |
| +// settingsGroup names which settings read a request belongs to, from the |
| +// key it names or the prefix it lists. "" is anything else (the app-tab |
| +// frame, the swap policy, the manifest). |
| +func settingsGroup(q s3Req) string { |
| + name := q.Key |
| + if name == "" { |
| + name = q.Prefix |
| + } |
| + switch { |
| + case strings.Contains(name, "status/boxes/"): |
| + return "boxes" |
| + case strings.Contains(name, "control/cert-warm/"): |
| + return "cert-warm" |
| + case strings.Contains(name, "/instances/"): |
| + return "instances" |
| + case strings.Contains(name, "/environments/"): |
| + return "environments" |
| + case strings.Contains(name, "/stores/"), strings.HasSuffix(name, "/store.json"): |
| + return "stores" |
| + case strings.Contains(name, "/senders/"), strings.HasSuffix(name, "/email.json"): |
| + return "mail" |
| + case strings.HasSuffix(name, "/features.json"): |
| + return "features" |
| + } |
| + return "" |
| +} |
| + |
| +// TestSettingsSectionReadsOnlyItsOwn: a settings section's view asks the |
| +// bucket only for what it shows, and still shows all of it. |
| +func TestSettingsSectionReadsOnlyItsOwn(t *testing.T) { |
| + for _, tc := range []struct { |
| + section string |
| + path string |
| + allowed []string // read groups the section may touch |
| + want []string // what the rendered page must carry |
| + }{ |
| + {"general", "/apps/kass/settings", nil, |
| + []string{"<h2>Identity</h2>", "Renaming: ", "Deploys"}}, |
| + {"environments", "/apps/kass/settings/environments", []string{"environments", "stores"}, |
| + []string{"<code>staging</code>", "<code>production</code>", "<code>APP_ORIGIN</code>", "<code>API_KEY</code>", "carlos-"}}, |
| + {"storage", "/apps/kass/settings/storage", []string{"stores"}, |
| + []string{"Object storage — staging environment", "Object storage — production environment", "<code>CARLOS_STORE_*</code>"}}, |
| + {"email", "/apps/kass/settings/email", []string{"mail"}, |
| + []string{"hi@shop.example.com", "shop.example.com", "AKIAEXAMPLE"}}, |
| + {"features", "/apps/kass/settings/features", []string{"features"}, |
| + []string{"checkout", "beta"}}, |
| + } { |
| + t.Run(tc.section, func(t *testing.T) { |
| + fx, lat := newPerfFixture(t) |
| + c := signInPaul(t, fx) |
| + if status, _, body := get(t, c, fx.u(tc.path)); status != http.StatusOK { |
| + t.Fatalf("%s = %d:\n%s", tc.path, status, body) |
| + } |
| + rec := recordS3(lat, nil) |
| + status, _, body := get(t, c, fx.u(tc.path)) |
| + if status != http.StatusOK { |
| + t.Fatalf("%s = %d:\n%s", tc.path, status, body) |
| + } |
| + for _, q := range rec.all() { |
| + if g := settingsGroup(q); g != "" && !slices.Contains(tc.allowed, g) { |
| + t.Errorf("%s read %s (%+v), which it does not show", tc.section, g, q) |
| + } |
| + } |
| + for _, w := range tc.want { |
| + if !strings.Contains(body, w) { |
| + t.Errorf("%s section lacks %q", tc.section, w) |
| + } |
| + } |
| + }) |
| + } |
| +} |
| + |
| +// TestSettingsDomainsKeepsItsReads: the Domains section is the one that |
| +// still reads claims, box reports, cert-warm records and instance records, |
| +// and shows what they say. |
| +func TestSettingsDomainsKeepsItsReads(t *testing.T) { |
| + fx, lat := newPerfFixture(t) |
| + c := signInPaul(t, fx) |
| + u := fx.u("/apps/kass/settings/domains") |
| + if status, _, body := get(t, c, u); status != http.StatusOK { |
| + t.Fatalf("domains = %d:\n%s", status, body) |
| + } |
| + rec := recordS3(lat, nil) |
| + status, _, body := get(t, c, u) |
| + if status != http.StatusOK { |
| + t.Fatalf("domains = %d:\n%s", status, body) |
| + } |
| + seen := map[string]bool{} |
| + for _, q := range rec.all() { |
| + seen[settingsGroup(q)] = true |
| + } |
| + for _, g := range []string{"boxes", "cert-warm", "instances"} { |
| + if !seen[g] { |
| + t.Errorf("domains did not read %s (requests: %v)", g, rec.all()) |
| + } |
| + } |
| + for _, g := range []string{"environments", "stores", "mail", "features"} { |
| + if seen[g] { |
| + t.Errorf("domains read %s, which it does not show", g) |
| + } |
| + } |
| + for _, w := range []string{"shop.example.com", "kass.carlosapp.dev", "Password"} { |
| + if !strings.Contains(body, w) { |
| + t.Errorf("domains section lacks %q", w) |
| + } |
| + } |
| +} |
| + |
| +// TestSettingsStorageReadsEachStoreOnce: the Storage section reads each |
| +// environment's store record one time, not once for an environment card and |
| +// again for a storage card. |
| +func TestSettingsStorageReadsEachStoreOnce(t *testing.T) { |
| + fx, lat := newPerfFixture(t) |
| + c := signInPaul(t, fx) |
| + u := fx.u("/apps/kass/settings/storage") |
| + if status, _, body := get(t, c, u); status != http.StatusOK { |
| + t.Fatalf("storage = %d:\n%s", status, body) |
| + } |
| + rec := recordS3(lat, nil) |
| + if status, _, body := get(t, c, u); status != http.StatusOK { |
| + t.Fatalf("storage = %d:\n%s", status, body) |
| + } |
| + acct := fx.sqid |
| + for _, env := range []string{"staging", "production"} { |
| + key := objstore.KeyIn(acct, "kass", env) |
| + n := 0 |
| + for _, q := range rec.all() { |
| + if q.Key == key { |
| + n++ |
| + } |
| + } |
| + if n != 1 { |
| + t.Errorf("store record of %s requested %d times, want 1 (requests: %v)", env, n, rec.all()) |
| + } |
| + } |
| +} |
| + |
| +// pagedStore answers the bounded listing and records how it is asked; |
| +// listOnly (below) is the same store without it. |
| +type pagedStore struct { |
| + release.Store |
| + limits []int |
| + lists int |
| +} |
| + |
| +func (p *pagedStore) List(ctx context.Context, prefix string) ([]string, error) { |
| + p.lists++ |
| + return p.Store.List(ctx, prefix) |
| +} |
| + |
| +func (p *pagedStore) ListPage(ctx context.Context, prefix, after string, limit int) ([]string, error) { |
| + p.limits = append(p.limits, limit) |
| + return p.Store.(release.PageLister).ListPage(ctx, prefix, after, limit) |
| +} |
| + |
| +type listOnly struct { |
| + release.Store |
| + lists int |
| +} |
| + |
| +func (l *listOnly) List(ctx context.Context, prefix string) ([]string, error) { |
| + l.lists++ |
| + return l.Store.List(ctx, prefix) |
| +} |
| + |
| +// TestAppDeployEmptyAsksForOneKey: the emptiness check wants one key per |
| +// prefix, so it asks for one when the store can page, and lists when not. |
| +func TestAppDeployEmptyAsksForOneKey(t *testing.T) { |
| + seed := func(t *testing.T, key string) release.Store { |
| + st := release.NewDirStore(t.TempDir()) |
| + if key != "" { |
| + if _, err := st.Put(context.Background(), key, []byte("x"), ""); err != nil { |
| + t.Fatal(err) |
| + } |
| + } |
| + return st |
| + } |
| + cases := []struct { |
| + name string |
| + key string |
| + empty bool |
| + calls int // prefixes asked before the answer |
| + }{ |
| + {"nothing under either prefix", "", true, 2}, |
| + {"a key under the account prefix", release.AppPrefix("bab", "shop") + "releases/v1/manifest.json", false, 1}, |
| + {"a key under the legacy prefix", release.LegacyAppPrefix("shop") + "releases/v1/manifest.json", false, 2}, |
| + } |
| + for _, tc := range cases { |
| + t.Run(tc.name, func(t *testing.T) { |
| + ps := &pagedStore{Store: seed(t, tc.key)} |
| + s := &Server{} |
| + s.cfg.Releases = ps |
| + empty, err := s.appDeployEmpty(context.Background(), "bab", "shop") |
| + if err != nil || empty != tc.empty { |
| + t.Fatalf("paged: empty %v err %v, want %v", empty, err, tc.empty) |
| + } |
| + if ps.lists != 0 { |
| + t.Errorf("paged: List called %d times, want 0", ps.lists) |
| + } |
| + if len(ps.limits) != tc.calls { |
| + t.Fatalf("paged: ListPage called %d times, want %d", len(ps.limits), tc.calls) |
| + } |
| + for _, l := range ps.limits { |
| + if l != 1 { |
| + t.Errorf("paged: ListPage limit %d, want 1", l) |
| + } |
| + } |
| + |
| + lo := &listOnly{Store: seed(t, tc.key)} |
| + s.cfg.Releases = lo |
| + empty, err = s.appDeployEmpty(context.Background(), "bab", "shop") |
| + if err != nil || empty != tc.empty { |
| + t.Fatalf("fallback: empty %v err %v, want %v", empty, err, tc.empty) |
| + } |
| + if lo.lists != tc.calls { |
| + t.Errorf("fallback: List called %d times, want %d", lo.lists, tc.calls) |
| + } |
| + }) |
| + } |
| +} |
diff --git a/internal/console/server.go b/internal/console/server.go| index 324a1f65f..9f71b3cec 100644 |
| --- a/internal/console/server.go |
| +++ b/internal/console/server.go |
| @@ -4292,26 +4292,47 @@ func setAppSettingsSection(p *page, section string) { |
| } |
| // settingsSectionReads is what one settings section renders beyond the |
| -// app-tab frame, so a section view reads only that. record is the |
| -// SettingsView assembleSettings builds (domains, gates, environments, |
| -// storage, email, features, rename and the account move: every section that |
| -// reads .Settings); telemetry is the resolved errors and analytics settings; |
| -// swap is the swap policy; placement is the Placement section's registry |
| -// read. A section that reads none of these (Delete) costs only the frame. |
| -type settingsSectionReads struct{ record, telemetry, swap, placement bool } |
| +// app-tab frame, so a section view reads only that. The first seven are the |
| +// parts of the SettingsView assembleSettings builds: domains (claims, box |
| +// reports and cert-warm records), gates (the instance records), deployEmpty |
| +// (the never-shipped check behind the rename form), envs (each environment |
| +// and its store), store (the app's own store plus the environment stores), |
| +// mail and features. telemetry is the resolved errors and analytics |
| +// settings; swap is the swap policy; placement is the Placement section's |
| +// registry read. A section that reads none of these (Delete) costs only the |
| +// frame. |
| +type settingsSectionReads struct { |
| + domains, gates, deployEmpty, envs, store, mail, features bool |
| + telemetry, swap, placement bool |
| +} |
| + |
| +// record reports whether the section reads any part of the SettingsView. |
| +// General does, by its deployEmpty read: the rename form, the control-plane |
| +// flag and the account mismatch come with it. |
| +func (r settingsSectionReads) record() bool { |
| + return r.domains || r.gates || r.deployEmpty || r.envs || r.store || r.mail || r.features |
| +} |
| func settingsSectionReadsFor(section string) settingsSectionReads { |
| switch section { |
| case "general": |
| - return settingsSectionReads{record: true, swap: true} |
| + return settingsSectionReads{deployEmpty: true, swap: true} |
| + case "domains": |
| + return settingsSectionReads{domains: true, gates: true} |
| + case "environments": |
| + return settingsSectionReads{envs: true} |
| + case "storage": |
| + return settingsSectionReads{store: true} |
| + case "email": |
| + return settingsSectionReads{mail: true} |
| + case "features": |
| + return settingsSectionReads{features: true} |
| case "placement": |
| return settingsSectionReads{placement: true} |
| case "errors-analytics": |
| return settingsSectionReads{telemetry: true} |
| - case "delete": |
| + default: // delete |
| return settingsSectionReads{} |
| - default: // domains, environments, storage, email, features |
| - return settingsSectionReads{record: true} |
| } |
| } |
| @@ -4319,8 +4340,8 @@ func settingsSectionReadsFor(section string) settingsSectionReads { |
| // settingsSectionReadsFor). |
| func (s *Server) populateAppSettings(r *http.Request, p *page, acct *Account, section string) { |
| reads := settingsSectionReadsFor(section) |
| - if reads.record { |
| - p.Settings = s.assembleSettings(r.Context(), p, acct) |
| + if reads.record() { |
| + p.Settings = s.assembleSettings(r.Context(), p, acct, reads) |
| } |
| if reads.placement { |
| s.populateAppPlacement(p, acct) |
diff --git a/internal/console/testdata/perf-budgets.txt b/internal/console/testdata/perf-budgets.txt| index 6a72631f6..ae47c4dcf 100644 |
| --- a/internal/console/testdata/perf-budgets.txt |
| +++ b/internal/console/testdata/perf-budgets.txt |
| @@ -48,8 +48,8 @@ GET /a/{sqid}/apps/{app}/instances over: instances.json, and every edges file an |
| GET /a/{sqid}/apps/{app}/instances/{host} over: the instance record, instances.json, the edges listing, and the box reports and the fleet box reports listed and read once per view (10 S3 calls warm, median about 315 ms); cold, also the app-tab frame and the account manifest (17 S3 calls, about 495 ms) |
| GET /a/{sqid}/apps/{app}/logs over: three listings for the log chunks and a chunk read; the host picker uses the records the page already holds (4 S3 calls warm, median about 105 ms); cold, also the app-tab frame and the account manifest (11 S3 calls, about 285 ms) |
| GET /a/{sqid}/apps/{app}/releases over: the release and tag listings, at most 20 manifests, retention and instances.json (6 S3 calls warm, median about 160 ms; 4 on the fixture's empty page 2) |
| -GET /a/{sqid}/apps/{app}/settings over: General builds the whole settings record: each environment and its store read twice, every instance record, the domain claims, cert-warm records, every box report and a listing of every key under the app, plus the swap policy (25 S3 calls warm) |
| -GET /a/{sqid}/apps/{app}/settings/{section} over: Domains, Environments, Storage, Email and Feature flags build the whole settings record, as General does (24 S3 calls warm; General 25); Errors and analytics 2 (both telemetry settings); the pipeline section, Placement, Delete and the advanced redirect none |
| +GET /a/{sqid}/apps/{app}/settings over: the one-key app listing for the rename check (a second for the legacy prefix when the first is empty) and the swap policy (2 S3 calls warm, 3 at most); cold, also the app-tab frame and the account manifest (30 S3 calls, about 235 ms) |
| +GET /a/{sqid}/apps/{app}/settings/{section} over: Domains still reads the domain claims, cert-warm records, every box report and every instance record (12 S3 calls warm, 20 cold); the other sections read only their own data: Environments 5 (the listing, and each environment and its store once), Storage 4, Email 1, Feature flags 1 (cold 8 to 12); Errors and analytics 2 (both telemetry settings); the pipeline section, Placement, Delete and the advanced redirect none |
| GET /a/{sqid}/fleet over: reads status/fleet.json and lists and reads each customer fleet's box reports (3 S3 calls warm) |
| GET /a/{sqid}/fleets/{fleet} over: lists and reads the fleet's box reports (2 S3 calls warm) |
| GET /a/{sqid}/plan/keep over: the lapse inventory lists every app's instance records and reads each one, lists every app's sidecar records, and lists the domain claims (8 S3 calls warm for two apps and three instances, median 209 ms; it grows with the account) |