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: speed up netlify status by removing extra api call #6181

Merged
merged 1 commit into from
Nov 16, 2023

Conversation

sarahetter
Copy link
Contributor

🎉 Thanks for submitting a pull request! 🎉

Summary

Removes a second run of getSite from the netlify status command as we already have that data when base-command runs first.

This makes this command a bit faster at the cost of losing errors based on error code (401, 404) but I think this a reasonable tradeoff.

Before After
Between 3.6 and 5.1 seconds Screenshot 2023-11-16 at 5 22 42 PM Between 3.2 and 3.7 seconds Screenshot 2023-11-16 at 5 23 39 PM

For us to review and ship your PR efficiently, please perform the following steps:

  • Open a bug/issue before writing your code 🧑‍💻. This ensures we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing a typo or something that`s on fire 🔥 (e.g. incident related), you can skip this step.
  • Read the contribution guidelines 📖. This ensures your code follows our style guide and
    passes our tests.
  • Update or add tests (if any source code was changed or added) 🧪
  • Update or add documentation (if features were changed or added) 📝
  • Make sure the status checks below are successful ✅

A picture of a cute animal (not mandatory, but encouraged)

@sarahetter sarahetter requested a review from a team as a code owner November 16, 2023 22:27
Copy link

📊 Benchmark results

Comparing with f1b4f05

  • Dependency count: 1,396 (no change)
  • Package size: 404 MB ⬇️ 0.00% decrease vs. f1b4f05

@sarahetter sarahetter changed the title feat: remove extra run of .getSite from status as it happens in base-command feat: speed up netlify status by removing extra api call Nov 16, 2023
Copy link
Member

@eduardoboucas eduardoboucas left a comment

Choose a reason for hiding this comment

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

Nice!

@sarahetter sarahetter added the automerge Add to Kodiak auto merge queue label Nov 16, 2023
@kodiakhq kodiakhq bot merged commit 7ab484b into main Nov 16, 2023
35 checks passed
@kodiakhq kodiakhq bot deleted the sarahetter/status branch November 16, 2023 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Add to Kodiak auto merge queue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants