Cannot terraform a Notion source using a start_date with zero fractional seconds
chandlerprall opened this issue · 2 comments
Notion's start_date
parameter is validated by validators.IsRFC3339()
, allowing the fractional seconds representation (.###
) to be omitted. When configuring a Notion resource via airbyte_source_notion , if I specify the start date in any format with zero fractional seconds,
2023-01-01T00:00:00.000Z
(explicit 0 fractional seconds)
2023-01-01T00:00:00Z
(no fractional seconds)
the API request errors with
│ {"type":"https://reference.airbyte.com/reference/errors#unprocessable-entity","title":"unprocessable-entity","status":422,"detail":"The
│ provided configuration does not fulfill the specification. Errors: json schema validation failed when comparing the data to
│ the json schema. \nErrors: $.start_date: does not match the regex pattern
│ ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}Z$ "}
In the case of explicit 0 seconds, whatever is processing/formatting data for the request is dropping the fractional seconds:
terraform plan
# airbyte_source_notion.notion will be created
+ resource "airbyte_source_notion" "notion" {
+ configuration = {
+ credentials = {
+ source_notion_authenticate_using_access_token = {
+ auth_type = "token"
+ token = (sensitive value)
}
}
+ source_type = "notion"
+ start_date = "2023-01-01T00:00:00.000Z"
}
+ name = "My Notion Source"
+ source_id = (known after apply)
+ source_type = (known after apply)
+ workspace_id = (sensitive value)
}
request body
{
"configuration": {
"credentials": {
"auth_type": "token",
"token": "..."
},
"sourceType": "notion",
"start_date": "2023-01-01T00:00:00Z"
},
"name": "My Notion Source",
"workspaceId": "..."
}
Specifying any other valid value of fractional seconds has worked for me. Likely worth noting the UI for creation a Notion source requires the fractional seconds, even when it's all 0
s.
Having the same issue with Aircall source using provider 0.4.1
.
Same with S3 source using provider 0.4.1