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

feat: apply annotations to determine if schedules should be enabled #36

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

@aaronsteers
Copy link
Author

@pnadolny13 - I think we want to wait for annotations feature (meltano/meltano#7215) to ship - but when that's done, can you help us test this using squared?

)

globals()[base_id] = dag
logger.info(f"DAG created for schedule '{schedule['name']}', task='{run_args}'")
logger.info(f"DAG created for schedule '{schedule_name}', task='{run_args}'")


def create_dags():
Copy link
Member

Choose a reason for hiding this comment

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

This runs meltano schedule list --format=json, which will not include annotation information. Currently, one has to ready the project files or manifest directly to get the annotations.

)
MELTANO_BIN = "meltano"


def _is_enabled(schedule_def: dict, environment_name: str) -> bool:
"""Return true if the schedule should be enabled for the named environment."""
airbyte_annotations: dict = schedule_def.get("annotations", {}).get("airbyte", {})
Copy link
Contributor

Choose a reason for hiding this comment

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

@aaronsteers I think these were supposed to be airflow references instead of airbyte 😄 , right?

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.

Support Airflow-specific annotations to schedules, including environment-specific schedules
3 participants