Merge lp://staging/~doanac/qa-dashboard/smoke-pull-regression into lp://staging/qa-dashboard

Proposed by Andy Doan
Status: Merged
Approved by: Chris Johnston
Approved revision: 691
Merged at revision: 691
Proposed branch: lp://staging/~doanac/qa-dashboard/smoke-pull-regression
Merge into: lp://staging/qa-dashboard
Diff against target: 26 lines (+7/-2)
1 file modified
smokeng/management/commands/jenkins_pull_smokeng.py (+7/-2)
To merge this branch: bzr merge lp://staging/~doanac/qa-dashboard/smoke-pull-regression
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Chris Johnston Approve
Review via email: mp+197416@code.staging.launchpad.net

Commit message

fix bug regression in our smoke pull script

the ran_at field has two paths. 1 for utah yaml results and 1 for
non-utah yaml. The utah path sends ran_at as a string while the
other path sends it as a datetime object. This makes the pull logic
smart enough to only convert when needed.

Description of the change

The dashboard is hitting an exception due to type mismatches that causing us to not be able to update bugs when build descriptions change:

fix bug regression in our smoke pull script

the ran_at field has two paths. 1 for utah yaml results and 1 for
non-utah yaml. The utah path sends ran_at as a string while the
other path sends it as a datetime object. This makes the pull logic
smart enough to only convert when needed.

To post a comment you must log in.
Revision history for this message
Chris Johnston (cjohnston) wrote :

 review approve
 merge approved

On Mon, Dec 2, 2013 at 11:47 AM, Andy Doan <email address hidden>wrote:

> Andy Doan has proposed merging
> lp:~doanac/qa-dashboard/smoke-pull-regression into lp:qa-dashboard.
>
> Commit message:
> fix bug regression in our smoke pull script
>
> the ran_at field has two paths. 1 for utah yaml results and 1 for
> non-utah yaml. The utah path sends ran_at as a string while the
> other path sends it as a datetime object. This makes the pull logic
> smart enough to only convert when needed.
>
> Requested reviews:
> PS Jenkins bot (ps-jenkins): continuous-integration
> Canonical CI Engineering (canonical-ci-engineering)
>
> For more details, see:
>
> https://code.launchpad.net/~doanac/qa-dashboard/smoke-pull-regression/+merge/197416
>
> The dashboard is hitting an exception due to type mismatches that causing
> us to not be able to update bugs when build descriptions change:
>
> fix bug regression in our smoke pull script
>
> the ran_at field has two paths. 1 for utah yaml results and 1 for
> non-utah yaml. The utah path sends ran_at as a string while the
> other path sends it as a datetime object. This makes the pull logic
> smart enough to only convert when needed.
> --
>
> https://code.launchpad.net/~doanac/qa-dashboard/smoke-pull-regression/+merge/197416
> Your team QA Dashboard Developers is subscribed to branch lp:qa-dashboard.
>
> === modified file 'smokeng/management/commands/jenkins_pull_smokeng.py'
> --- smokeng/management/commands/jenkins_pull_smokeng.py 2013-11-21
> 16:58:17 +0000
> +++ smokeng/management/commands/jenkins_pull_smokeng.py 2013-12-02
> 16:45:59 +0000
> @@ -201,6 +201,12 @@
>
> jenkins_builds.delete()
>
> + @staticmethod
> + def _to_datetime(ran_at):
> + if type(ran_at) == str:
> + ran_at = datetime.datetime.strptime(ran_at, '%Y-%m-%d
> %H:%M:%S')
> + return ran_at
> +
> def add_result(self, dashboard_data):
> """ Add smoke data to the database. """
>
> @@ -229,8 +235,7 @@
> )
>
> if not new_result:
> - result.ran_at = datetime.datetime.strptime(
> - dashboard_data['ran_at'], '%Y-%m-%d %H:%M:%S')
> + result.ran_at = self._to_datetime(dashboard_data['ran_at'])
> result.pass_count = dashboard_data['passes']
> result.fail_count = dashboard_data['failures']
> result.error_count = dashboard_data['errors']
>
>
>

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

PASSED: Continuous integration, rev:691
http://s-jenkins.ubuntu-ci:8080/job/dashboard-ci/264/
Executed test runs:

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/dashboard-ci/264/rebuild

review: Approve (continuous-integration)

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