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

fix: app outdir property cannot be different from CLI or cdk8s.yaml file #783

Merged
merged 7 commits into from
Oct 4, 2022

Conversation

vinayak-kukreja
Copy link
Contributor

Currently setting the outdir property for CDK8s app throws an error,

ERROR: synthesis failed, app expected to create "dist"

This is due to the CLI not able to recognize this change in the outdir in the application property.
The value specified in the outdir needs to be similar to what is mentioned either in CLI's --output argument or the output property in the cdk8s.yaml file.

Signed-off-by: Vinayak Kukreja [email protected]

Resolves cdk8s-team/cdk8s-cli#210

@iliapolo iliapolo changed the title fix(docs): app outdir property cannot be different from CLI or cdk8s.yaml file fix: app outdir property cannot be different from CLI or cdk8s.yaml file Oct 3, 2022
@iliapolo iliapolo added the backport-to-1.x Backport a PR to the 1.x branch label Oct 3, 2022
src/app.ts Outdated
Comment on lines 26 to 32
* By default, the value you pass to the CDK8s CLI's `--output` flag
* or in the `output` property of cdk8s.yaml file will be used,
* and if you change it to a different directory the CLI will fail
* to pick up the new output directory.
*
* This property is intended for internal and testing use.
*
Copy link
Member

@iliapolo iliapolo Oct 3, 2022

Choose a reason for hiding this comment

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

Where not focusing on the default behavior, but rather on the conflicts that may arise.

Suggested change
* By default, the value you pass to the CDK8s CLI's `--output` flag
* or in the `output` property of cdk8s.yaml file will be used,
* and if you change it to a different directory the CLI will fail
* to pick up the new output directory.
*
* This property is intended for internal and testing use.
*
* If you synthesize your application using `cdk8s synth`, you must also pass this value to the CLI using the `--
* output` option or the `output` property in the `cdk8s.yaml` configuration file.
* Otherwise, the CLI will not know about the output directory, and synthesis will fail.
*
* This property is intended for internal and testing use.
*

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see, ok, will make this update.

@mergify mergify bot merged commit 05bf5f4 into 2.x Oct 4, 2022
@mergify mergify bot deleted the vkukreja/fix-cli-error branch October 4, 2022 08:07
cdk8s-automation pushed a commit that referenced this pull request Oct 4, 2022
… file (#783)

Currently setting the `outdir` property for CDK8s app throws an error,
```
ERROR: synthesis failed, app expected to create "dist"
```

This is due to the CLI not able to recognize this change in the `outdir` in the application property.
The value specified in the `outdir` needs to be similar to what is mentioned either in CLI's `--output` argument or the `output` property in the cdk8s.yaml file.

Signed-off-by: Vinayak Kukreja <[email protected]>

Resolves cdk8s-team/cdk8s-cli#210

(cherry picked from commit 05bf5f4)
Signed-off-by: Vinayak Kukreja <[email protected]>
@cdk8s-automation
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
1.x

Questions ?

Please refer to the Backport tool documentation

mergify bot pushed a commit that referenced this pull request Oct 4, 2022
… file (#783) (#786)

# Backport

This will backport the following commits from `2.x` to `1.x`:
 - [fix: app `outdir` property cannot be different from CLI or cdk8s.yaml file (#783)](#783)



### Questions ?
Please refer to the [Backport tool documentation](https://github.com/sqren/backport)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-to-1.x Backport a PR to the 1.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CLI throws faulty error when outdir is passed to AppProps
3 participants