Skip to content

Conversation

@jscheffl
Copy link
Contributor

This is a pure re-factoring PR. The python module providers/edge3/src/airflow/providers/edge3/cli/edge_command.py was just too large.

I splitted the class _EdgeWorkerCli out into a separate module and renamed it to EdgeWorker. Also extracted some basics for signalling.
Should be zero functional change, even if it looks like a large review. Just pushing and changing a lot of names.

@boring-cyborg boring-cyborg bot added area:providers provider:edge Edge Executor / Worker (AIP-69) / edge3 labels May 17, 2025
@jscheffl jscheffl requested a review from Copilot May 18, 2025 14:16
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the Edge Worker CLI by extracting the previously monolithic _EdgeWorkerCli into a dedicated module and renaming it to EdgeWorker. It also extracts basic signalling functionality into its own module with accompanying tests.

  • Refactored Edge Worker CLI class into a separate module and renamed it.
  • Updated tests to import and use the new EdgeWorker class.
  • Introduced a new signalling module with functions for managing PID files.

Reviewed Changes

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

File Description
providers/edge3/tests/unit/edge3/worker_api/routes/test_worker.py Updated import and fixture type hint to use EdgeWorker instead of _EdgeWorkerCli.
providers/edge3/tests/unit/edge3/cli/test_signalling.py Added tests for the new signalling functionality ensuring PID file behavior is as expected.
providers/edge3/src/airflow/providers/edge3/cli/signalling.py New module handling PID file management and signalling for edge workers.

Copy link
Contributor

@shubhamraj-git shubhamraj-git left a comment

Choose a reason for hiding this comment

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

Thanks for the refactor.
Looks good.

@jscheffl jscheffl merged commit 23f439b into apache:main May 18, 2025
64 checks passed
dadonnelly316 pushed a commit to dadonnelly316/airflow that referenced this pull request May 26, 2025
* Refactor Edge Worker CLI for smaller module

* Ups, delete un-needed redundant test module

* Add a test for command

---------

Co-authored-by: Shubham Raj <48172486+shubhamraj-git@users.noreply.github.com>
sanederchik pushed a commit to sanederchik/airflow that referenced this pull request Jun 7, 2025
* Refactor Edge Worker CLI for smaller module

* Ups, delete un-needed redundant test module

* Add a test for command

---------

Co-authored-by: Shubham Raj <48172486+shubhamraj-git@users.noreply.github.com>
@jscheffl jscheffl deleted the bugfix/refactor-edge-cli-for-smaller-module branch October 5, 2025 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers provider:edge Edge Executor / Worker (AIP-69) / edge3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants