Skip to content

Touch up features endpoint #748

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

Merged

Conversation

drew-gross
Copy link
Contributor

As discussed, remove unused stuff and disable config and logs endpoint. Also this updates the format of the logs featureset to account for the new parameters :)

@facebook-github-bot
Copy link

@drew-gross updated the pull request.

@nlutsenko
Copy link
Contributor

@drew-gross Be aware - I changed few things in #747 - it uses a slightly different logic for FeaturesRouter. Shouldn't impact this big time though.

return Promise.resolve({
response: {
results: [getFeatures()]
results: getFeatures()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need results here as another nester layer?
It's going to surface in the response as { results: { push: .... } }.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Results is standard across almost all our endpoints

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also suppose there were a feature named message and another named code, it would be impossible to determine success vs. failure

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but not for a single object, and only in case where there could be more than a single result.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is more important in eg. /schemas where you could legitimately create a class named code and another named message

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we do result:{} or features:{} in this case? results doesn't really surface the truth about what you get back.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In regards to code/message - we shouldn't be relying on keys in the body for success/failure, but on http status code. If >=400 - then the request failed and any info in the body is describing the error.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eh, if we are not going to follow the standard exactly I would rather go back to just using a raw object with no nested layer.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Raw object without a nested layer - sounds great.
I am not sure whether results is a standard at this point, since it's used roughly for 2 endpoints only. Queries and schema. :)

@drew-gross drew-gross force-pushed the touch-up-features-endpoint branch from 8c04c67 to 364c7de Compare March 2, 2016 06:53
@facebook-github-bot
Copy link

@drew-gross updated the pull request.

@drew-gross
Copy link
Contributor Author

Woooo now the dashboard can see the parse server version

@facebook-github-bot
Copy link

@drew-gross updated the pull request.

@peterdotjs
Copy link
Contributor

nice! I thought you wanted to send it as results though?

@@ -106,11 +106,11 @@ function ParseServer({
passwordResetSuccess: undefined
},
}) {

setFeature('serverVersion', parseServerPackage.version);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about we use a metadata field to hold the version info. it feels odd to treat it as a feature like the others

id like the payload to be something like:

{ 
  metadata: {}
  features: {}
}

its prob out of scope so i can make the changes in a later pr

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this idea. I will do that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then we can include things like installed packages, adapters and their version, and so on

@drew-gross
Copy link
Contributor Author

@peterdotjs my and @nlutsenko went back and forth in comments that GitHub has now hidden and landed on no results.

@peterdotjs
Copy link
Contributor

lgtm. let me know about your thoughts on having metadata.

@facebook-github-bot
Copy link

@drew-gross updated the pull request.

1 similar comment
@facebook-github-bot
Copy link

@drew-gross updated the pull request.

@drew-gross drew-gross force-pushed the touch-up-features-endpoint branch from 6f05c90 to a56fe0f Compare March 3, 2016 00:16
@facebook-github-bot
Copy link

@drew-gross updated the pull request.

drew-gross added a commit that referenced this pull request Mar 3, 2016
@drew-gross drew-gross merged commit d70e87f into parse-community:master Mar 3, 2016
@drew-gross drew-gross deleted the touch-up-features-endpoint branch April 5, 2016 21:52
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.

4 participants