Skip to content

Add Edge event reference#44

Merged
timkimadobe merged 13 commits intoadobe:dev-v2.0.1from
timkimadobe:edge-event-reference
Feb 17, 2023
Merged

Add Edge event reference#44
timkimadobe merged 13 commits intoadobe:dev-v2.0.1from
timkimadobe:edge-event-reference

Conversation

@timkimadobe
Copy link
Copy Markdown
Contributor

@timkimadobe timkimadobe commented Feb 4, 2023

Description

This PR adds the event reference page for the Edge Network extension:

  1. Events handled
  2. Events dispatched
    Basically outlining the event contract for all events edge interacts with via the Event Hub

Related Issue

Motivation and Context

How Has This Been Tested?

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 10, 2023

Codecov Report

Merging #44 (a144253) into dev-v2.0.1 (66eac87) will not change coverage.
The diff coverage is n/a.

❗ Current head a144253 differs from pull request most recent head 2288b58. Consider uploading reports for the commit 2288b58 to get more accurate results

@@              Coverage Diff              @@
##             dev-v2.0.1      #44   +/-   ##
=============================================
  Coverage         83.28%   83.28%           
  Complexity          367      367           
=============================================
  Files                29       29           
  Lines              1555     1555           
  Branches            219      219           
=============================================
  Hits               1295     1295           
  Misses              161      161           
  Partials             99       99           
Flag Coverage Δ
functional-tests 65.85% <ø> (ø)
unit-tests 79.16% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@timkimadobe timkimadobe marked this pull request as ready for review February 10, 2023 20:01
@timkimadobe timkimadobe changed the base branch from main to dev-v2.0.1 February 10, 2023 21:30
#### Event Details<!-- omit in toc -->

| Event type | Event source |
| -------------------------- | ------------------------------------ |
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.

We can remove this table since the next table L32 has the same info with the API.

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.

Thanks for catching that! Removed table

Fix event source value
Copy link
Copy Markdown
Contributor Author

@timkimadobe timkimadobe left a comment

Choose a reason for hiding this comment

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

Thank you for the review @addb! Updated based on feedback

#### Event Details<!-- omit in toc -->

| Event type | Event source |
| -------------------------- | ------------------------------------ |
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.

Thanks for catching that! Removed table


| Key | Value type | Required | Description |
| ------------ | ------------- | -------- | -------------------------- |
| locationHint | `boolean` | Yes | The Edge Network location hint to use when connecting to Edge Network. Property is set to `true` automatically; it is not user modifiable. |
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.

This field is used to distinguish (edge, requestIdentity) event is a getter for locationHint. Let's update the description accordingly.

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.

We can add Required value as Yes (internal)

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.

That makes sense! Thank you, updated description section

For the Required column what do you think about updating the column name to Key Required or Mandatory Key? Since this doc is from the perspective of Edge extension's own event contract, all of the "Required"-ness should already be implied to be internal right?

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.

Makes sense. We can keep it as is then.


