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

fix(lambda-python): asset files are generated inside the 'asset-input' folder #18306

Merged
merged 3 commits into from
Jan 7, 2022

Conversation

otaviomacedo
Copy link
Contributor

Changes the asset structure from:

├── asset.993168cfa75b295eeea55bf603340284b9be46ebc079e4965f2c16f5470efda5
│   └── asset-input
│       ├── __init__.py
│       └── app.py

to:

├── asset.993168cfa75b295eeea55bf603340284b9be46ebc079e4965f2c16f5470efda5
│   ├── __init__.py
│   └── app.py

Fixes #18301.


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

@gitpod-io
Copy link

gitpod-io bot commented Jan 7, 2022

@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Jan 7, 2022
};
bundlingCommands.push(`cp -R ${options.inputDir} ${options.outputDir}`);
}
bundlingCommands.push(`cp -R ${options.inputDir}/* ${options.outputDir}`);
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe this syntax will drop hidden files, whereas cp -R input/ output will retain them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, let me test that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated.

@mergify
Copy link
Contributor

mergify bot commented Jan 7, 2022

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-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: 5ae922d
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

@mergify mergify bot merged commit aff607a into master Jan 7, 2022
@mergify mergify bot deleted the otaviom/lambda-python-assets branch January 7, 2022 12:34
@mergify
Copy link
Contributor

mergify bot commented Jan 7, 2022

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

otaviomacedo added a commit that referenced this pull request Jan 7, 2022
…' folder (#18306)

Changes the asset structure from:

```
├── asset.993168cfa75b295eeea55bf603340284b9be46ebc079e4965f2c16f5470efda5
│   └── asset-input
│       ├── __init__.py
│       └── app.py
```

to:

```
├── asset.993168cfa75b295eeea55bf603340284b9be46ebc079e4965f2c16f5470efda5
│   ├── __init__.py
│   └── app.py
```

Fixes #18301.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@njlynch
Copy link
Contributor

njlynch commented Jan 10, 2022

@Mergifyio backport v2-main

mergify bot pushed a commit that referenced this pull request Jan 10, 2022
…' folder (#18306)

Changes the asset structure from:

```
├── asset.993168cfa75b295eeea55bf603340284b9be46ebc079e4965f2c16f5470efda5
│   └── asset-input
│       ├── __init__.py
│       └── app.py
```

to:

```
├── asset.993168cfa75b295eeea55bf603340284b9be46ebc079e4965f2c16f5470efda5
│   ├── __init__.py
│   └── app.py
```

Fixes #18301.

----

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

(cherry picked from commit aff607a)
@mergify
Copy link
Contributor

mergify bot commented Jan 10, 2022

backport v2-main

✅ Backports have been created

mergify bot added a commit that referenced this pull request Jan 10, 2022
…' folder (backport #18306) (#18341)

This is an automatic backport of pull request #18306 done by [Mergify](https://mergify.com).


---


<details>
<summary>Mergify commands and options</summary>

<br />

More conditions and actions can be found in the [documentation](https://docs.mergify.com/).

You can also trigger Mergify actions by commenting on this pull request:

- `@Mergifyio refresh` will re-evaluate the rules
- `@Mergifyio rebase` will rebase this PR on its base branch
- `@Mergifyio update` will merge the base branch into this PR
- `@Mergifyio backport <destination>` will backport this PR on `<destination>` branch

Additionally, on Mergify [dashboard](https://dashboard.mergify.com/) you can:

- look at your merge queues
- generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com
</details>
mergify bot pushed a commit that referenced this pull request Jan 10, 2022
Asset files are incorrectly being bundled under the `asset-input` directory instead of the root of the bundle.

To also copy over hidden files (#18306 (comment)), I switched from using `-R` to `-a` based on what I found on [SO](https://stackoverflow.com/a/13020113) and the [man page](https://linux.die.net/man/1/cp). (`-a` is equivalent to `-dR`.)

Fixes #18301 and @chrispykim's comment: #18082 (comment).

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this pull request Feb 21, 2022
…' folder (aws#18306)

Changes the asset structure from:

```
├── asset.993168cfa75b295eeea55bf603340284b9be46ebc079e4965f2c16f5470efda5
│   └── asset-input
│       ├── __init__.py
│       └── app.py
```

to:

```
├── asset.993168cfa75b295eeea55bf603340284b9be46ebc079e4965f2c16f5470efda5
│   ├── __init__.py
│   └── app.py
```

Fixes aws#18301.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this pull request Feb 21, 2022
Asset files are incorrectly being bundled under the `asset-input` directory instead of the root of the bundle.

To also copy over hidden files (aws#18306 (comment)), I switched from using `-R` to `-a` based on what I found on [SO](https://stackoverflow.com/a/13020113) and the [man page](https://linux.die.net/man/1/cp). (`-a` is equivalent to `-dR`.)

Fixes aws#18301 and @chrispykim's comment: aws#18082 (comment).

----

*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
@aws-cdk/aws-lambda-python contribution/core This is a PR that came from AWS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

‼️ (aws-lambda-python): SAM - CDK integration is broken in CDK V2.4.0
4 participants