fix(test): point test queue traffic at Azurite instead of real Azure - #110
Merged
Anthony Cintron (prbatero) merged 1 commit intoAug 10, 2026
Merged
Conversation
The `test` hatch environment sets BLOB_CONNECTION_STRING with only a BlobEndpoint override. Config.get_queue_config() reuses that same connection string for queues, so QueueServiceClient.from_connection_string falls back to deriving the default public endpoint https://devstoreaccount1.queue.core.windows.net. That hostname resolves to real Azure Storage infrastructure, so running the suite locally sends authenticated queue requests off-box. The requests fail with AuthenticationFailed (MAC signature mismatch), which surfaced as a confusing test failure that looked like a broken local Azurite setup. Add an explicit QueueEndpoint pointing at the Azurite queue port (10001, already published by docker/docker-compose.yml) so queue operations stay on localhost.
Caleb Robinson (calebrob6)
force-pushed
the
calebrob6/fix-test-queue-endpoint
branch
from
August 8, 2026 17:25
ee29a65 to
25364b2
Compare
RC artifacts readyAll branch deployment references use the same RC tag:
|
RC artifacts readyAll branch deployment references use the same RC tag:
|
Caleb Robinson (calebrob6)
deleted the
calebrob6/fix-test-queue-endpoint
branch
August 10, 2026 16:04
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.
Problem
The
testhatch environment inhastelib/pyproject.tomlsetsBLOB_CONNECTION_STRINGwith only aBlobEndpointoverride:Config.get_queue_config()reuses that same connection string for queues:Because the string carries no
QueueEndpoint,QueueServiceClient.from_connection_stringfalls back to deriving the default public endpoint rather than the emulator:That hostname resolves to real Azure Storage infrastructure:
So running the test suite locally sends authenticated queue requests off-box to public Azure instead of to Azurite. They fail with
AuthenticationFailed(MAC signature mismatch, since the well-known emulator key is not valid there), which surfaces as a confusingtest_zipfailure that looks like a broken local Azurite setup.Fix
Add an explicit
QueueEndpointpointing at the Azurite queue port. Port10001is already published bydocker/docker-compose.yml, so this needs no other setup change:No production code path is affected — this is test-environment configuration only. Only the emulator's well-known public credentials are involved; no secrets are added.
Verification
Run against the local Docker stack (
docker compose -f docker/docker-compose.yml up -d):Queue traffic now stays on
127.0.0.1.test_zipstill fails, but for a different, pre-existing reason unrelated to this change — it progresses past queue creation and then hits stale test drift:ArtifactProcessor.zip()was refactored intosend_to_zip_queue/process_zip/prepare_zip_job/submit_zip_job, but the test was never updated.Pre-existing failures on
main(out of scope, not introduced here)These 3 failures are present on
mainbefore this change and are left alone:test_artifacts.py::test_zipArtifactProcessor.zip()no longer exists (refactored)test_imagery_preprocess_config.py::test_config_includes_user_building_footprints_url_when_setMagicMock(spec=ImageLayer)has noclipBboxtest_imagery_preprocess_config.py::test_config_user_url_is_none_when_unsetThe
clipBboxpair stems from36d23bcaddingself.image_data.clipBboxinprocessors/imagery.pywithout updating the mock introduced inb2b096e. Happy to fix these in a follow-up PR if wanted.Note for reviewers
hatch run test:pytestrequires thehatch-condaplugin (pip install hatch-conda), since[tool.hatch.envs.test]declarestype = "conda". Without it hatch fails withEnvironment `test` has unknown type: conda. That is not a declared dependency anywhere in the repo — possibly worth documenting separately.