Skip to content

Conversation

@kalel-commits
Copy link

@kalel-commits kalel-commits commented Jan 6, 2026

This PR adds behavior-focused DAG-level documentation (doc_md) to
several example DAGs in the standard provider to improve the Docs tab
experience in the Airflow UI.

The documentation explains runtime behavior, design intent, and usage
patterns that are not immediately obvious from the code alone.

This change is documentation-only and does not affect runtime behavior.

Closes: #60128

@kalel-commits
Copy link
Author

Hi @jroachgolf84 I’ve opened a follow-up PR addressing #60128 with
more behavior-focused documentation across multiple example DAGs.
Would appreciate a review when you have time. Thanks!

Copy link
Member

@potiuk potiuk left a comment

Choose a reason for hiding this comment

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

This one is really nice.

@potiuk potiuk added this to the Airflow 3.1.6 milestone Jan 6, 2026
@potiuk potiuk added the backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch label Jan 6, 2026
@potiuk
Copy link
Member

potiuk commented Jan 6, 2026

Also - we strongly recommend installing prek (prek install) in the repo, then static checks will be fixed automatically at commit time. The easiest way to achieve it is to have uv and running uv tool install prek and then prek install in the repo.

@kalel-commits
Copy link
Author

Thanks for the reviews and feedback! I’ve addressed the comments and resolved the conversations. Happy to make further adjustments if needed.

Srabasti

This comment was marked as resolved.

Srabasti

This comment was marked as resolved.

@kalel-commits
Copy link
Author

Thanks everyone for the reviews!

I’ve fixed the doc_md syntax issues flagged by static checks and verified the example DAGs compile cleanly locally.

Happy to make any further adjustments if needed.

@potiuk potiuk requested a review from Srabasti January 7, 2026 09:15
@potiuk
Copy link
Member

potiuk commented Jan 7, 2026

Thanks everyone for the reviews!

I’ve fixed the doc_md syntax issues flagged by static checks and verified the example DAGs compile cleanly locally.

Happy to make any further adjustments if needed.

Some static check fixes are not applied yet.

@kalel-commits
Copy link
Author

Thanks for catching that — much appreciated!

I’ve fixed the trailing whitespace / doc_md formatting issues flagged by the static checks and verified locally that all example DAGs compile cleanly.

Pushed the fix; CI should be green once checks complete. Please let me know if anything else needs adjustment.

@potiuk
Copy link
Member

potiuk commented Jan 7, 2026

Not green. Are you using prek to fix those things? Because if you don't, you should.

Copy link
Contributor

@Srabasti Srabasti left a comment

Choose a reason for hiding this comment

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

Line 54 below in file "providers/standard/src/airflow/providers/standard/example_dags/example_short_circuit_decorator.py", the word run’s (with right single quotation) needs to be replaced with straight quotation (run's).
Short-circuiting affects only the current DAG run’s execution path

Copy link
Contributor

@Srabasti Srabasti left a comment

Choose a reason for hiding this comment

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

Line 53 below in file "providers/standard/src/airflow/providers/standard/example_dags/example_sensor_decorator.py", the word “run (with right double quotation) needs to be replaced with right straight double quotation ("run).
(for example, “run daily, but only after upstream data is ready”)

Copy link
Contributor

@Srabasti Srabasti left a comment

Choose a reason for hiding this comment

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

Line 53 below in file "providers/standard/src/airflow/providers/standard/example_dags/example_sensor_decorator.py", the word ready” (with left double quotation) needs to be replaced with left straight double quotation (ready").
(for example, “run daily, but only after upstream data is ready”)

@Srabasti
Copy link
Contributor

Srabasti commented Jan 8, 2026

Thanks for including the changes @kalel-commits however still static checks checks are failing!

As Jarek advised above, have you reproduced locally by running prek run --all-files in your branch?
Prek will fix any formatting errors, and then you can push the commit from your branch. It is super easy to fix them. The first time is toughest:)

To run prek as part of git workflow, use prek install to set up git hooks.

image

@jscheffl
Copy link
Contributor

@kalel-commits Thanks for the comments! Actually the aim is since a while to rework the examples in general - if you'd like to help and contribute in this topic, that would be also cool! https://cwiki.apache.org/confluence/display/AIRFLOW/Examples+Refurbish

@kalel-commits
Copy link
Author

kalel-commits commented Jan 15, 2026

Thanks for the patience and the detailed feedback much appreciated.

I’ve gone through all files flagged by CI and reviewer comments and verified locally that:

  • All smart/curly quotes have been replaced with ASCII quotes
  • Trailing whitespace has been removed
  • doc_md blocks are syntactically correct and compile cleanly
  • Example DAGs compile successfully via py_compile

I’m currently on Windows and hitting environment-specific issues running the full
prek run --all-files locally (some hooks fail early due to path resolution),
so I’ve aligned the code with the diffs CI / prek previously reported and pushed those fixes.

At this point I’ll let CI be the source of truth.
If any static checks are still failing, I’ll switch to a Linux/WSL environment and
re-run prek end-to-end to commit exactly what it modifies.

Please let me know if you’d prefer I do that proactively.

Screenshot 2026-01-15 115031

@kalel-commits
Copy link
Author

Thanks @jscheffl that sounds great!

I wasn’t aware of the broader examples refurbish effort, but it definitely aligns with what motivated this PR. I’d be happy to contribute there as well once this PR is wrapped up.

I’ll take a closer look at the Examples Refurbish page and see where I can help next. Thanks for sharing the link!

@Srabasti
Copy link
Contributor

The same static errors persist, unfortunately. Yes will be great to follow steps as per the documentation link mentioned below, to use WSL/Linux on your Windows machine, so no one has to suggest changes to you.
"prek" will fix the static errors for you by default, hence the time taken to merge your PR will be drastically reduced.

I was in same boat as you and after implementing as per steps in below link, have set up to be able run static checks from my end, before any PR commits. Please feel free to post any blockers in Slack channel #user-troubleshooting, so the community can help out.

https://github.com/apache/airflow/blob/main/contributing-docs/03_contributors_quick_start.rst

@kalel-commits
Copy link
Author

Thanks for the patience and guidance, @Srabasti.

I’ve now set up WSL and prek as recommended, applied the auto-fixes locally, and force-pushed the updated commit.

Static checks should be clean now. Please let me know if anything else is needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch provider:standard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Example DAGs are missing DAG-level documentation (doc_md) in the UI

6 participants