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

Documentation for testing PubSub needs quotes changing #49

Open
jervine-gogo opened this issue Jan 16, 2020 · 0 comments
Open

Documentation for testing PubSub needs quotes changing #49

jervine-gogo opened this issue Jan 16, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@jervine-gogo
Copy link

Describe the bug

The documentation for testing the Pub/Sub needs to be updated. The example:
gcloud pubsub topics publish stop-instance-event --project --message "{"command":"stop"}"

This is referring to an older topic name used (stop-instance-event) and should be changed to 'instance-scheduler-event'. The command also use double quotes to wrap the message and double quotes to wrap the JSON components. This causes syntax errors on the Cloud Function. The outer set of double quotes can be replaced with single quotes to resolve this.

Stacktrace Copy

Message[[123 99 111 109 109 97 110 100 58 115 116 111 112 125]] ... Could not decode subscribing data: invalid character 'c' looking for beginning of object key string

To Reproduce

Deploy the Cloud Function as described and try to push the PubSub message as per the documentation.

Expected behaviour

The PubSub message should be sent and the function triggered.

Known workaround

Rename the function used in the pubsub command, and replace outer double quotes with single quotes.

Additional context

Add any other context about the problem here.

@jervine-gogo jervine-gogo added the bug Something isn't working label Jan 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant