Skip to content

fix: unblock subscriptions-smoke (S3 loader without R4; smoke ids via PUT) - #1418

Merged
smunini merged 2 commits into
mainfrom
fix/s3-default-enabled-fhir-version
Sep 22, 2026
Merged

smunini merged 2 commits into
mainfrom
fix/s3-default-enabled-fhir-version

Conversation

@smunini

@smunini smunini commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Two independent problems kept subscriptions-smoke.yml from running at all; both predate #1342 and neither is backend-specific.

1. hfs did not compile without the R4 feature when s3 was on

S3Backend::reload_stored_cache_for_tenant (crates/persistence/src/backends/s3/storage.rs:403) built its SearchParameterLoader with FhirVersion::default(), which only exists when the R4 feature is enabled:

error[E0599]: no variant, associated function, or constant named `default` found for enum `FhirVersion`
   --> crates/persistence/src/backends/s3/storage.rs:403:62

That failed 10 of the 16 build jobs (run 35516683520). Switched to FhirVersion::default_enabled(), the helper intended for code that must compile in any single-version build. The companion validator error was fixed in #1375.

2. The smoke script asserted on ids the server no longer keeps

crates/hfs/tests/subscriptions/run_external_subscriptions_smoke.sh POSTed its topic, Subscriptions and Encounters with a client-chosen id, then asserted that delivered notifications reference Encounter/<that id>. HFS assigns the id on POST, so every leg failed with rest-hook event bundle missing expected focus (run 35629993565: the captured bundle carried Encounter/01a0c55f-…, the script expected Encounter/enc-rest-…). The nine create calls now use PUT <Type>/<id> (update-as-create), which keeps the chosen id.

Test plan

  • cargo check -p helios-hfs --no-default-features --features "<V>,subscriptions,sqlite,elasticsearch,postgres,mongodb,s3" for R5, R4B, R6, and R4B,R6
  • CI: all 15 build subsets compiled in run 35629993565 (previously 10 failed)
  • Patched smoke script run locally against an in-memory sqlite hfs, R4 (backport topic) and R5 (native SubscriptionTopic): rest-hook, websocket and messaging pass
  • Email channel re-run locally against a mailpit container (R5): passes, and the delivered bundle carries the client-chosen focus Encounter/enc-email-… — the exact assertion that was failing
  • subscriptions-smoke.yml on this branch (run 35644104645): green — all 168 smoke legs pass, including the first-ever run of the postgres-elasticsearch / mongodb-elasticsearch legs added in ci: add postgres-elasticsearch and mongodb-elasticsearch legs to backend matrices #1342. Two legs initially failed on GitHub's artifact service (403 Forbidden: Error from intermediary on FinalizeArtifact / ListArtifacts, unrelated to storage behaviour); re-running just those two passed.

… the R4 feature

reload_stored_cache_for_tenant built its SearchParameterLoader with
FhirVersion::default(), which only exists when the R4 feature is enabled,
so every hfs build without R4 (R4B-, R5-, R6-only and their combinations)
failed to compile helios-persistence with the s3 feature on. Use
FhirVersion::default_enabled(), the helper meant for code that must
compile in any single-version build.
@codecov

codecov Bot commented Sep 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

…vive

The external subscriptions smoke POSTed its topic, Subscriptions and
Encounters with a client-chosen id and then asserted on that id in the
delivered notifications. HFS assigns the id on POST, so the expected
Encounter/<id> focus never appeared and every leg failed with
"rest-hook event bundle missing expected focus". Create them with
PUT <Type>/<id> (update-as-create), which keeps the chosen id.
@smunini smunini changed the title fix(persistence): build the S3 SearchParameter overlay loader without the R4 feature fix: unblock subscriptions-smoke (S3 loader without R4; smoke ids via PUT) Sep 21, 2026
@smunini
smunini merged commit 75c2039 into main Sep 22, 2026
383 of 386 checks passed
@smunini
smunini deleted the fix/s3-default-enabled-fhir-version branch September 22, 2026 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant