You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "phil-park (via GitHub)" <gi...@apache.org> on 2023/09/08 00:26:16 UTC
[GitHub] [airflow] phil-park opened a new pull request, #34197: fix: Retains the name of the ingress for backwards compatibility
phil-park opened a new pull request, #34197:
URL: https://github.com/apache/airflow/pull/34197
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!--
Thank you for contributing! Please make sure that your code changes
are covered with tests. And in case of new features or big changes
remember to adjust the documentation.
Feel free to ping committers for the review!
In case of an existing issue, reference it using one of the following:
closes: #34196
related: #34196
How to write a good git commit message:
http://chris.beams.io/posts/git-commit/
-->
<!-- Please keep an empty line above the dashes. -->
---
When an existing user upgrades from Helm chart 1.10.0 to 1.11.0-dev, the ingress name is different, so they will try to create a new one. And finally it fails. (https://github.com/apache/airflow/issues/34196)
Therefore, to ensure backward compatibility, add airflow- to the middle of the ingress name to maintain the name before 1.10.0.
**^ Add meaningful description above**
Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed.
In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
In case of backwards incompatible changes please leave a note in a newsfragment file, named `{pr_number}.significant.rst` or `{issue_number}.significant.rst`, in [newsfragments](https://github.com/apache/airflow/tree/main/newsfragments).
--
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
[GitHub] [airflow] fgalind1 commented on pull request #34197: fix: Retains the name of the ingress for backwards compatibility
Posted by "fgalind1 (via GitHub)" <gi...@apache.org>.
fgalind1 commented on PR #34197:
URL: https://github.com/apache/airflow/pull/34197#issuecomment-1718293382
> @fgalind1, is [this list incorrect](https://github.com/apache/airflow/blob/847d2c3b37210113dce3cf5da0344a2fcfcd9d12/chart/newsfragments/31066.significant.rst?plain=1#L6) then and we missed the ingress changes, or is this only a problem when `useStandardNaming` is enabled?
@jedcunningham that's a good point, and yes ingress should be included there. I've made a PR https://github.com/apache/airflow/pull/34354 to cover that and clarify when that happens at least with the current implementation at this moment
--
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
[GitHub] [airflow] fgalind1 commented on pull request #34197: fix: Retains the name of the ingress for backwards compatibility
Posted by "fgalind1 (via GitHub)" <gi...@apache.org>.
fgalind1 commented on PR #34197:
URL: https://github.com/apache/airflow/pull/34197#issuecomment-1711895617
> I think the problem is that if you use "airflow" as Release.Name the new "airflow.fullname" macro shortens to just .Release.Name.
yep that's correct
> Was there any particular reason to shorten the fullname in this case @fgalind1 other than avoiding accidental duplication? I am not sure if there ia any way to avoid backwards compatibilty problems, but my vote would go to removing the shortening and leaving "airflow-airflow" if someone uses "airflow" release name (even if it looks duplicate).
Just to make it standard as that is the most common pattern I've seen in mostly all upstream charts for the `fullname` implementation, e.g:
- https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_names.tpl#L31-L32
- https://github.com/jfrog/charts/blob/master/stable/artifactory/templates/_helpers.tpl#L25-L26
- https://github.com/prometheus-community/helm-charts/blob/main/charts/prometheus/templates/_helpers.tpl#L56-L57
Maybe if we want to keep it for backwards compatibility we could add an option that opts-in/out that if condition like `.Values.disableShortenFullname` or `.Values.allowShortenFullname`? Maybe to something like:
```
{{- define "airflow.fullname" -}}
{{- if not .Values.useStandardNaming }}
{{- .Release.Name }}
{{- else if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if and .Values.disableShortenFullname (contains $name .Release.Name) }}.
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}
```
--
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
[GitHub] [airflow] phil-park commented on pull request #34197: fix: Retains the name of the ingress for backwards compatibility
Posted by "phil-park (via GitHub)" <gi...@apache.org>.
phil-park commented on PR #34197:
URL: https://github.com/apache/airflow/pull/34197#issuecomment-1713661448
I'm actually using the name airflow-airflow-ingress. I know this is actually a bad name, but it's hard to risk removing ingress and recreating it. (There are quite a few airflows in operation.) I would appreciate it if backward compatibility was provided.
--
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
[GitHub] [airflow] potiuk commented on pull request #34197: fix: Retains the name of the ingress for backwards compatibility
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #34197:
URL: https://github.com/apache/airflow/pull/34197#issuecomment-1713682121
> I'm actually using the name airflow-airflow-ingress. I know this is actually a bad name, but it's hard to risk removing ingress and recreating it. (There are quite a few airflows in operation.) I would appreciate it if backward compatibility was provided.
Yeah. I wish there was an easy way to provide new defaults, while keeping the old ones if someone used them in the past.
--
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
[GitHub] [airflow] phil-park closed pull request #34197: fix: Retains the name of the ingress for backwards compatibility
Posted by "phil-park (via GitHub)" <gi...@apache.org>.
phil-park closed pull request #34197: fix: Retains the name of the ingress for backwards compatibility
URL: https://github.com/apache/airflow/pull/34197
--
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
[GitHub] [airflow] phil-park commented on pull request #34197: fix: Retains the name of the ingress for backwards compatibility
Posted by "phil-park (via GitHub)" <gi...@apache.org>.
phil-park commented on PR #34197:
URL: https://github.com/apache/airflow/pull/34197#issuecomment-1729301639
https://github.com/apache/airflow/issues/34196
--
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
[GitHub] [airflow] jedcunningham commented on pull request #34197: fix: Retains the name of the ingress for backwards compatibility
Posted by "jedcunningham (via GitHub)" <gi...@apache.org>.
jedcunningham commented on PR #34197:
URL: https://github.com/apache/airflow/pull/34197#issuecomment-1718246960
@fgalind1, is [this list incorrect](https://github.com/apache/airflow/blob/847d2c3b37210113dce3cf5da0344a2fcfcd9d12/chart/newsfragments/31066.significant.rst?plain=1#L6) then and we missed the ingress changes, or is this only a problem when `useStandardNaming` is enabled?
--
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
[GitHub] [airflow] hussein-awala commented on pull request #34197: fix: Retains the name of the ingress for backwards compatibility
Posted by "hussein-awala (via GitHub)" <gi...@apache.org>.
hussein-awala commented on PR #34197:
URL: https://github.com/apache/airflow/pull/34197#issuecomment-1722558603
I wonder if we should close this PR and the linked issue (#34196) since we've merged #34354
--
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
[GitHub] [airflow] boring-cyborg[bot] commented on pull request #34197: fix: Retains the name of the ingress for backwards compatibility
Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on PR #34197:
URL: https://github.com/apache/airflow/pull/34197#issuecomment-1710918893
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 (ruff, mypy and type annotations). Our [pre-commits]( https://github.com/apache/airflow/blob/main/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/BREEZE.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.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
[GitHub] [airflow] potiuk commented on pull request #34197: fix: Retains the name of the ingress for backwards compatibility
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #34197:
URL: https://github.com/apache/airflow/pull/34197#issuecomment-1711208519
Thanks for opening the issue and PR, but I believe this is not the right way to fix it @phil-park
I believe the problem is in fullname definition. I think the problem is that if you use "airflow" as Release.Name the new "airflow.fullname" macro shortens to just .Release.Name. I think that was the intention @fgalind1 - but it indeed causes backwards compatibility problem.
Was there any particular reason to shorten the fullname in this case @fgalind1 other than avoiding accidental duplication? I am not sure if there ia any way to avoid backwards compatibilty problems, but my vote would go to removing the shortening and leaving "airflow-airflow" if someone uses "airflow" release name (even if it looks duplicate).
```
{{- define "airflow.fullname" -}}
{{- if not .Values.useStandardNaming }}
{{- .Release.Name }}
{{- else if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}. # <---------- HERE
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}
```
--
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
[GitHub] [airflow] phil-park commented on pull request #34197: fix: Retains the name of the ingress for backwards compatibility
Posted by "phil-park (via GitHub)" <gi...@apache.org>.
phil-park commented on PR #34197:
URL: https://github.com/apache/airflow/pull/34197#issuecomment-1729301258
I found out that the reason why renaming (recreating) the ingress failed was because I used Helm's wait option.
It's okay to close this PR and issue(https://github.com/apache/airflow/issues/34196).
--
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
[GitHub] [airflow] potiuk commented on pull request #34197: fix: Retains the name of the ingress for backwards compatibility
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #34197:
URL: https://github.com/apache/airflow/pull/34197#issuecomment-1713654537
> @potiuk any thoughts?
Good for me, though this inflates options we have :)
--
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