Skip to content

Conversation

@jasonhawkharris
Copy link
Contributor

@jasonhawkharris jasonhawkharris commented May 2, 2023

The src scout utility is a command that helps users manage resources. This PR:

  • adds the scout utility to the CLI
  • adds the resource subcommand, which prints resource allocations for all Sourcegraph services
  • adds unit tests for ResourcesK8s and ResourcesDocker

Test plan

Shipped with unit tests.

- Prints all current resource allocations for each service (CPU, Memory, Storage) to the terminal
- Previously, you could only run `scout` on a k8s deployment
- Now, by specifying the `--docker` flag, you can run against a docker
  deployment
- Added unit tests for ResourcesK8s and ResourcesDocker
Copy link
Contributor

@jdpleiness jdpleiness left a comment

Choose a reason for hiding this comment

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

On first pass this looks good overall. I would revisit the testing setup and whether or not to use mocking or if another approach would work.

jasonhawkharris and others added 12 commits May 2, 2023 12:53
Co-authored-by: Jacob Pleiness <jdpleiness@users.noreply.github.com>
Co-authored-by: Jacob Pleiness <jdpleiness@users.noreply.github.com>
Co-authored-by: Jacob Pleiness <jdpleiness@users.noreply.github.com>
Co-authored-by: Jacob Pleiness <jdpleiness@users.noreply.github.com>
Co-authored-by: Jacob Pleiness <jdpleiness@users.noreply.github.com>
Co-authored-by: Jacob Pleiness <jdpleiness@users.noreply.github.com>
Co-authored-by: Jacob Pleiness <jdpleiness@users.noreply.github.com>
Co-authored-by: Jacob Pleiness <jdpleiness@users.noreply.github.com>
Co-authored-by: Jacob Pleiness <jdpleiness@users.noreply.github.com>
@jasonhawkharris jasonhawkharris requested a review from jdpleiness May 2, 2023 20:19
- change package from resources to resource
- renamed files accordingly
- changed from if statement to switch statement.
- deleted empty README.md
Copy link
Contributor

@jdpleiness jdpleiness left a comment

Choose a reason for hiding this comment

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

Looks like everything as been addressed 🚀

LGTM!

@jasonhawkharris jasonhawkharris merged commit b367736 into main May 16, 2023
@jasonhawkharris jasonhawkharris deleted the jhh/src-resource branch May 16, 2023 13:24
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