Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Holding for validation

Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,11 @@ resource dataFactory 'Microsoft.DataFactory/factories@2018-06-01' existing = {
recurrence: {
frequency: 'Hour'
interval: 24
startTime: '2023-01-01T01:01:00'
// Data Factory requires a trailing 'Z' on startTime when timeZone resolves to 'UTC' (the
// fallback for regions not in timeZones.bicep's map); a missing 'Z' fails trigger activation
// with InvalidWorkflowTriggerRecurrence. Mapped, non-UTC regions must keep the no-'Z' format
// so they continue scheduling on local wall-clock time.
startTime: timeZones.outputs.Timezone == 'UTC' ? '2023-01-01T01:01:00Z' : '2023-01-01T01:01:00'

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The conditional and the comment are both right, and I like that the second occurrence points back here rather than repeating the rationale.

Non-blocking suggestion: pin this in HubsAdfTriggerTimeZones.Tests.ps1. Its Fallback context already asserts the ?? 'UTC' fallback against the Bicep source, so the natural companion is an assertion that every startTime in these two files carries the Z on the UTC branch and omits it on the other — something to the effect of every startTime: line matching Timezone == 'UTC' ? '<ts>Z' : '<ts>'.

Without it, the invariant lives only in a comment, and 91ce5a5e is the precedent for extending this specific test file so the fix cannot silently regress. If you extend it to the docs/deploy artifacts the way that commit did for the mappings, it also catches the shipped-template drift I raised in the review body.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

nit: Should we update these to 2026? Not sure if there's an issue with a 3-year-old start date. Just a thought. Applies to the other 2 instances as well.

timeZone: timeZones.outputs.Timezone
}
}
Expand All @@ -138,7 +142,8 @@ resource dataFactory 'Microsoft.DataFactory/factories@2018-06-01' existing = {
recurrence: {
frequency: 'Month'
interval: 1
startTime: '2023-01-05T01:11:00'
// See trigger_DailySchedule above for why the 'Z' suffix is conditional on the UTC fallback.
startTime: timeZones.outputs.Timezone == 'UTC' ? '2023-01-05T01:11:00Z' : '2023-01-05T01:11:00'
timeZone: timeZones.outputs.Timezone
schedule: {
monthDays: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,11 @@ resource trigger_DailySchedule 'Microsoft.DataFactory/factories/triggers@2018-06
recurrence: {
frequency: 'Hour'
interval: 24
startTime: '2023-01-01T01:01:00'
// Data Factory requires a trailing 'Z' on startTime when timeZone resolves to 'UTC' (the
// fallback for regions not in timeZones.bicep's map); a missing 'Z' fails trigger activation
// with InvalidWorkflowTriggerRecurrence. Mapped, non-UTC regions must keep the no-'Z' format
// so they continue scheduling on local wall-clock time.
startTime: timeZones.outputs.Timezone == 'UTC' ? '2023-01-01T01:01:00Z' : '2023-01-01T01:01:00'
timeZone: timeZones.outputs.Timezone
}
}
Expand Down