Skip to main content

2.4 Config Server apply

Config Server tab · momo-ticket-system ext API · RCM Config Server (KrakenD gateway)

Usermomo-cogworkmomo-ticket-systemext APIRCM Config Serverper-env gateway + keyOpen the “Config Server” tabGET /api/ext/config-server-changes?updated=falsepending changesenvironment is a single value (“TP”) or merged (“TC+TP”, “TC+TP+GCP”)Click “Apply” on one row → confirm dialog → applyGET again — take the latest, authoritative recordguard: an empty-string value is rejected outrightsplit environment on “+”, resolve RCM credentials per environmentloop · write each environment in orderPOST {api-base}/config (action=update, upsert){r:1, m:"success"} (or r:0 / 4xx business failure)mark momo-ticket-system done only when every environment succeededmid-way failure: report which environments succeeded, do not mark donesafe to retry later (RCM writes are upserts)PUT /api/ext/config-server-changes/{id}full record, only updated / deploy flipped to true200 {data: updated record}

Figure 4 — Applying a Config Server change: write RCM first, mark done afterwards

Safety design

  • RCM is written first, momo-ticket-system is marked afterwards — RCM is the real system of record; if the later marking fails, the change itself has already taken effect and momo-ticket-system merely still shows it as pending, so it can be retried safely.
  • Empty-value guard — when value is an empty string the apply is refused outright, so a production RCM value is never wiped to blank.
  • Multi-environment merged apply — the environment field can be "TC+TP" or "TC+TP+GCP"; cogwork first resolves the credentials of every environment before it writes anything, and if any environment fails it stops and reports progress clearly, never marking a half-applied change as done.

Known limitation

caution

The "Deploy" toggle on the RCM web UI (the enable field in the API response) cannot be written through the API-key write API — in testing, sending enable:true on a write is silently ignored by RCM. Every value written through the API is therefore in the "not enabled" state, and somebody has to open the key's Deploy toggle on the RCM web UI by hand before it actually takes effect. An issue has been raised with the RCM maintainers (see rcm-enable-deploy-toggle.md).