Skip to content

[PubSub emulator] Do not create topics/subs when container is being reused #1951

@MV-GH

Description

@MV-GH

When a pubsub container is reused do not recreate the topcis/subs.

Example currently:

10:28:18.781 [main] INFO  tc.google/cloud-sdk:480.0.0 - Creating container for image: google/cloud-sdk:480.0.0
10:28:18.792 [main] INFO  tc.google/cloud-sdk:480.0.0 - Reusing container with ID: b0784998c0122fb53b74ae84713783ad70600d93fea0f947c9504a0dc2de99fc and hash: 9b3a19d9b99111f60c840682a3987e6df7a1923f
10:28:18.792 [main] INFO  tc.google/cloud-sdk:480.0.0 - Reusing existing container (b0784998c0122fb53b74ae84713783ad70600d93fea0f947c9504a0dc2de99fc) and not creating a new one
10:28:18.812 [main] INFO  tc.google/cloud-sdk:480.0.0 - Container google/cloud-sdk:480.0.0 started in PT0.0315963S
10:28:18.817 [main] INFO  c.p.t.p.EmbeddedPubsubBootstrapConfiguration - google/cloud-sdk:480.0.0 build 2024-06-18T12:38:36+02:00 (3 weeks ago) startup time is 0 seconds
10:28:18.817 [main] INFO  c.p.t.p.EmbeddedPubsubBootstrapConfiguration - Started Google Cloud Pubsub emulator. Connection details: {embedded.google.pubsub.port=64888, embedded.google.pubsub.host=localhost, embedded.google.pubsub.project-id=machine-configuration-integration-tests, embedded.google.pubsub.networkAlias=googlepubsub.testcontainer.docker, embedded.google.pubsub.internalPort=8089}, 
10:28:18.817 [main] INFO  c.p.t.p.EmbeddedPubsubBootstrapConfiguration - Consult with the doc https://cloud.google.com/pubsub/docs/emulator for more details
10:28:18.820 [main] INFO  c.p.t.p.PubSubResourcesGenerator - Creating topics and subscriptions.
10:28:18.820 [main] INFO  c.p.t.p.PubSubResourcesGenerator - Creating topic: projects/biz-integration-tests/topics/device-update-trigger
10:28:18.836 [main] INFO  c.p.t.p.PubSubResourcesGenerator - Creating subscription: projects/biz-integration-tests/subscriptions/machine-configuration-device-update-trigger
10:28:18.841 [main] INFO  c.p.t.p.PubSubResourcesGenerator - Creating topic: projects/biz-integration-tests/topics/asset-config-changes-trigger
10:28:18.845 [main] INFO  c.p.t.p.PubSubResourcesGenerator - Creating subscription: projects/biz-integration-tests/subscriptions/pss-biz--biz--asset-config-changes-trigger
10:28:18.850 [main] INFO  c.p.t.p.PubSubResourcesGenerator - Creating topic: projects/biz-integration-tests/topics/device.configuration.updates
10:28:18.855 [main] INFO  c.p.t.p.PubSubResourcesGenerator - Creating subscription: projects/biz-integration-tests/subscriptions/biz-device-update-subscription
10:28:18.859 [main] INFO  c.p.t.p.PubSubResourcesGenerator - Creating topic: projects/biz-integration-tests/topics/device.created
10:28:18.863 [main] INFO  c.p.t.p.PubSubResourcesGenerator - Creating subscription: projects/biz-integration-tests/subscriptions/biz-test
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions