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

Failing test(s): ForceNew permadiff: TestAccDocumentAIProcessorDefaultVersion_documentaiDefaultVersionExample #12905

Comments

@melinath
Copy link
Collaborator

melinath commented Oct 28, 2022

Affected Resource(s)

  • google_document_ai_processor_default_version

Failure rate: 100% since 2022-09-13

Impacted tests:

  • TestAccDocumentAIProcessorDefaultVersion_documentaiDefaultVersionExample

Nightly builds:

Message:

# google_document_ai_processor_default_version.processor must be replaced
-/+ resource "google_document_ai_processor_default_version" "processor" {
~ id        = "projects/project-id/locations/us/processors/e79fa191ecd3e06d" -> (known after apply)
~ version   = "projects/123456789/locations/us/processors/e79fa191ecd3e06d/processorVersions/pretrained-ocr-v1.0-2020-09-23" -> "projects/project-id/locations/us/processors/e79fa191ecd3e06d/processorVersions/pretrained-next" # forces replacement
# (1 unchanged attribute hidden)
}
Plan: 1 to add, 0 to change, 1 to destroy.

It looks like the API team started converting the project-id to project-number the morning of Sept. 13th.

@AarshDhokai
Copy link
Contributor

@AarshDhokai
Copy link
Contributor

b/261553942

@melinath
Copy link
Collaborator Author

Could likely resolve this with projectNumberDiffSuppress

@melinath
Copy link
Collaborator Author

melinath commented Feb 15, 2023

projectNumberDiffSuppress is already in use. The issue is actually that pretrained-next is being replaced with pretrained-ocr-v1.0-2020-09-23. This is due to a change in how model versions are managed - that naming scheme is no longer in use. There are now release channels instead, like projects/my-proj/locations/us/processors/my-processor/processorVersions/stable. Using the release channels directly would have the same permadiff behavior observed with pretrained-next.

We should probably suppress the diff, though I think there's a risk that folks will end up in a state where they don't see there's a new version of the release branch available.

We could also consider something like https://registry.terraform.io/providers/hashicorp/google/latest/docs/data-sources/container_engine_versions to allow querying available processor versions. The DocumentAI API only allows listing available versions within a particular processor, so it's convenient that the default version resource is separate - we could have a datasource that reads available versions for the processor and feeds them as input to the default version resource.

@melinath
Copy link
Collaborator Author

There doesn't seem to be a way to determine whether a particular version is rc or stable, so I think it's currently not possible to make a datasource that would spit out the latest stable version.

@github-actions
Copy link

I'm going to lock this issue 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 similar to this, 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 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.