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

Move airflow conf fetch call to setting.py #975

Merged
merged 1 commit into from
May 20, 2024
Merged

Conversation

pankajastro
Copy link
Contributor

@pankajastro pankajastro commented May 16, 2024

Description

  • Centralizing environment or configuration fetching by moving the Airflow configuration call to the Cosmos settings.py file.
  • Add documentation for cosmos config sections

Sample HTML page
Screenshot 2024-05-18 at 1 04 13 AM

Related Issue(s)

closes: #928

Breaking Change?

No

Checklist

  • I have made corresponding changes to the documentation (if required)
  • I have added tests that prove my fix is effective or that my feature works

Copy link

netlify bot commented May 16, 2024

Deploy Preview for sunny-pastelito-5ecb04 canceled.

Name Link
🔨 Latest commit 97db047
🔍 Latest deploy log https://app.netlify.com/sites/sunny-pastelito-5ecb04/deploys/664b2a5e1dc5fe0009a6e6ad

@tatiana tatiana added this to the 1.5.0 milestone May 17, 2024
@tatiana tatiana added the triage-needed Items need to be reviewed / assigned to milestone label May 17, 2024
@pankajastro pankajastro removed the triage-needed Items need to be reviewed / assigned to milestone label May 17, 2024
@pankajastro pankajastro marked this pull request as ready for review May 17, 2024 19:40
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. area:config Related to configuration, like YAML files, environment variables, or executer configuration area:docs Relating to documentation, changes, fixes, improvement labels May 17, 2024
Copy link

codecov bot commented May 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.67%. Comparing base (214813b) to head (97db047).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #975      +/-   ##
==========================================
- Coverage   95.67%   95.67%   -0.01%     
==========================================
  Files          59       59              
  Lines        2893     2890       -3     
==========================================
- Hits         2768     2765       -3     
  Misses        125      125              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@tatiana tatiana left a comment

Choose a reason for hiding this comment

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

This looks great, thank you very much, @pankajastro ! Minor comments mainly on docs. Also, please, rebase before we merge this change.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label May 20, 2024
@pankajastro pankajastro merged commit cb70188 into main May 20, 2024
69 checks passed
@pankajastro pankajastro deleted the unify-config branch May 20, 2024 15:56
tatiana added a commit that referenced this pull request Jun 5, 2024
As of Cosmos 1.4.1, users are not able to disable the cache in Cosmos
using `AIRFLOW__COSMOS__ENABLE_CACHE=0`.

During a recent refactoring #975, the `enable_cache` was changed to a
non-boolean config. This PR fixes this issue.
tatiana added a commit that referenced this pull request Jun 6, 2024
As of Cosmos 1.4.1, users are not able to disable the cache in Cosmos
using `AIRFLOW__COSMOS__ENABLE_CACHE=0`.

During a recent refactoring #975, the `enable_cache` was changed to a
non-boolean config. This PR fixes this issue.
@tatiana tatiana mentioned this pull request Jun 6, 2024
tatiana added a commit that referenced this pull request Jun 6, 2024
Bug fixes

* Fix the invocation mode for ``ExecutionMode.VIRTUALENV`` by @marco9663
in #1023
* Fix Cosmos ``enable_cache`` setting by @tatiana in #1025
* Make ``GoogleCloudServiceAccountDictProfileMapping`` dataset profile
arg optional by @oliverrmaa and @pankajastro in #839 and #1017
* Athena profile mapping set ``aws_session_token`` in profile only if it
exists by @pankajastro in #1022

Others