This event signals that [Identity for Edge Network](https://github.com/adobe/aepsdk-edgeidentity-android) has completed [resetting all identities](https://developer.adobe.com/client-sdks/documentation/identity-for-edge-network/api-reference/#resetidentities) usually following a call to [`MobileCore.resetIdentities()`](https://github.com/adobe/aepsdk-core-android/blob/main/Documentation/MobileCore/api-reference.md).

When this event is received, the Edge extension queues it up and removes the cached internal state:store settings. If other events are queued before this event, these events will be processed first in the order they were received.
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.

... queued before this event, those events...

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.

Updated!


This event is a response to the [Edge request identity event](#edge-request-identity)) and provides the location hint being used by the Edge Network extension in requests to the Edge Network. The Edge Network location hint may be used when building the URL for Edge Network requests to hint at the server cluster to use.

| Value | Behavior |
Copy link
Copy Markdown
Contributor

@addb addb Feb 15, 2023

Choose a reason for hiding this comment

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

We dont need this consent table here.

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.

We should add this is dispatched for edge-request-identity event with data containing lochint = true

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.

Also add a local href to the section getLocHint

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.

Removed table and added locationHint = true requirement in description

For adding a local href to getLoc Hint, did you mean adding a link to the getLocationHint API in the description for this section? I was thinking the link to Edge request identity event (which has a link to getLocationHint API) would be enough since that API actually creates that event, and not this response one

#### Data payload definition<!-- omit in toc -->

| Key | Value type | Required | Description |
| --------- | ------------- | -------- | --------------------- |
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.

We can add Required value as Yes (internal)

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.


| Event type | Event source |
| --------------------------------- | ------------------------------------- |
| com.adobe.eventType.edge | This value is copied from the event being responded to; if not set or `null`, has a default value of com.adobe.eventSource.responseContent |
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.

just com.adobe.eventSource.responseContent

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.

I was a bit confused for this one, since the dispatchResponse API is able to generate many different kinds of response events; for this section of "Edge event response" do we only want strictly the
Event type: com.adobe.eventType.edge and Event source: com.adobe.eventSource.responseContent and cover the other potential cases separately in other new sections?

for example dispatchResponse is able to use any eventSource value:

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.

We should have error response and responseContent. I am not sure how to accommodate any source. @emdobrin @kevinlind Do we have any a limited number eventSource that we expect or this can be anything and we should not try to document each and every known source?

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.

I've removed the variable event source for now; maybe we can address the variable portion in a followup PR?

Standardize table header formatting for easier find and replace in the future
Separate API creating event section
Update API signature format to match standard java doc format
Copy link
Copy Markdown
Contributor Author

@timkimadobe timkimadobe left a comment

Choose a reason for hiding this comment

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

Thanks for the review @addb! Updated based on feedback with a few outstanding questions (attached to relevant feedback comments)

Also, I separated the API column from the table in the cases where the APIs directly create the event into a new section, since if multiple APIs were to create the same event its redundant to repeat the event type/source values for each; what do you think?


| Key | Value type | Required | Description |
| ------------ | ------------- | -------- | -------------------------- |
| locationHint | `boolean` | Yes | The Edge Network location hint to use when connecting to Edge Network. Property is set to `true` automatically; it is not user modifiable. |
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.

That makes sense! Thank you, updated description section

For the Required column what do you think about updating the column name to Key Required or Mandatory Key? Since this doc is from the perspective of Edge extension's own event contract, all of the "Required"-ness should already be implied to be internal right?


This event signals that [Identity for Edge Network](https://github.com/adobe/aepsdk-edgeidentity-android) has completed [resetting all identities](https://developer.adobe.com/client-sdks/documentation/identity-for-edge-network/api-reference/#resetidentities) usually following a call to [`MobileCore.resetIdentities()`](https://github.com/adobe/aepsdk-core-android/blob/main/Documentation/MobileCore/api-reference.md).

When this event is received, the Edge extension queues it up and removes the cached internal state:store settings. If other events are queued before this event, these events will be processed first in the order they were received.
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.

Updated!


This event is a response to the [Edge request identity event](#edge-request-identity)) and provides the location hint being used by the Edge Network extension in requests to the Edge Network. The Edge Network location hint may be used when building the URL for Edge Network requests to hint at the server cluster to use.

| Value | Behavior |
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.

Removed table and added locationHint = true requirement in description

For adding a local href to getLoc Hint, did you mean adding a link to the getLocationHint API in the description for this section? I was thinking the link to Edge request identity event (which has a link to getLocationHint API) would be enough since that API actually creates that event, and not this response one

#### Data payload definition<!-- omit in toc -->

| Key | Value type | Required | Description |
| --------- | ------------- | -------- | --------------------- |
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.


| Event type | Event source |
| --------------------------------- | ------------------------------------- |
| com.adobe.eventType.edge | This value is copied from the event being responded to; if not set or `null`, has a default value of com.adobe.eventSource.responseContent |
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.

I was a bit confused for this one, since the dispatchResponse API is able to generate many different kinds of response events; for this section of "Edge event response" do we only want strictly the
Event type: com.adobe.eventType.edge and Event source: com.adobe.eventSource.responseContent and cover the other potential cases separately in other new sections?

for example dispatchResponse is able to use any eventSource value:

@timkimadobe timkimadobe merged commit f487fce into adobe:dev-v2.0.1 Feb 17, 2023
@timkimadobe timkimadobe deleted the edge-event-reference branch February 17, 2023 21:51
@emdobrin emdobrin added this to the v2.0.1 milestone Apr 20, 2023
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.

3 participants