Skip to content

Regenerate UI client and handle deadline alerts with no fixed interval - #70637

Merged
shahar1 merged 2 commits into
apache:mainfrom
shahar1:fix-deadline-nullable-interval-ui
Jul 29, 2026
Merged

Regenerate UI client and handle deadline alerts with no fixed interval#70637
shahar1 merged 2 commits into
apache:mainfrom
shahar1:fix-deadline-nullable-interval-ui

Conversation

@shahar1

@shahar1 shahar1 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

main currently fails Compile / format / lint UI for every PR that triggers a full static-check run.

#68919 made DeadlineAlertResponse.interval nullable (float | None) for dynamic intervals — a VariableInterval whose value is only resolved at scheduler evaluation time — but the generated TypeScript client was not regenerated. The stale client still declared interval: number, which masked a real type error: once the client is regenerated, tsc fails at five call sites that pass the value straight to dayjs.duration(...).

This regenerates the client and makes those call sites handle a null interval.

A dynamic interval has no duration to display, so those sites render a dedicated wording instead — "Must complete within a dynamically resolved interval of {reference}" — via a new key in en/dag.json that other locales fall back to per the UI i18n policy (no other locale files touched). The shared humanizeSeconds helper keeps the null handling in one place next to the existing null-tolerant renderDuration, the "Met" badge tooltip is disabled rather than rendered empty when there are no rules to show, and a component test pins the dynamic-interval rendering.

Reproduce on main with no changes: prek run ts-compile-lint-ui --all-files.

related: #68919

Note

v3-3-test will need the same fix. #70625 backports the same datamodel change and touches only backend files, so merging it as-is reproduces this breakage there. Folding these changes into that PR before it merges avoids landing the breakage and cherry-picking a follow-up.


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 5)

Generated-by: Claude Code (Opus 5) following the guidelines

@shahar1

shahar1 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

Drafting as I'm still optimizing this PR.
My main concern - how the error didn't surface in static checks of #68919

@shahar1
shahar1 force-pushed the fix-deadline-nullable-interval-ui branch from 7f43c10 to b75096e Compare July 28, 2026 19:16
@shahar1
shahar1 marked this pull request as ready for review July 28, 2026 19:17
The deadline-alert response now reports a null interval when the alert
has no fixed number of seconds, but the committed TypeScript client
still described it as a required number. That stale client hid a real
type error in every component rendering the completion rule, so
`ts-compile-lint-ui` fails on a clean checkout and blocks unrelated PRs.

The null is wrong on screen today as well: dayjs humanizes it as "a few
seconds", so such an alert claims the run must complete within a few
seconds of its reference point. There is no duration to name there, so
the rule now names the reference point alone. English is the source and
fallback locale, so the wording is added there alone and the other
locales fall back to it until translated.
@shahar1
shahar1 force-pushed the fix-deadline-nullable-interval-ui branch from b75096e to 8bfab47 Compare July 28, 2026 20:01
@seanghaeli

Copy link
Copy Markdown
Contributor

Thanks for putting this up. Seems that ts-compile-lint-ui pre-commit hook was skipped during #68919, which is why this bug was not surfaced. Quick fix could be to make sure it runs whenever any yaml under core_api/openapi/ changes, what do you think?

@shahar1

shahar1 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for putting this up. Seems that ts-compile-lint-ui pre-commit hook was skipped during #68919, which is why this bug was not surfaced. Quick fix could be to make sure it runs whenever any yaml under core_api/openapi/ changes, what do you think?

On it right now :) It seems that indeed there's a misconfiguration in the selective checks

@shahar1 shahar1 added the backport-to-v3-3-test Backport to v3-3-test label Jul 29, 2026
@shahar1
shahar1 merged commit 78b88db into apache:main Jul 29, 2026
66 of 67 checks passed
@shahar1
shahar1 deleted the fix-deadline-nullable-interval-ui branch July 29, 2026 05:39
@github-actions github-actions Bot added this to the Airflow 3.3.2 milestone Jul 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hi maintainer, this PR was merged without a milestone set.
We've automatically set the milestone to Airflow 3.3.2 based on: backport label targeting v3-3-test
If this milestone is not correct, please update it to the appropriate milestone.

This comment was generated by Milestone Tag Assistant.

@github-actions

Copy link
Copy Markdown
Contributor

Backport successfully created: v3-3-test

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
v3-3-test PR Link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:UI Related to UI/UX. For Frontend Developers. backport-to-v3-3-test Backport to v3-3-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants