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

Removing deprecated "duration" field from ancla. #62

Open
utsavbatra5 opened this issue Jun 18, 2021 · 2 comments
Open

Removing deprecated "duration" field from ancla. #62

utsavbatra5 opened this issue Jun 18, 2021 · 2 comments

Comments

@utsavbatra5
Copy link

Hi @joe94, when are we planning to remove deprecated duration field from ancla as while retrieving hooks its giving a misleading duration field to the users.

@joe94
Copy link
Member

joe94 commented Aug 19, 2021

Hey @utsavbatra5, we've had some initial discussions about this but since changes in this area might be API impacting, it might take us some time to deliberate especially as we are tackling some other higher priority tasks at the moment.

Find some notes from our initial discussion:

Some of the options to consider for the flow to indicate how long a webhook should last:

A) Keep only until field
Changes:

  • Remove duration field from struct used in both GET /hooks and POST /hook endpoints.
  • Use the until field as the only field dictating when a webhook expires: the field is a quoted string in RFC 3339 format. The until field is heavily used internally for determining until what specific time a webhook destination should be served.

B) Keep both duration and until fields
Changes:

  • Keep duration as the API field that determines a webhook's expiration on the POST /hook endpoint: this has the advantage that the format is more concise than 'until' (i.e. '3m' vs 2019-10-12T07:20:50.52Z')
  • Keep until and set the value to be RegistrationTime + Duration. When users request to see their webhooks using the GET /hooks endpoint, they would be able to see both duration and until fields.

Other considerations made so far:

  • Regardless of which field is used to specify the expiration date for the webhook, the expiration should be capped at 5mins. If an invalid value is specified, an error should be returned. Depending on the use case, we may make this cap configurable.

@Sachin4403
Copy link
Contributor

HI @joe94
when we are getting response for GET /hooks endpoint we are getting duration as 300000000000 instead of this we are expecting this to be 5m or 300s.

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

No branches or pull requests

3 participants