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

docs(lambda): fromAsset exclude #26473

Merged
merged 4 commits into from
Jul 25, 2023
Merged

Conversation

go-to-k
Copy link
Contributor

@go-to-k go-to-k commented Jul 22, 2023

We discussed for the need to document exclude patterns using a negation in the PR.

I also could not find documentation for the exclude property itself, so I added them.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@tmokmss
Copy link
Contributor

tmokmss commented Jul 22, 2023

The sample code must be compilable :) https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md#documentation

Perhaps you have to change default.tx-fixture to reference IgnoreMode in the code.

@go-to-k
Copy link
Contributor Author

go-to-k commented Jul 24, 2023

@tmokmss

Thank you! I've never touched the rosetta file before so that helped!

I fixed it and pushed it.

@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Jul 24, 2023

When using `lambda.Code.fromAsset(path)` an `exclude` property allows you to ignore particular files for assets based on simple glob patterns.

An `ignoreMode` property can be used to write based on the [.gitignore specification](https://git-scm.com/docs/gitignore) and the [.dockerignore specification](https://docs.docker.com/engine/reference/builder/#dockerignore-file).
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you think about changing the wording to this:

When using lambda.Code.fromAsset(path) an exclude property allows you to ignore particular files for assets by providing patterns for file paths to exclude. Note that this has no effect on Assets bundled using the bundling property.

The ignoreMode property can be used with the exclude property to specify the file paths to ignore based on the .gitignore specification or the .dockerignore specification. The default behavior is to ignore file paths based on simple glob patterns.

Copy link
Contributor Author

@go-to-k go-to-k Jul 25, 2023

Choose a reason for hiding this comment

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

@colifran

Thanks for your review! I think that's good. I will change.

Copy link
Contributor

@colifran colifran left a comment

Choose a reason for hiding this comment

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

@go-to-k Thanks for getting started on this! Let me know what you think about making a slight wording change.

@mergify mergify bot dismissed colifran’s stale review July 25, 2023 01:35

Pull request has been modified.

colifran
colifran previously approved these changes Jul 25, 2023
Copy link
Contributor

@colifran colifran left a comment

Choose a reason for hiding this comment

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

@go-to-k looks good! Thank you for your contribution.

@mergify
Copy link
Contributor

mergify bot commented Jul 25, 2023

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).

@mergify mergify bot dismissed colifran’s stale review July 25, 2023 15:26

Pull request has been modified.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: a8beca6
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented Jul 25, 2023

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).

@mergify mergify bot merged commit 0e16c90 into aws:main Jul 25, 2023
7 checks passed
@go-to-k go-to-k deleted the docs/lambda-fromAsset-exclude branch July 26, 2023 03:14
bmoffatt pushed a commit to bmoffatt/aws-cdk that referenced this pull request Jul 29, 2023
We discussed for the need to document `exclude` patterns using a negation in [the PR](aws#26365 (comment)).

I also could not find documentation for the `exclude` property itself, so I added them.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p2 pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. valued-contributor [Pilot] contributed between 6-12 PRs to the CDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants