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

Fix for cron issues #613

Merged
merged 3 commits into from Sep 20, 2018

Conversation

Projects
None yet
3 participants
@Zlopez
Copy link
Member

Zlopez commented Sep 20, 2018

This PR should fix current cron issues on staging.

Zlopez added some commits Sep 20, 2018

Fix IndexError in cron job
This error was caused by trying to retrieve last version when no version
was received
Change the vagrant development environment to python3
This will prevent issue with UnicodeEncodeError when running
files/anitya_cron.py
@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Sep 20, 2018

Codecov Report

Merging #613 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #613      +/-   ##
==========================================
+ Coverage   90.02%   90.03%   +0.01%     
==========================================
  Files          55       55              
  Lines        2646     2650       +4     
  Branches      341      343       +2     
==========================================
+ Hits         2382     2386       +4     
  Misses        201      201              
  Partials       63       63
Impacted Files Coverage Δ
anitya/lib/backends/github.py 100% <100%> (ø) ⬆️
anitya/lib/backends/gitlab.py 100% <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 8f73430...709073e. Read the comment docs.

@jeremycline
Copy link
Member

jeremycline left a comment

One small note about the string format

'Project %s was incorrectly set-up. \
Can\'t parse owner and repo' % project.name)
'Project %s was incorrectly set-up. ' % project.name +
'Can\'t parse owner and repo.')

This comment has been minimized.

@jeremycline

jeremycline Sep 20, 2018

Member

It's neater to do it as:

"Project {} was incorrectly set-up. Can't parse owner and repo.".format(project.name)

rather than having the format in the middle of a string

'Project %s was incorrectly set-up. ' % project.name +
'Can\'t parse owner and repo.')
"""Project {} was incorrectly set-up.
Can\'t parse owner and repo.""".format(project.name))

This comment has been minimized.

@jeremycline

jeremycline Sep 20, 2018

Member

FYI you can do

raise AnityaPluginException(
    "..."
    "more text".format())

This comment has been minimized.

@Zlopez

Zlopez Sep 20, 2018

Member

Didn't know that, it can't be done with %.

@mergify mergify bot merged commit 01d8d5e into release-monitoring:master Sep 20, 2018

4 checks passed

codecov/patch 100% of diff hit (target 90.02%)
Details
codecov/project 90.03% (+0.01%) compared to 8f73430
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
mergify/pr Merged

@Zlopez Zlopez deleted the Zlopez:cron branch Oct 8, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment