Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix is_local for LocalKubernetesExecutor #28288

Merged

Conversation

pierrejeambrun
Copy link
Member

@pierrejeambrun pierrejeambrun commented Dec 10, 2022

LocalKurbernetesExecutor does not extends the BaseExecutor class, and therefore does not inherit is_local attribute.

See #28276 general discussion on how to handle mixed executor API.

cc: @dstandish @o-nikolas

Copy link
Contributor

@o-nikolas o-nikolas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving. Though note: a discussion is ongoing for the final approach to be taken, so this solution may change, please see here: #28276 (comment)

@@ -43,6 +43,8 @@ class LocalKubernetesExecutor(LoggingMixin):

KUBERNETES_QUEUE = conf.get("local_kubernetes_executor", "kubernetes_queue")

is_local: bool = False
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is tricky, since this executor is sometimes local, but I think it's best to go with False unless all executors are local.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep I thought the same. This is the conservative choice, and equivalent to what was implemented before

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aagree.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah i mean, the flag itself is problematic. Because, with these composite executors, it's not yes or no.

Is it local? well, yes and no -- depends what you need, depends why you are asking. So this flag should probably be replaced with something more specific to what it's actually concerned about. Iike, the specific behavior that is required / investigated and not whether the executor is "a local executor".

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thinkg better question is - what is the use and semantic of the "local" flag - why it is needed and what we want to achieve by it. I.e. what different happens when executor is local vs. non-local - and can we name it differently in this case to better reflect the meaning.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's basically what i'm saying. is_local doesn't make sense when applied to these executors, it's probably a proxy for some behavior that .... prior to the composite executors made sense but no longer does.

@potiuk potiuk merged commit 3d8bc2c into apache:main Dec 27, 2022
@pierrejeambrun pierrejeambrun deleted the fix-is-local-for-local-kurbernetes-executor branch December 28, 2022 12:42
@pierrejeambrun pierrejeambrun added this to the Airflow 2.6.0 milestone Jan 9, 2023
@pierrejeambrun pierrejeambrun added the type:misc/internal Changelog: Misc changes that should appear in change log label Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:Scheduler including HA (high availability) scheduler type:misc/internal Changelog: Misc changes that should appear in change log
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants