Merge ~bladernr/hwcert-tools:add-private-cert-filter into hwcert-tools:master

Proposed by Jeff Lane 
Status: Approved
Approved by: Jeff Lane 
Approved revision: accab378d8c0c2510b5b87cec7f989af8cba64fd
Proposed branch: ~bladernr/hwcert-tools:add-private-cert-filter
Merge into: hwcert-tools:master
Diff against target: 84 lines (+29/-12)
1 file modified
certification_reports/c3_results_notify.py (+29/-12)
Reviewer Review Type Date Requested Status
Paul Larson (community) Approve
Review via email: mp+335471@code.qastaging.launchpad.net

Description of the change

Added a --private arg for certificate reports to only return certificates that are flagged as private.

To post a comment you must log in.
Revision history for this message
Sheila Miguez (codersquid) wrote :

Hi, while skimming this I noticed that the api being called does not allow for filtering based on privacy, so I added a feature request for it lp:1739636

Revision history for this message
Jeff Lane  (bladernr) wrote :

I saw that. Thanks!

On Thu, Dec 21, 2017 at 10:59 AM, Sheila Miguez
<email address hidden> wrote:
> Hi, while skimming this I noticed that the api being called does not allow for filtering based on privacy, so I added a feature request for it lp:1739636
> --
> https://code.launchpad.net/~bladernr/hwcert-tools/+git/hwcert-tools/+merge/335471
> You are the owner of ~bladernr/hwcert-tools:add-private-cert-filter.
>
> Launchpad-Message-Rationale: Owner
> Launchpad-Message-For: bladernr
> Launchpad-Notification-Type: code-review
> Launchpad-Branch: ~bladernr/hwcert-tools/+git/hwcert-tools:add-private-cert-filter
> Launchpad-Project: hwcert-tools

--
"Entropy isn't what it used to be."

Jeff Lane -
Server Certification Lead, Warrior Poet, Biker, Lover of Pie
Phone: 919-442-8649
Ubuntu Ham: W4KDH Freenode IRC: bladernr or bladernr_
gpg: 1024D/3A14B2DD 8C88 B076 0DD7 B404 1417 C466 4ABD 3635 3A14 B2DD

Revision history for this message
Paul Larson (pwlars) wrote :

This looks sane to me. One question, I notice that we only do:
+ result.update({"Is Private": certificate['is_private']})
...if --private is specified. Is that useful information to include in the result that we hand back even if you don't specify --private?

I tested running with and without --private and it seems to work as advertised though, so +1

review: Approve
Revision history for this message
Paul Larson (pwlars) wrote :

also, wow that query takes a long time! hopefully this isn't something you have to run a lot

Revision history for this message
Jeff Lane  (bladernr) wrote :

All queries take a long time, unfortunately... but it helps greatly to
use the --oneweek or --onemonth or --oneyear limits, or do a start/end
date limit. If you try rolling through them all, then yes, it'll take
forever, but that's the way the API is designed.

Sheila has a change in the works to remove some of that necessary
complexity though... a way to filter certificates directly in the API
based on privacy is coming when she has free time for it, but it's a
low-priority change.

To be honest, a LOT of the complexity in that script was necessary
because of the API design, but I imagine that one day we could take a
look at that and plan out a way to make API improvements to stream
line a lot of the report generation bits. (That may be a good topic
for a sprint... in Taipei... heh)

On Tue, Jan 2, 2018 at 1:06 PM, Paul Larson <email address hidden> wrote:
> also, wow that query takes a long time! hopefully this isn't something you have to run a lot
> --
> https://code.launchpad.net/~bladernr/hwcert-tools/+git/hwcert-tools/+merge/335471
> You are the owner of ~bladernr/hwcert-tools:add-private-cert-filter.
>
> Launchpad-Message-Rationale: Owner
> Launchpad-Message-For: bladernr
> Launchpad-Notification-Type: code-review
> Launchpad-Branch: ~bladernr/hwcert-tools/+git/hwcert-tools:add-private-cert-filter
> Launchpad-Project: hwcert-tools

--
"Entropy isn't what it used to be."

Jeff Lane -
Server Certification Lead, Warrior Poet, Biker, Lover of Pie
Phone: 919-442-8649
Ubuntu Ham: W4KDH Freenode IRC: bladernr or bladernr_
gpg: 1024D/3A14B2DD 8C88 B076 0DD7 B404 1417 C466 4ABD 3635 3A14 B2DD

Revision history for this message
Jeff Lane  (bladernr) wrote :

Not sure why this was never set to approve, but I just did it. Lets see if it lands.

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

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