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

Management Console bootstrap.go Code Understanding and Improvement #464

Closed
galenatjpl opened this issue Aug 20, 2024 · 2 comments · May be fixed by unity-sds/unity-management-console#34
Closed
Assignees
Labels

Comments

@galenatjpl
Copy link
Collaborator

galenatjpl commented Aug 20, 2024

Do the following, to improve the understanding of the code:

  1. https://github.com/unity-sds/unity-management-console/blob/main/backend/internal/processes/bootstrap.go Comment what each section does in the func BootstrapEnv. Put comment above the following lines:
        store, err := database.NewGormDatastore()
	err = provisionS3(appconf)
	err = storeDefaultSSMParameters(appconf, store)
	err = initTerraform(store, appconf)
	err = installGateway(store, appconf)
	err = installHealthStatusLambda(store, appconf)
	err = installBasicAPIGateway(store, appconf)
	err = store.AddToAudit(application.Bootstrap_Successful, "test")

These comment should describe what the side effects of each of these sections do.

  1. Also add comments to the functions themselves (that are called above).

  2. Improve the naming of the installGateway and installBasicAPIGateway functions. Really the first one, is the unity-proxy, and it is confusing with the concept of API Gateway.

  3. There is this commented out code:

	//r := action.ActRunnerImpl{}
	//err = UpdateCoreConfig(appconf, store, nil, "")
	//if err != nil {
	//	log.WithError(err).Error("Problem updating ssm config")
	//}

The UpdateCoreConfig function doesn't seem to exist in bootstrap.go, but instead exists in https://github.com/unity-sds/unity-management-console/blob/main/backend/internal/processes/coreconfig.go. Comment this line. We will probably want to make a call to this in the near future.

@galenatjpl galenatjpl converted this from a draft issue Aug 20, 2024
@galenatjpl galenatjpl changed the title Management Console Code Understanding and Improvement Management Console bootstrap.go Code Understanding and Improvement Aug 20, 2024
@galenatjpl galenatjpl assigned hargitayjpl and unassigned jdrodjpl Sep 4, 2024
@galenatjpl galenatjpl moved this to In Progress in Unity Project Board Sep 4, 2024
@galenatjpl
Copy link
Collaborator Author

Moving assignment of this ticket to @hargitayjpl , since he will be working on #470 as well, which is touching the same code.

@galenatjpl
Copy link
Collaborator Author

@jdrodjpl heads-up about ticket reassignment, see comment above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants