Repository navigation
deploy: keep the isolated Bot Social TRUST_PROXY default one the service accepts - #3499
Merged
Merged
Conversation
…ice accepts The overlay defaulted TRUST_PROXY to a list that also contained loopback, and loadTrustProxy refuses to mix loopback with address entries. The refusal is thrown at module load, before listen, so the container exited 1 and restarted forever with /healthz never answering. - drop the loopback token from the overlay default - join the two halves in trust_proxy.test.ts: read the overlay's TRUST_PROXY default and assert loadTrustProxy accepts it, so the default cannot drift back to one the service rejects Refs #3498
…ifest The overlay-default test changes a file that comes from the Bot Social snapshot, so it moves from the identical-file list to modified_files with the original hash kept, and the component file count follows it down by one. Refs #3498
Collaborator
Author
|
Reviewed at head
Refs #3498 |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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 changed
The isolated overlay's
TRUST_PROXYdefault mixedloopbackwith RFC1918 address entries, andloadTrustProxyrefuses that combination by design: the refusal is thrown at module load (services/bot-social/src/main.ts:29), before the server listens, so the container exits 1 andrestart: unless-stoppedturns that into an endless restart loop with/healthznever answering.deploy/isolated/bot-social.compose.yml: the default is now the three RFC1918 ranges the overlay actually needs;loopbackis gone.services/bot-social/test/trust_proxy.test.ts: new test that reads the overlay'sTRUST_PROXYdefault out of the Compose file and assertsloadTrustProxyaccepts it as a CIDR list. The YAML-parsing test and the parser test existed separately and were never joined, which is why CI stayed green while the documented deployment could not start.Nothing else changes: the parser's rule is right, and the documented procedure stays as it is.
Evidence (local on this host, not CI)
Replayed on a clean
0bdbbfbe7cc5b77c78f84adc7b9e78e86aba9fb2tarball; the rebuilt base tree isaacdf8ea529f4355cfb72e87a73cf4eb21861ca9. Slice tree6d9ddd362fcc293a58955631e91f16ab84c55027, commit9dfee9b3, 2 files +16/-1.node --import tsx --test test/trust_proxy.test.ts-> 11/11 pass.loopbackback in the overlay default ->not ok 11 - the isolated Bot Social overlay's TRUST_PROXY default is one the service accepts, errorTRUST_PROXY cannot mix false or loopback with address entries (got "172.16.0.0/12,10.0.0.0/8,192.168.0.0/16,loopback"). Restored -> 11/11 pass.python3 -m unittest test_isolated_bot_social-> OK.grep -rn "192.168.0.0/16,loopback"matches nowhere else in the repository.Provenance
services/bot-social/test/trust_proxy.test.tscomes from the Bot Social snapshot, so changing it is recorded rather than silently allowed: it moves out ofdocs/upstream/bot-social-files.jsonintomodified_filesindocs/upstream/migration-manifest.jsonwith the original sha256 and blob kept, plus the reason and the licence notice, and the component'sfile_countdrops from 436 to 435.python3 scripts/verify-upstream-migration.py->ok (flybot 46 files, bot-social 435 files).Refs #3498