jedcunningham commented on code in PR #24496:
URL: https://github.com/apache/airflow/pull/24496#discussion_r903138270


##########
airflow/config_templates/default_celery.py:
##########
@@ -36,6 +36,12 @@ def _broker_supports_visibility_timeout(url):
     if _broker_supports_visibility_timeout(broker_url):
         broker_transport_options['visibility_timeout'] = 21600
 
+if conf.has_option("celery", 'RESULT_BACKEND'):
+    result_backend = str(conf.get('celery', 'RESULT_BACKEND'))
+else:
+    log.info("Value for celery result_backend not found. Using 
sql_alchemy_conn with db+ prefix.")

Review Comment:
   I almost wonder if this should be debug?



##########
chart/templates/_helpers.yaml:
##########
@@ -74,6 +74,7 @@ If release name contains chart name it will be used as a full 
name.
         key: webserver-secret-key
   {{- end }}
   {{- if or (eq .Values.executor "CeleryExecutor") (eq .Values.executor 
"CeleryKubernetesExecutor") }}
+    {{- if or (semverCompare "<=2.3.2" .Values.airflowVersion) 
(.Values.data.resultBackendSecretName) (.Values.data.resultBackendConnection) }}

Review Comment:
   ```suggestion
       {{- if or (semverCompare "<2.4.0" .Values.airflowVersion) 
(.Values.data.resultBackendSecretName) (.Values.data.resultBackendConnection) }}
   ```
   
   This change won't make it into a core release until 2.4.0.



##########
chart/values.yaml:
##########
@@ -319,6 +319,16 @@ extraEnvFrom: ~
 # Airflow database & redis config
 data:
   # If secret names are provided, use those secrets
+  # These secrets must be created manually, eg:
+  #
+  # kind: Secret
+  # apiVersion: v1
+  # metadata:
+  #   name: custom-airflow-metadata-secret
+  # type: Opaque
+  # data:
+  #   connection: base64_encoded_connection_string
+
   metadataSecretName: ~
   resultBackendSecretName: ~

Review Comment:
   Might be worth a comment that this will use `metadataSecretName`, if it's 
set.



##########
chart/templates/secrets/result-backend-connection-secret.yaml:
##########
@@ -20,6 +20,7 @@
 #################################
 {{- if not .Values.data.resultBackendSecretName }}
 {{- if or (eq .Values.executor "CeleryExecutor") (eq .Values.executor 
"CeleryKubernetesExecutor") }}
+{{- if or (semverCompare "<=2.3.2" .Values.airflowVersion) 
(.Values.data.resultBackendSecretName) (.Values.data.resultBackendConnection) }}

Review Comment:
   ```suggestion
   {{- if or (semverCompare "<2.4.0" .Values.airflowVersion) (and 
(semverCompare ">=2.4.0" .Values.airflowVersion) 
.Values.data.resultBackendConnection) }}
   ```
   Either we are pre-2.4, or we are post 2.4 with a `resultBackendConnection`. 
We already check for `resultBackendSecretName`, so we can drop that portion.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to