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

In Java, specify empty string results in undefined makes Cloudfront unusable #815

Closed
leepa opened this issue Sep 30, 2018 · 8 comments
Closed
Assignees
Labels
bug This issue is a bug.

Comments

@leepa
Copy link
Contributor

leepa commented Sep 30, 2018

I if do:

        new CloudFrontWebDistribution(this, "CloudFront", CloudFrontWebDistributionProps.builder()
                .withDefaultRootObject("")

This will result in:

DefaultRootObject: index.html

This is obviously undesired behaviour and there doesn't appear to be a way to work around it.

@leepa
Copy link
Contributor Author

leepa commented Sep 30, 2018

I have resorted to using the L1 DistributionResource directly for now to work around the issue.

@rix0rrr
Copy link
Contributor

rix0rrr commented Sep 30, 2018

From the sound of it, that'll be an

if (property)

Which should have been an

if (property !== undefined)

Somewhere in that construct.

@rix0rrr rix0rrr added bug This issue is a bug. good first issue Related to contributions. See CONTRIBUTING.md labels Sep 30, 2018
@leepa
Copy link
Contributor Author

leepa commented Sep 30, 2018

It's not - in the code it uses === undefined correctly.

@rix0rrr
Copy link
Contributor

rix0rrr commented Sep 30, 2018

Well huh. Wonder if it's a jsii bug somewhere.

@rix0rrr rix0rrr removed the good first issue Related to contributions. See CONTRIBUTING.md label Oct 1, 2018
@RomainMuller
Copy link
Contributor

I'll try to have a look at this one soon-ish. May be jsii turning a blank string into undefined before shipping it to the node process, but won't know for sure before I dive deeper.

@RomainMuller RomainMuller self-assigned this Oct 2, 2018
@RomainMuller
Copy link
Contributor

Okay - this is fixed by #801, which is not yet released (aka 0.10.0 doesn't have the fix). The next release will have this problem solved.

@RomainMuller
Copy link
Contributor

To elaborate a bit more - this particular fix slipped right after we published the npm, maven and NuGet package, but we had issues publishing the release & this prompted us to re-tag on a later commit. This ONE particular fix is under the v0.10.0 tag, but is only included in the GitHub release, and not anywhere else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug.
Projects
None yet
Development

No branches or pull requests

3 participants