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

Changed bucket check to correct logic and and fixed printout #1176

Merged
merged 2 commits into from
May 17, 2022

Conversation

i-oden
Copy link
Member

@i-oden i-oden commented May 17, 2022

Description

As seen below, the lost-files flask command complains that a bucket starting with a letter does not start with a letter. Also, it says that a file has been deleted, but it hasn’t and it shouldn’t. “delete” is apparently the default message.

:/code$ flask lost-files add-missing-buckets
/usr/local/lib/python3.10/site-packages/apscheduler/util.py:95: PytzUsageWarning: The zone attribute is specific to pytz's interface; please migrate to a new time zone provider. For more details on how to do so, see https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html
  if obj.zone == 'local':
[2022-05-17 10:32:15,478] __init__ [INFO] Logging initiated.
/usr/local/lib/python3.10/site-packages/apscheduler/triggers/cron/__init__.py:146: PytzUsageWarning: The normalize method is no longer necessary, as this time zone supports the fold attribute (PEP 495). For more details on migrating to a PEP 495-compliant implementation, see https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html
  return self.timezone.normalize(dateval + difference), fieldnum
/usr/local/lib/python3.10/site-packages/apscheduler/triggers/cron/__init__.py:159: PytzUsageWarning: The localize method is no longer necessary, as this time zone supports the fold attribute (PEP 495). For more details on migrating to a PEP 495-compliant implementation, see https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html
  return self.timezone.localize(datetime(**values))
[2022-05-17 10:32:15,880] __init__ [WARNING] Missing bucket snpseq00001-220513122154667651-c911cbcf
[2022-05-17 10:32:15,881] __init__ [WARNING] Could not create bucket 'snpseq00001-220513122154667651-c911cbcf' for project 'snpseq00001': The bucket name must begin with a letter or number.
[2022-05-17 10:32:15,890] __init__ [WARNING] Missing bucket snpseq00002-220516112135701065-ac86de52
[2022-05-17 10:32:15,917] __init__ [WARNING] Could not create bucket 'snpseq00002-220516112135701065-ac86de52' for project 'snpseq00002': The bucket name must begin with a letter or number.
[2022-05-17 10:32:16,014] __init__ [WARNING] Missing bucket ngisthlm00001-220513063100105841-391570c8
[2022-05-17 10:32:16,015] __init__ [WARNING] Could not create bucket 'ngisthlm00001-220513063100105841-391570c8' for project 'ngisthlm00001': The bucket name must begin with a letter or number.
[2022-05-17 10:32:19,239] __init__ [INFO] Deleted 1 entries for lost files (0 in db, 1 in s3)
  • Summary of the changes and the related issue
  • Relevant motivation and context
  • Any dependencies that are required for this change

Fixes DDS-1284

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

Please delete options that are not relevant.

  • Any dependent changes have been merged and published in downstream modules
  • Rebase/merge the branch which this PR is made to
  • Changes to the database schema: A new migration is included in the PR

Formatting and documentation

  • I have added a row in the changelog
  • The code follows the style guidelines of this project: Black / Prettier formatting
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

Tests

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@i-oden i-oden self-assigned this May 17, 2022
@codecov
Copy link

codecov bot commented May 17, 2022

Codecov Report

Merging #1176 (ec03c13) into dev (45b7f9e) will not change coverage.
The diff coverage is 0.00%.

@@           Coverage Diff           @@
##              dev    #1176   +/-   ##
=======================================
  Coverage   83.74%   83.74%           
=======================================
  Files          29       29           
  Lines        3641     3641           
=======================================
  Hits         3049     3049           
  Misses        592      592           
Impacted Files Coverage Δ
dds_web/__init__.py 46.71% <0.00%> (ø)
dds_web/utils.py 76.75% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 45b7f9e...ec03c13. Read the comment docs.

@i-oden i-oden merged commit cb4d8c4 into dev May 17, 2022
@i-oden i-oden deleted the DDS-1284_fix-cronjob-bug branch May 17, 2022 11:53
@i-oden i-oden mentioned this pull request May 17, 2022
18 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.

1 participant