* Update dbt and Airflow conflicts matrix by @tatiana in #1026
* Enable Python 3.12 unittest by @pankajastro in #1018
* Improve error logging in ``DbtLocalBaseOperator`` by @davidsteinar in
#1004
* Add GitHub issue templates for bug reports and feature request by
@pankajkoti in #1009
* Add more fields in bug template to reduce turnaround in issue triaging
by @pankajkoti in #1027
* Fix ``dev/Dockerfile`` + Add ``uv pip install`` for faster build time
by @dwreeves in #997
* Drop support for Airflow 2.3 by @pankajkoti in #994
* Update Astro Runtime image by @RNHTTR in #988 and #989
* Enable ruff F linting by @pankajastro in #985
* Move Cosmos Airflow configuration to settings.py by @pankajastro in
#975
* Fix CI Issues by @tatiana in #1005
* Pre-commit hook updates in #1000, #1019

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Daniel Reeves <31971762+dwreeves@users.noreply.github.com>
Co-authored-by: Pankaj Koti <pankajkoti699@gmail.com>
Co-authored-by: davidsteinar <davidsteinar@gmail.com>
Co-authored-by: David Steinar Asgrimsson <david-steinar.asgrimsson@kommuninvest.se>
Co-authored-by: Marco Yuen <33394715+marco9663@users.noreply.github.com>
Co-authored-by: Pankaj Singh <98807258+pankajastro@users.noreply.github.com>
Co-authored-by: Ollie Ma <oliver.zheyi.ma@gmail.com>
arojasb3 pushed a commit to arojasb3/astronomer-cosmos that referenced this pull request Jul 14, 2024
## Description

- Centralizing environment or configuration fetching by moving the
Airflow configuration call to the Cosmos settings.py file.
- Add documentation for cosmos config sections

Sample HTML page
<img width="798" alt="Screenshot 2024-05-18 at 1 04 13 AM"
src="https://github.com/astronomer/astronomer-cosmos/assets/98807258/55f353d5-7f3f-4f08-9e65-3f7269a93bd5">



## Related Issue(s)

closes: astronomer#928

## Breaking Change?

No

## Checklist

- [ ] I have made corresponding changes to the documentation (if
required)
- [ ] I have added tests that prove my fix is effective or that my
feature works
arojasb3 pushed a commit to arojasb3/astronomer-cosmos that referenced this pull request Jul 14, 2024
As of Cosmos 1.4.1, users are not able to disable the cache in Cosmos
using `AIRFLOW__COSMOS__ENABLE_CACHE=0`.

During a recent refactoring astronomer#975, the `enable_cache` was changed to a
non-boolean config. This PR fixes this issue.
arojasb3 pushed a commit to arojasb3/astronomer-cosmos that referenced this pull request Jul 14, 2024
Bug fixes

* Fix the invocation mode for ``ExecutionMode.VIRTUALENV`` by @marco9663
in astronomer#1023
* Fix Cosmos ``enable_cache`` setting by @tatiana in astronomer#1025
* Make ``GoogleCloudServiceAccountDictProfileMapping`` dataset profile
arg optional by @oliverrmaa and @pankajastro in astronomer#839 and astronomer#1017
* Athena profile mapping set ``aws_session_token`` in profile only if it
exists by @pankajastro in astronomer#1022

Others

* Update dbt and Airflow conflicts matrix by @tatiana in astronomer#1026
* Enable Python 3.12 unittest by @pankajastro in astronomer#1018
* Improve error logging in ``DbtLocalBaseOperator`` by @davidsteinar in
astronomer#1004
* Add GitHub issue templates for bug reports and feature request by
@pankajkoti in astronomer#1009
* Add more fields in bug template to reduce turnaround in issue triaging
by @pankajkoti in astronomer#1027
* Fix ``dev/Dockerfile`` + Add ``uv pip install`` for faster build time
by @dwreeves in astronomer#997
* Drop support for Airflow 2.3 by @pankajkoti in astronomer#994
* Update Astro Runtime image by @RNHTTR in astronomer#988 and astronomer#989
* Enable ruff F linting by @pankajastro in astronomer#985
* Move Cosmos Airflow configuration to settings.py by @pankajastro in
astronomer#975
* Fix CI Issues by @tatiana in astronomer#1005
* Pre-commit hook updates in astronomer#1000, astronomer#1019

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Daniel Reeves <31971762+dwreeves@users.noreply.github.com>
Co-authored-by: Pankaj Koti <pankajkoti699@gmail.com>
Co-authored-by: davidsteinar <davidsteinar@gmail.com>
Co-authored-by: David Steinar Asgrimsson <david-steinar.asgrimsson@kommuninvest.se>
Co-authored-by: Marco Yuen <33394715+marco9663@users.noreply.github.com>
Co-authored-by: Pankaj Singh <98807258+pankajastro@users.noreply.github.com>
Co-authored-by: Ollie Ma <oliver.zheyi.ma@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:config Related to configuration, like YAML files, environment variables, or executer configuration area:docs Relating to documentation, changes, fixes, improvement lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor Cosmos Airflow-based configuration to use settings.py
2 participants