Support enforceInTransit field in PubSubTopic MessageStoragePolicy - #9700
Conversation
|
@maqiuyujoyce I think this works - adding to both controllers (I've just reassigned back to codebot-robot to regenerate the clients, I'm assuming). Mind taking a look with me (I did cross-check against the terraform code, but I'm not sure I'm much more competent than the AI here 😂 ) |
6d83908 to
cb34f8c
Compare
|
We have a unit test failure: |
cb34f8c to
857f933
Compare
maqiuyujoyce
left a comment
There was a problem hiding this comment.
@maqiuyujoyce I think this works - adding to both controllers (I've just reassigned back to codebot-robot to regenerate the clients, I'm assuming). Mind taking a look with me (I did cross-check against the terraform code, but I'm not sure I'm much more competent than the AI here 😂 )
Yep, it looks good! A bit concerned about the real GCP test, but for a PubSubTopic, I think we can start with it and see how it goes.
/lgtm
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: maqiuyujoyce The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Yeah, we can see! We know that the GCP and Direct controllers behave the same way based on the logs, against mockgcp. When we run against realgcp we'll find out whether our mockgcp is accurate. Another argument for a release branch :-) |
be3df83
This PR adds support for the
enforceInTransitparameter undermessageStoragePolicyin thePubSubTopicCRD (pubsubtopics.pubsub.cnrm.cloud.google.com).Changes
resource_pubsub_topic.go) to addenforce_in_transitto themessage_storage_policyschema, including its expander/flattener mapping helpers.EnforceInTransit *boolfield under theMessageStoragePolicystruct inapis/pubsub/v1beta1/topic_types.go.EnforceInTransittopkg/controller/direct/pubsub/topic_mapper.go..message_storage_policy.enforce_in_transitto aSpecFieldinpkg/controller/direct/pubsub/topic_fuzzer.go.pubsubtopicto configureenforceInTransit: trueduring creation andenforceInTransit: falseduring update to verify correct handling in both states.Fixes #9649