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

Move SQLFluff requirements.txt to subdirectory #1359

Merged
merged 1 commit into from
Dec 4, 2024
Merged

Conversation

jasonaowen
Copy link
Contributor

@jasonaowen jasonaowen commented Dec 4, 2024

Having requirements.txt in the root of the project causes DigitalOcean App Platform to detect the app as needing the Python buildpack. Adding that buildpack seems to throw away the Node output(?), and so the migrate step fails to run:

Error: Cannot find module '/workspace/dist/scripts/migrate.js'

Even if that did not cause a build failure, we do not want this dev/CI tool to be present in the deployed image.

Move the requirements.txt file into a new subdirectory, and configure dependabot to look at that new subdirectory weekly.

Resolves #1356 Deployment failure 2024-12-03

Having `requirements.txt` in the root of the project causes DigitalOcean
App Platform to detect the app as needing the Python buildpack. Adding
that buildpack seems to throw away the Node output(?), and so the
migrate step fails to run:

    Error: Cannot find module '/workspace/dist/scripts/migrate.js'

Even if that did not cause a build failure, we do not want this dev/CI
tool to be present in the deployed image.

Move the `requirements.txt` file into a new subdirectory, and configure
dependabot to look at that new subdirectory weekly.

Issue #1356 Deployment failure 2024-12-03
@jasonaowen jasonaowen requested review from slifty and bickelj December 4, 2024 20:52
@jasonaowen
Copy link
Contributor Author

I was able to deploy this on api-test.pdco by editing the app spec to point to this branch rather than main, and it successfully deployed: https://cloud.digitalocean.com/apps/21057031-b8f6-4acd-a82a-912e2607e7e7/deployments/b463cb15-1ade-4b94-a48d-2dd525cfe8e3

I'll switch it back now so that it'll work when this gets merged.

Copy link

codecov bot commented Dec 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.34%. Comparing base (9a871ff) to head (2fde13b).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1359   +/-   ##
=======================================
  Coverage   87.34%   87.34%           
=======================================
  Files         185      185           
  Lines        2387     2387           
  Branches      321      314    -7     
=======================================
  Hits         2085     2085           
- Misses        276      302   +26     
+ Partials       26        0   -26     

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

@@ -32,7 +32,7 @@ jobs:
with:
python-version: '3.13'
- name: Install SQLFluff
run: 'pip install -r requirements.txt'
run: 'pip install -r sqlfluff/requirements.txt'
Copy link
Member

@slifty slifty Dec 4, 2024

Choose a reason for hiding this comment

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

My initial thought was "this directory name seems too specific" but until we have another python requirement, this is truly the only thing it exists for and we can always change it another day.

@jasonaowen jasonaowen merged commit 2403604 into main Dec 4, 2024
10 checks passed
@jasonaowen jasonaowen deleted the fix-deploy-python branch December 4, 2024 22:27
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.

Deployment failure 2024-12-03
2 participants