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

Ping Annotations #8

Merged
merged 1 commit into from
Mar 29, 2021
Merged

Ping Annotations #8

merged 1 commit into from
Mar 29, 2021

Conversation

wlach
Copy link
Contributor

@wlach wlach commented Mar 29, 2021

No description provided.

@wlach wlach force-pushed the ping-annotations branch from ab80f7d to 8fa98e5 Compare March 29, 2021 16:05
This is based on the exact same principle as metric annotations. This
PR changes the API format slightly, so we'll need to modify the
glean dictionary as well before this lands.
@wlach wlach force-pushed the ping-annotations branch from 8fa98e5 to 3d3b5d8 Compare March 29, 2021 16:12
@wlach wlach marked this pull request as ready for review March 29, 2021 18:40
@wlach wlach requested a review from acmiyaguchi March 29, 2021 18:40
Copy link
Contributor

@acmiyaguchi acmiyaguchi left a comment

Choose a reason for hiding this comment

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

This looks reasonable to me.


ANNOTATIONS_DIR = os.path.join(os.path.dirname(__file__), "..", "annotations")

data = defaultdict(lambda: defaultdict(lambda: {}))
Copy link
Contributor

Choose a reason for hiding this comment

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

It might be worthwhile to create a schema to validate the API:

type: object
description: application
additionalProperties:
  type: object
  description: metric/ping
  additionalProperties:
    type: object
    properties:
      content:
        type: string
        description: markdown contents of annotation
      component:
        type: string
        $comment: could be an enumerated type
      features:
        type: string
    required:
      - content

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great idea! Filed #9 for this

@wlach
Copy link
Contributor Author

wlach commented Mar 29, 2021

Waiting for review on mozilla/glean-dictionary#493 before merging this: they mutually depend on each other.

@wlach wlach merged commit e22ac9e into main Mar 29, 2021
@wlach wlach deleted the ping-annotations branch March 29, 2021 21:30
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.

2 participants