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

Open relative extra links in place #17477

Merged

Conversation

bradarndt
Copy link
Contributor

@bradarndt bradarndt commented Aug 6, 2021

This PR changes the existing behavior of "extra links" added to operators such that any relative links open in place rather than in a new window/tab. This is consistent with the way other links/buttons in Airflow work today. Any absolute links will continue to open in a new window/tab as they do today.

For the purposes of this change, a "relative" link is defined as any link url that does not satisfy the following regular expression: ^(?:[a-z]+:)?//. See this stack overflow post for more in depth discussion.

Note: As a first time contributor, I've followed the contributing documentation as much as possible. I could not find any existing tests to update for the www js code, so given the simplicity of this change, I did not add any tests, however, I did run all WWW tests as well as static analysis. Please let me know if i missed something or this is otherwise unacceptable. Looking forward to feedback!

@boring-cyborg boring-cyborg bot added area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues labels Aug 6, 2021
@boring-cyborg
Copy link

boring-cyborg bot commented Aug 6, 2021

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 Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
Here are some useful points:

  • Pay attention to the quality of your code (flake8, mypy and type annotations). Our pre-commits 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 Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment 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 for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
    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

airflow/www/static/js/dag.js Outdated Show resolved Hide resolved
airflow/www/static/js/dag.js Outdated Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented Aug 9, 2021

The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest main or amend the last commit of the PR, and push it with --force-with-lease.

@github-actions github-actions bot added the okay to merge It's ok to merge this PR as it does not require more tests label Aug 9, 2021
@jedcunningham jedcunningham reopened this Aug 13, 2021
@jedcunningham
Copy link
Member

(closed/reopened to rekick CI)

@bradarndt
Copy link
Contributor Author

@jedcunningham (i noticed that you re-triggered the CI build). The build is failing due to a failed build constraint:

  ERROR: Cannot install apache-airflow[devel-ci]==2.2.0.dev0 because these package versions have conflicting dependencies.
  
  The conflict is caused by:
      apache-airflow[devel-ci] 2.2.0.dev0 depends on google-ads<8.0.0 and >=4.0.0
      The user requested (constraint) google-ads==12.0.0

I believe this is unrelated to my change, as a clean build failed even before I made any changes and I didn't change any dependencies. However, I haven't had the chance to track down the root of the issue yet. I was hoping that if I gave it a while, a fix to the root cause might be merged in allowing my change to then build successfully.

Does that sound like a reasonable approach? Or should I try to hunt down the cause?

@jedcunningham
Copy link
Member

Sorry, I should have looked more closely. Since main isn't currently failing, can you try rebasing on main? You probably waited long enough 👍

@jedcunningham jedcunningham added this to the Airflow 2.2 milestone Aug 13, 2021
@bradarndt bradarndt force-pushed the open-relative-extra-links-in-place branch from 267eec8 to 88eb5ca Compare August 13, 2021 21:32
@bradarndt
Copy link
Contributor Author

Sorry, I should have looked more closely. Since main isn't currently failing, can you try rebasing on main? You probably waited long enough 👍

Done. Will keep an eye on the build.

@jedcunningham
Copy link
Member

@bradarndt, looks like 2 static check failures, both should be easy to fix. I'd also suggest that you set up the pre-commit hooks, they help catch these issues early 👍.

@bradarndt
Copy link
Contributor Author

@bradarndt, looks like 2 static check failures, both should be easy to fix. I'd also suggest that you set up the pre-commit hooks, they help catch these issues early 👍.

Thanks for the suggestion @jedcunningham. Fixed the formatting (as well as enabled pre-commit hooks).

@jedcunningham jedcunningham reopened this Aug 16, 2021
@jedcunningham jedcunningham merged commit 84de7c5 into apache:main Aug 16, 2021
@boring-cyborg
Copy link

boring-cyborg bot commented Aug 16, 2021

Awesome work, congrats on your first merged pull request!

@jedcunningham
Copy link
Member

Congrats @bradarndt on your first commit! Thanks for contributing 🍺

@bradarndt
Copy link
Contributor Author

Congrats @bradarndt on your first commit! Thanks for contributing 🍺

Thanks! I appreciate the guiding hand along the way!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues okay to merge It's ok to merge this PR as it does not require more tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants