Skip to content

feat: create, require and read env variables for MONO_REPO_PATH, SERVICE_CONFIG_PATH, INTER_CONTAINER_VARS_PATH#4561

Merged
sofisl merged 6 commits into
mainfrom
addEnvVariablesBootstrapper
Oct 12, 2022
Merged

feat: create, require and read env variables for MONO_REPO_PATH, SERVICE_CONFIG_PATH, INTER_CONTAINER_VARS_PATH#4561
sofisl merged 6 commits into
mainfrom
addEnvVariablesBootstrapper

Conversation

@sofisl

@sofisl sofisl commented Oct 11, 2022

Copy link
Copy Markdown
Contributor

This feature corresponds to the work in the internal doc,Design Doc: Providing API-specific information in owlbot-bootstrapper. We've agreed to store the paths in env variables as opposed to constants.

There's a small refactor in this PR as well that corresponds to the env variables. I separated out a writeToWellKnownFile function so that it corresponds to the environment variable that you want to write to, instead of being hidden in an openABranch function. This makes the env variable more obvious as to where it's being used.

@chingor13 chingor13 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This PR mostly looks fine, but it doesn't match the PR title/description. I don't see handling for env variables (I see CLI arguments being read/required).

@sofisl sofisl changed the title feat: create env variables for MONO_REPO_PATH, SERVICE_CONFIG_PATH, INTER_CONTAINER_VARS_PATH feat: require and read env variables for MONO_REPO_PATH, SERVICE_CONFIG_PATH, INTER_CONTAINER_VARS_PATH Oct 11, 2022
@sofisl sofisl requested a review from chingor13 October 11, 2022 17:08
@sofisl sofisl changed the title feat: require and read env variables for MONO_REPO_PATH, SERVICE_CONFIG_PATH, INTER_CONTAINER_VARS_PATH feat: create, require and read env variables for MONO_REPO_PATH, SERVICE_CONFIG_PATH, INTER_CONTAINER_VARS_PATH Oct 11, 2022
@sofisl

sofisl commented Oct 11, 2022

Copy link
Copy Markdown
Contributor Author

@chingor13, added in the cli work (forgot to add it to the commit), PTAL

Comment on lines +56 to +61
- "--monoRepoPath"
- "$_MONO_REPO_PATH"
- "--serviceConfigPath"
- "$_SERVICE_CONFIG_PATH"
- "--interContainerVarsPath"
- "$_INTER_CONTAINER_VARS_PATH"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

These should be env vars, not CLI arguments.

Shouldn't the env var that the language container receive for SERVICE_CONFIG_PATH and INTER_CONTAINER_VARS_PATH be paths including the filename? I would not expect each container to have to know/specify the file name within the directory.

@sofisl sofisl requested a review from chingor13 October 12, 2022 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants