-
Notifications
You must be signed in to change notification settings - Fork 60
[Improvement] Fix first time install errors and update docs #926
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
[Improvement] Fix first time install errors and update docs #926
Conversation
mod_ci/controllers.py
Outdated
| start = datetime.datetime.strptime(parts[0], '%Y-%m-%d %H:%M:%S') | ||
| end = datetime.datetime.strptime(parts[-1], '%Y-%m-%d %H:%M:%S') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you clarify why you changed these lines?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code was throwing an error citing a format mismatch when i ran this.
MySQL databases by default store the timestamps without millisecond precision (the .%f). The TestProgress model also doesn't have any configuration for said precision. I looked around and noticed that this was the only strptime() call in the codebase which expected this kind of precision.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit hesitant to merge this as is because I can't remember (and check right now) if we have the precision in the database or not.
Maybe wrap it in a try-except to catch it just to be sure? Try with precision first and then fallback if it fails?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that is probably the safest bet. This also broke tests apparently because SQLite does have precision and the test was reliant on the code being in the current state. I've pushed the fix 👍
c212105 to
95bf5b2
Compare
|
I've fixed the isort error, the workflow checks should be fine now. |
d1292d9 to
b122dee
Compare
b122dee to
79ff180
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #926 +/- ##
==========================================
- Coverage 86.91% 86.85% -0.07%
==========================================
Files 35 35
Lines 3699 3704 +5
Branches 759 759
==========================================
+ Hits 3215 3217 +2
- Misses 348 351 +3
Partials 136 136
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Please prefix your pull request with one of the following: [FEATURE] [FIX] [IMPROVEMENT].
In raising this pull request, I confirm the following (please check boxes):
My familiarity with the project is as follows (check one):
This PR addresses several bugs encountered during the initial setup of the platform on a fresh VPS. The deployment process was less than pleasant, and this fix aims to improve the experience by fixing a few of the errors and improving the documentation to add a few missing pieces (like the necessity of
ccextractortesterand webhooks).Summary of code changes
sample_db.pyfile was missing a few imports which were required for the creation of tables by SQLAlchemy. see docs.strptime()expects millisecond precision, however MySQL does not enable this by default. I also noticed that the millisecond format is not used anywhere else in the codebase apart from the initial setup run.