Content-Length: 275243 | pFad | http://github.com/apache/airflow/issues/50796

4B Cannot get/patch/delete a variable if its key contains slash character · Issue #50796 · apache/airflow · GitHub
Skip to content

Cannot get/patch/delete a variable if its key contains slash character #50796

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

Closed
1 of 2 tasks
yzhsieh opened this issue May 19, 2025 · 4 comments · Fixed by #50841
Closed
1 of 2 tasks

Cannot get/patch/delete a variable if its key contains slash character #50796

yzhsieh opened this issue May 19, 2025 · 4 comments · Fixed by #50841
Assignees
Labels
area:API Airflow's REST/HTTP API area:core kind:bug This is a clearly a bug needs-triage label for new issues that we didn't triage yet
Milestone

Comments

@yzhsieh
Copy link

yzhsieh commented May 19, 2025

Apache Airflow version

3.0.1

If "Other Airflow 2 version" selected, which one?

No response

What happened?

In Airflow 3.0, I can create a variable which key contains slash character '/' .
However, once the variable created, I cannot call API to modify or delete it.
Also I cannot get its value via "get variable" API, but I can get by list all variables using "get variables" API

I think the problem is that the slash in variable key has been treated as URL separator, so the API return error.
Also due to above reason, the APIs which not require variable key in URL still work (like "create variable" and "get variables")

I also tried to escape '/' as %2F when calling API, but still no luck.
In such scenario, api-server log still show '/' instead of '%2F' in visiting log

What you think should happen instead?

No response

How to reproduce

  1. Create an Airflow instance, open browser and go to Variable page.
  2. Create a new variable and put a slash in its key
  3. Save the variable, it will success
  4. Try to modify this variable, it will show error with "405 Method Not Allowed"
  5. Try to delete this variable, it will also show error

Operating System

Ubuntu

Versions of Apache Airflow Providers

No response

Deployment

Virtualenv installation

Deployment details

No response

Anything else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@yzhsieh yzhsieh added kind:bug This is a clearly a bug area:core needs-triage label for new issues that we didn't triage yet labels May 19, 2025
@dosubot dosubot bot added the area:API Airflow's REST/HTTP API label May 19, 2025
@vatsrahul1001 vatsrahul1001 self-assigned this May 20, 2025
@vatsrahul1001 vatsrahul1001 added this to the Airflow 3.0.2 milestone May 20, 2025
@amoghrajesh
Copy link
Contributor

Good find

@vatsrahul1001
Copy link
Contributor

@pierrejeambrun Should we disallow slashes (/) in variable keys at creation time?

@pierrejeambrun pierrejeambrun self-assigned this May 20, 2025
@pierrejeambrun
Copy link
Member

I'll open a PR, we can just handle the slashes.

@pierrejeambrun
Copy link
Member

#50841

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:API Airflow's REST/HTTP API area:core kind:bug This is a clearly a bug needs-triage label for new issues that we didn't triage yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/apache/airflow/issues/50796

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy