Skip to content

[AMSDK-11013] Support for sending update consent requests to Edge Network#164

Merged
emdobrin merged 14 commits intoadobe:feature/consentfrom
emdobrin:consent
Feb 18, 2021
Merged

[AMSDK-11013] Support for sending update consent requests to Edge Network#164
emdobrin merged 14 commits intoadobe:feature/consentfrom
emdobrin:consent

Conversation

@emdobrin
Copy link
Copy Markdown
Contributor

Description

  • Update EdgeHitProcessor to queue and process experience events and update consent events
  • EdgeHit is now a protocol so it can be implemented for various types of requests
  • In addition to the privacy optout check, ignore experience events when consent is set to no
  • Sample app updates for consent events, requires future updates to use Consent public APIs
  • Swift lint fixes in tests and disabled some rules

Related Issue

Motivation and Context

How Has This Been Tested?

Unit and manual testing, functional tests should be covered in a separate PR

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 11, 2021

Codecov Report

Merging #164 (495178b) into feature/consent (03c5232) will decrease coverage by 2.12%.
The diff coverage is 75.59%.

@@                 Coverage Diff                 @@
##           feature/consent     #164      +/-   ##
===================================================
- Coverage            93.08%   90.95%   -2.12%     
===================================================
  Files                   20       23       +3     
  Lines                  621      807     +186     
===================================================
+ Hits                   578      734     +156     
- Misses                  43       73      +30     


func getPayload() -> String? {
let encoder = JSONEncoder()
encoder.outputFormatting = [.prettyPrinted]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Any reason why this needs to be pretty printed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The request payload is also printed to debug logs.

@emdobrin emdobrin requested a review from PravinPK February 17, 2021 01:59
Copy link
Copy Markdown
Contributor

@kevinlind kevinlind left a comment

Choose a reason for hiding this comment

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

Looks good. Added a comment, but doesn't require changes for this PR.

/// An `EdgeConsentUpdate` is the top-level request object sent to Experience Edge to the set-consent endpoint.
struct EdgeConsentUpdate: Encodable {
/// The IdentityMap at the moment of this request
let identityMap: IdentityMap?
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: I think this is okay for now, in this PR, however when Edge reads the IdentityEdge XDM shared state, we should remove the IdentityMap class from Edge and use a [String: Any] type here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

👍 should be handled by #165

@emdobrin emdobrin merged commit e8e8330 into adobe:feature/consent Feb 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants