Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Scoped notification pause #3579

Merged
merged 13 commits into from
Oct 30, 2023

Conversation

tevoinea
Copy link
Member

@tevoinea tevoinea commented Oct 18, 2023

Summary of the Pull Request

What is this about?

Info on Pull Request

What does this include?

  • New containers endpoint for modifying container metadata
  • New CLI command for modifying container metadata (onefuzz containers update {container name} {metadata key}={metadata value})
  • Fixes a bug where messages requeued due to ADO_WORKITEM_PROCESSING_DISABLED have their retry count incremented. We should only increment the retry count when we actually try to process the notification
  • Do not attempt to process notifications for containers that are tagged with pauseNotifications=true. If that's the case, requeue the message with a 1 day timeout

Validation Steps Performed

How does someone test & validate?

Tested in dev deployment:

  • Create a file in a container
  • Check that a message was added in file-changes queue
  • Using the cli, set pauseNotifications=true metadata tag on the container
  • Create another file in the container
  • Check that a message was added in file-changes queue
  • Check that file-changes queue shows "0 of 1 messages" meaning that the message was requeued with a visibility timeout

@codecov-commenter
Copy link

codecov-commenter commented Oct 18, 2023

Codecov Report

Merging #3579 (359fadb) into main (72d775f) will decrease coverage by 0.05%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main    #3579      +/-   ##
==========================================
- Coverage   39.99%   39.94%   -0.05%     
==========================================
  Files         303      303              
  Lines       37683    37724      +41     
  Branches     1728     1738      +10     
==========================================
- Hits        15072    15070       -2     
- Misses      22289    22332      +43     
  Partials      322      322              
Files Coverage Δ
src/ApiService/ApiService/OneFuzzTypes/Enums.cs 32.39% <ø> (ø)
src/ApiService/ApiService/onefuzzlib/Reports.cs 39.68% <ø> (ø)
...ce/ApiService/onefuzzlib/NotificationOperations.cs 18.60% <0.00%> (-0.15%) ⬇️
src/ApiService/ApiService/OneFuzzTypes/Requests.cs 58.73% <0.00%> (-0.89%) ⬇️
src/ApiService/ApiService/Functions/Containers.cs 70.58% <0.00%> (-11.61%) ⬇️
src/ApiService/ApiService/onefuzzlib/Containers.cs 59.37% <0.00%> (-3.50%) ⬇️
...piService/ApiService/Functions/QueueFileChanges.cs 8.49% <0.00%> (-0.70%) ⬇️

... and 1 file with indirect coverage changes

@tevoinea tevoinea marked this pull request as ready for review October 19, 2023 13:27
@tevoinea tevoinea enabled auto-merge (squash) October 30, 2023 17:06
@tevoinea tevoinea merged commit d50fd48 into microsoft:main Oct 30, 2023
24 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When requeuing a message because of ADO_WORKITEM_PROCESSING_DISABLED, we should not increment the retry count.
3 participants