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

Add a make pr target for an easy "do automated checks for PR" command #5670

Merged
merged 2 commits into from
Feb 17, 2024

Conversation

Groxx
Copy link
Contributor

@Groxx Groxx commented Feb 16, 2024

We already have a fair number of quicker and more focused commands, but they can be hard to remember to run / remember when to run.
So now we have one command that should do everything that's reasonably quick: make pr
(it still takes a couple minutes)

I've avoided adding tests to this because tests take quite a lot longer and aren't totally isolated / setup-free,
and tbh I tend to just push tests to CI because it's more comprehensive anyway.
Arguably (quick, stable) unit tests should be included though, and if we can figure out a safe set to run it'd be easy to add.


This same command will also be added to the client repo, as it has similar needs, and if/when we add submodules
there we'll need a make tidy and possibly other things too. Better to standardize on something simple.

Comment on lines 794 to +798
help:
$Q # print help first, so it's visible
$Q # print help and PR first, so they're highly visible
$Q printf "\033[36m%-20s\033[0m %s\n" 'help' 'Prints a help message showing any specially-commented targets'
$Q printf "\033[36m%-20s\033[0m %s\n" 'pr' 'Refresh all code, to ensure your PR can reach tests. Recommended before opening a github PR.'
$Q echo '-----------------------------------'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Resulting output:

❯ make
help                 Prints a help message showing any specially-commented targets
pr                   Refresh all code, to ensure your PR can reach tests.  Recommended before opening a github PR.
-----------------------------------
bins                 Make all binaries
build                Build all packages and all tests (ensures everything compiles)
clean                Clean build products
copyright            update copyright headers
deps                 Check for dependency updates, for things that are directly imported
deps-all             Check for all dependency updates
fmt                  run gofmt / organize imports / etc
go-generate          run go generate to regen mocks, enums, etc
lint                 (re)run the linter
release              Re-generate generated code and run tests
test                 Build and run all tests. This target is for local development. The pipeline is using cover_profile target
tidy                 go mod tidy all packages

@coveralls
Copy link

Pull Request Test Coverage Report for Build 018db42b-2fe7-4cfe-adc6-e9d4466a0c24

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 87 unchanged lines in 18 files lost coverage.
  • Overall coverage decreased (-0.03%) to 62.738%

Files with Coverage Reduction New Missed Lines %
common/peerprovider/ringpopprovider/config.go 2 81.58%
common/persistence/sql/common.go 2 72.73%
common/persistence/sql/sqlplugin/mysql/db.go 2 83.33%
common/persistence/sql/sqlplugin/mysql/task.go 2 73.68%
common/task/weighted_round_robin_task_scheduler.go 2 88.06%
service/history/execution/mutable_state_builder.go 2 68.64%
service/history/execution/mutable_state_util.go 2 37.63%
service/history/task/fetcher.go 2 85.05%
service/matching/db.go 2 73.23%
service/matching/taskListManager.go 2 80.2%
Totals Coverage Status
Change from base Build 018db395-f65a-4639-b990-f699c3ac12b7: -0.03%
Covered Lines: 92617
Relevant Lines: 147626

💛 - Coveralls

Copy link
Contributor

@davidporter-id-au davidporter-id-au left a comment

Choose a reason for hiding this comment

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

nice, appreciated

@Groxx Groxx changed the title Add a make pr target for an easy "do automated checks for PR" commnad Add a make pr target for an easy "do automated checks for PR" command Feb 17, 2024
@Groxx Groxx merged commit f0097a6 into uber:master Feb 17, 2024
16 checks passed
@Groxx Groxx deleted the makepr branch February 17, 2024 05:21
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.

None yet

3 participants