Skip to content

feat(azure): add API v2 backfill script#391

Open
natemcintosh wants to merge 7 commits intomainfrom
azure-backfill-api-v2
Open

feat(azure): add API v2 backfill script#391
natemcintosh wants to merge 7 commits intomainfrom
azure-backfill-api-v2

Conversation

@natemcintosh
Copy link
Copy Markdown
Collaborator

@natemcintosh natemcintosh commented Apr 8, 2026

This new script allows us to kick off backfill runs more easily in the future. It will require a bit of tinkering with the command lines arguments (there are a number), but should allow us to run for whatever specifics we like.

Copilot Summary

This pull request introduces a new script, azure/backfill_api_v2.py, which automates the backfilling of weekly jobs for API v2 data processing using Azure resources. The script provides a command-line interface for generating configuration files, discovering them in Azure Blob Storage, and submitting jobs to Azure Container Apps, with support for dry runs and various customizable parameters.

Key additions in this script:

Backfill job automation and orchestration:

  • Implements functions to calculate weekly intervals, generate job IDs, and determine the latest Wednesday for scheduling backfill runs.
  • Automates the generation of configuration files for each backfill date using the cfa-config-generator, and uploads them to Azure Blob Storage.
  • Discovers generated configuration files in Azure Blob Storage and submits corresponding jobs to Azure Container Apps, dynamically updating the container image and command for each execution.

Command-line interface and configuration:

  • Provides a comprehensive CLI using typer, allowing customization of dates, job prefixes, containers, image names, production dates, and other parameters. Supports dry-run mode for previewing planned jobs without execution.
  • Integrates with Azure SDKs for authentication, resource management, and blob storage operations, ensuring secure and efficient cloud interactions.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

Thank you for your contribution @natemcintosh 🚀! Your pkgdown-site is ready for download 👉 here 👈!
(The artifact expires on 2026-04-20T19:28:22Z. You can re-generate it by re-running the workflow here.)

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Azure automation script to kick off API v2 backfill runs by generating weekly config sets and submitting corresponding Azure Container Apps Job (CAJ) executions.

Changes:

  • Introduces azure/backfill_api_v2.py with a Typer CLI to define a weekly backfill window and per-run parameters.
  • Generates config blobs per Wednesday and discovers them in Blob Storage for job submission.
  • Submits CAJ executions while allowing overrides for image, storage account/container, and resource group/job name.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@micahwiesner67 micahwiesner67 self-requested a review April 8, 2026 19:51
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Collaborator

@micahwiesner67 micahwiesner67 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great. Thanks so much for doing this. I added a small comment on adding additional CLI messaging if start_date is not a wednesday, and I agree with the automated PR that additional messaging on end_date would be useful, but approved.

natemcintosh and others added 2 commits April 13, 2026 14:30
Co-authored-by: Micah Wiesner <33739832+micahwiesner67@users.noreply.github.com>
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.

4 participants