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

Add kwargs param in DocsOperator method upload_to_cloud_storage #1422

Merged
merged 3 commits into from
Dec 26, 2024

Conversation

pankajastro
Copy link
Contributor

@pankajastro pankajastro commented Dec 23, 2024

This PR addresses an issue where the callback callable parameter's
handling was modified in PR #1389 leading to a change in
the way keyword arguments like context were passed to the callable.

However, the Docs Operator has its own implementation of the callback callable,
which only expects a single parameter, project_dir. As a result, passing extra
keyword arguments like context is causing a mismatch and resulting in the error described in #1420.

This PR add kwargs param in upload_to_cloud_storage for Docs operators

We have integration tests for these operator but look like CI does have not required setup and it get ignored.
https://github.com/astronomer/astronomer-cosmos/blob/main/dev/dags/dbt_docs.py

related: #1420

Copy link

netlify bot commented Dec 23, 2024

Deploy Preview for sunny-pastelito-5ecb04 canceled.

Name Link
🔨 Latest commit ceead6e
🔍 Latest deploy log https://app.netlify.com/sites/sunny-pastelito-5ecb04/deploys/676cfeb87239050008ab9fa5

Copy link

cloudflare-workers-and-pages bot commented Dec 23, 2024

Deploying astronomer-cosmos with  Cloudflare Pages  Cloudflare Pages

Latest commit: ceead6e
Status:⚡️  Build in progress...

View logs

Copy link

codecov bot commented Dec 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.52%. Comparing base (dada5cf) to head (ceead6e).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1422   +/-   ##
=======================================
  Coverage   96.52%   96.52%           
=======================================
  Files          73       73           
  Lines        4320     4320           
=======================================
  Hits         4170     4170           
  Misses        150      150           

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

@pankajastro pankajastro marked this pull request as ready for review December 23, 2024 15:49
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Dec 23, 2024
@pankajkoti pankajkoti self-requested a review December 26, 2024 06:44
Copy link
Contributor

@pankajkoti pankajkoti left a comment

Choose a reason for hiding this comment

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

Thanks for the quick fix @pankajastro . Indeed, it appears that the example DAG we have was silently not running the tasks as it could not find the connections. I have created a PR #1428 to adapt to our existing CI connections and run this example DAG and as can be seen in the action https://github.com/astronomer/astronomer-cosmos/actions/runs/12500718837/job/34877247783?pr=1428 it failed with the same reason as in #1420.

I will rebase my PR after merging this one to verify CI passes after running the docs DAG.

CHANGELOG.rst Outdated Show resolved Hide resolved
@pankajkoti pankajkoti merged commit 4ac32cf into main Dec 26, 2024
65 of 66 checks passed
@pankajkoti pankajkoti deleted the fix_1420 branch December 26, 2024 06:59
@pankajastro pankajastro added this to the Cosmos 1.8.1 milestone Dec 26, 2024
@pankajastro pankajastro self-assigned this Dec 27, 2024
tatiana pushed a commit that referenced this pull request Dec 27, 2024
It seems that the dbt docs DAG in our example DAGs suite was silently
failing to run because the specified connections in the DAG were not
present in our CI environment. I am removing the connection checks,
allowing the previously skipped tasks to execute even when the remote
Airflow connections are unavailable. Additionally, I’ve updated the DAG
to use our existing CI credentials and Airflow connections, as well as
updated the bucket name to the ones I created in our object stores. This
change will help catch issues like #1420 earlier. While fix #1422 has
already addressed #1420, this PR will now validate that the fix is
functioning as expected.

closes: #1420
@pankajastro pankajastro mentioned this pull request Dec 30, 2024
pankajastro added a commit that referenced this pull request Dec 30, 2024
1.8.1 (2024-12-30)
--------------------

Bug Fixes

* Fix rendering dbt tests with multiple parents by @tatiana in #1433
* Add ``kwargs`` param in DocsOperator method
``upload_to_cloud_storage`` by @pankajastro in #1422

Docs

* Improve OpenLineage documentation by @tatiana in #1431

Others

* Enable Docs DAG in CI leveraging existing CI connections by
@pankajkoti in #1428
* Install providers with airflow by @pankajkoti in #1432
* Remove unused docs dependency by @pankajastro in #1414
* Pre-commit hook updates in #1424 

---------

Co-authored-by: Tatiana Al-Chueyr <[email protected]>
Co-authored-by: Pankaj Koti <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants