-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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: make examples compile #18020
chore: make examples compile #18020
Conversation
return false; | ||
}, | ||
}, | ||
local: {tryBundle}, |
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.
Will this compile in Python too?
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.
It passes rosetta:extract --compile
so it should. However, this entire PR is waiting on a fix in backup
I'm going to make very soon (which is why build is failing).
edit: nevermind, no fix necessary.
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 won't work actually. If Rosetta doesn't flag this, that's a bug in Rosetta.
You need to declare an explicit class that implements the right interface.
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.
@kaizen3031593 for context: #17928
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.
Rip rosetta. I can investigate what is going on in rosetta
later. In fact, I looked back at what I did in lambda-go
which also included a bundling function. I recall that rosetta:extract --compile
did not pass there and what I did was end up making that example a text
snippet and say that the snippet is only available in TypeScript.
Which I guess is bad for the Python folks because I'm basically saying, sorry this doesn't work in Python.
You need to declare an explicit class that implements the right interface.
That seems to be what #17928 tried and it did not work.
return false; | ||
}, | ||
}, | ||
local: {tryBundle}, |
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 won't work actually. If Rosetta doesn't flag this, that's a bug in Rosetta.
You need to declare an explicit class that implements the right interface.
I ran @jsii.implements(ILocalBundling)
class myBundle:
def try_bundle(self, output_dir, *, image, entrypoint=None, command=None, volumes=None, environment=None, workingDirectory=None, user=None, local=None, outputType=None, securityOpt=None):
can_run_locally = True # replace with actual logic
if can_run_locally:
# perform local bundling here
return True
return False
assets.Asset(self, "BundledAsset",
path="/path/to/asset",
bundling=BundlingOptions(
local=my_bundle(),
# Docker bundling fallback
image=DockerImage.from_registry("alpine"),
entrypoint=["/bin/sh", "-c"],
command=["bundle"]
)
) I think this looks good to go. The rest of the PR should still be gtg as well. |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Done for a bunch of modules: - custom-resources - backup - s3-assets - s3-notifications - s3-deployment - config - cloudtrail ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Done for a bunch of modules:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license