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

feat(gatsby-plugin-benchmark-reporting): Add more fields to the report #21973

Merged
merged 3 commits into from
Mar 6, 2020

Conversation

abhiaiyer91
Copy link
Contributor

@abhiaiyer91 abhiaiyer91 commented Mar 4, 2020

Description

Add some data sent to the reporting url via pluginOptions / env

Documentation

These values are used internally so I didnt add them to the docs

@abhiaiyer91 abhiaiyer91 requested a review from a team as a code owner March 4, 2020 22:31
@abhiaiyer91 abhiaiyer91 changed the title <!-- Have any questions? Check out the contributing docs at https://gatsby.dev/contribute, or ask in this Pull Request and a Gatsby maintainer will be happy to help :) --> Modify Benchmark Plugin to send some values from pluginOptions and environment Mar 4, 2020
@abhiaiyer91 abhiaiyer91 requested a review from pvdz March 4, 2020 22:32
pvdz
pvdz previously approved these changes Mar 5, 2020
Copy link
Contributor

@pvdz pvdz left a comment

Choose a reason for hiding this comment

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

Yeah good for me.

I would probably not set any defaults at all. The build type in particular might be misleading later. Better not to have any value at all. The other values, I think an empty value is the same as 'unknown' so feels a bit redundant. Fine with me either way :)

contentSource: this.pluginOptions.contentSource || `Unknown`,
siteType: this.pluginOptions.siteType || `Unknown`,
repoName: this.pluginOptions.repoName || `Unknown`,
buildType: process.env.BENCHMARK_BUILD_TYPE || `COLD_START`,
Copy link
Contributor

Choose a reason for hiding this comment

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

I wouldn't set a default at all tbh. Might be misleading.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will do!

@pvdz pvdz changed the title Modify Benchmark Plugin to send some values from pluginOptions and environment feat(gatsby-plugin-benchmark-reporting): Add more fields to the report Mar 5, 2020
@abhiaiyer91
Copy link
Contributor Author

@pvdz Changed to no defaults and added support for build hook payload https://docs.netlify.com/configure-builds/build-hooks/#payload. For netlify CI we can decorate the report by passing env vars through this INCOMING_HOOK_BODY

Copy link
Contributor

@pvdz pvdz left a comment

Choose a reason for hiding this comment

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

yay

@pvdz pvdz merged commit f28272b into master Mar 6, 2020
@gatsbot
Copy link

gatsbot bot commented Mar 6, 2020

Holy buckets, @abhiaiyer91 — we just merged your PR to Gatsby! 💪💜

Gatsby is built by awesome people like you. Let us say “thanks” in two ways:

  1. We’d like to send you some Gatsby swag. As a token of our appreciation, you can go to the Gatsby Swag Store and log in with your GitHub account to get a coupon code good for one free piece of swag. We’ve got Gatsby t-shirts, stickers, hats, scrunchies, and much more. (You can also unlock even more free swag with 5 contributions — wink wink nudge nudge.) See gatsby.dev/swag for details.
  2. We just invited you to join the Gatsby organization on GitHub. This will add you to our team of maintainers. Accept the invite by visiting https://github.com/orgs/gatsbyjs/invitation. By joining the team, you’ll be able to label issues, review pull requests, and merge approved pull requests.

If there’s anything we can do to help, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’.

Thanks again!

@delete-merged-branch delete-merged-branch bot deleted the benchmarkAdditionalInfo branch March 6, 2020 12:28
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.

2 participants