Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 22 additions & 10 deletions backend/src/routes/webhooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2028,18 +2028,30 @@ webhooks.post("/github", async (c) => {
}

if (zarrDecision.dispatch) {
try {
await triggerZarrGeneration(zarrDecision.datasetId, zarrDecision.ref, pat);
// The Hallu cron is the Zarr conversion engine (the GitHub Actions path
// can't sustain bulk/backfill -- a large dataset stalls past the 120-min
// cap; epic #684). Auto-dispatch is therefore OFF by default; set
// ZARR_AUTODISPATCH="true" to re-enable the event-driven Actions path. The
// run-generate-zarr.yml workflow stays available for manual
// workflow_dispatch recovery regardless.
if (c.env.ZARR_AUTODISPATCH !== "true") {
console.log(
`[github-webhook] dispatched run-generate-zarr for ${zarrDecision.datasetId}@${zarrDecision.ref} delivery=${deliveryId}`,
);
dispatched.zarr = { dataset_id: zarrDecision.datasetId, ref: zarrDecision.ref };
} catch (err) {
const msg = err instanceof Error ? err.message : String(err);
console.error(
`[github-webhook] zarr dispatch failed for ${zarrDecision.datasetId}@${zarrDecision.ref} delivery=${deliveryId}: ${msg}`,
`[github-webhook] zarr autodispatch off (Hallu cron owns conversion); skipping ${zarrDecision.datasetId}@${zarrDecision.ref} delivery=${deliveryId}`,
);
errors.zarr = msg;
} else {
try {
await triggerZarrGeneration(zarrDecision.datasetId, zarrDecision.ref, pat);
console.log(
`[github-webhook] dispatched run-generate-zarr for ${zarrDecision.datasetId}@${zarrDecision.ref} delivery=${deliveryId}`,
);
dispatched.zarr = { dataset_id: zarrDecision.datasetId, ref: zarrDecision.ref };
} catch (err) {
const msg = err instanceof Error ? err.message : String(err);
console.error(
`[github-webhook] zarr dispatch failed for ${zarrDecision.datasetId}@${zarrDecision.ref} delivery=${deliveryId}: ${msg}`,
);
errors.zarr = msg;
}
}
}

Expand Down
5 changes: 5 additions & 0 deletions backend/src/types/bindings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ export interface Bindings {
ZARR_CACHE_BASE_URL?: string; // e.g. "https://zarr.nemar.org" (cache host, no trailing slash needed)
CLOUDFLARE_API_TOKEN?: string; // Workers secret; scoped token with Zone.Cache Purge on the SCCN zone
CLOUDFLARE_ZONE_ID?: string; // SCCN zone id for the cache host
// "true" re-enables the event-driven Actions auto-dispatch on a data/events
// push. Default (unset) keeps it OFF: the SDSC Hallu cron is the conversion
// engine (Actions can't sustain bulk/backfill). run-generate-zarr.yml stays
// available for manual workflow_dispatch recovery either way.
ZARR_AUTODISPATCH?: string;
}

/** User roles in hierarchical order: owner > admin > member */
Expand Down
Loading