You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "mohamedmeqlad99 (via GitHub)" <gi...@apache.org> on 2025/01/01 15:41:43 UTC

[PR] fix(databricks): update DatabricksJobRunLink for improved XCom handlin [airflow]

mohamedmeqlad99 opened a new pull request, #45328:
URL: https://github.com/apache/airflow/pull/45328

   # Fix Databricks Extra Link to See Job Run with Custom S3 Backend
   
   ## Problem Addressed
   
   This PR addresses the issue described in [#45240](https://github.com/apache/airflow/issues/45240), where the Databricks Extra Link for "See Job Run" does not work when using a custom XCom backend that writes to S3. Specifically:
   
   - The link directs to the S3 path of the XCom JSON file instead of the Databricks workspace job run URL.
   - This behavior makes the feature unusable in setups with custom XCom backends, such as those storing XCom values entirely in S3.
   
   ## Proposed Changes
   
   - Refactored the `DatabricksJobRunLink` implementation to reliably fetch the Databricks job run URL from XCom using `XCom.get_value`.
   - Ensured compatibility with custom XCom backends, decoupling the link generation logic from specific backend implementations.
   - Improved error handling to ensure the system fails gracefully if the required XCom value is missing or malformed.
   - Enhanced maintainability with detailed comments and a cleaner structure.
   
   ## Key Benefits
   
   - Resolves the issue of broken links when using custom XCom backends.
   - Ensures compatibility across a wide range of backend configurations, including setups where all XCom values are stored in S3.
   - Improves user experience by providing accurate links to Databricks job run details.
   
   ## Testing
   
   - Validated the new implementation using a local Airflow environment with a custom XCom backend.
   - Confirmed that the generated links now correctly point to Databricks job run URLs, regardless of the XCom storage location.
   
   ## Issue Link
   
   Closes [#45240](https://github.com/apache/airflow/issues/45240).
   
   ## Checklist
   
   - [x] All unit tests pass.
   - [x] Code is formatted according to Airflow’s standards.
   - [x] Changes are backward compatible and do not break existing functionality.
   
   ## Code of Conduct
   
   I agree to follow this project's Code of Conduct.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(databricks): update DatabricksJobRunLink for improved XCom handlin [airflow]

Posted by "mohamedmeqlad99 (via GitHub)" <gi...@apache.org>.
mohamedmeqlad99 closed pull request #45328: fix(databricks): update DatabricksJobRunLink for improved XCom handlin
URL: https://github.com/apache/airflow/pull/45328


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(databricks): update DatabricksJobRunLink for improved XCom handlin [airflow]

Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on PR #45328:
URL: https://github.com/apache/airflow/pull/45328#issuecomment-2567054839

   Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
   Here are some useful points:
   - Pay attention to the quality of your code (ruff, mypy and type annotations). Our [pre-commits]( https://github.com/apache/airflow/blob/main/contributing-docs/08_static_code_checks.rst#prerequisites-for-pre-commit-hooks) will help you with that.
   - In case of a new feature add useful documentation (in docstrings or in `docs/` directory). Adding a new operator? Check this short [guide](https://github.com/apache/airflow/blob/main/docs/apache-airflow/howto/custom-operator.rst) Consider adding an example DAG that shows how users should use it.
   - Consider using [Breeze environment](https://github.com/apache/airflow/blob/main/dev/breeze/doc/README.rst) for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
   - Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
   - Please follow [ASF Code of Conduct](https://www.apache.org/foundation/policies/conduct) for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
   - Be sure to read the [Airflow Coding style]( https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#coding-style-and-best-practices).
   - Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
   Apache Airflow is a community-driven project and together we are making it better 🚀.
   In case of doubts contact the developers at:
   Mailing List: dev@airflow.apache.org
   Slack: https://s.apache.org/airflow-slack
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(databricks): update DatabricksJobRunLink for improved XCom handlin [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #45328:
URL: https://github.com/apache/airflow/pull/45328#issuecomment-2567060213

   You need to add unit tests exhibiting and testing the new behaviour


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(databricks): update DatabricksJobRunLink for improved XCom handlin [airflow]

Posted by "mohamedmeqlad99 (via GitHub)" <gi...@apache.org>.
mohamedmeqlad99 commented on PR #45328:
URL: https://github.com/apache/airflow/pull/45328#issuecomment-2567069169

   @potiuk i don't understand can u explain more how can I do this and what I need to edit 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(databricks): update DatabricksJobRunLink for improved XCom handlin [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #45328:
URL: https://github.com/apache/airflow/pull/45328#issuecomment-2567079679

   Add unit tests: Look at our [Contributing docs](https://github.com/apache/airflow/blob/main/contributing-docs/README.rst) - particularly [testing](https://github.com/apache/airflow/blob/main/contributing-docs/09_testing.rst) - you can also look at other PRs for reference. We practically never accept PRs that have no accompanying unit tests and you need to learn how to write and run them if you want to contribute. 
   
   Our contribution guides have quick-starts for various IDEs and when you follow them you can have working development environment where you can run unit tests in less than 10 minutes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org