Merge lp://qastaging/~doanac/ubuntu-ci-services-itself/publisher-ppa-sync into lp://qastaging/ubuntu-ci-services-itself

Proposed by Andy Doan
Status: Merged
Approved by: Andy Doan
Approved revision: 404
Merged at revision: 407
Proposed branch: lp://qastaging/~doanac/ubuntu-ci-services-itself/publisher-ppa-sync
Merge into: lp://qastaging/ubuntu-ci-services-itself
Diff against target: 217 lines (+61/-60)
4 files modified
lander/bin/lander_service_wrapper.py (+44/-16)
lander/bin/ppa_sync.py (+17/-0)
ppa-assigner/ppa_assigner/api.py (+0/-24)
ppa-assigner/ppa_assigner/tests.py (+0/-20)
To merge this branch: bzr merge lp://qastaging/~doanac/ubuntu-ci-services-itself/publisher-ppa-sync
Reviewer Review Type Date Requested Status
Francis Ginther Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+211189@code.qastaging.launchpad.net

Commit message

publisher: move ppa_sync logic into lander

We are seeing some flakiness in the publishing phase. This simplifies
things a little in a way that might make it "just work", and at a
minimum, it should get us improved logging.

Description of the change

This is an idea I had to help improve the chances of the publisher working. It solves the issue where publisher logs weren't getting connected to Joe's new webui workflow stuff.

To post a comment you must log in.
Revision history for this message
Francis Ginther (fginther) wrote :

ppa-assigner/ppa_assigner/api.py still has:
  from ppa_assigner import ppa_sync

This breaks startup of ppa_django. Still reviewing.

review: Needs Fixing
Revision history for this message
Francis Ginther (fginther) wrote :

68-95: the try block in lander/bin/lander_service_wrapper.py:

There are two actions in this try block, the ppa_copy and the artifact creation. If either fails, the publiser step is marked as failed. I believe this is the right outcome and is consistent with other components. Another thing I considered if either of these actions could be retried if it fails and I don't see a use case where it would help.

So I thinks is right, but please give it a second thought if I overlooked something.

I'm finished reviewing this.

Revision history for this message
Andy Doan (doanac) wrote :

On 03/16/2014 01:51 PM, Francis Ginther wrote:
> 68-95: the try block in lander/bin/lander_service_wrapper.py:
>
> There are two actions in this try block, the ppa_copy and the
> artifact creation. If either fails, the publiser step is marked as
> failed. I believe this is the right outcome and is consistent with
> other components. Another thing I considered if either of these
> actions could be retried if it fails and I don't see a use case where
> it would help.

Hmm. I think you've noticed something here. Really once we are through
that first block, the ticket has been marked COMPLETE. The 2nd block is
merely uploading/attaching artifacts. I don't think its worth failing an
otherwise successfull ticket over that. That should be easy to fix.

Revision history for this message
Andy Doan (doanac) wrote :

I'm testing revno 404 right now with:

 http://15.125.119.88/ticket.html?ticket_id=4

Not sure I totally trust myself patching this on the fly like I am

Revision history for this message
Andy Doan (doanac) wrote :

ticket: http://15.125.119.88/ticket.html?ticket_id=4 looks good. moving to "needs review"

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:404
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/444/
Executed test runs:

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/444/rebuild

review: Approve (continuous-integration)
Revision history for this message
Francis Ginther (fginther) wrote :

90 + with open(output) as f:
91 + ticket_id = config['master']['request_id']
92 + auth = unit_config.get_auth_config()
93 + ds = data_store.create_for_ticket(ticket_id, auth)
94 + url = ds.put_file(output, f.read(), 'text/plain')
95 + result['artifacts'] = [{
96 + 'name': output,
97 + 'reference': url,
98 + 'type': 'LOGS',
99 + }]
100 + ticket.process_artifacts(result)

This is now outside the try block. Is that what you want? If it fails, the exception will now be caught by the try block in main(). This looks right to me as it's still a failure that needs to be surfaced and dealt with (in this case it would behave in a similar way as if the API call had failed). I'll approve, but just want to mention this in case you had a different outcome in mind.

review: Approve
Revision history for this message
Andy Doan (doanac) wrote :

On 03/17/2014 10:44 AM, Francis Ginther wrote:
> This is now outside the try block. Is that what you want? If it
> fails, the exception will now be caught by the try block in main().
> This looks right to me as it's still a failure that needs to be
> surfaced and dealt with (in this case it would behave in a similar
> way as if the API call had failed). I'll approve, but just want to
> mention this in case you had a different outcome in mind.

It fails the Jenkins job, but not the ticket. I figured this was a good
distinction. ie - there was a failure we might want to investigate. Its
just not a failure that should stop a ticket from being complete.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches