Conversation
Co-Authored-By: Humza Rabbani <humza.rabbani@cognition.ai>
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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.
Summary
MBA-2211 / TICKET-10. Replaces the bash orchestration of the pipeline with Synapse pipeline definitions held as code under
synapse/, plus a renderer/deployer and CI. The Teradata/SAS assets stay in place;orchestration/run_full_pipeline.shandconfig/pipeline_config.cfgonly gain a "superseded" header.Control flow lands as five pipelines:
Mapping decisions worth calling out (full table in
docs/modernization/orchestration_synapse_migration.md):set -euo pipefail+exit ${RC}becomesdependsOn: [{Succeeded}]chains; every non-first activity in every scope has one, and the validator enforces that so the ordering can't silently regress.--dry-run—dryRunparameter gates the whole run: the true branch only writes the planned activity list to a variable, so nothing touches Snowflake.--skip-bteq/--skip-sas—skipStaging/skipAnalyticsIfConditions; a skipped phase still counts asSucceededfor the next phase, matching the shell.SELECT COUNT(*)heredoc becomes one Script activity producingBREACH_COUNT/DETAILagainst per-environment minimums, thenFailOnRowCountBreach(error code 99, the shell's zero-row exit code).ETL_RUN_LOGinserts become<staging_db>.OPS.PIPELINE_RUN_LOG.pipeline_config.cfgvalue becomes a pipeline parameter supplied fromsynapse/config/{dev,uat,prod}.parameters.json(LOOKBACK_MONTHS, RISK_SCORE_THRESHOLD, LOG_LEVEL, DB_* -> Snowflake databases, RUN_DATE ->runDate/runId). SAS/edge-server paths are dropped. Only vault and secret names are in the repo; Snowflake auth is key-pair with the private key resolved from Key Vault byls_snowflake.scripts/deploy_synapse.pysubstitutes the Spark pool reference and the entry pipeline's default parameters per environment and deploys callee-before-caller, so DEV/UAT/PROD deploy from identical definitions with no manual edits.Assumptions about unmerged predecessors
TICKET-01..09 are in flight, so this codes against the interfaces the ticket describes rather than merged artifacts: schemas
<staging_db>.STAGING/<products_db>.DATA_PRODUCTSand the run-log table<staging_db>.OPS.PIPELINE_RUN_LOG; a dbt runner notebooknb_run_dbttakingdbt_select; and notebooksnb_customer_segments,nb_txn_analytics,nb_risk_scoring,nb_data_products. If a predecessor lands other names, only thereferenceNamevalues andEXPECTED_NOTEBOOKSin the validator change. Note also thatbteq/run_bteq_pipeline.shandsas/run_sas_pipeline.share referenced by the README but do not exist in the repo — their phase behaviour is reconstructed fromrun_full_pipeline.shand the numbered BTEQ/SAS assets.Validation
No Snowflake or Azure environment is available, so checks are static:
python scripts/validate_synapse_artifacts.py— JSON parse, name/file agreement, resolvable pipeline/linked-service/notebook references, complete linked-service parameter sets,dependsOnpresent on every non-first activity, DEV/UAT/PROD parameter keys consistent and covering every required entry-pipeline parameter, no credential literals. Negative-tested by injecting a missingdependsOn, a bogus notebook, a dropped env parameter and a plaintextprivateKey— all five were reported.python scripts/deploy_synapse.py --environment {dev,uat,prod} --dry-run— renders each environment and prints theaz synapsecommands in dependency order.bash -non the two touched shell/config files.CI (
.github/workflows/synapse-ci.yml) runs the validation and the three dry-run renders on PRs, and deploys dev -> uat -> prod onmainvia Azure OIDC.Devin-Org: engineering
Link to Devin session: https://app.devin.ai/sessions/9947f7c8c39540429878f2339628a5b7
Requested by: @hrabbani
Devin Review