Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add check for Environment proto field before accessing in Dataflow provider #6999

Conversation

modular-magician
Copy link
Collaborator

Adds an extra check to the Dataflow provider when accessing job proto fields; an edge case existed where the Environment proto field is nil, causing a nil-pointer exception when accessing sub-fields rather than an error that can be returned up the call stack. Checking for existence and bubbling an error up should eliminate that issue.

Validated the code change is propagated to the generated repos following https://googlecloudplatform.github.io/magic-modules/get-started/generate-providers/, also passed linting + unit tests + dataflow acceptance tests

Fixes hashicorp/terraform-provider-google#17046

Release Note Template for Downstream PRs (will be copied)

dataflow: fixes potential nil-pointer error if a job's Environment field is nil when reading job information in `google_dataflow_job`

Derived from GoogleCloudPlatform/magic-modules#10016

…ovider (#10016)

[upstream:6aba2a9bda474112d1d59bf0b8e7b627afb2ee7a]

Signed-off-by: Modular Magician <magic-modules@google.com>
@modular-magician modular-magician merged commit 7eb7543 into hashicorp:main Feb 21, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant