Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google cloud platform 源存储库无法在发布/订阅上发布消息_Google Cloud Platform_Google Cloud Pubsub_Google Source Repositories - Fatal编程技术网

Google cloud platform 源存储库无法在发布/订阅上发布消息

Google cloud platform 源存储库无法在发布/订阅上发布消息,google-cloud-platform,google-cloud-pubsub,google-source-repositories,Google Cloud Platform,Google Cloud Pubsub,Google Source Repositories,为了将我的存储库集成到pubsub,我遵循了下面的链接。 但是,我的存储库无法发布pubsub消息。 以下是我的存储库的描述: $ gcloud beta source repos describe test name: projects/[my-project-id]/repos/test pubsubConfigs: projects/[my-project-id]/topics/test: messageFormat: JSON serviceAccountEmail

为了将我的存储库集成到pubsub,我遵循了下面的链接。

但是,我的存储库无法发布pubsub消息。 以下是我的存储库的描述:

$ gcloud beta source repos describe test
name: projects/[my-project-id]/repos/test
pubsubConfigs:
  projects/[my-project-id]/topics/test:
    messageFormat: JSON
    serviceAccountEmail: xxx-compute@developer.gserviceaccount.com
    topic: projects/[my-project-id]/topics/test
size: '2425'
url: https://source.developers.google.com/p/[my-project-id]/r/test
主题“测试”具有名为“测试订阅”的订阅

$ gcloud pubsub subscriptions describe test-subscription
ackDeadlineSeconds: 10
expirationPolicy:
  ttl: 2678400s
messageRetentionDuration: 604800s
name: projects/[my-project-id]/subscriptions/test-subscription
pushConfig: {}
topic: projects/[my-project-id]/topics/test
因此,我尝试在推动新的更改后提取消息。但是,没有来自源存储库的消息。
我怎么了?我还能做什么?请帮助我。

我复制了你的场景,它对我有效,可能是暂时的问题。 当您跟踪它时,它似乎处于测试状态

是我遵循的教程,但唯一的区别是我使用的gcloud命令没有“beta”参数:

i、 e

而不是

gcloud beta source repos update hello-world --add-topic=csr-test

以下是PublicFig的参考

我在尝试验证云源存储库发布的主题更改时遇到了相同的问题。问题是我需要pull命令中订阅的全名:

gcloud pubsub subscriptions pull projects/[my-project-id]/subscriptions/test-subscription

仅使用
测试订阅的基本ID,但这似乎不可靠。

运行
gcloud alpha pubsub-topics Description test
时,您看到了什么?它只显示了topicok的名称,我不知道可能出了什么问题。看看这里:谢谢,但我不能用文件解决这个问题。我的主题在云控制台上使用时发布得很好。但只有源repos不发布消息。
gcloud pubsub subscriptions pull projects/[my-project-id]/subscriptions/test-subscription