Skip to content

Fix dataFreshness default value (b/460810505)#18292

Open
yair-harel wants to merge 2 commits into
GoogleCloudPlatform:mainfrom
yair-harel:fix-b-460810505-datafreshness
Open

Fix dataFreshness default value (b/460810505)#18292
yair-harel wants to merge 2 commits into
GoogleCloudPlatform:mainfrom
yair-harel:fix-b-460810505-datafreshness

Conversation

@yair-harel

Copy link
Copy Markdown

Fixes b/460810505

This PR adds a default value of 900s to the data_freshness field on google_datastream_stream to prevent validation errors during stream creation when the field is omitted.

Self-Review Checklist

Based on Magic Modules PR Review Guidelines

  • PR Description & Context: The PR description is clear, establishes context, and links to the internal bug that this change addresses.
  • No Duplicate Resources: N/A (Modifying an existing resource).
  • Schema Matches API: The default value for data_freshness aligns with the Datastream API structure and expectations.
  • Correct Versioning: The change applies to the correct provider versions.
  • No Unjustified Breaking Changes: Adding a default value gracefully resolves the validation error; it is a backwards-compatible change.
  • Linked Issue Resolved: The added default value fully resolves the Datastream validation failure (b/460810505).
  • Test Coverage: Existing tests will transparently cover this default initialization. No new mutable fields are introduced that require separate tests.

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

datastream: set default value of `900s` for `data_freshness` field in `google_datastream_stream` to prevent validation errors

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Jul 15, 2026
@github-actions
github-actions Bot requested a review from BBBmau July 15, 2026 07:27
@github-actions

Copy link
Copy Markdown

Googlers: For automatic test runs see go/terraform-auto-test-runs.

@BBBmau, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look.

You can help make sure that review is quick by doing a self-review and by running impacted tests locally.

@modular-magician modular-magician added service/datastream and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Jul 16, 2026
@modular-magician

modular-magician commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes for commit d3efc5a:

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 1 file changed, 1 insertion(+)
google-beta provider View Diff 1 file changed, 1 insertion(+)
terraform-google-conversion View Diff 2 files changed, 1 insertion(+), 6 deletions(-)

Breaking Change(s) Detected

The following breaking change(s) were detected within your pull request.

  • Field destination_config.bigquery_destination_config.data_freshness default value changed from <nil> to 900s on google_datastream_stream - reference

If you believe this detection to be incorrect please raise the concern with your reviewer.
If you intend to make this change you will need to wait for a major release window.
An override-breaking-change label can be added to allow merging.

Test report

Analytics

Total Tests Passed Skipped Affected
20 10 10 0
Affected Service Packages
  • datastream

Learn how VCR tests work


Step 1: Replaying Mode

🟢 All tests passed in Replaying mode! No Recording was needed.

View the replaying VCR build log

@yair-harel VCR tests complete for d3efc5a!

@BBBmau BBBmau left a comment

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.

can you provide more information regarding the validation error? from a quick review it seems that the default value for data_freshness should be zero

Data freshness: The time difference between when data is written to the source and when Datastream reads the event from the source. It is calculated as the time elapsed between the source timestamp and the read timestamp for the oldest event being processed. If there are no new events to read from the source, the freshness is set to 0.

Seems like the 900s value was obtained based off of examples but doesn't quite support the idea that the default value should be 900s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants