Added Cloud Storage as a PubSub subscription#8517
Conversation
|
Hello! I am a robot. It looks like you are a community contributor. @c2thorn, 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. |
|
I am a little unsure on how to interpret the following fields, as far as I can see Is this assumption correct? https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions#CloudStorageConfig |
That looks like a correct assumption to me. Looks like there is an inner field |
|
not reviewing for now since this is set to draft. If you think it is ready for review, then feel free to message me here or switch the PR to ready |
|
I implemented the field |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are. Terraform GA: Diff ( 3 files changed, 506 insertions(+), 6 deletions(-)) Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_pubsub_subscription" "primary" {
cloud_storage_config {
avro_config {
write_metadata = # value needed
}
filename_prefix = # value needed
filename_suffix = # value needed
max_bytes = # value needed
max_duration = # value needed
text_config {
write_metadata = # value needed
}
}
}
|
Tests analyticsTotal tests: Action takenFound 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccPubsubSubscription_pubsubSubscriptionPushCloudstorageExample |
|
|
|
Please verify that all added fields are somehow included in an example or handwritten test. For the current failing test: |
|
Added additional test coverage for the other fields, and the test failed due to a race condition with creating the subscription resource and the IAM permissions. This should all be fixed now, can we run the tests again? |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are. Terraform GA: Diff ( 3 files changed, 656 insertions(+), 6 deletions(-)) Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_pubsub_subscription" "primary" {
cloud_storage_config {
max_duration = # value needed
text_config {
write_metadata = # value needed
}
}
}
|
Tests analyticsTotal tests: Action takenFound 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccPubsubSubscription_pubsubSubscriptionPushCloudstorageAvroExample|TestAccBigQueryDataTable_bigtable|TestAccPubsubSubscription_pubsubSubscriptionPushCloudstorageExample |
|
Rerun these tests in REPLAYING mode to catch issues
Tests failed due to non-determinism or randomness when the VCR replayed the response after the HTTP request was made. Please fix these to complete your PR. If you believe these test failures to be incorrect or unrelated to your change, or if you have any questions, please raise the concern with your reviewer.
|
seems to be the same error for both |
|
@c2thorn Do you by any chance have any more information? I ran them on my own account and I couldn't repoduce this, I think that either the bucket doesn't exist yet at that point or there is some sort of organisational policy prohibiting me from doing this. Also I don't quite understand why |
Don't have a great answer here, my guess is that the bucket had some eventual consistency? I'm running the test again in a separate build.
Terraform will default to the API's value when not configured, but if it is a settable field, we should have a test attempting to set it. Only a field that is completely output-only would not need a test. |
c2thorn
left a comment
There was a problem hiding this comment.
The avro example failed this time. Posted some suggestions to hopefully fix the consistency
|
I have taken another look at the Looking at the response body of a GET request of this resource it looks like this field has nothing in it. |
|
@DanielRieske assuming that the default value of However, there is no need to implement |
|
committing minor whitespace fix |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are. Terraform GA: Diff ( 3 files changed, 616 insertions(+), 6 deletions(-)) |
Tests analyticsTotal tests: Action takenFound 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccPubsubSubscription_pubsubSubscriptionPushCloudstorageAvroExample|TestAccPubsubSubscription_pubsubSubscriptionPushCloudstorageExample |
|
Rerun these tests in REPLAYING mode to catch issues
Tests failed due to non-determinism or randomness when the VCR replayed the response after the HTTP request was made. Please fix these to complete your PR. If you believe these test failures to be incorrect or unrelated to your change, or if you have any questions, please raise the concern with your reviewer.
|
|
I assume the build failure is because of the same thing as before, at this point the only thing I can try is to use admin rights. I changed them and hopefully this solves the inconsistency between projects. |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are. Terraform GA: Diff ( 3 files changed, 560 insertions(+), 6 deletions(-)) |
Tests analyticsTotal tests: Action takenFound 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccPubsubSubscription_pubsubSubscriptionPushCloudstorageAvroExample|TestAccPubsubSubscription_pubsubSubscriptionPushCloudstorageExample |
|
Rerun these tests in REPLAYING mode to catch issues$\textcolor{green}{\textsf{All tests passed!}} |
If this PR is for Terraform, I acknowledge that I have:
make testandmake lintin the generated providers to ensure it passes unit and linter tests.Release Note Template for Downstream PRs (will be copied)
Closes: hashicorp/terraform-provider-google#15352