[aerogear-dev] Question about metricsEndpoint

Matthias Wessendorf matzew at apache.org
Thu Apr 20 08:29:55 EDT 2017


Mind sending a PR ?

On Thu, Apr 20, 2017 at 1:31 PM, Jose Miguel Gallas Olmedo <
jgallaso at redhat.com> wrote:

> Hi all,
>
> I am trying to solve some bugish behaviour that makes the status label to
> be "Pending..." permanently, even when the notifications have been sent.
>
> The label is "Pending..." when "*servedVariants*" is less than "
> *totalVariants*" -> https://github.com/aerogear/aerogear-unifiedpush-
> server/blob/1.1.x-dev/admin-ui/app/components/app-detail/
> include/activity.html#L46
>
> Well, in the *metricsEndpoint.js*, it iterates over all variants and flag
> an error or increase the "*servedVariants*" property ->
> https://github.com/aerogear/aerogear-unifiedpush-server/
> blob/1.1.x-dev/admin-ui/app/scripts/endpoints/metricsEndpoint.js#L28-L30
>
> ​I don't fully understand what's happening in this iteration and why
> there's no "else" clause. The problem is caused by this I think. During
> some iteration the counter is not being increased hence the
> *servedVariants* never equals *totalVariants* and hence (again) the label
> does not change.​
>
> So the current flow would be:
> 1. If *deliveryStatus* is falsy, flag an error.
> 2. If servedBatches = totalBatches then increase servedVariants
>
> Can both conditions pass? I think they can although this is not expected.
> Can deliveryStatus be always truthy but the servedBatches != totalBatches?
> I think that what's happening and as a result, it is hiding some error that
> the user may want to see.
>
> I also think that, in case of deliveryStatus, the iteration should stop.
>
> WDYT?
>
> ​Cheers,​
>
> --
>
> JOSE MIGUEL GALLAS OLMEDO
>
> ASSOCIATE QE, mobile
>
> Red Hat
>
> <https://www.redhat.com/>
>
> M: +34618488633 <http://redhatemailsignature-marketing.itos.redhat.com/>
>
> <https://red.ht/sig>
>
> _______________________________________________
> aerogear-dev mailing list
> aerogear-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>



-- 
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
twitter: http://twitter.com/mwessendorf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/aerogear-dev/attachments/20170420/44f652d9/attachment-0001.html 


More information about the aerogear-dev mailing list