You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "abhishekbhakat (via GitHub)" <gi...@apache.org> on 2025/04/23 09:10:02 UTC
[PR] Rename operation IDs for task instance endpoints to include map index… [airflow]
abhishekbhakat opened a new pull request, #49608:
URL: https://github.com/apache/airflow/pull/49608
closes: #49607
--
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] Rename operation IDs for task instance endpoints to include map index… [airflow]
Posted by "bugraoz93 (via GitHub)" <gi...@apache.org>.
bugraoz93 commented on code in PR #49608:
URL: https://github.com/apache/airflow/pull/49608#discussion_r2056824980
##########
scripts/in_container/run_update_fastapi_api_spec.py:
##########
@@ -74,13 +76,29 @@ def generate_file(app: FastAPI, file_path: Path, prefix: str = "", only_ui: bool
)
+def validate_openapi_file(file_path: Path) -> bool:
+ with file_path.open() as f:
+ openapi_schema = yaml.safe_load(f)
+ try:
+ validate_spec(openapi_schema)
+ except Exception as e:
+ print(f"[ERROR] OpenAPI validation failed for {file_path}: {e}", file=sys.stderr)
+ return False
+ return True
Review Comment:
```suggestion
sys.exit(1)
```
--
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] Rename operation IDs for task instance endpoints to include map index… [airflow]
Posted by "abhishekbhakat (via GitHub)" <gi...@apache.org>.
abhishekbhakat commented on PR #49608:
URL: https://github.com/apache/airflow/pull/49608#issuecomment-2825182700
Added validation of openapi spec logic in the `run_update_fastapi_api_spec.py` so now it runs with pre-commit hook `generate-openapi-spec`
--
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] Rename operation IDs for task instance endpoints to include map index… [airflow]
Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun merged PR #49608:
URL: https://github.com/apache/airflow/pull/49608
--
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] Rename operation IDs for task instance endpoints to include map index… [airflow]
Posted by "abhishekbhakat (via GitHub)" <gi...@apache.org>.
abhishekbhakat commented on PR #49608:
URL: https://github.com/apache/airflow/pull/49608#issuecomment-2824891532
@bugraoz93
- The CI failing is not related to this PR.
- To add the tests, I might need to add the `openapi-spec-validator` in the deps. Let me know if that's ok I'll add it.
--
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] Rename operation IDs for task instance endpoints to include map index… [airflow]
Posted by "bbovenzi (via GitHub)" <gi...@apache.org>.
bbovenzi commented on PR #49608:
URL: https://github.com/apache/airflow/pull/49608#issuecomment-2824603465
Can you check that `BlockingDeps.tsx` in the UI still works?
It should render in the "Details" tab when you have a task instance selected.
--
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] Rename operation IDs for task instance endpoints to include map index… [airflow]
Posted by "abhishekbhakat (via GitHub)" <gi...@apache.org>.
abhishekbhakat commented on PR #49608:
URL: https://github.com/apache/airflow/pull/49608#issuecomment-2824804132
> Can you check that `BlockingDeps.tsx` in the UI still works?
>
> It should render in the "Details" tab when you have a task instance selected.
<img width="1373" alt="Screenshot 2025-04-23 at 16 00 57" src="https://github.com/user-attachments/assets/21b4a02f-231a-4686-8af0-90f1c569d9c0" />
@bbovenzi this is what I got
--
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] Rename operation IDs for task instance endpoints to include map index… [airflow]
Posted by "bugraoz93 (via GitHub)" <gi...@apache.org>.
bugraoz93 commented on PR #49608:
URL: https://github.com/apache/airflow/pull/49608#issuecomment-2824968646
> @bugraoz93
>
> * The CI failing is not related to this PR. I'll have to just wait till they are fixed.
> * To add the tests, I might need to add the `openapi-spec-validator` in the deps. Let me know if that's ok I'll add it.
Yeah, I wasn't on the computer, checked it now :) I think manual test should be fine thanks!
--
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] Rename operation IDs for task instance endpoints to include map index… [airflow]
Posted by "abhishekbhakat (via GitHub)" <gi...@apache.org>.
abhishekbhakat commented on code in PR #49608:
URL: https://github.com/apache/airflow/pull/49608#discussion_r2057426378
##########
scripts/in_container/run_update_fastapi_api_spec.py:
##########
@@ -74,13 +76,29 @@ def generate_file(app: FastAPI, file_path: Path, prefix: str = "", only_ui: bool
)
+def validate_openapi_file(file_path: Path) -> bool:
+ with file_path.open() as f:
+ openapi_schema = yaml.safe_load(f)
+ try:
+ validate_spec(openapi_schema)
+ except Exception as e:
+ print(f"[ERROR] OpenAPI validation failed for {file_path}: {e}", file=sys.stderr)
+ return False
+ return True
Review Comment:
mypy enforces a return value so kept `return True` but exiting on exception.
--
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] Rename operation IDs for task instance endpoints to include map index… [airflow]
Posted by "bugraoz93 (via GitHub)" <gi...@apache.org>.
bugraoz93 commented on code in PR #49608:
URL: https://github.com/apache/airflow/pull/49608#discussion_r2056824120
##########
scripts/in_container/run_update_fastapi_api_spec.py:
##########
@@ -74,13 +76,29 @@ def generate_file(app: FastAPI, file_path: Path, prefix: str = "", only_ui: bool
)
+def validate_openapi_file(file_path: Path) -> bool:
+ with file_path.open() as f:
+ openapi_schema = yaml.safe_load(f)
+ try:
+ validate_spec(openapi_schema)
+ except Exception as e:
+ print(f"[ERROR] OpenAPI validation failed for {file_path}: {e}", file=sys.stderr)
+ return False
+ return True
+
+
# Generate main application openapi spec
# Set the auth manager as SAM. No need to use another one to generate fastapi spec
os.environ["AIRFLOW__CORE__AUTH_MANAGER"] = (
"airflow.api_fastapi.auth.managers.simple.simple_auth_manager.SimpleAuthManager"
)
generate_file(app=create_app(), file_path=OPENAPI_SPEC_FILE)
+if not validate_openapi_file(OPENAPI_SPEC_FILE):
+ sys.exit(1)
Review Comment:
Can we exit once in the method and only call the method for all the spec files?
```suggestion
validate_openapi_file(OPENAPI_SPEC_FILE)
```
--
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