azure-sdk-for-java icon indicating copy to clipboard operation
azure-sdk-for-java copied to clipboard

App Configuration: recurring time window filter

Open ivywei0125 opened this issue 1 year ago • 1 comments

Add "Recurrence" parameter for TimeWindowFilter using Outlook-style schema: https://learn.microsoft.com/en-us/graph/outlook-schedule-recurring-events#using-patterns-and-ranges-to-create-recurring-events

Example:

feature-management:
  feature-flags:
    feature-v:
      enabled-for:
        -
         name: TimeWindowFilter
          parameters:
            start: "Fri, 22 Mar 2024 20:00:00 GMT",
            end: "Mon, 01 July 2019 00:00:00 GMT",
            recurrence:
              pattern:
                type: "Daily",
                interval: 1
              range:
                type: "NoEnd"

The main logic of how to check whether current time is within any recurring time window: Find the previous occurrence of the recurring time window, let's call it prevOccurrenceStart Check whether the current time: time is within the time window: prevOccurrenceStart ~ prevOccurrenceStart + End - Start

ivywei0125 avatar May 09 '24 12:05 ivywei0125

API change check

APIView has identified API level changes in this PR and created following API reviews.

com.azure.spring:spring-cloud-azure-feature-management

azure-sdk avatar May 09 '24 13:05 azure-sdk