Ops scripts: backend container name, safe re-runs, probe Vinted again - #714
Merged
Merged
Conversation
- scripts/ops: the cloud backend runs as amcp-cloud-backend since the container split; every docker cp/exec/restart line now names it. Each restart step now silences the host uptime probe first with an expiring /var/lib/anythingmcp-probe/maintenance marker (as deploy-cloud.yml does), since the restart takes the API down for ~30-60 s. - migrate-vinted-cloud.mjs: skip connectors already at the target (base URL, LOGIN_TOKEN with the adapter's authConfig, adapterVersion, tool set) and list them as "already current"; a second --apply writes nothing. - migrate-deutsche-bahn-cloud.mjs: the generated SQL leaves out connectors already on this adapterVersion and MOTIS URL and reports them. - Remove migrate-amadeus-client-credentials.mjs: the Amadeus adapter is gone (#713). - probe-keyless.mjs: "keyless" now means no user-supplied credentials, not authType NONE. Adapters whose authConfig has no {{VAR}} are probed too, with LOGIN_TOKEN reproduced from the adapter JSON (cookie or body token), which brings Vinted's anonymous session back into the weekly run. Auth types the probe cannot reproduce are listed as unsupported-auth.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
1. Container name in the ops scripts. The cloud backend has run as
amcp-cloud-backendsince the container split (docker-compose.cloud.yml). Everydocker cp/docker exec/docker restartline inscripts/ops/saidamcp-cloud-app, and those commands no longer work. They now useamcp-cloud-backend. No other file in the repo (docs included) used the old name. Each restart step now warns that the restart takes the API down for ~30–60 s, and shows how to silence the host uptime probe first. The probe reads an expiry epoch from/var/lib/anythingmcp-probe/maintenance(deploy/cloud/uptime-probe.sh), the same file deploy-cloud.yml sets:Behaviour is unchanged apart from the wording of the hints the scripts print.
2. Safe re-runs.
migrate-vinted-cloud.mjsnever checked whether a connector was already migrated, so a dry run after--applyreported every connector as still to migrate. It now skips connectors already at the target and lists them asalready current. A connector is at the target when all of these hold:config.adapterVersionmatches;A second
--applywrites nothing.migrate-deutsche-bahn-cloud.mjs(prints SQL): the SQL now leaves out connectors already on this adapterVersion and MOTIS URL, and prints analready_currentcount. A second run matches no rows.fix-etsy-api-key.mjsandfix-reddit-oauth.mjswere already safe to re-run.resync-catalog-connectors.mjsalready reportsalready current.migrate-amadeus-client-credentials.mjsis deleted because the Amadeus adapter was removed in Remove the Amadeus adapter: Amadeus retired its Self-Service API #713.3. Weekly probe covers Vinted again.
probe-keyless.mjsused to test onlyauthType: NONE, so Vinted dropped out when it moved to LOGIN_TOKEN. "Keyless" now means the user supplies no credentials: no{{VAR}}in the authConfig, and no required env vars beyond those the operator provides. The rule reads the adapter JSON, so there is no Vinted-specific code.login-token.service.ts/injectLoginTokenHeaders()do: cookie token (last non-empty Set-Cookie value) or body token (tokenJsonPath), thenheaderName/headerTemplate/extraHeaders.login-failed, which counts as a failure under--check.unsupported-auth, a warning, so they show up in the output instead of being skipped. Today Vinted is the only adapter in this category.Verification
postgres:17-alpine,prisma migrate deploy, built backend. Seeded two old-style Vinted connectors: one with a baseline on www.vinted.fr, and one pre-baseline on www.vinted.de with an operator response mapping and a disabled tool. Also seeded one non-Vinted control connector.Would migrate 2 of 2 (0 already current).--apply:Migrated 2 of 2, 9 tools in total.Would migrate 0 of 2 (2 already current).--applyagain:Migrated 0 of 2, still 9 tools. A DB snapshot includingupdated_atis identical before and after.Would migrate 2.already_current 1,connectors_to_migrate 0, withupdated_atunchanged.--applypatches 0 rows.node scripts/probe-keyless.mjs --only=vinted --checkgivesok 200 vinted_search_items (anonymous LOGIN_TOKEN), exit 0. A full--allrun gives the same results as the old script, plus Vinted (16 probed instead of 15, no new failures). Two negative checks:login-failed.bot-blocked), which shows the token is what makes the call pass.Not run against production.