You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "jason810496 (via GitHub)" <gi...@apache.org> on 2025/03/09 06:47:11 UTC

[PR] Fix Breeze K8s: Patch ConfigMap [api/base_url] with Port-Forwarded Host Port [airflow]

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

   closes: #47521
   
   ## Why  
   
   The `[api/base_url]` is set to `http://localhost:8080` by default, which causes issues in the Breeze K8s environment. The redirect URL after login does not match the `host:port` defined in `KUBERNETES_HOST_PORT`, also leading to CORS problems as described in #47521.  
   
   ## What  
   
   - Patch the `[api/base_url]` value in `airflow.cfg` within the ConfigMap using `KUBERNETES_HOST_PORT`.  
   - Roll out a restart of the `airflow-api-server` deployment before running tests.  
   
   ## Note  
   
   We could also move the ConfigMap patching step into a Breeze k8s utility that runs before `shell` and `test` commands. Open to discussion—any advice would be greatly appreciated!


-- 
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 Breeze K8s: Patch ConfigMap [api/base_url] with Port-Forwarded Host Port [airflow]

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

   BTW. Very nice and out-of-the-box idea ;) . I would have never come up with such an aproach, but it is really nice :)


-- 
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 Breeze K8s: Patch ConfigMap [api/base_url] with Port-Forwarded Host Port [airflow]

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

   Also it has a very nice side-effect ..... We are ACTUALLY testing rolling restart of API server this way :) 


-- 
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 Breeze K8s: Patch ConfigMap [api/base_url] with Port-Forwarded Host Port [airflow]

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

   > > We could also move the ConfigMap patching step into a Breeze k8s utility that runs before shell and test commands. Open to discussion—any advice would be greatly appreciated!
   > 
   > That one is better I think, as theorethically we could run the tests outside of the `breeze k8s` utiltity. I always prefer to run setup - if only possible - in a pytest fixture, as this makes tests far more portable in general. We had a lot, a lot of cases where we had some environmental setup in outside scripts or even breeze image and that was a cause for many problems where someone attempted to run tests in not-exactly-the-way-it-was-supposed-to-be causing lots of confusion and time lost for diagnosing the issues.
   
   Thanks for confirming, @potiuk I’ll move it to Breeze in the next PR—already noted in my backlog.  
   
   > BTW. Very nice and out-of-the-box idea ;) . I would have never come up with such an approach, but it is really nice :)  
   
   Really appreciate that! Glad you liked the idea—you just made my day! 


-- 
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 Breeze K8s: Patch ConfigMap [api/base_url] with Port-Forwarded Host Port [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk merged PR #47544:
URL: https://github.com/apache/airflow/pull/47544


-- 
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 Breeze K8s: Patch ConfigMap [api/base_url] with Port-Forwarded Host Port [airflow]

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

   Cool! Thanks for the fix!


-- 
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 Breeze K8s: Patch ConfigMap [api/base_url] with Port-Forwarded Host Port [airflow]

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

   > We could also move the ConfigMap patching step into a Breeze k8s utility that runs before shell and test commands. Open to discussion—any advice would be greatly appreciated!
   
   That one is better I think, as theorethically we could run the tests outside of the `breeze k8s` utiltity. I always prefer to run setup - if only possible - in a pytest fixture, as this makes tests far more portable in general. We had a lot, a lot of cases where we had some environmental setup in outside scripts or even breeze image and that was a cause for many problems where someone attempted to run tests in not-exactly-the-way-it-was-supposed-to-be causing lots of confusion and time lost for diagnosing the issues.


-- 
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