Skip to content

feat(pipelines): Support setting ELT_WRITE_DISPOSITION value in Ansible playbook#164

Merged
martyngigg merged 1 commit into
mainfrom
opralogwebdb-replace-disposition-cron
Nov 25, 2025
Merged

feat(pipelines): Support setting ELT_WRITE_DISPOSITION value in Ansible playbook#164
martyngigg merged 1 commit into
mainfrom
opralogwebdb-replace-disposition-cron

Conversation

@martyngigg

@martyngigg martyngigg commented Nov 25, 2025

Copy link
Copy Markdown
Member

Summary

The Ansible playbook can now set the mode for write_disposition in the ELT cron jobs. For now Opralog is set to replace to ensure everything is fresh until #138 is implemented.

Refs #138

Summary by CodeRabbit

Release Notes

  • Chores
    • Updated data warehouse configuration to support write disposition settings with replace mode enabled for improved data handling.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Nov 25, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

The changes introduce write disposition configuration to the ELT workflow. An environment variable ELT_WRITE_DISPOSITION is added to the cron task execution, whilst a write_disposition: "replace" setting is configured for the opralogweb warehouse.

Changes

Cohort / File(s) Change Summary
ELT Configuration Updates
infra/ansible-docker/playbooks/elt/elt_cron_tasks.yml, infra/ansible-docker/playbooks/elt/group_vars/elt.yml
Introduced write disposition configuration for ELT tasks. Added ELT_WRITE_DISPOSITION environment variable to cron job command with source fallback. Configured write_disposition: "replace" for opralogweb warehouse.

Poem

🐰 A whisker's worth of wisdom writes,
With disposition set just right,
The opralogweb finds its place,
As "replace" completes the chase,
Configuration hops along with glee!

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: adding support for setting ELT_WRITE_DISPOSITION value in the Ansible playbook, which aligns with the changeset modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
infra/ansible-docker/playbooks/elt/group_vars/elt.yml (1)

28-32: Consider adding an inline comment about the temporary nature of this configuration.

The write_disposition: "replace" configuration is applied only to the opralogweb source, which aligns with the PR objectives. However, since the PR description notes this is a temporary measure pending issue #138, adding a brief comment would help future maintainers understand the rationale.

Consider adding an inline comment to clarify the temporary nature:

       - name: opralogweb
         hour: 2
         minute: 11
         dbt_args: "--select '+models/operations' --exclude '+models/operations/power_consumption.sql'"
+        # TODO: Remove write_disposition after issue #138 is implemented
         write_disposition: "replace"
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 1b7a8a3 and 74c1fbe.

📒 Files selected for processing (2)
  • infra/ansible-docker/playbooks/elt/elt_cron_tasks.yml (1 hunks)
  • infra/ansible-docker/playbooks/elt/group_vars/elt.yml (1 hunks)
🔇 Additional comments (2)
infra/ansible-docker/playbooks/elt/group_vars/elt.yml (1)

14-42: Overall structure is sound and maintains backwards compatibility.

The changes correctly introduce per-warehouse write disposition configuration. The implementation:

  • Uses sensible defaults (empty string) for sources without explicit configuration
  • Scopes the "replace" mode specifically to opralogweb as per PR objectives
  • Maintains backwards compatibility with existing sources
infra/ansible-docker/playbooks/elt/elt_cron_tasks.yml (1)

11-11: Verification confirmed—ELT_WRITE_DISPOSITION is correctly consumed by the downstream script.

The environment variable is properly declared in the Jinja2 template at infra/ansible-docker/playbooks/elt/templates/cron/elt_task.sh.j2 (line 7) and consumed with correct conditional handling (lines 56–58). The variable is read and used to conditionally set a --write-disposition flag for the uv command. The empty-string default in the playbook ensures backwards compatibility by making the flag optional.

@martyngigg
martyngigg merged commit 5a094f2 into main Nov 25, 2025
2 checks passed
@martyngigg
martyngigg deleted the opralogwebdb-replace-disposition-cron branch November 25, 2025 12:06
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