Skip to content

Conversation

@jwngr
Copy link

@jwngr jwngr commented Mar 13, 2017

The resourceState property is in the payload, just not in the type information.

@katfang - Can you confirm that the type should be string (meaning it will always be there) and not string? (meaning it is optional)?

It is in the payload, just not in the type information.
@katfang
Copy link

katfang commented Mar 13, 2017

Huh, well, that's an interesting question.

Right now, we want string.

But the eventual goal is to have different event types, and drop resourceState. This'll happen when we move onto GCS Pubsub. How terrible would it be to change it to string? when we introduce the new event types? (Where down the line does this come?

@jwngr
Copy link
Author

jwngr commented Mar 13, 2017

How terrible would it be to change it to string? when we introduce the new event types?

Since this is now a public API and people are using it, we can't just change its behavior until the next breaking change. We can introduce a new property which can be used instead and deprecate resourceState, but we will need to backfill resourceState until we cut a new major version, else may break people's existing Cloud Functions.

It sounds like the string typing is correct for this property. I've also already added this property to our public reference docs here.

@jwngr jwngr merged commit e9efdd3 into master Mar 13, 2017
@jwngr jwngr deleted the jw-resource-state branch March 13, 2017 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants