Skip to content

Conversation

@edwardmedia
Copy link
Contributor

@edwardmedia edwardmedia commented Jan 1, 2023

Fixes hashicorp/terraform-provider-google#13307

If this PR is for Terraform, I acknowledge that I have:

  • Searched through the issue tracker for an open issue that this either resolves or contributes to, commented on it to claim it, and written "fixes {url}" or "part of {url}" in this PR description. If there were no relevant open issues, I opened one and commented that I would like to work on it (not necessary for very small changes).
  • Generated Terraform, and ran make test and make lint to ensure it passes unit and linter tests.
  • Ensured that all new fields I added that can be set by a user appear in at least one example (for generated resources) or third_party test (for handwritten resources or update tests).
  • Ran relevant acceptance tests (If the acceptance tests do not yet pass or you are unable to run them, please let your reviewer know).
  • Read the Release Notes Guide before writing my release note below.

Release Note Template for Downstream PRs (will be copied)

datacatalog: fixed the import failure when the `project` is different from the default on `google_data_catalog_taxonomy`

@modular-magician
Copy link
Collaborator

Hello! I am a robot who works on Magic Modules PRs.

I've detected that you're a community contributor. @SarahFrench, a repository maintainer, has been assigned to assist you and help review your changes.

❓ First time contributing? Click here for more details

Your assigned reviewer will help review your code by:

  • Ensuring it's backwards compatible, covers common error cases, etc.
  • Summarizing the change into a user-facing changelog note.
  • Passes tests, either our "VCR" suite, a set of presubmit tests, or with manual test runs.

You can help make sure that review is quick by running local tests and ensuring they're passing in between each push you make to your PR's branch. Also, try to leave a comment with each push you make, as pushes generally don't generate emails.

If your reviewer doesn't get back to you within a week after your most recent change, please feel free to leave a comment on the issue asking them to take a look! In the absence of a dedicated review dashboard most maintainers manage their pending reviews through email, and those will sometimes get lost in their inbox.


@modular-magician
Copy link
Collaborator

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

Diff report

Your PR generated some diffs in downstreams - here they are.

Terraform Beta: Diff ( 1 file changed, 7 insertions(+))

@modular-magician
Copy link
Collaborator

The provider crashed while running the VCR tests in REPLAYING mode
Please fix it to complete your PR
View the build log

@SarahFrench SarahFrench self-assigned this Jan 3, 2023
SarahFrench
SarahFrench previously approved these changes Jan 3, 2023
Copy link
Contributor

@SarahFrench SarahFrench left a comment

Choose a reason for hiding this comment

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

Happy new year! This PR looks good to me, and I like how you've used FindStringSubmatch to get values instead of just splitting the name string by /.

I've included a suggested change for a nit about indentation, but I'll approve as it's not blocking

@SarahFrench SarahFrench self-requested a review January 3, 2023 16:22
@SarahFrench SarahFrench dismissed their stale review January 3, 2023 16:29

Want to check if there's a better approach to do this for generated resources

Copy link
Contributor

@SarahFrench SarahFrench left a comment

Choose a reason for hiding this comment

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

I re-requested myself for review because I learned some more about the parseImportId function from Riley and I wanted to make sure I understood this problem fully.

From my understanding, the import code usually made for generated resources would pull in project names ok, but this resource's names can include slashes so we need to use custom import code, right?

In that case, re-approved!

@modular-magician
Copy link
Collaborator

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

Diff report

Your PR generated some diffs in downstreams - here they are.

Terraform Beta: Diff ( 1 file changed, 7 insertions(+))

@modular-magician
Copy link
Collaborator

The provider crashed while running the VCR tests in REPLAYING mode
Please fix it to complete your PR
View the build log

@edwardmedia
Copy link
Contributor Author

edwardmedia commented Jan 3, 2023

@SarahFrench usually name is short while id is long. In this case, the name is long and no other fields (like project and locations) are available which are needed for building the url for read call. I looked up the attributes and it appears we have to parse the name to obtain the project and the location. Fortunately there is already the import custom code which makes the fix a little easier.

@c2thorn
Copy link
Member

c2thorn commented Jan 3, 2023

This appears to be causing a crash in VCR runs @edwardmedia

melinath added a commit that referenced this pull request Jan 3, 2023
melinath added a commit that referenced this pull request Jan 3, 2023
i-laird pushed a commit to i-laird/magic-modules that referenced this pull request Jan 10, 2023
* retrieve project from the name

* reformat for indentation

Co-authored-by: Edward Sun <[email protected]>
i-laird pushed a commit to i-laird/magic-modules that referenced this pull request Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cannot import google_data_catalog_taxonomy

4 participants