Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Airflow-specific annotations to schedules, including environment-specific schedules #35

Open
aaronsteers opened this issue Feb 14, 2023 · 1 comment · May be fixed by #36
Open

Comments

@aaronsteers
Copy link

aaronsteers commented Feb 14, 2023

The new annotations spec will be released to Meltano soon. This spec allows projects to define deploy hints and other rules for 3rd-party tools.

schedules:
- name: slack_notifications
  interval: 0 12 * * *
  job: slack_notifications
  annotations:
    airflow:
      disabled: True

- name: cloudwatch_el
  interval: 0 6 * * *
  job: cloudwatch_el
  annotations:
    airflow:
      environments: [prod, staging]

- name: meltanohub_el_staging
  interval: 0 6 * * *
  job: meltanohub_el
  annotations:
    airflow:
      environments: [prod]

- name: spreadsheets_anywhere_el
  interval: 0 6 * * *
  job: spreadsheets_anywhere_el
  annotations:
    airflow:
      environments: [prod]

- name: daily_staging_dry_run
  interval: 0 6 * * *
  job: spreadsheets_anywhere_el
  annotations:
    airflow:
      environments: [staging]

The logic here will be ignored by Meltano Core - but it can be used within airflow-ext to modify how schedules will be executed.

The above logic handles two basic rules:

  1. If disabled=True, then the job would be disabled for all environments - or simply not deployed to Airflow at all.
  2. If environments is declared, the schedule will only be run if it contains a match to the name of the currently activated Meltano Environment.
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 a pull request may close this issue.

1 participant