Skip to content

Add team_name tag to Edge executor sync metric#69005

Merged
eladkal merged 2 commits into
apache:mainfrom
shivaam:codex/edge-executor-metrics-68996
Jun 30, 2026
Merged

Add team_name tag to Edge executor sync metric#69005
eladkal merged 2 commits into
apache:mainfrom
shivaam:codex/edge-executor-metrics-68996

Conversation

@shivaam

@shivaam shivaam commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Add the team_name tag to the Edge executor sync duration metric for multi-team deployments.

This follows the same pattern as #68593 for executor metrics:

  • use self.team_name as the metric tag source
  • wrap tags with prune_dict so global/no-team executors keep the existing empty tag set
  • keep the change scoped to the Edge executor metric only

This PR covers the edge_executor.sync.duration item from #68996. Edge worker metrics and ECS executor metrics are being kept in separate PRs.

Tests:

  • uv run ruff format --check providers/edge3/src/airflow/providers/edge3/executors/edge_executor.py providers/edge3/tests/unit/edge3/executors/test_edge_executor.py
  • uv run ruff check providers/edge3/src/airflow/providers/edge3/executors/edge_executor.py providers/edge3/tests/unit/edge3/executors/test_edge_executor.py
  • git diff --check
  • uv run pytest providers/edge3/tests/unit/edge3/executors/test_edge_executor.py -q
  • breeze run pytest providers/edge3/tests/unit/edge3/executors/test_edge_executor.py -q
  • uvx prek run --from-ref upstream/main --stage pre-commit

Results:

  • ruff format/check passed
  • diff check clean
  • 20 passed, 1 warning
  • pre-commit stage passed

Related: #68996


Was generative AI tooling used to co-author this PR?
  • Yes - OpenAI Codex

Generated-by: OpenAI Codex following the guidelines


Drafted-by: OpenAI Codex (no human review before posting)

@boring-cyborg boring-cyborg Bot added area:providers provider:edge Edge Executor / Worker (AIP-69) / edge3 labels Jun 26, 2026

@SameerMesiah97 SameerMesiah97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I have left some comments.

Comment thread providers/edge3/tests/unit/edge3/executors/test_edge_executor.py
Comment thread providers/edge3/tests/unit/edge3/executors/test_edge_executor.py
Comment thread providers/edge3/tests/unit/edge3/executors/test_edge_executor.py
@shivaam
shivaam force-pushed the codex/edge-executor-metrics-68996 branch from 76c4ef4 to cb85313 Compare June 27, 2026 01:49
@shivaam

shivaam commented Jun 27, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @ferruzzi @SameerMesiah97 .

I updated the PR to match the existing Edge executor multi-team test pattern:

  • added the AIRFLOW_V_3_2_PLUS guard for the EdgeExecutor(team_name=...) metric test
  • parameterized the team/no-team assertions for the edge_executor.sync.duration metric tags
  • kept prune_dict({"team_name": self.team_name}) so the no-team path continues to emit tags={} rather than team_name=None

@ferruzzi ferruzzi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, thanks for taking this on.

@eladkal
eladkal merged commit 4ee7bd9 into apache:main Jun 30, 2026
77 checks passed
karenbraganz pushed a commit to karenbraganz/airflow that referenced this pull request Jun 30, 2026
* Add team name tag to Edge executor sync metric

* Address Edge executor metric test review
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.

4 participants