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(ui): allow resending of webhooks to update deployed version #110

Merged

Conversation

JosephKav
Copy link
Collaborator

@JosephKav JosephKav commented Jul 8, 2022

requested in #102

resend availability for upgrades to newer LatestVersion. Have added minimum delays to these sends of 15s if they fail and 2xInterval of the Service if they pass. Users could change their browser times to get around the disabled buttons, but the server keeps track of the next runnable time and ignores the request if it's too early. We could still get situations where two users approve commands/webhooks before they find out that another user did the same. In this case, if the delay between these requests is big enough that the goroutines have synced the next runnable time, then only one request will be made, but if the goroutines haven't been synched yet, the webhooks/commands could be actioned twice. If people want, I could look into mutex locks to account for this possibility, but I feel that this isn't really a risk and so not worth further investigation.

normal modal:

command fails (same for webhooks):

button gets disabled and hourglass appears with re-send available time tooltip. Relatively useless for command/webhooks that fail atm as the retry interval is 15s and the tooltip just says the minute it'll be resendable.

after 15s:

successful command/webhook:

resendable after 2xInterval

@JosephKav JosephKav added the enhancement New feature or request label Jul 8, 2022
@JosephKav JosephKav linked an issue Jul 8, 2022 that may be closed by this pull request
@JosephKav JosephKav force-pushed the 102-add-ability-to-resend-webhooks-when-not-on-latest-version branch from 1ccbdd6 to 29710c8 Compare July 10, 2022 18:58
@JosephKav JosephKav force-pushed the 102-add-ability-to-resend-webhooks-when-not-on-latest-version branch 5 times, most recently from 8762a80 to 808fb44 Compare July 11, 2022 11:23
block repeats whilst running/sending
block runs whilst under `delay` with `auto_approve`
@JosephKav JosephKav force-pushed the 102-add-ability-to-resend-webhooks-when-not-on-latest-version branch from 808fb44 to 8d96400 Compare July 11, 2022 11:28
@codecov
Copy link

codecov bot commented Jul 11, 2022

Codecov Report

Merging #110 (2c0e389) into master (ec7a6d2) will increase coverage by 0.10%.
The diff coverage is 100.00%.

❗ Current head 2c0e389 differs from pull request most recent head ceaeece. Consider uploading reports for the commit ceaeece to get more accurate results

@@            Coverage Diff             @@
##           master     #110      +/-   ##
==========================================
+ Coverage   95.59%   95.69%   +0.10%     
==========================================
  Files          49       49              
  Lines        4419     4517      +98     
==========================================
+ Hits         4224     4322      +98     
  Misses        148      148              
  Partials       47       47              
Impacted Files Coverage Δ
web/api/types/argus.go 100.00% <ø> (ø)
commands/announce.go 100.00% <100.00%> (ø)
commands/commands.go 100.00% <100.00%> (ø)
commands/init.go 100.00% <100.00%> (ø)
config/init.go 100.00% <100.00%> (ø)
service/handlers.go 100.00% <100.00%> (ø)
service/init.go 100.00% <100.00%> (ø)
web/api/v1/websocket-hub.go 93.34% <100.00%> (+0.16%) ⬆️
web/api/v1/websocket.go 93.46% <100.00%> (+0.03%) ⬆️
webhook/announce.go 100.00% <100.00%> (ø)
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ec7a6d2...ceaeece. Read the comment docs.

@JosephKav JosephKav force-pushed the 102-add-ability-to-resend-webhooks-when-not-on-latest-version branch from bf379a7 to 8d96400 Compare July 11, 2022 12:58
@JosephKav JosephKav force-pushed the 102-add-ability-to-resend-webhooks-when-not-on-latest-version branch 3 times, most recently from 9525a49 to ceaeece Compare July 11, 2022 14:09
JosephKav added a commit to release-argus/Website that referenced this pull request Jul 12, 2022
JosephKav added a commit to release-argus/Website that referenced this pull request Jul 12, 2022
@JosephKav JosephKav merged commit 862cc97 into master Jul 13, 2022
@JosephKav JosephKav deleted the 102-add-ability-to-resend-webhooks-when-not-on-latest-version branch July 13, 2022 09:54
JosephKav added a commit to release-argus/Website that referenced this pull request Jul 26, 2022
* faq detailing how to change the retry block time
release-argus/Argus#110

* info for the new sqlite db
release-argus/Argus#113
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ability to resend Webhooks when not on latest version
1 participant