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(assets): invalid fingerprint when 'exclude' captures root directory name #7719

Merged
merged 2 commits into from May 6, 2020

Conversation

christophgysin
Copy link
Contributor

@christophgysin christophgysin commented Apr 30, 2020

Commit Message

fix(assets): fix(assets): invalid fingerprint when 'exclude' captures root directory name (#7719)

When creating an asset from a directory with certain exclude options, the fingerprint does not change even if the files change.

If a fingerprint is calculated over a directory with exclude options [ '**', '!file' ], the code never descends into the directory.

This commit skips the exclude check for the root directory, to correctly handle negated expressions in the exclude options.

fixes #7718

End Commit Message


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

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: a8503a5
  • Result: FAILED
  • Build Logs (available for 30 days)

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

@eladb
Copy link
Contributor

eladb commented May 1, 2020

@christophgysin can I bug you to rebase this change on top of #7708 once it's merged (hopefully shortly)

@eladb
Copy link
Contributor

eladb commented May 3, 2020

@christophgysin ok, #7708 has been merged to master. Can you please rebase here?

eladb
eladb previously requested changes May 3, 2020
Copy link
Contributor

@eladb eladb left a comment

Choose a reason for hiding this comment

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

Rebase

@mergify mergify bot dismissed eladb’s stale review May 5, 2020 20:01

Pull request has been modified.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 515b8c5
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

Copy link
Contributor

@eladb eladb left a comment

Choose a reason for hiding this comment

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

Ca you please update the commit message and explain what was the root cause of the bug and how this commit fixes it?

@christophgysin
Copy link
Contributor Author

@eladb I updated the commit message accordingly. Let me know if something is still unclear.

@eladb eladb changed the title fix(assets): Correct fingerprint with 'exclude' fix(assets): invalid fingerprint when 'exclude' captures root directory name May 6, 2020
@eladb
Copy link
Contributor

eladb commented May 6, 2020

@christophgysin updated commit title accordingly to represent the bug and not the solution (think that this goes under "bug fixes" section in the changelog).

@mergify
Copy link
Contributor

mergify bot commented May 6, 2020

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: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: ab72234
  • 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 May 6, 2020

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

@mergify mergify bot merged commit a5c06a3 into aws:master May 6, 2020
karupanerura pushed a commit to karupanerura/aws-cdk that referenced this pull request May 7, 2020
… root directory name (aws#7719)

When creating an asset from a directory with certain exclude options, the fingerprint does not change even if the files change.

If a fingerprint is calculated over a directory with exclude options `[ '**', '!file' ]`, the code never descends into the directory.

This commit skips the exclude check for the root directory, to correctly handle negated expressions in the exclude options.

fixes aws#7718
mergify bot pushed a commit that referenced this pull request Mar 13, 2023
…k/lambda-layer-awscli (#24590)

Bumps [awscli](https://github.com/aws/aws-cli) from 1.27.84 to 1.27.89.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/aws/aws-cli/blob/develop/CHANGELOG.rst">awscli's changelog</a>.</em></p>
<blockquote>
<h1>1.27.89</h1>
<ul>
<li>api-change:<code>ivschat</code>: This release adds a new exception returned when calling AWS IVS chat UpdateLoggingConfiguration. Now UpdateLoggingConfiguration can return ConflictException when invalid updates are made in sequence to Logging Configurations.</li>
<li>api-change:<code>secretsmanager</code>: The type definitions of SecretString and SecretBinary now have a minimum length of 1 in the model to match the exception thrown when you pass in empty values.</li>
</ul>
<h1>1.27.88</h1>
<ul>
<li>api-change:<code>codeartifact</code>: This release introduces the generic package format, a mechanism for storing arbitrary binary assets. It also adds a new API, PublishPackageVersion, to allow for publishing generic packages.</li>
<li>api-change:<code>connect</code>: This release adds a new API, GetMetricDataV2, which returns metric data for Amazon Connect.</li>
<li>api-change:<code>evidently</code>: Updated entity override documentation</li>
<li>api-change:<code>networkmanager</code>: This update provides example usage for TransitGatewayRouteTableArn.</li>
<li>api-change:<code>quicksight</code>: This release has two changes: add state persistence feature for embedded dashboard and console in GenerateEmbedUrlForRegisteredUser API; add properties for hidden collapsed row dimensions in PivotTableOptions.</li>
<li>api-change:<code>redshift-data</code>: Added support for Redshift Serverless workgroup-arn wherever the WorkgroupName parameter is available.</li>
<li>api-change:<code>sagemaker</code>: Amazon SageMaker Inference now allows SSM access to customer's model container by setting the &quot;EnableSSMAccess&quot; parameter for a ProductionVariant in CreateEndpointConfig API.</li>
<li>api-change:<code>servicediscovery</code>: Updated all AWS Cloud Map APIs to provide consistent throttling exception (RequestLimitExceeded)</li>
<li>api-change:<code>sesv2</code>: This release introduces a new recommendation in Virtual Deliverability Manager Advisor, which detects missing or misconfigured Brand Indicator for Message Identification (BIMI) DNS records for customer sending identities.</li>
</ul>
<h1>1.27.87</h1>
<ul>
<li>api-change:<code>athena</code>: A new field SubstatementType is added to GetQueryExecution API, so customers have an error free way to detect the query type and interpret the result.</li>
<li>api-change:<code>dynamodb</code>: Adds deletion protection support to DynamoDB tables. Tables with deletion protection enabled cannot be deleted. Deletion protection is disabled by default, can be enabled via the CreateTable or UpdateTable APIs, and is visible in TableDescription. This setting is not replicated for Global Tables.</li>
<li>api-change:<code>ec2</code>: Introducing Amazon EC2 C7g, M7g and R7g instances, powered by the latest generation AWS Graviton3 processors and deliver up to 25% better performance over Graviton2-based instances.</li>
<li>api-change:<code>lakeformation</code>: This release adds two new API support &quot;GetDataCellsFiler&quot; and &quot;UpdateDataCellsFilter&quot;, and also updates the corresponding documentation.</li>
<li>api-change:<code>mediapackage-vod</code>: This release provides the date and time VOD resources were created.</li>
<li>api-change:<code>mediapackage</code>: This release provides the date and time live resources were created.</li>
<li>api-change:<code>route53resolver</code>: Add dual-stack and IPv6 support for Route 53 Resolver Endpoint,Add IPv6 target IP in Route 53 Resolver Forwarding Rule</li>
<li>api-change:<code>sagemaker</code>: There needs to be a user identity to specify the SageMaker user who perform each action regarding the entity. However, these is a not a unified concept of user identity across SageMaker service that could be used today.</li>
</ul>
<h1>1.27.86</h1>
<ul>
<li>bugfix:eks: Output JSON only for user entry in kubeconfig fixes <code>[#7719](aws/aws-cli#7719) &lt;https://github.com/aws/aws-cli/issues/7719&gt;</code><strong>, fixes <code>[#7723](aws/aws-cli#7723) &lt;https://github.com/aws/aws-cli/issues/7723&gt;</code></strong>, fixes <code>[#7724](aws/aws-cli#7724) &lt;https://github.com/aws/aws-cli/issues/7724&gt;</code>__</li>
<li>api-change:<code>dms</code>: This release adds DMS Fleet Advisor Target Recommendation APIs and exposes functionality for DMS Fleet Advisor. It adds functionality to start Target Recommendation calculation.</li>
<li>api-change:<code>location</code>: Documentation update for the release of 3 additional map styles for use with Open Data Maps: Open Data Standard Dark, Open Data Visualization Light &amp; Open Data Visualization Dark.</li>
</ul>
<h1>1.27.85</h1>
<ul>
<li>api-change:<code>account</code>: AWS Account alternate contact email addresses can now have a length of 254 characters and contain the character &quot;|&quot;.</li>
<li>api-change:<code>ivs</code>: Updated text description in DeleteChannel, Stream, and StreamSummary.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/aws/aws-cli/commit/df68d39f402e023dd0ee48e6974eda850b4bbb21"><code>df68d39</code></a> Merge branch 'release-1.27.89'</li>
<li><a href="https://github.com/aws/aws-cli/commit/be4afd12701baadf08a343553b99975a2c02b7a0"><code>be4afd1</code></a> Bumping version to 1.27.89</li>
<li><a href="https://github.com/aws/aws-cli/commit/9583dc5226fdd93d752bcf319736af7c42602963"><code>9583dc5</code></a> Update changelog based on model updates</li>
<li><a href="https://github.com/aws/aws-cli/commit/7808d95fb9d1d99e0e0088132296e96d99a6a958"><code>7808d95</code></a> Merge branch 'release-1.27.88'</li>
<li><a href="https://github.com/aws/aws-cli/commit/7e4d04f4e522737ba951995886fe58e33a410ca3"><code>7e4d04f</code></a> Merge branch 'release-1.27.88' into develop</li>
<li><a href="https://github.com/aws/aws-cli/commit/7b64318189b3a3f2369885122b3249a961930b62"><code>7b64318</code></a> Bumping version to 1.27.88</li>
<li><a href="https://github.com/aws/aws-cli/commit/1c8486baccbfe705230ccf87850f8dfe5aba7ff3"><code>1c8486b</code></a> Update changelog based on model updates</li>
<li><a href="https://github.com/aws/aws-cli/commit/b40f487fa9a27ccf00e93e480bd7f73419d5f66a"><code>b40f487</code></a> Merge branch 'release-1.27.87'</li>
<li><a href="https://github.com/aws/aws-cli/commit/19b76b4b57f86ed4b6341a353d56cacf4f3582fd"><code>19b76b4</code></a> Merge branch 'release-1.27.87' into develop</li>
<li><a href="https://github.com/aws/aws-cli/commit/753b87077b1a8d21082cf2de1e48e9f4eec22352"><code>753b870</code></a> Bumping version to 1.27.87</li>
<li>Additional commits viewable in <a href="https://github.com/aws/aws-cli/compare/1.27.84...1.27.89">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=awscli&package-manager=pip&previous-version=1.27.84&new-version=1.27.89)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Asset.fingerprint() does not handle excludes correctly
3 participants