Skip to content

Issue 140 #516

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

Merged
merged 20 commits into from
Jul 4, 2024
Merged

Issue 140 #516

merged 20 commits into from
Jul 4, 2024

Conversation

Chrisyhjiang
Copy link
Contributor

This aims to closes #140 where the hints generated by the current defang generate command is insufficient. I accomplish this by unmarshalling the compose.yaml file to collect the environment variables that need to be set with defang config set.

@Chrisyhjiang Chrisyhjiang requested a review from lionello June 28, 2024 23:18
@Chrisyhjiang Chrisyhjiang requested a review from lionello July 2, 2024 18:03
Copy link
Member

@lionello lionello left a comment

Choose a reason for hiding this comment

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

You should probably turn your new code into a separate function and write a test for it, because it has a logic error now. Try to write the test first.

@Chrisyhjiang Chrisyhjiang requested a review from lionello July 4, 2024 18:07
@Chrisyhjiang Chrisyhjiang requested a review from lionello July 4, 2024 22:33
loader := compose.Loader{ComposeFilePath: filepath.Join(prompt.Folder, "compose.yaml")}
project, _ := loader.LoadCompose(cmd.Context())

envVars := collectUnsetEnvVars(project) // ir err != nil -> proj == nil, which is handled in the collectUnsetEnvVars function
Copy link
Member

Choose a reason for hiding this comment

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

typo ir

@lionello lionello merged commit 54bf92a into DefangLabs:main Jul 4, 2024
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.

Defang compose up showing Error: missing configs:"API_KEY"
2 participants