You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "hussein-awala (via GitHub)" <gi...@apache.org> on 2023/04/15 14:31:29 UTC
[GitHub] [airflow] hussein-awala commented on a diff in pull request #29498: add missing read for K8S config file from conn in deferred `KubernetesPodOperator`
hussein-awala commented on code in PR #29498:
URL: https://github.com/apache/airflow/pull/29498#discussion_r1167555764
##########
airflow/providers/cncf/kubernetes/operators/pod.py:
##########
@@ -560,18 +557,8 @@ def execute_async(self, context: Context):
pod_request_obj=self.pod_request_obj,
context=context,
)
- self.convert_config_file_to_dict()
self.invoke_defer_method()
- def convert_config_file_to_dict(self):
- """Converts passed config_file to dict format."""
- config_file = self.config_file if self.config_file else os.environ.get(KUBE_CONFIG_ENV_VAR)
- if config_file:
- with open(config_file) as f:
- self._config_dict = yaml.safe_load(f)
- else:
- self._config_dict = None
Review Comment:
In my opinion, this method is used as a private method since it only updates some attributes in the class instances without returning any value. However, it's possible that someone could extend the operator class and use it. Should we deprecate it and remove it in the next major release, or should we add a breaking change note?
--
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