-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
chore: experimental cdk migrate command #25859
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
A comment requesting an exemption should contain the text Exemption Request
. Additionally, if clarification is needed add Clarification Request
to a comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a couple of questions, if I just got the wrong understanding, we can clear it up and approve the changes.
** [email protected] - https://www.npmjs.com/package/noctilucent/v/0.2.0 | MIT | ||
MIT License | ||
|
||
Copyright (c) 2021 Sean Myers | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems standard. Do we have to involve anyone else to review the wording?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm honestly not sure, romain is the one who included this. I'm not even sure it's totally necessary since this gets auto genned anyway
packages/aws-cdk/generate.sh
Outdated
git -C ./vendor/noctilucent git fetch && git checkout 6da7c9fade55f8443bba7b8fdfcd4ebfe5208fb1 | ||
fi | ||
|
||
# update the package to the pinned commit hash | ||
git -C vendor/noctilucent reset --hard HEAD | ||
git -C vendor/noctilucent fetch && git -C vendor/noctilucent checkout 6da7c9fade55f8443bba7b8fdfcd4ebfe5208fb1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You only need one line in the if, the other two get executed no matter what, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
derp ill fix this
export const MIGRATE_SUPPORTED_LANGUAGES: readonly string[] = nocti.supported_languages(); | ||
|
||
export async function cliMigrate( | ||
inputpath: string = process.cwd() + '/../temp.txt', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the chance of (eventual) name collision?
This hardcodes a bunch of input that should be accepted from the command line. Will this actually output things in "~/my-dir" if the cli comand was cdk migrate -l java -inputpath ~/template.json -outputpath ~/my-dir
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup it works, these are just setting the default. We could just delete the /../temp.txt default for the input path if we wanted, I just left it in there for now
outputpath = process.cwd(), | ||
) { | ||
warning('This is a very experimental feature, use at your own risk.'); | ||
const type = 'default'; // "default" is the default type (and maps to 'app') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to double-take: why is this an option here, but not exposed as an argument?
Even if right now it has a single value, it can be expanded in the future (based on the comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah so this is basically just to get the init funcitonality to work. I'm happy to just pass the hardcoded string into the initliazeproject but I thought I'd be explicit about wat the default meant.
f900fbf
to
afbe3b3
Compare
This is an attempt to make sure that there is one and only one `ts-node` in the closure, so that symlinks "always make sense".
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
cdk migrate command.
See readme for additional description of command. Default input path is a file named "template.txt" in the parent directory for now. Default output path is the current directory. If you have any issues with the actually generated code, please create an issue on https://github.com/iph/noctilucent
Please refer to noctilucent or command help supported languages to see what languages are supported.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license