Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses a Daylight Saving Time (DST) issue in the Spring Cloud Azure Feature Management “recurring time window” logic, aiming to make recurrence validation/evaluation behave consistently across DST transitions.
Changes:
- Update recurrence validation to use UTC when computing week-based gaps (avoids DST-dependent day lengths).
- Add DST-focused unit tests for
RecurrenceValidatorandRecurrenceEvaluator. - Add DST-handling logic in weekly recurrence evaluation when comparing fixed-offset start times with region-based “now” times.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
sdk/spring/spring-cloud-azure-feature-management/src/main/java/com/azure/spring/cloud/feature/management/implementation/timewindow/recurrence/RecurrenceValidator.java |
Switches “today” computation to UTC to avoid DST affecting duration/gap calculations. |
sdk/spring/spring-cloud-azure-feature-management/src/main/java/com/azure/spring/cloud/feature/management/implementation/timewindow/recurrence/RecurrenceEvaluator.java |
Adds DST-aware zone conversion logic for weekly recurrence computations. |
sdk/spring/spring-cloud-azure-feature-management/src/test/java/com/azure/spring/cloud/feature/management/filters/recurrence/RecurrenceValidatorDSTTest.java |
Introduces DST-related validation tests (currently mostly “no exception” assertions). |
sdk/spring/spring-cloud-azure-feature-management/src/test/java/com/azure/spring/cloud/feature/management/filters/recurrence/RecurrenceEvaluatorDSTTest.java |
Introduces DST-related evaluation tests for fixed-offset vs region-zone comparisons. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
You can also share your feedback on Copilot code review. Take the survey.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
Do other languages have the same issue? |
Not that I know of. I had another PR build fail because of this issue. |
|
Here's what copilot found. Might be worth double checking:
Findings:
|
* Fix: Skip App Configuration validation when feature is disabled (#47588) (cherry picked from commit 0d08d06) * Collection monitoring (#47648) * start collection monitoring * Updating collection monitoring * Updating State * Updated docs * cleaning up refresh * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fixing tests * New tests * More new tests * Update AzureAppConfigDataLoader.java * Fixing Formatting * Update AppConfigurationReplicaClient.java * Code Review comments * review comments * code review items * Format fixing * fixing tests --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> (cherry picked from commit f6267fc) * App Configuration Provider - Tag filters (#47985) * Tag Filter + Updated JavaDocs * Fixing tests * Update CHANGELOG.md * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * review comments * Tag Filter util file + tests * Update ValidationUtilTest.java * assertsame --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> (cherry picked from commit e43ce23) * Load balance bug (#48121) * Fixes Load Balancing Bug * fixes * new version * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update sdk/spring/spring-cloud-azure-appconfiguration-config/src/main/java/com/azure/spring/cloud/appconfiguration/config/implementation/ConnectionManager.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update sdk/spring/spring-cloud-azure-appconfiguration-config/src/test/java/com/azure/spring/cloud/appconfiguration/config/implementation/ConnectionManagerTest.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> (cherry picked from commit c237703) * fix(spring-messaging-servicebus): evict stale processors from cache (#48062) * fix(spring-messaging-servicebus): evict stale processors from cache (#48030) * chore: revert CHANGELOG entry per reviewer feedback * Update sdk/spring/spring-messaging-azure-servicebus/src/test/java/com/azure/spring/messaging/servicebus/core/DefaultServiceBusNamespaceProcessorFactoryTests.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix: separate try-catch for listener notification and stale processor close Ensures stale.close() always executes even if listener notification throws, preventing a potential resource leak. * refactor: extract buildProcessorName to local variable in stale eviction block Avoids recomputing buildProcessorName(key) multiple times and ensures consistent value across debug log, listener callback, and warn logs. * test: add mock-based tests for running-to-not-running processor transition - Add testRunningProcessorReturnedFromCache: verifies running processor stays in cache without eviction - Add testProcessorEvictedAfterTransitionToNotRunning: verifies stale (non-running) processor is evicted, closed, and replaced - Update comments on existing stale tests to clarify they test never-started processors; reference new mock tests for transition - Add reflection helper getProcessorMap() for injecting mocks into cache --------- Co-authored-by: Eldert Grootenboer (from Dev Box) <egrootenboer@microsoft.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> (cherry picked from commit 1c16e17) * Fix: KeyVaultJcaProvider registered at highest JCA priority breaks mTLS with standard keystores (#48198) * Initial plan * Fix: KeyVaultJcaProvider registered at highest priority breaks mTLS with standard keystores Co-authored-by: rujche <171773178+rujche@users.noreply.github.com> * Revert spring-cloud-azure-autoconfigure/CHANGELOG.md - keep aligned with other versions Co-authored-by: rujche <171773178+rujche@users.noreply.github.com> * Update CHANGELOG issue link to #48183 Co-authored-by: rujche <171773178+rujche@users.noreply.github.com> * Apply PR review suggestions: remove unused param and use PROVIDER_NAME constant Co-authored-by: rujche <171773178+rujche@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: rujche <171773178+rujche@users.noreply.github.com> (cherry picked from commit 7f9adaf) * update changelog * App Config Spring - Json content type fix (#48448) * fixing semi colon support * Update CHANGELOG.md * bug fix * review comments * Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * remove release notes * Update JsonConfigurationParser.java * Update JsonConfigurationParser.java * Update JsonConfigurationParser.java * Update JsonConfigurationParser.java --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> (cherry picked from commit c0c405a) * update changelog * App Config - Startup retry (#47857) * Refactor + Startup Retry * Update AzureAppConfigDataLoader.java * Adding Tests * Updating readme, correct location * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * interval change * fixes after merge * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update AzureAppConfigDataLoader.java * review comments * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> (cherry picked from commit 02491f7) * App Config Spring - Refresh Refactor (#47877) * Refactor Refresh * review fixes * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update StateHolderTest.java * Update AppConfigurationRefreshUtil.java * Update AppConfigurationRefreshUtil.java * Update sdk/spring/spring-cloud-azure-appconfiguration-config/src/main/java/com/azure/spring/cloud/appconfiguration/config/implementation/StateHolder.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update AzureAppConfigBootstrapRegistrar.java * Update AppConfigurationRefreshUtilTest.java * Update ConnectionManager.java * Update AppConfigurationRefreshUtilTest.java * fixing after merge * Update AppConfigurationRefreshUtilTest.java * fixing tests * fixing merge issue * Update RecurrenceEvaluator.java * Update RecurrenceEvaluator.java * better fix * new fix * Update AppConfigurationWatchAutoConfiguration.java * Update AppConfigurationPullRefresh.java * Update AppConfigurationPullRefresh.java --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> (cherry picked from commit dcd90d0) * Fixing Load Balancing shuffle (#48274) * Fixing Load Balancing shuffle * Update ConnectionManager.java * Update ConnectionManager.java (cherry picked from commit bb97593) * Bug 47910.count query text block (#47911) * RED: isCountQuery() should return true for queries in text blocks * GREEN: isCountQuery() should return true for queries in text blocks * RED: isSumQuery() should return true for sum query in java text block * GREEN: isSumQuery() should return true for sum query in java text block --------- Co-authored-by: Kushagra Thapar <kuthapar@microsoft.com> (cherry picked from commit d3f381d) * Fix flaky AddressRepositoryIT tests due to non-deterministic ordering and ambiguous IDs (#48071) * Initial plan * Fix flaky AddressRepositoryIT tests - order-sensitive assertions and ambiguous findById Co-authored-by: kushagraThapar <14034156+kushagraThapar@users.noreply.github.com> * Remove unused TEST_ADDRESS_TEMP variables from testFindAllByStreetNotNull and testCountByStreetNotNull Co-authored-by: kushagraThapar <14034156+kushagraThapar@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: kushagraThapar <14034156+kushagraThapar@users.noreply.github.com> Co-authored-by: Rujun Chen <rujche@microsoft.com> (cherry picked from commit 6cf1688) * Startup Bug Fixes (#48278) * Startup Bug Fixes * Update README.md * Update AppConfigurationProperties.java --------- Co-authored-by: Nishant Routray <nroutray@microsoft.com> (cherry picked from commit 35d4a6c) * Daylight saving time fix (#48363) * Daylight saving time fix * dst tests * test updates * Update RecurrenceEvaluator.java * test update * Update RecurrenceValidatorDSTTest.java * copilot comments * Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> (cherry picked from commit c57f2d2) * update changelog * update changelog * update changelog * fix * sync eng/pipelines * sync eng/common --------- Co-authored-by: Copilot <198982749+copilot@users.noreply.github.com> Co-authored-by: Matthew Metcalf <mrm9084@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Eldert Grootenboer <eldert@eldert.net> Co-authored-by: Jason Bodnar <jason.bodnar@blackbaud.com> Co-authored-by: Kushagra Thapar <kuthapar@microsoft.com> Co-authored-by: kushagraThapar <14034156+kushagraThapar@users.noreply.github.com> Co-authored-by: Rujun Chen <rujche@microsoft.com>
Description
Fixes an issue where timezone info doesn't work around Daylight Savings time for the recurring time filter.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines