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: Issues with content filtering when using patterns #578

Conversation

sohaibiftikhar
Copy link

@sohaibiftikhar sohaibiftikhar commented May 28, 2024

Description

-- ZipContentFilter logic for patterns that have a single allowed pattern.
Earlier this would include all files.
-- generate_content_hash also considers the patterns before generating the
hash so that the hash generated matches the content of the zip.

Motivation and Context

  • Without using this patch deployments to the same environment from different machines with intermediaries such as pycache cause redeployments.
  • This also fixes the surprising behaviour that a pattern of [ ".*.py$" ] will also include files that do not match that pattern.

Breaking Changes

Unless someone is relying on the legacy behaviour this should not be a breaking change. It will however cause redeployments because of content hash changes.

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • I have tested and validated these changes using one or more of the provided examples/* projects
  • I have executed pre-commit run -a on my pull request

@sohaibiftikhar sohaibiftikhar changed the title This commit fixes two issues with content filtering Fix issues with content filtering May 28, 2024
@sohaibiftikhar sohaibiftikhar changed the title Fix issues with content filtering fix: Issues with content filtering when using patterns May 28, 2024
-- `ZipContentFilter` logic for patterns that have a single allowed pattern.
   Earlier this would include all files.
-- `generate_content_hash` also considers the patterns before generating the
   hash so that the hash generated matches the content of the zip.
Copy link

This PR has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this PR will be closed in 10 days

@github-actions github-actions bot added the stale label Jun 28, 2024
Copy link

github-actions bot commented Jul 8, 2024

This PR was automatically closed because of stale in 10 days

@github-actions github-actions bot closed this Jul 8, 2024
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant