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

[EDGE]Enable edge worker maintenance mode #45958

Open
wants to merge 68 commits into
base: main
Choose a base branch
from

Conversation

majorosdonat
Copy link
Contributor

@majorosdonat majorosdonat commented Jan 23, 2025

Maintenance mode is enabled for the edge worker. In maintenance mode, the worker is alive, but cannot consume any jobs.
The maintenance mode can be triggered by a button from the edge worker status page. It writes the state "maintenance request" directly to the database as worker state. Then the worker will go to maintenance pending if there are running jobs, and maintenance mode if all jobs have finished.

When exiting maintenance mode, maintenance exit is written to the database. Then the worker will switch to running state if it was in state maintenance pending, and to idle if it was in maintenance mode.

image

Why do we need the state maintenance exit?
If the user requested maintenance, so the maintenance request is in the database, and the user wants to exit maintenance immidiately e.g. for misclick, then we will not know if we should write running or idle to the database.


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
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.

@majorosdonat majorosdonat changed the title [WIP]nable edge worker maintenance mode [EDGE]Enable edge worker maintenance mode Jan 24, 2025
@majorosdonat majorosdonat marked this pull request as ready for review January 24, 2025 14:39
@jscheffl jscheffl added type:new-feature Changelog: New Features AIP-69 Edge Executor provider:edge Edge Executor / Worker (AIP-69) labels Jan 24, 2025
@jscheffl jscheffl requested review from jscheffl and Copilot January 24, 2025 15:06

Choose a reason for hiding this comment

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

Copilot reviewed 5 out of 15 changed files in this pull request and generated no comments.

Files not reviewed (10)
  • providers/edge/README.rst: Language not supported
  • providers/edge/docs/changelog.rst: Language not supported
  • providers/edge/src/airflow/providers/edge/openapi/edge_worker_api_v1.yaml: Language not supported
  • providers/edge/src/airflow/providers/edge/plugins/templates/edge_worker_hosts.html: Language not supported
  • providers/edge/src/airflow/providers/edge/cli/api_client.py: Evaluated as low risk
  • providers/edge/src/airflow/providers/edge/get_provider_info.py: Evaluated as low risk
  • providers/edge/provider.yaml: Evaluated as low risk
  • providers/edge/tests/provider_tests/edge/cli/test_edge_command.py: Evaluated as low risk
  • providers/edge/src/airflow/providers/edge/init.py: Evaluated as low risk
  • providers/edge/pyproject.toml: Evaluated as low risk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AIP-69 Edge Executor area:providers provider:edge Edge Executor / Worker (AIP-69) type:new-feature Changelog: New Features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants