@@ -182,63 +182,6 @@ run_infrastructure_sps() {
182182 log " RDB_DATE rows: $rdb_date_count , CONDITION rows: $cond_count "
183183}
184184
185- # --------------------------------------------------------------------
186- # Step 2.5 — Apply pending-PR routine fixes
187- # --------------------------------------------------------------------
188- #
189- # The baseline docker image (DATABASE_VERSION=6.0.18.1) ships SP versions
190- # that pre-date several RTR fixes under review. Until those PRs merge to
191- # main and a new image is cut, pull each pending routine from its bug
192- # branch via `git show` and apply it to the freshly-restored DB so Tier 3
193- # fixtures and the datamart chain can execute cleanly.
194- #
195- # Remove a branch from this list once its PR merges and the baseline
196- # image is refreshed.
197-
198- apply_pending_pr_routines () {
199- log " Step 2.5: apply pending-PR routine fixes"
200- local routines=(
201- # PR #837 (bug-3): morbidity user-comment join via NRT staging CSV
202- " aw/app-471/bug-3:liquibase-service/src/main/resources/db/005-rdb_modern/routines/016-sp_nrt_morbidity_report_postprocessing-001.sql"
203- # PR #839 (bug-7): sp_nrt_ldf_dimensional_data_postprocessing
204- " aw/app-471/bug-7:liquibase-service/src/main/resources/db/005-rdb_modern/routines/265-sp_nrt_ldf_dimensional_data_postprocessing-001.sql"
205- # PR #840 (bug-8): SUBSTRING guards across 6 per-condition LDF datamart SPs
206- " aw/app-471/bug-8:liquibase-service/src/main/resources/db/005-rdb_modern/routines/285-sp_ldf_bmird_datamart_postprocessing-001.sql"
207- " aw/app-471/bug-8:liquibase-service/src/main/resources/db/005-rdb_modern/routines/290-sp_ldf_foodborne_datamart_postprocessing-001.sql"
208- " aw/app-471/bug-8:liquibase-service/src/main/resources/db/005-rdb_modern/routines/295-sp_ldf_mumps_datamart_postprocessing-001.sql"
209- " aw/app-471/bug-8:liquibase-service/src/main/resources/db/005-rdb_modern/routines/300-sp_ldf_tetanus_datamart_postprocessing-001.sql"
210- " aw/app-471/bug-8:liquibase-service/src/main/resources/db/005-rdb_modern/routines/305-sp_ldf_vaccine_prevent_diseases_datamart_postprocessing-001.sql"
211- " aw/app-471/bug-8:liquibase-service/src/main/resources/db/005-rdb_modern/routines/320-sp_ldf_hepatitis_datamart_postprocessing-001.sql"
212- # bug-5a (this branch, no separate PR): swap @@ROWCOUNT capture before
213- # IF @debug block in sp_hepatitis_datamart_postprocessing so step 3's
214- # job_flow_log row_count reflects the actual temp-table population
215- " aw/odse-test-seed:liquibase-service/src/main/resources/db/005-rdb_modern/routines/013-sp_hepatitis_datamart_postprocessing-001.sql"
216- )
217-
218- local tmp_dir
219- tmp_dir=$( mktemp -d)
220- trap " rm -rf '$tmp_dir '" RETURN
221-
222- for spec in " ${routines[@]} " ; do
223- local branch=" ${spec%%:* } "
224- local path=" ${spec#*: } "
225- local fname
226- fname=$( basename " $path " )
227- local outfile=" $tmp_dir /$fname "
228-
229- if ! git -C " $NEDSS_DR_ROOT " show " $branch :$path " > " $outfile " 2> /dev/null; then
230- log " skip (branch '$branch ' not present): $fname "
231- continue
232- fi
233-
234- log " apply: $branch -> $fname "
235- if ! $SQLCMD_BASE -d RDB_MODERN -i " $outfile " -b > /dev/null 2>&1 ; then
236- printf ' \033[1;31m[merge ERROR]\033[0m failed to apply %s from %s\n' " $fname " " $branch " >&2
237- return 1
238- fi
239- done
240- }
241-
242185# --------------------------------------------------------------------
243186# Step 3 — Foundation
244187# --------------------------------------------------------------------
@@ -627,7 +570,6 @@ main() {
627570 if [[ $SKIP_RESET -eq 0 ]]; then
628571 reset_baseline
629572 run_infrastructure_sps
630- apply_pending_pr_routines
631573 else
632574 log " Skipping baseline reset (--skip-reset)"
633575 fi
0 commit comments