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

Move the `Init*` functions to their respective packages #2228

Merged
merged 7 commits into from Jun 12, 2019

Conversation

2 participants
@chrisgilmerproj
Copy link
Contributor

commented Jun 4, 2019

Description

Infra wants to use github.com/transcom/mymove/pkg/cli in the ppp-infra repo. However many of the Init* functions imported from github.com/transcom/mymove/models indirectly which meant a dependency on github.com/transcom/mymove/pkg/gen/internalmessages which is generated code from swagger. You can verify this by looking at the imports:

go list -f '{{ join .Imports "\n"}}'  github.com/transcom/mymove/pkg/auth/authentication
go: finding github.com/transcom/mymove/pkg/gen/internalmessages latest
go: finding github.com/transcom/mymove/pkg/gen latest
go: finding github.com/transcom/mymove/pkg latest
go: finding github.com/transcom/mymove latest
context
crypto/sha256
encoding/base64
encoding/hex
encoding/json
fmt
github.com/dgrijalva/jwt-go
github.com/gobuffalo/pop
github.com/gofrs/uuid
github.com/gorilla/csrf
github.com/honeycombio/beeline-go
github.com/honeycombio/beeline-go/trace
github.com/markbates/goth
github.com/markbates/goth/providers/openidConnect
github.com/pkg/errors
github.com/transcom/mymove/pkg/auth
github.com/transcom/mymove/pkg/models
go.uber.org/zap
html/template
io/ioutil
math/rand
net/http
net/url
reflect
strings
time

So in this PR the Init* functions are moved to their respective packages.

Reviewer Notes

This doesn't move InitHoneycomb and InitDatabase since these don't have analog packages inside milmove. I could move them out but at least the InitDatabase would affect several other binaries.

Setup

This ought to be a no-op so let's verify the tests pass.

Code Review Verification Steps

  • Request review from a member of a different team.

@chrisgilmerproj chrisgilmerproj self-assigned this Jun 4, 2019

@chrisgilmerproj chrisgilmerproj changed the title Cg remove init cli functions Move the `Init*` functions to their respective packages Jun 4, 2019

@chrisgilmerproj chrisgilmerproj marked this pull request as ready for review Jun 4, 2019

@codecov

This comment has been minimized.

Copy link

commented Jun 4, 2019

Codecov Report

Merging #2228 into master will decrease coverage by 0.01%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master    #2228      +/-   ##
==========================================
- Coverage   59.01%   58.99%   -0.01%     
==========================================
  Files         249      250       +1     
  Lines       14051    14029      -22     
==========================================
- Hits         8291     8276      -15     
+ Misses       4761     4755       -6     
+ Partials      999      998       -1
@rdhariwal
Copy link
Contributor

left a comment

LGTM!

@chrisgilmerproj chrisgilmerproj merged commit 10e9613 into master Jun 12, 2019

17 of 19 checks passed

codecov/patch 0% of diff hit (target 59.01%)
Details
codecov/project/go 58.81% (-0.01%) compared to d39ca3b
Details
ci/circleci: acceptance_tests_experimental Your tests passed on CircleCI!
Details
ci/circleci: acceptance_tests_local Your tests passed on CircleCI!
Details
ci/circleci: acceptance_tests_staging Your tests passed on CircleCI!
Details
ci/circleci: build_app Your tests passed on CircleCI!
Details
ci/circleci: build_migrations Your tests passed on CircleCI!
Details
ci/circleci: build_tasks Your tests passed on CircleCI!
Details
ci/circleci: build_tools Your tests passed on CircleCI!
Details
ci/circleci: client_test Your tests passed on CircleCI!
Details
ci/circleci: integration_tests_api Your tests passed on CircleCI!
Details
ci/circleci: integration_tests_mymove Your tests passed on CircleCI!
Details
ci/circleci: integration_tests_office Your tests passed on CircleCI!
Details
ci/circleci: integration_tests_tsp Your tests passed on CircleCI!
Details
ci/circleci: pre_deps_golang Your tests passed on CircleCI!
Details
ci/circleci: pre_deps_yarn Your tests passed on CircleCI!
Details
ci/circleci: pre_test Your tests passed on CircleCI!
Details
ci/circleci: server_test Your tests passed on CircleCI!
Details
ci/circleci: server_test_coverage Your tests passed on CircleCI!
Details

@chrisgilmerproj chrisgilmerproj deleted the cg_remove_init_cli_functions branch Jun 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.