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 option name (ignore-size -> ignore_size) #424

Merged
merged 2 commits into from
Feb 3, 2023

Conversation

elacuesta
Copy link
Member

@elacuesta elacuesta commented Feb 3, 2023

Quick fix (no tests 🥲) after internal report from developers.

With the following patch (after line https://github.com/scrapinghub/shub/blob/v2.14.3/shub/utils.py#L132)

diff --git a/shub/utils.py b/shub/utils.py
index 11665ec..c32ba67 100644
--- a/shub/utils.py
+++ b/shub/utils.py
@@ -130,6 +130,8 @@ def make_deploy_request(url, data, files, auth, verbose, keep_log):
 def _check_deploy_files_size(files):
     """Ensure that request's files total size is less than current limit."""
     ctx = click.get_current_context(silent=True)
+    import pdb
+    pdb.set_trace()
     if not isinstance(files, list) or ctx and ctx.params.get('ignore-size'):
         return
     files_size = sum(

we can see the option name:

$ shub deploy --ignore-size
Packing version 40136e4-main
Deploying to Scrapy Cloud project "445393"
> /home/eugenio/zyte/scheduler-load-test/venv-scheduler-load-test/lib/python3.9/site-packages/shub/utils.py(135)_check_deploy_files_size()
-> if not isinstance(files, list) or ctx and ctx.params.get('ignore-size'):
(Pdb) ctx.params
{'ignore_size': True, 'target': 'default', 'version': None, 'debug': False, 'egg': None, 'build_egg': None, 'verbose': False, 'keep_log': False}
(Pdb) 

@codecov
Copy link

codecov bot commented Feb 3, 2023

Codecov Report

Base: 91.01% // Head: 89.39% // Decreases project coverage by -1.63% ⚠️

Coverage data is based on head (793264c) compared to base (da7a5c9).
Patch coverage: 100.00% of modified lines in pull request are covered.

❗ Current head 793264c differs from pull request most recent head 57cd387. Consider uploading reports for the commit 57cd387 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #424      +/-   ##
==========================================
- Coverage   91.01%   89.39%   -1.63%     
==========================================
  Files          28       34       +6     
  Lines        1558     2423     +865     
==========================================
+ Hits         1418     2166     +748     
- Misses        140      257     +117     
Impacted Files Coverage Δ
shub/utils.py 82.53% <100.00%> (ø)
shub/image/deploy.py 94.36% <0.00%> (-0.74%) ⬇️
shub/image/run/wrapper.py 83.87% <0.00%> (-0.51%) ⬇️
shub/login.py 85.29% <0.00%> (-0.43%) ⬇️
shub/image/utils.py 94.44% <0.00%> (ø)
shub/__init__.py 100.00% <0.00%> (ø)
shub/items.py 100.00% <0.00%> (ø)
shub/image/__init__.py 90.00% <0.00%> (ø)
shub/deploy.py 90.50% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@elacuesta
Copy link
Member Author

Failed builds for py36 are because py36 is no longer available in the ubuntu-latest image, we need to downgrade that specific check to ubuntu-20-04.

@elacuesta elacuesta merged commit 6f8195e into master Feb 3, 2023
@elacuesta elacuesta deleted the fix-deploy-ignore-size-check branch February 3, 2023 14:48
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