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

feat: support updating web hook url [MD-482] #9890

Merged
merged 6 commits into from
Sep 11, 2024
Merged

Conversation

jgongd
Copy link
Contributor

@jgongd jgongd commented Sep 3, 2024

Ticket

MD-482

Description

Users can edit the url of a webhook.
image

Test Plan

CI passes.

Checklist

  • Changes have been manually QA'd
  • New features have been approved by the corresponding PM
  • User-facing API changes have the "User-facing API Change" label
  • Release notes have been added as a separate file under docs/release-notes/
    See Release Note for details.
  • Licenses have been included for new code which was copied and/or modified from any external code

@cla-bot cla-bot bot added the cla-signed label Sep 3, 2024
Copy link

netlify bot commented Sep 3, 2024

Deploy Preview for determined-ui ready!

Name Link
🔨 Latest commit c8fc477
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/66df7c152f3c8000083c75b9
😎 Deploy Preview https://deploy-preview-9890--determined-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Sep 3, 2024

Codecov Report

Attention: Patch coverage is 10.71429% with 100 lines in your changes missing coverage. Please review.

Project coverage is 59.18%. Comparing base (c1499ac) to head (c8fc477).

Files with missing lines Patch % Lines
webui/react/src/components/WebhookEditModal.tsx 0.00% 89 Missing and 1 partial ⚠️
webui/react/src/pages/WebhookList.tsx 0.00% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9890      +/-   ##
==========================================
+ Coverage   54.57%   59.18%   +4.61%     
==========================================
  Files        1250      751     -499     
  Lines      156266   104452   -51814     
  Branches     3598     3597       -1     
==========================================
- Hits        85283    61824   -23459     
+ Misses      70852    42496   -28356     
- Partials      131      132       +1     
Flag Coverage Δ
backend 43.80% <ø> (-1.35%) ⬇️
harness 72.75% <ø> (ø)
web 54.33% <10.71%> (-0.07%) ⬇️

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

Files with missing lines Coverage Δ
webui/react/src/services/api.ts 97.79% <100.00%> (+0.01%) ⬆️
webui/react/src/services/apiConfig.ts 74.18% <100.00%> (+0.07%) ⬆️
webui/react/src/pages/WebhookList.tsx 0.00% <0.00%> (ø)
webui/react/src/components/WebhookEditModal.tsx 0.00% <0.00%> (ø)

... and 500 files with indirect coverage changes

@jgongd jgongd requested a review from gt2345 September 3, 2024 18:06
Copy link
Contributor

@gt2345 gt2345 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! Just some minor comments.

master/internal/webhooks/postgres_webhook.go Show resolved Hide resolved
};

// The updated webhook.
determined.webhook.v1.PatchWebhook webhook = 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I'd prefer reusing determined.webhook.v1.Webhook

webui/react/src/components/WebhookEditModal.tsx Outdated Show resolved Hide resolved
@jgongd jgongd marked this pull request as ready for review September 3, 2024 21:54
@jgongd jgongd requested review from a team as code owners September 3, 2024 21:54
@jgongd jgongd changed the title feat: updating web hook url feat: updating web hook url [MD-482] Sep 3, 2024
@jgongd jgongd changed the title feat: updating web hook url [MD-482] feat: support updating web hook url [MD-482] Sep 3, 2024
@jgongd jgongd force-pushed the jgong/updating-webhook-url branch 2 times, most recently from c36212e to e958c3c Compare September 9, 2024 15:08
@jgongd jgongd requested a review from gt2345 September 9, 2024 18:26
Copy link
Contributor

@gt2345 gt2345 left a comment

Choose a reason for hiding this comment

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

LGTM


for _, t := range ts {
if t.TriggerType != TriggerTypeTaskLog {
return nil
Copy link
Contributor

Choose a reason for hiding this comment

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

is it expected that you receive requests to edit non-TaskLog triggers? Also do we want to exit the function as soon as we encounter the first non-Task log type trigger?

Copy link
Contributor Author

@jgongd jgongd Sep 9, 2024

Choose a reason for hiding this comment

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

is it expected that you receive requests to edit non-TaskLog triggers?

Yes. I'm skipping it because only TaskLog triggers are stored in cache. https://github.com/determined-ai/determined/pull/9890/files/c08e8b902b779999dee41e3d7b287f67453d8750#diff-3ea86afd178c30910e3fdbc3f40b950a61d566b1e70bc4d932bbba3e693c2802R71-R78

Also do we want to exit the function as soon as we encounter the first non-Task log type trigger?

Good catch! I shouldn't exit the function.

Copy link
Contributor

@salonig23 salonig23 left a comment

Choose a reason for hiding this comment

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

LGTM!

@jgongd
Copy link
Contributor Author

jgongd commented Sep 11, 2024

The failures in CI test-intg-master are known flakes.

@jgongd jgongd merged commit de89f68 into main Sep 11, 2024
77 of 91 checks passed
@jgongd jgongd deleted the jgong/updating-webhook-url branch September 11, 2024 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants