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 #17344

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 #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 (hashicorp#10016)

[upstream:6aba2a9bda474112d1d59bf0b8e7b627afb2ee7a]

Signed-off-by: Modular Magician <magic-modules@google.com>
@modular-magician modular-magician merged commit 938a8d9 into hashicorp:main Feb 21, 2024
4 checks passed
SarahFrench pushed a commit that referenced this pull request Mar 1, 2024
…ovider (#10016) (#17344)

[upstream:6aba2a9bda474112d1d59bf0b8e7b627afb2ee7a]

Signed-off-by: Modular Magician <magic-modules@google.com>
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

google_dataflow_flex_template_job - Error: The terraform-provider-google-beta_v5.12.0_x5 plugin crashed!
1 participant