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

[api] Handle multibuilds in API call to _result #3106

Merged
merged 1 commit into from May 11, 2017

Conversation

Projects
None yet
2 participants
@bgeuken
Copy link
Member

bgeuken commented May 11, 2017

Fixes #3026

In case of multibuilds we need to fetch the sources of the package
container, but the build results of the queried multibuild package.
This commit should do the trick.

Kudos to Michael for pointing me towards the right direction.

@@ -168,12 +168,19 @@ def result
def result_lastsuccess
required_parameters :package, :pathproject

pkg = Package.get_by_project_and_name(params[:project], params[:package],
if params[:multibuild]

This comment has been minimized.

@ChrisBr

ChrisBr May 11, 2017

Member

Looking at the issue there is no multibuild parameter.

Other solution:

Set follow_multibuild: true in Package.get_by_project_and_name will return always the package container. If the package parameter does not package pkg.name it is a multibuild.

This comment has been minimized.

@bgeuken

bgeuken May 11, 2017

Member

Right, that was from the other solution. I got confused.

@bgeuken bgeuken force-pushed the bgeuken:multibuild_result branch from 154c60b to e593c3d May 11, 2017

@codecov

This comment has been minimized.

Copy link

codecov bot commented May 11, 2017

Codecov Report

Merging #3106 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #3106      +/-   ##
=========================================
+ Coverage   88.89%   88.9%   +<.01%     
=========================================
  Files         262     262              
  Lines       17585   17588       +3     
=========================================
+ Hits        15633   15636       +3     
  Misses       1952    1952
Flag Coverage Δ
#api 83.62% <100%> (-0.79%) ⬇️
#rspec 65.78% <0%> (-0.01%) ⬇️
#webui 64.48% <ø> (+0.56%) ⬆️
[api] Handle multibuilds in API call to _result
Fixes #3026

In case of multibuilds we need to fetch the sources of the package
container, but the build results of the queried multibuild package.
This commit should do the trick.

Kudos to Michael for pointing me towards the right direction.

@bgeuken bgeuken force-pushed the bgeuken:multibuild_result branch from e593c3d to 2b480d4 May 11, 2017

@ChrisBr

This comment has been minimized.

Copy link
Member

ChrisBr commented May 11, 2017

LGTM (provided tests succeed!)

@bgeuken bgeuken merged commit b945bc7 into openSUSE:master May 11, 2017

4 checks passed

Hakiri No security warnings were found.
Details
codecov/patch 100% of diff hit (target 88.89%)
Details
codecov/project 88.9% (+<.01%) compared to b17e066
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@bgeuken bgeuken deleted the bgeuken:multibuild_result branch May 11, 2017

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