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

Try adding python3-venv to an Aptfile #1416

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

bickelj
Copy link
Contributor

@bickelj bickelj commented Jan 7, 2025

Try adding python3-venv to an Aptfile

The goal is to restore the Digital Ocean (DO) deployment pipeline
while keeping the existing lint command that now includes sqlfluff
calls. The assumption is that an Ubuntu Jammy image is being built and
that when an Aptfile is present, DO will use it before or during a build.

The specific error we're getting at deploy time is this:

postinstall

[ ! -d "venv" ] && python3 -m venv venv; ./venv/bin/pip install -r sqlfluff/requirements.txt
The virtual environment was not created successfully because ensurepip is not
available. On Debian/Ubuntu systems, you need to install the python3-venv
package...

See https://docs.digitalocean.com/products/app-platform/reference/buildpacks/aptfile/

Hat tip to Daniel Schultz for finding that documentation.

Issue #1410

Copy link

codecov bot commented Jan 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.30%. Comparing base (26f8d6f) to head (04fff54).
Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1416   +/-   ##
=======================================
  Coverage   87.30%   87.30%           
=======================================
  Files         209      209           
  Lines        2876     2876           
  Branches      400      408    +8     
=======================================
  Hits         2511     2511           
+ Misses        365      336   -29     
- Partials        0       29   +29     

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

The goal is to restore the Digital Ocean (DO) deployment pipeline
while keeping the existing `lint` command that now includes `sqlfluff`
calls. The assumption is that an Ubuntu Jammy image is being built and
that when an Aptfile is present, DO will use it before or during a build.

The specific error we're getting at deploy time is this:

> postinstall
> > [ ! -d "venv" ] && python3 -m venv venv; ./venv/bin/pip install -r sqlfluff/requirements.txt
> The virtual environment was not created successfully because ensurepip is not
> available.  On Debian/Ubuntu systems, you need to install the python3-venv
> package...

See https://docs.digitalocean.com/products/app-platform/reference/buildpacks/aptfile/

Hat tip to Daniel Schultz for finding that documentation.

Issue #1410
@bickelj bickelj force-pushed the try-aptfile-with-digital-ocean-app-platform branch from 67d54e3 to 04fff54 Compare January 7, 2025 21:14
@bickelj bickelj merged commit 5562425 into main Jan 7, 2025
11 checks passed
@bickelj bickelj deleted the try-aptfile-with-digital-ocean-app-platform branch January 7, 2025 21:23
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.

1 participant