Skip to content

Remove unused span_status DB columns#69278

Merged
ashb merged 1 commit into
apache:mainfrom
Ei-Sandi:clean_span_status
Jul 8, 2026
Merged

Remove unused span_status DB columns#69278
ashb merged 1 commit into
apache:mainfrom
Ei-Sandi:clean_span_status

Conversation

@Ei-Sandi

@Ei-Sandi Ei-Sandi commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Description

This PR removes the span_status column from dag_run, task_instance and task_instance_history and associated SpanStatus enum. This field previously tracked OpenTelemetry span lifecycle state and is no longer needed after #62554.

Changes

  • New Alembic migration dropping the column from all three tables (downgrade restores it with its original default)
  • Removed the mapped column and imports from the DagRun, TaskInstance, and TaskInstanceHistory models
  • Updated tests, coverage config, and migration references accordingly
  • Fixed outdated file paths in the metadata database contributing docs

Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

Co-authored by: [Claude Opus 4.8] following the guidelines


  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@xBis7 xBis7 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.

@Ei-Sandi Thanks for the PR! I added 2 small comments.

Your branch seems to have conflicts, you need to do a rebase.

Comment thread airflow-core/tests/integration/otel/test_otel.py
Comment thread airflow-core/tests/integration/otel/test_otel.py
@Ei-Sandi Ei-Sandi force-pushed the clean_span_status branch from 2678783 to 99b2182 Compare July 3, 2026 11:32
@xBis7

xBis7 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

It turns out that the sleep that was initially used for the span_status, now provides enough time for jaeger to pick up the spans. Removing it make the otel test flaky.

@Ei-Sandi Ei-Sandi force-pushed the clean_span_status branch from 99b2182 to 48eaa1b Compare July 3, 2026 13:12

@xBis7 xBis7 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!

@Ei-Sandi Ei-Sandi force-pushed the clean_span_status branch 4 times, most recently from 48eaa1b to c88a489 Compare July 3, 2026 21:22

@ashb ashb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Other than the version LGTM

@Ei-Sandi Ei-Sandi force-pushed the clean_span_status branch 2 times, most recently from df7ca86 to 94c6200 Compare July 7, 2026 22:43
@Ei-Sandi Ei-Sandi requested a review from o-nikolas as a code owner July 7, 2026 22:43
@ashb ashb changed the title Remove span_status. Remove unused span_status DB columns Jul 7, 2026
@Ei-Sandi Ei-Sandi force-pushed the clean_span_status branch from 94c6200 to 783ffc2 Compare July 7, 2026 23:04
@Ei-Sandi Ei-Sandi force-pushed the clean_span_status branch from 783ffc2 to 22bd5b5 Compare July 8, 2026 11:40
@Ei-Sandi

Ei-Sandi commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

@ashb The version is updated, the merge conflicts are resolved, all the CI checks are passed. I think we can merge this now. Thank you.

@ashb ashb added changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) and removed backport-to-v3-3-test Backport to v3-3-test labels Jul 8, 2026
@ashb ashb merged commit 3452040 into apache:main Jul 8, 2026
148 checks passed
@Ei-Sandi Ei-Sandi deleted the clean_span_status branch July 8, 2026 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:db-migrations PRs with DB migration area:dev-tools changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) kind:documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants