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

Alter time_elapsed field in BuildHistory Model #126

Merged
merged 1 commit into from
Sep 29, 2019

Conversation

arjunsalyan
Copy link
Member

Closes: #124

@codecov
Copy link

codecov bot commented Sep 27, 2019

Codecov Report

Merging #126 into master will increase coverage by 0.07%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #126      +/-   ##
==========================================
+ Coverage   73.76%   73.84%   +0.07%     
==========================================
  Files          45       46       +1     
  Lines        1334     1338       +4     
==========================================
+ Hits          984      988       +4     
  Misses        350      350
Impacted Files Coverage Δ
...ions/0009_alter_field_time_elapsed_buildhistory.py 100% <100%> (ø)
app/ports/models/buildhistory.py 20.61% <100%> (ø) ⬆️

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 c37e5cf...b5dc20b. Read the comment docs.

@umeshksingla
Copy link
Member

If we are not doing any calculations over it and the format is not understood by the app/python directly, I'd say we should keep it simply as a string?

@arjunsalyan
Copy link
Member Author

If we are not doing any calculations over it and the format is not understood by the app/python directly, I'd say we should keep it simply as a string?

It stores a timedelta object which does not support custom formatting. So DurationField seems just the right choice for it.

@umeshksingla
Copy link
Member

umeshksingla commented Sep 28, 2019 via email

@umeshksingla umeshksingla self-requested a review September 28, 2019 15:51
@mojca
Copy link
Member

mojca commented Sep 28, 2019

Is the migration really so simple and the conversion works out of the box? Will the app redo fetching data from the failed parsing cases?

Looks ok to me in any case, duration makes more sense than useless string.

@arjunsalyan
Copy link
Member Author

arjunsalyan commented Sep 28, 2019

Is the migration really so simple and the conversion works out of the box?

Yes. We were already storing a timedelta object in this field, which is supported by DurationField.

Will the app redo fetching data from the failed parsing cases?

Yes, the app always starts fetching from last build id + 1 build for each builder.

I have also tested this on EC2.

@arjunsalyan
Copy link
Member Author

If this looks good, we should merge it asap. We are missing on updates due to this.

@mojca mojca merged commit bafaefc into macports:master Sep 29, 2019
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.

Cron fails with djano.core.exceptions.ValidationError
3 participants