Skip to content
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

Rvr 2369 Refactor events handling (#9) #3683

Merged
merged 2 commits into from
Apr 1, 2019
Merged

Conversation

AlessandroDG
Copy link
Contributor

Type of change

  • Feature
  • Refactoring (no functional changes, no api changes)

Description of change

Refactor rivrAnalyticsAdapter.js events handling.
Add ADD_AD_UNITS to trackable events.

* RVR-2177 - Refactor events handling

* RVR-2087 - Inject pbjsGlobalVariable into rivraddon

* RVR-2087 - update adapterManager dependency

* RVR-2087 - Add ADD_AD_UNITS to Prebid.JS trackable events

* RVR-2369 - Update package-lock.json
@AlessandroDG
Copy link
Contributor Author

On circle-ci tests pass but the job times out.
I don't seem to have permissions to rebuild it, let me know if you have any suggestions.

From circle-ci:

IE 11.0.0 (Windows 10.0.0): Executed 3466 of 3467 (skipped 1) SUCCESS (8.551 secs / 3.916 secs)
Firefox 58.0.0 (Windows 10.0.0): Executed 3469 of 3470 (skipped 1) SUCCESS (13.108 secs / 5.265 secs)
Safari 8.0.8 (Mac OS X 10.10.5): Executed 3466 of 3467 (skipped 1) SUCCESS (6.929 secs / 3.1 secs)
Edge 15.15063.0 (Windows 10.0.0): Executed 3466 of 3467 (skipped 1) SUCCESS (9.859 secs / 5.045 secs)
Chrome 61.0.3163 (Windows 10.0.0): Executed 3469 of 3470 (skipped 1) SUCCESS (7.957 secs / 3.263 secs)
Firefox 57.0.0 (Windows 10.0.0): Executed 3469 of 3470 (skipped 1) SUCCESS (10.407 secs / 3.897 secs)
Safari 9.1.3 (Mac OS X 10.11.6): Executed 3466 of 3467 (skipped 1) SUCCESS (28.652 secs / 18.286 secs)
TOTAL: 27740 SUCCESS

[15:50:04] Finished 'test' after 10 min
[15:50:04] Finished 'test' after 10 min
Too long with no output (exceeded 10m0s)```

@jsnellbaker
Copy link
Collaborator

@AlessandroDG It looks like the CircleCI job is running in a different instance than the Prebid. When I click on the details link above, it shows the test was ran under simplaex (in the top-left corner). As such, I can't rebuild the job either due to the permissions.

This sometimes happens when the submitter has their own setup with circleCI, To my knowledge, we haven't found a good fix for this situation.

I suppose in this case the reviewer will just have to run the tests locally to verify everything's working fine.

@AlessandroDG
Copy link
Contributor Author

@jsnellbaker thanks for getting back so quickly. I am of course available in case you need me to take any actions.

@jsnellbaker jsnellbaker self-requested a review March 26, 2019 17:00
@jsnellbaker jsnellbaker self-assigned this Mar 26, 2019
Copy link
Collaborator

@jsnellbaker jsnellbaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AlessandroDG I ran the browserstack tests locally and everything passed successfully.

However while looking over the changes, I saw a few things that needed to be reviewed. Please take a look at the items below when you have the chance.

Additionally, do you happen to have any test credentials/information available that I could use to test out the updates to your Analytics Adapter?

Thanks!

import adapterManager from '../src/adapterManager';
import * as utils from '../src/utils';
import * as utils from 'src/utils';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please reinstate the relative import paths; this style is needed for #3435

@@ -16,7 +16,8 @@ const {
BID_ADJUSTMENT,
BIDDER_DONE,
SET_TARGETING,
AD_RENDER_FAILED
AD_RENDER_FAILED,
ADD_AD_UNITS
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you clarify on the changes in this file?

If a new analytics event is needed, that should be part of a separate PR (since it's a core change to the module, rather than just your adapter).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure,

The event addAdUnits helps us detect any change on the adUnits object between the moment a new value is assigned to it and any other moment in the flow.

We are currently handling it at a lower level with:

    pbjsGlobal.onEvent('addAdUnits', (data) => { myHandler(data); });

but I understood that the events we get from it are not considered a stable interface.

I will create a separate PR fo it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jsnellbaker I updated this PR. Now it is only about rivrAnalyticsAdapter.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jsnellbaker PR for changes in core have been moved to #3691

## Type of change
- [x] Refactoring (no functional changes, no api changes)

## Description of change

Refactor rivrAnalyticsAdapter.js events handling.


## History

* RVR-2087 - update adapterManager dependency

* RVR-2369 - Update package-lock.json

* RVR-2369 - Revert changes in main Analytics adapter

It will be handled in a separate PR

* RVR-2369 - Use relative import paths

Needed for prebid#3435
AlessandroDG added a commit to simplaex/Prebid.js that referenced this pull request Mar 28, 2019
@jsnellbaker
Copy link
Collaborator

@AlessandroDG This PR looks good.

Do you have a preference though when this merged in lieu of #3691? Can this go separate, or do you want the other item merged first before updating your adapter?

@AlessandroDG
Copy link
Contributor Author

@jsnellbaker thanks for asking.
Feel free to merge this PR and #3691 in any order.

@jsnellbaker jsnellbaker merged commit d3f4d28 into prebid:master Apr 1, 2019
idettman pushed a commit that referenced this pull request Apr 1, 2019
* RVR-2177 - Refactor events handling

* RVR-2087 - Inject pbjsGlobalVariable into rivraddon

* RVR-2087 - update adapterManager dependency

* RVR-2087 - Add ADD_AD_UNITS to Prebid.JS trackable events

* RVR-2369 - Update package-lock.json

* RVR-2369 - Revert rivrAnalyticsAdapter changed

Handled in separate PR #3683

* RVR-2369 - Add REQUEST_BIDS to trackable events
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants