-
Notifications
You must be signed in to change notification settings - Fork 0
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
Switch url rewriter from js to typescipt #4
Switch url rewriter from js to typescipt #4
Conversation
I pulled in a new library @aws-cdk/aws-lambda-nodejs that handles the transformation of javascript to typescript. Had to patch up a couple of things which made this change a little more complex that intended. - All of the CDK components were not version locked, that meant depending on the order of npm installs they could drift and get into a dependancy mismatch spiral. The version itself isn't important, its uniformity is all that matters. - Added permissions to the lambda role for interacting with cloudfronts distribution system, these were handled by the lambda function during deployment, but it seems this new library while handling the js -> ts brought some limitations and I had to manually implement the permssions see for details https://tinyurl.com/5xy3n8zt - Need to fix some typescript compliation issues, please feel free to re-work all of this and just keep the method signature Signed-off-by: Peter Nied <[email protected]>
This resolves opensearch-project#1569 (comment) |
|
||
console.log('maxBuildNumber', maxBuildNumber); | ||
} catch (ex) { | ||
console.error(ex); |
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.
We should fail hard on exception here which will cause s 500. Otherwise we will never know we had an error.
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.
Needed to fix some typescript compliation issues, please feel free to re-work all of this and just keep the method signature
I agree with you recommendation.
For this PR I did the minimal amount of changes I could. The flow of this method still seems under development in the core PR and I'd rather continue the discussion on that review
@tianleh I would recommend merging these PRs or implementing the changes you prefer in |
I pulled in a new library @aws-cdk/aws-lambda-nodejs that handles the
transformation of javascript to typescript. Had to patch up a couple of
things which made this change a little more complex that intended.
All of the CDK components were not version locked, that meant
depending on the order of npm installs they could drift and get into a
dependancy mismatch spiral. The version itself isn't important, its
uniformity is all that matters.
Added permissions to the lambda role for interacting with cloudfronts
distribution system, these were handled by the lambda function during
deployment, but it seems this new library while handling the js -> ts
brought some limitations and I had to manually implement the permssions see
for details https://tinyurl.com/5xy3n8zt
Needed to fix some typescript compliation issues, please feel free to re-work all of this and just keep the method signature
Signed-off-by: Peter Nied [email protected]