[FLINK-39042][webui] Port timezone-aware watermark timestamps to release-2.1#28092
Open
featzhang wants to merge 1 commit intoapache:release-2.1from
Open
[FLINK-39042][webui] Port timezone-aware watermark timestamps to release-2.1#28092featzhang wants to merge 1 commit intoapache:release-2.1from
featzhang wants to merge 1 commit intoapache:release-2.1from
Conversation
…figurable (apache#27552) * [FLINK-39042][ui] Make watermark timestamps timezone-aware and configurable * [FLINK-39042][webui] Use Intl API for timezone handling and support DST Address review feedback: - Use native Intl.DateTimeFormat API instead of manual offset calculation - Replace fixed UTC offsets with IANA timezone names (e.g., America/Los_Angeles) - IANA timezones automatically handle daylight saving time transitions - Remove redundant console.log statements and improve code quality - Add documentation comments with reference to IANA timezone database * [FLINK-39042][webui] Make watermark timestamps timezone-aware and configurable * [FLINK-39042][webui] Address code review comments - Add MDN reference for Intl.DateTimeFormat API - Clarify DST handling in timezone abbreviations (e.g., PST vs PDT) - Improve error messages to explicitly mention UTC fallback - Update comments to better explain timezone resolution logic * Address review comments - Remove 'pure: false' from HumanizeWatermarkToDatetimePipe as template already passes timezone argument - Use Intl.supportedValuesOf('timeZone') to get all supported timezones instead of hardcoded list - Keep browser local timezone as default - Revert unnecessary changes in job-status.component.less * fix: improve timezone fallback handling and CSS property ordering - Enhance timezone detection fallback logic in watermark component\n- Fix CSS property ordering in job status component for better maintainability * style: improve code formatting for better readability - Split long lines in timezone options initialization for improved code readability * style: optimize CSS property ordering for better maintainability - Reorder CSS properties in job status component for improved code organization * fix: add type assertion for Intl.supportedValuesOf to fix TS compilation error * [FLINK-39042][webui] Use browser locale instead of hardcoded en-US in watermark datetime pipe Replace hardcoded 'en-US' locale with undefined in Intl.DateTimeFormat to respect the user's browser locale settings. This ensures the date display order follows the user's regional preferences rather than being fixed to the en-US format. Suggested by @davidradl in code review. (cherry picked from commit 64d0316)
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the purpose of the change
Port PR #27552 (FLINK-39042) from
mastertorelease-2.1. Makes watermark timestamps in the Web UI timezone-aware and user-configurable: the Watermarks drawer now shows a timezone selector populated fromIntl.supportedValuesOf('timeZone'), defaulting to the browser's local IANA zone, and the datetime pipe honours the selection (DST handled automatically via the Intl API).Brief change log
Cherry-pick of
64d0316aad22e83888b65e6c3036d0a980ae33a9ontorelease-2.1. Four files changed,+172 / -11:humanize-watermark.pipe.ts—HumanizeWatermarkToDatetimePipeaccepts an optional IANA timezone arg and formats viaIntl.DateTimeFormat; keeps legacy behaviour when no zone is passed.job-overview-drawer-watermarks.component.{ts,html,less}— adds timezone dropdown (nz-select), populates options fromIntl.supportedValuesOf('timeZone'), defaults toIntl.DateTimeFormat().resolvedOptions().timeZone, wires it into the datetime column.Backport notes (conflicts resolved)
Two conflicts resolved manually — both are environmental drift, not logic drift:
job-overview-drawer-watermarks.component.ts—@Component.imports:release-2.1still uses the legacy ng-zorro nameNzToolTipModule(capitalT), whilemasterhas been renamed toNzTooltipModule. Keptrelease-2.1'sNzToolTipModulespelling in both theimportand theimportsarray, while adopting the new array entries the PR requires (NgForOf,FormsModule,NzSelectModule).job-status.component.less: the.back-linkblock reordered by the original PR does not exist onrelease-2.1— it was introduced onmasterby an unrelated later PR. Dropped this hunk; the resulting net diff for this file is 0, sorelease-2.1is untouched here. (This accounts for the slightly smaller overall diff vs the original PR's 178/14.)No other code changes, no semantic deviation from the master PR.
Verification
npm ci && npm run lint— ✅ cleannpm run build(i.e.ng build --configuration production) — ✅ producedwatermarks-job-overview-drawer-watermarks-componentchunk without errorsDoes this pull request potentially affect one of the following parts:
@Public(Evolving): noDocumentation