Skip to content
This repository has been archived by the owner on Dec 1, 2022. It is now read-only.

Refactored daemon-scheduler environment and deployment structure. #185

Merged
merged 2 commits into from Mar 13, 2017

Conversation

kylbarnes
Copy link
Contributor

@kylbarnes kylbarnes commented Mar 10, 2017

Summary

Refactored daemon-scheduler environment and deployment structure.

Implementation details

  • Moved environment to daemon-scheduler/pkg/environment
  • Moved types.Deployment to daemon-scheduler/pkg/deployment/types
  • Renamed deployment.Environment to environment.EnvironmentService
  • Renamed deployment.Deployment to deployment.DeploymentService

Testing

  • cluster-state-service binary built locally and unit-tests pass (cd cluster-state-service; make; cd ../)
  • cluster-state-service build in Docker succeeds (cd cluster-state-service; make release; cd ../)
  • daemon-scheduler binary built locally and unit-tests pass (cd daemon-scheduler; make; cd ../)
  • daemon-scheduler build in Docker succeeds (cd daemon-scheduler; make release; cd ../)

New tests cover the changes: no

Description for the changelog

Refactored daemon-scheduler environment and deployment structure.

Licensing

This contribution is under the terms of the Apache 2.0 License: Yes

Before merging

  • daemon-scheduler integration tests pass. Required setup details are listed here.
  • daemon-scheduler end-to-end tests pass. Required setup details are listed here.

@@ -282,7 +283,7 @@ func (suite *APITestSuite) TestDeleteEnvironmentMissingEnvironment() {
assert.Equal(suite.T(), http.StatusNotFound, responseRecorder.Code)
}

func (suite *APITestSuite) assertSame(environment *types.Environment, environmentModel *models.Environment) {
func (suite *APITestSuite) assertSame(environment *environmenttypes.Environment, environmentModel *models.Environment) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't it be environmentTypes? camelCase?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes for variables. No for packages. environmenttypes is a package, not a variable. You'll see we reference package names in all lowercase everywhere.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh I see

Copy link
Contributor

@poojamaiya poojamaiya left a comment

Choose a reason for hiding this comment

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

Minor comment. You can address it in the deployments refactor if you want.

inProgressLock sync.RWMutex
id string
ctx context.Context
environmentService environment.EnvironmentService
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we make this environmentSvc to keep it consistent with deploymentSvc declared below? Or vice versa (use ..Service for both).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup, I'll rename deploymentSvc to deploymentService when I do the deployments refactor.

@kylbarnes kylbarnes changed the title Refactored daemon-scheduler environment structure. Refactored daemon-scheduler environment and deployment structure. Mar 13, 2017
Copy link
Contributor

@poojamaiya poojamaiya left a comment

Choose a reason for hiding this comment

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

lgtm!

@kylbarnes kylbarnes merged commit 22f676d into blox:dev Mar 13, 2017
@kylbarnes kylbarnes deleted the ds_restructure branch March 13, 2017 22:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants