Skip to content
This repository was archived by the owner on Sep 23, 2024. It is now read-only.

Misc improvements mostly Jenkins #113

Merged
spbnick merged 7 commits intocki-project:masterfrom
danghai:sktm_misc
Jul 19, 2018
Merged

Misc improvements mostly Jenkins #113
spbnick merged 7 commits intocki-project:masterfrom
danghai:sktm_misc

Conversation

@danghai
Copy link
Copy Markdown
Contributor

@danghai danghai commented Jul 14, 2018

I make PR to supersedes #52

@danghai danghai force-pushed the sktm_misc branch 2 times, most recently from f364825 to 9ad0a99 Compare July 14, 2018 18:09
@coveralls
Copy link
Copy Markdown

coveralls commented Jul 14, 2018

Pull Request Test Coverage Report for Build 380

  • 31 of 64 (48.44%) changed or added relevant lines in 6 files are covered.
  • 5 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.02%) to 29.082%

Changes Missing Coverage Covered Lines Changed/Added Lines %
sktm/patchwork.py 1 2 50.0%
sktm/executable.py 0 3 0.0%
sktm/init.py 4 13 30.77%
sktm/jenkins.py 17 37 45.95%
Files with Coverage Reduction New Missed Lines %
sktm/init.py 1 25.69%
sktm/jenkins.py 4 12.79%
Totals Coverage Status
Change from base Build 377: 0.02%
Covered Lines: 320
Relevant Lines: 928

💛 - Coveralls

@danghai
Copy link
Copy Markdown
Contributor Author

danghai commented Jul 14, 2018

@spbnick It is good to review now!

Copy link
Copy Markdown
Contributor

@spbnick spbnick 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 have only a few minor requests. Thank you, Hai!

Comment thread sktm/__init__.py Outdated
patch_url))

if bres != sktm.tresult.BASELINE_FAILURE:
if bres != sktm.misc.BASELINE_FAILURE:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

These three above are missing TestResult in the name and wouldn't work. Please fix.

Comment thread sktm/__init__.py
self.jk = sktm.jenkins.skt_jenkins(jenkinsurl, jenkinslogin,
jenkinspassword)
# Jenkins project name
self.jobname = jenkinsjobname
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A comment on the commit message: Could you update the message to say sktm.jenkins.JenkinsProject instead of sktm.jenkins.Project? Thank you.

Comment thread sktm/__init__.py
self.db.set_patchset_pending(cpw.baseurl, cpw.project_id,
series.get_patch_info_list())
# Submit and remember a Jenkins build for the series
url_list = series.get_patch_url_list()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same here, could you please use sktm.jenkins.JenkinsProject in the commit message?

Comment thread sktm/jenkins.py Outdated

def is_build_complete(self, buildid):
"""
Check if a project build is complete.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you remove "project" from here? This class is all about a project, so no need to mention it here.

@danghai danghai force-pushed the sktm_misc branch 2 times, most recently from 7d22fcb to 75c8d72 Compare July 16, 2018 15:48
@danghai
Copy link
Copy Markdown
Contributor Author

danghai commented Jul 16, 2018

@spbnick I have updated! Let me know if you need anything change.

@spbnick spbnick requested a review from veruu July 16, 2018 16:15
@spbnick
Copy link
Copy Markdown
Contributor

spbnick commented Jul 16, 2018

@veruu, could you please review this again? @danghai rebased and cleaned it up. I think it would be great to get this in.

Copy link
Copy Markdown
Contributor

@veruu veruu left a comment

Choose a reason for hiding this comment

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

Thanks Hai! I noticed two things you missed from the original pull (one is a docstring so not that important, but the other one would break the functionality). Can you please resolve them and rebase?

@spbnick , your review still says "changes requested". Is this still your status? In case not, can you change it to the right one?

Comment thread sktm/jenkins.py
buildid: Jenkins build ID.

Return:
The URL of the build result.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I can't comment on a specific commit, but the Describe sktm.jenkins.get_result_url functions commit is only adding docstring to this function, while in the original commit it's also documenting get_result one (hence why there is an asterisk in the original commit message, which is also missing in this one).

Comment thread sktm/__init__.py Outdated
subject=series.subject,
emails=series.email_addr_set,
patchwork=series.get_patch_url_list(),
patchwork=url_list,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The method parameter is still named patchwork here (while it's changed in the build(), so this commit would break things)

spbnick
spbnick previously approved these changes Jul 17, 2018
@spbnick
Copy link
Copy Markdown
Contributor

spbnick commented Jul 17, 2018

Thank you, @veruu for spotting the omissions! Approving and handing over to you now :)

@spbnick
Copy link
Copy Markdown
Contributor

spbnick commented Jul 18, 2018

@danghai, do you think you could rebase this again and address @veruu's comments?

@danghai
Copy link
Copy Markdown
Contributor Author

danghai commented Jul 18, 2018

@spbnick Sure. I will do it when I have a chance

danghai added 7 commits July 19, 2018 02:29
Move sktm.tresult to sktm.misc.TestResult to fix composition, so
that modules lower in the hierarchy (e.g. sktm.jenkins) do not
have to import the module above (i.e. sktm).
Instead of creating and using a "Jenkins Interface"
(sktm.jenkins.JenkinsProject), and then supplying a project name
("jobname") with every method call, create and use a "Jenkins Project
Interface" (sktm.jenkins.JenkinsProject) and only supply the project name on
its creation.

This simplifes the interface, and removes a bit of code.
This also prepares for abstracting Jenkins away.
Spell out "patch URL list" instead of writing "patchwork" in
sktm.jenkins.JenkinsProject, to make clear what's being
accepted/returned.

Leave updating the Jenkins project parameter name for later.
Create a complete Jenkins project interface instance and pass it to the
watcher, instead of having the watcher create it. This prepares the
watcher to using abstract scheduler interface, instead of Jenkins
specifically.
@danghai
Copy link
Copy Markdown
Contributor Author

danghai commented Jul 19, 2018

@spbnick @veruu I rebased and addressed comments. It is good to review now :)

Copy link
Copy Markdown
Contributor

@veruu veruu left a comment

Choose a reason for hiding this comment

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

Thanks Hai! The pull looks good now!

@spbnick
Copy link
Copy Markdown
Contributor

spbnick commented Jul 19, 2018

Thank you very much, @veruu and @danghai 😄!

@spbnick spbnick merged commit 8e6f329 into cki-project:master Jul 19, 2018
@danghai danghai deleted the sktm_misc branch July 19, 2018 16:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants