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

Setuptools Handling of Dashes #4794

Merged
merged 1 commit into from
Apr 12, 2024
Merged

Setuptools Handling of Dashes #4794

merged 1 commit into from
Apr 12, 2024

Conversation

pattisdr
Copy link
Contributor

@pattisdr pattisdr commented Apr 12, 2024

Addresses a new change to setuptools described here, introduced in setuptools 69.3.0.

Description Of Changes

As described in pypa/setuptools#4300, setuptools changed to produce built tarballs with _ instead of - in the distribution's naming convention. Our Dockerfile prod build (incorrectly) relied on the - naming convention for our built distribution of ethyca-fides.

We can adjust the expected naming convention to ethyca_fides. Per the comments on pypa/setuptools#4300, we can now rely on this naming convention, as it is up to spec.

As mentioned in the issue, the change in setuptools was in response to https://peps.python.org/pep-0625/ which mentions

The name of an sdist should be {distribution}-{version}.tar.gz.

  • distribution is the name of the distribution as defined in PEP 345, and normalised as described in the wheel spec e.g. 'pip', 'flit_core'.

and then the linked wheel spec mentions here:

In distribution names, any run of -_. characters (HYPHEN-MINUS, LOW LINE and FULL STOP) should be replaced with _ (LOW LINE), and uppercase characters should be replaced with corresponding lowercase ones. This is equivalent to regular name normalization followed by replacing - with _. Tools consuming wheels must be prepared to accept . (FULL STOP) and uppercase letters, however, as these were allowed by an earlier version of this specification.

Code Changes

  • update Dockerfile to look for dist/ethyca_fides-*.tar.gz rather than dist/ethyca-fides-*.tar.gz

Steps to Confirm

  • CI jobs relying on the prod image run successfully

Pre-Merge Checklist

Copy link

vercel bot commented Apr 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated (UTC)
fides-plus-nightly ⬜️ Ignored (Inspect) Apr 12, 2024 8:26pm

Copy link

cypress bot commented Apr 12, 2024

Passing run #7239 ↗︎

0 4 0 0 Flakiness 0
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.

Details:

Merge eb26121 into 22fa0b9...
Project: fides Commit: 6e06f6edb4 ℹ️
Status: Passed Duration: 00:35 💡
Started: Apr 12, 2024 8:37 PM Ended: Apr 12, 2024 8:38 PM

Review all test suite changes for PR #4794 ↗︎

Copy link

codecov bot commented Apr 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.28%. Comparing base (22fa0b9) to head (eb26121).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4794   +/-   ##
=======================================
  Coverage   86.28%   86.28%           
=======================================
  Files         339      339           
  Lines       20090    20090           
  Branches     2586     2586           
=======================================
  Hits        17334    17334           
  Misses       2290     2290           
  Partials      466      466           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@adamsachs adamsachs marked this pull request as ready for review April 12, 2024 21:25
Copy link
Contributor

@adamsachs adamsachs left a comment

Choose a reason for hiding this comment

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

this looks good, thank you for tracking down the issue and pushing up a quick and effective fix!

i updated the PR description to provide some more context on the issue and why the resolution is viable 👍

@adamsachs adamsachs merged commit 9fd78f2 into main Apr 12, 2024
41 of 42 checks passed
@adamsachs adamsachs deleted the setuptools_underscore branch April 12, 2024 21:28
adamsachs pushed a commit that referenced this pull request Apr 12, 2024
@cypress cypress bot mentioned this pull request Apr 12, 2024
31 tasks
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.

2 participants