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

Appropiate logging when a LockTimeout for VCS is reached #4804

Merged
merged 2 commits into from
Nov 7, 2018

Conversation

humitos
Copy link
Member

@humitos humitos commented Oct 24, 2018

Related #3856

@humitos humitos requested a review from a team October 24, 2018 16:37
@codecov
Copy link

codecov bot commented Oct 24, 2018

Codecov Report

Merging #4804 into master will decrease coverage by 0.07%.
The diff coverage is 9.09%.

@@            Coverage Diff             @@
##           master    #4804      +/-   ##
==========================================
- Coverage   76.39%   76.31%   -0.08%     
==========================================
  Files         158      158              
  Lines        9980     9989       +9     
  Branches     1261     1264       +3     
==========================================
- Hits         7624     7623       -1     
- Misses       2016     2025       +9     
- Partials      340      341       +1
Impacted Files Coverage Δ
readthedocs/projects/tasks.py 67.82% <9.09%> (-1.49%) ⬇️

'Lock still active: project=%s version=%s',
self.project.slug,
self.version.slug,
)
Copy link
Member Author

Choose a reason for hiding this comment

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

This should raise VersionLockedError here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Since this task is used only for syncing the repo, we don't need to raise the exception here. It will return False when it fails and that's all what we need.

'Lock still active: project=%s version=%s',
self.project.slug,
self.version.slug,
)
Copy link
Member Author

Choose a reason for hiding this comment

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

Same here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Here, we need to raise a proper exception on each different case.

Copy link
Member

@ericholscher ericholscher left a comment

Choose a reason for hiding this comment

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

Looks good.

I ran into issues with self.version and self.project not existing because get_project and get_version fail because of an API issue (https://sentry.io/read-the-docs/readthedocs-org/issues/712735617/?query=is:unresolved). We can probably change that in another PR, but thought it might be worth mentioning.

@humitos
Copy link
Member Author

humitos commented Nov 1, 2018

Yes, I also noted those. I need to fix them.

@humitos humitos added the PR: work in progress Pull request is not ready for full review label Nov 1, 2018
@ericholscher
Copy link
Member

Believe we can ignore the codecov issues here -- it feels wrong, and I will merge.

@ericholscher ericholscher merged commit ce0948f into master Nov 7, 2018
@humitos humitos deleted the humitos/lock/appropiate-log branch November 8, 2018 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: work in progress Pull request is not ready for full review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants