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

feat: Allow users to override the default deploy tool workspace directory #617

Merged
merged 1 commit into from
Jun 20, 2022

Conversation

96malhar
Copy link
Contributor

@96malhar 96malhar commented Jun 15, 2022

Issue #, if available:
DOTNET-6010

Description of changes:
The PR gives users the ability to set their custom deploy tool workspace directory. They can do so by setting a user scoped or machine scoped environment variable called AWS_DOTNET_DEPLOYTOOL_WORKSPACE. This variable must point to a directory that exists on the disk and does not contain any whitespace characters.

This PR also solves the issue of failed deployments when the user profile path contains a whitespace character - #579
The underlying issue is with CDK and not with our deployment tool - aws/aws-cdk#2532 and aws/jsii#1296


Without the setting the AWS_DOTNET_DEPLOYTOOL_WORKSPACE environment variable

Capture

The same deployment is successful after the AWS_DOTNET_DEPLOYTOOL_WORKSPACE environment variable

Capture

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@96malhar 96malhar requested review from normj, philasmar and ashovlin June 15, 2022 23:03
Copy link
Member

@normj normj left a comment

Choose a reason for hiding this comment

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

For testing since we have environment variables abstracted with EnvironmentManager I suggest adding a testing reset method on DeployToolWorkspaceMetadata that can inject a custom instance of EnvironmentManager with the workspace environment variable set.

@96malhar 96malhar force-pushed the kmalhar/handle-spaces-in-profile branch from 3515765 to 95a54a3 Compare June 16, 2022 23:30
@96malhar 96malhar marked this pull request as draft June 16, 2022 23:44
@96malhar 96malhar force-pushed the kmalhar/handle-spaces-in-profile branch 3 times, most recently from d2df8e9 to bb0af2f Compare June 17, 2022 03:55
@96malhar 96malhar marked this pull request as ready for review June 17, 2022 03:56
@96malhar
Copy link
Contributor Author

For testing since we have environment variables abstracted with EnvironmentManager I suggest adding a testing reset method on DeployToolWorkspaceMetadata that can inject a custom instance of EnvironmentManager with the workspace environment variable set.

Reworked the PR to use dependency injection and added an integ test.

@96malhar 96malhar force-pushed the kmalhar/handle-spaces-in-profile branch 2 times, most recently from 4f197d2 to cb0d0a4 Compare June 17, 2022 22:20
Copy link
Member

@normj normj left a comment

Choose a reason for hiding this comment

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

Just a minor comment about the doc update but otherwise I'm good with the change.

@96malhar 96malhar force-pushed the kmalhar/handle-spaces-in-profile branch from cb0d0a4 to a5bff28 Compare June 20, 2022 14:29
@96malhar 96malhar merged commit ddc1fd4 into dev Jun 20, 2022
@96malhar 96malhar deleted the kmalhar/handle-spaces-in-profile branch June 20, 2022 16:36
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.

3 participants