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 Oct 24, 2018
@codecov
Copy link

@codecov 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%) ⬇️

Loading

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

@humitos humitos Oct 31, 2018

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.

Loading

Copy link
Member Author

@humitos humitos Jan 16, 2019

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.

Loading

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

@humitos humitos Oct 31, 2018

Choose a reason for hiding this comment

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

Same here.

Loading

Copy link
Member Author

@humitos humitos Jan 16, 2019

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.

Loading

Copy link
Member

@ericholscher ericholscher left a comment

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.

Loading

@humitos
Copy link
Member Author

@humitos humitos commented Nov 1, 2018

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

Loading

@ericholscher
Copy link
Member

@ericholscher ericholscher commented Nov 7, 2018

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

Loading

@ericholscher ericholscher merged commit ce0948f into master Nov 7, 2018
1 of 3 checks passed
Loading
@humitos humitos deleted the humitos/lock/appropiate-log branch Nov 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants