feat(api): organizations with own status page servers serve their pages alone
ci / lint (push) Skipped
ci / test (push) Skipped
ci / build (push) Skipped
ci / image (push) Skipped
ci / lint (pull_request) Canceled after 6m3s
ci / test (pull_request) Canceled after 6m2s
ci / build (pull_request) Canceled after 0s
ci / image (pull_request) Canceled after 0s
ci / lint (push) Skipped
ci / test (push) Skipped
ci / build (push) Skipped
ci / image (push) Skipped
ci / lint (pull_request) Canceled after 6m3s
ci / test (pull_request) Canceled after 6m2s
ci / build (pull_request) Canceled after 0s
ci / image (pull_request) Canceled after 0s
The platform's status page servers handed out every published page, including those of organizations running their own servers. Once one of an organization's own status page servers has connected, the agent API now answers the platform's servers 404 for its pages, so they drop them from their cache, and only the organization's servers serve them. A created but never connected token changes nothing, so moving over does not take the pages offline. The console no longer links such pages to the platform's address, which would not serve them; the editor says who does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
This commit is contained in:
1 parent
20874a5a87
commit
c0239e15bb
11 files changed
+905
-778
No files matched your search
@@ -192,6 +192,26 @@ func TestStatusPages(t *testing.T) {
|
||||
st, body = editor.do("PUT", "/api/v1/org/statuspages/"+second, map[string]any{"slug": "x-second", "title": "x"})
|
||||
expect(t, "edit page out of scope", st, body, http.StatusNotFound, "not_found")
|
||||
})
|
||||
|
||||
t.Run("own servers replace the platform's", func(t *testing.T) {
|
||||
org := uuid.MustParse(owner.orgID())
|
||||
own := e.statuspageClient(t, &org)
|
||||
if _, err := platform.Page(context.Background(), "", slug); err != nil {
|
||||
t.Fatalf("platform server before the own one connected: %v", err)
|
||||
}
|
||||
if _, err := own.Hello(context.Background()); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if _, err := platform.Page(context.Background(), "", slug); !errors.Is(err, agentapi.ErrNotFound) {
|
||||
t.Errorf("platform server still gets the page: %v", err)
|
||||
}
|
||||
if snap, err := own.Page(context.Background(), "", slug); err != nil || snap.Title != "Acme Status" {
|
||||
t.Errorf("own server Page() = %v, %v", snap.Title, err)
|
||||
}
|
||||
if _, _, html := owner.page("/statuspages/" + pageID); !strings.Contains(html, "own status page servers serve its pages") {
|
||||
t.Error("the editor does not say who serves the pages")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func editorEmail(b *browser) string {
|
||||
|
||||
Reference in new issue
Block a user