Skip to content

[TT-11585] Process DeleteAPICache event#6190

Merged
jeffy-mathew merged 13 commits into
masterfrom
fix/TT-11585/process-delete-api-cache-signal
Mar 28, 2024
Merged

[TT-11585] Process DeleteAPICache event#6190
jeffy-mathew merged 13 commits into
masterfrom
fix/TT-11585/process-delete-api-cache-signal

Conversation

@jeffy-mathew

@jeffy-mathew jeffy-mathew commented Mar 27, 2024

Copy link
Copy Markdown
Contributor

User description

Description

This PR adds

  • A redis event handler to react on event DeleteAPICache, this is used when gateway is used in pro mode.
  • A processor in edge gateways to invalidate cache via DeleteAPICache action via mdcb RPC.

Related Issue

https://tyktech.atlassian.net/browse/TT-11585

Motivation and Context

How This Has Been Tested

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Refactoring or add test (improvements in base code or adds test coverage to functionality)

Checklist

  • I ensured that the documentation is up to date
  • I explained why this PR updates go.mod in detail with reasoning why it's required
  • I would like a code coverage CI quality gate exception and have explained why

Type

enhancement, bug_fix


Description

  • Introduced a new method invalidateAPICache to centralize the logic for API cache invalidation.
  • Added handling for a new signal NoticeDeleteAPICache to trigger the cache invalidation process.
  • Created tests to ensure the functionality of the new cache invalidation method.
  • Updated key space change processing to include the DeleteAPICache action.

Changes walkthrough

Relevant files
Enhancement
api.go
Refactor API Cache Invalidation Logic                                       

gateway/api.go

  • Refactored cache invalidation logic into a separate method
    invalidateAPICache.
  • +1/-5     
    delete_api_cache.go
    Introduce Method for API Cache Invalidation                           

    gateway/delete_api_cache.go

  • Introduced a new method invalidateAPICache to encapsulate the cache
    invalidation logic.
  • +10/-0   
    redis_signals.go
    Handle Delete API Cache Signal                                                     

    gateway/redis_signals.go

  • Added handling for NoticeDeleteAPICache signal to trigger cache
    invalidation.
  • +5/-0     
    rpc_storage_handler.go
    Process DeleteAPICache Action in Key Space Changes             

    gateway/rpc_storage_handler.go

  • Added DeleteAPICache to the list of actions to process for key space
    changes.
  • +4/-0     
    Tests
    delete_api_cache_test.go
    Add Tests for API Cache Invalidation                                         

    gateway/delete_api_cache_test.go

    • Added tests for the new invalidateAPICache method.
    +34/-0   

    PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    @github-actions

    github-actions Bot commented Mar 27, 2024

    Copy link
    Copy Markdown
    Contributor

    API Changes

    --- prev.txt	2024-03-28 07:41:49.413689647 +0000
    +++ current.txt	2024-03-28 07:41:46.569678191 +0000
    @@ -8577,7 +8577,11 @@
     	NoticeGatewayDRLNotification NotificationCommand = "NoticeGatewayDRLNotification"
     	KeySpaceUpdateNotification   NotificationCommand = "KeySpaceUpdateNotification"
     	OAuthPurgeLapsedTokens       NotificationCommand = "OAuthPurgeLapsedTokens"
    +	// NoticeDeleteAPICache is the command with which event is emitted from dashboard to invalidate cache for an API.
    +	NoticeDeleteAPICache NotificationCommand = "DeleteAPICache"
     )
    +func (n NotificationCommand) String() string
    +
     type OASSchemaResponse struct {
     	Status  string          `json:"status"`
     	Message string          `json:"message"`

    @github-actions

    Copy link
    Copy Markdown
    Contributor

    PR Description updated to latest commit (57a6afa)

    @github-actions

    Copy link
    Copy Markdown
    Contributor

    PR Review

    ⏱️ Estimated effort to review [1-5]

    3, because the PR involves changes across multiple files including the addition of a new feature for cache invalidation, modifications to existing functions, and the introduction of new tests. The complexity is moderate, requiring a good understanding of the existing caching mechanism and notification system.

    🧪 Relevant tests

    Yes

    🔍 Possible issues

    Possible Bug: In gateway/delete_api_cache.go, the return value of store.DeleteScanMatch(matchPattern) might not accurately reflect the success of the cache invalidation operation. It's important to ensure that this method correctly reports failures to delete keys.

    Performance Concern: The use of DeleteScanMatch in gateway/delete_api_cache.go might not scale well with a large number of cache keys. Consider evaluating the performance impact of this operation on large datasets.

    🔒 Security concerns

    No

    Code feedback:
    relevant filegateway/delete_api_cache.go
    suggestion      

    Consider adding error logging within invalidateAPICache to provide more context in case of failure. This can help with debugging and monitoring the cache invalidation process. [important]

    relevant linereturn store.DeleteScanMatch(matchPattern)

    relevant filegateway/redis_signals.go
    suggestion      

    The error logging in the NoticeDeleteAPICache case does not capture the actual error since err is not defined. Capture and log the actual error to improve error reporting. [important]

    relevant linelog.WithError(err).Errorf("cache invalidation failed for: %s", notif.Payload)

    relevant filegateway/delete_api_cache_test.go
    suggestion      

    Expand the test case to verify that the cache is actually invalidated by checking the absence of expected keys in Redis after the NoticeDeleteAPICache event is processed. This ensures the functionality works as expected. [important]

    relevant linets.Gw.MainNotifier.Notify(n)

    relevant filegateway/api.go
    suggestion      

    After refactoring to use invalidateAPICache, ensure that any specific error handling or logging that was previously done in the invalidateCacheHandler function is still appropriately handled. [medium]

    relevant lineif ok := gw.invalidateAPICache(apiID); !ok {


    ✨ Review tool usage guide:

    Overview:
    The review tool scans the PR code changes, and generates a PR review which includes several types of feedbacks, such as possible PR issues, security threats and relevant test in the PR. More feedbacks can be added by configuring the tool.

    The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on any PR.

    • When commenting, to edit configurations related to the review tool (pr_reviewer section), use the following template:
    /review --pr_reviewer.some_config1=... --pr_reviewer.some_config2=...
    
    [pr_reviewer]
    some_config1=...
    some_config2=...
    

    See the review usage page for a comprehensive guide on using this tool.

    @github-actions

    github-actions Bot commented Mar 27, 2024

    Copy link
    Copy Markdown
    Contributor

    PR Code Suggestions

    CategorySuggestions                                                                                                                                                       
    Enhancement
    Improve error handling in cache invalidation by logging the error and returning an HTTP status code.

    Consider handling the error more robustly by logging the error and returning an
    appropriate HTTP status code to the client. This provides better visibility into why the
    cache invalidation failed and informs the client of the failure.

    gateway/api.go [2848-2849]

     if ok := gw.invalidateAPICache(apiID); !ok {
    -    err := errors.New("scan/delete failed")
    +    log.Errorf("Failed to invalidate API cache for API ID %s: %v", apiID, err)
    +    http.Error(w, "Internal Server Error", http.StatusInternalServerError)
    +    return
    +}
     
    Add assertions to the test case to verify cache invalidation.

    The test case TestDeleteAPICache lacks assertions to verify the behavior of the cache
    invalidation. Consider adding assertions to check if the cache was successfully
    invalidated.

    gateway/delete_api_cache_test.go [30]

     ts.Gw.MainNotifier.Notify(n)
    +// Add assertions here to verify cache invalidation
     
    Best practice
    Enhance error handling by returning an error from the cache invalidation function.

    It's a good practice to check for errors when interacting with external systems like
    Redis. Consider modifying the invalidateAPICache function to return an error alongside the
    boolean to handle potential Redis errors more gracefully.

    gateway/delete_api_cache.go [5]

    -func (gw *Gateway) invalidateAPICache(apiID string) bool {
    +func (gw *Gateway) invalidateAPICache(apiID string) (bool, error) {
     
    Bug
    Fix undefined variable error by capturing and logging the error from cache invalidation.

    The variable err is not defined in the case block for NoticeDeleteAPICache. You should
    capture and log the error returned by invalidateAPICache to ensure proper error handling
    and logging.

    gateway/redis_signals.go [152-153]

    -if ok := gw.invalidateAPICache(notif.Payload); !ok {
    +if ok, err := gw.invalidateAPICache(notif.Payload); !ok {
         log.WithError(err).Errorf("cache invalidation failed for: %s", notif.Payload)
     
    Possible issue
    Implement logic to invalidate cache for collected API IDs.

    After collecting API IDs in apisToDeleteCache, ensure to process them to actually delete
    the cache. It seems the collected IDs are not used afterwards. Implement the logic to
    invalidate cache for these APIs.

    gateway/rpc_storage_handler.go [1027]

    -apisToDeleteCache = append(apisToDeleteCache, splitKeys[1])
    +// Example logic to process deletion after collecting all API IDs
    +for _, apiID := range apisToDeleteCache {
    +    gw.invalidateAPICache(apiID)
    +}
     

    ✨ Improve tool usage guide:

    Overview:
    The improve tool scans the PR code changes, and automatically generates suggestions for improving the PR code. The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on a PR.

    • When commenting, to edit configurations related to the improve tool (pr_code_suggestions section), use the following template:
    /improve --pr_code_suggestions.some_config1=... --pr_code_suggestions.some_config2=...
    
    [pr_code_suggestions]
    some_config1=...
    some_config2=...
    

    See the improve usage page for a comprehensive guide on using this tool.

    @jeffy-mathew
    jeffy-mathew force-pushed the fix/TT-11585/process-delete-api-cache-signal branch from 57a6afa to ce33ffc Compare March 27, 2024 14:30
    @TykTechnologies TykTechnologies deleted a comment from github-actions Bot Mar 27, 2024
    @github-actions

    Copy link
    Copy Markdown
    Contributor

    💥 CI tests failed 🙈

    git-state

    all ok

    Please look at the run or in the Checks tab.

    Comment thread gateway/delete_api_cache.go Outdated
    Comment thread gateway/delete_api_cache_test.go Outdated
    Comment thread gateway/redis_signals.go Outdated
    Comment thread gateway/rpc_storage_handler.go Outdated
    Comment thread gateway/rpc_storage_handler.go Outdated
    Comment thread gateway/rpc_storage_handler.go Outdated
    Comment thread gateway/delete_api_cache.go Outdated
    @jeffy-mathew
    jeffy-mathew force-pushed the fix/TT-11585/process-delete-api-cache-signal branch from dc33a3a to 17507ab Compare March 27, 2024 16:52

    @titpetric titpetric left a comment

    Copy link
    Copy Markdown
    Contributor

    Choose a reason for hiding this comment

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

    LGTM, no more feedback

    @TykTechnologies TykTechnologies deleted a comment from github-actions Bot Mar 27, 2024
    @TykTechnologies TykTechnologies deleted a comment from github-actions Bot Mar 27, 2024
    @TykTechnologies TykTechnologies deleted a comment from github-actions Bot Mar 27, 2024
    @TykTechnologies TykTechnologies deleted a comment from github-actions Bot Mar 27, 2024
    @TykTechnologies TykTechnologies deleted a comment from github-actions Bot Mar 27, 2024
    @TykTechnologies TykTechnologies deleted a comment from github-actions Bot Mar 27, 2024
    @TykTechnologies TykTechnologies deleted a comment from github-actions Bot Mar 27, 2024
    @github-actions

    Copy link
    Copy Markdown
    Contributor

    💥 CI tests failed 🙈

    git-state

    all ok

    Please look at the run or in the Checks tab.

    Comment thread tests/regression/issue_11585_test.go Outdated
    @jeffy-mathew
    jeffy-mathew force-pushed the fix/TT-11585/process-delete-api-cache-signal branch from b5d091a to 3a34a70 Compare March 28, 2024 07:41
    @TykTechnologies TykTechnologies deleted a comment from github-actions Bot Mar 28, 2024
    @TykTechnologies TykTechnologies deleted a comment from github-actions Bot Mar 28, 2024
    @TykTechnologies TykTechnologies deleted a comment from github-actions Bot Mar 28, 2024
    @jeffy-mathew
    jeffy-mathew enabled auto-merge (squash) March 28, 2024 07:41
    @sonarqubecloud

    Copy link
    Copy Markdown

    Quality Gate Failed Quality Gate failed

    Failed conditions
    46.2% Coverage on New Code (required ≥ 80%)

    See analysis details on SonarCloud

    @jeffy-mathew
    jeffy-mathew merged commit 43f5f5c into master Mar 28, 2024
    @jeffy-mathew
    jeffy-mathew deleted the fix/TT-11585/process-delete-api-cache-signal branch March 28, 2024 08:03
    @jeffy-mathew

    Copy link
    Copy Markdown
    Contributor Author

    /release to release-5.3

    @jeffy-mathew

    Copy link
    Copy Markdown
    Contributor Author

    /release-5-lts

    @tykbot

    tykbot Bot commented Mar 28, 2024

    Copy link
    Copy Markdown

    Working on it! Note that it can take a few minutes.

    @tykbot

    tykbot Bot commented Mar 28, 2024

    Copy link
    Copy Markdown

    @jeffy-mathew Sorry, but I do not understand!

    tykbot Bot pushed a commit that referenced this pull request Mar 28, 2024
    ## **User description**
    <!-- Provide a general summary of your changes in the Title above -->
    
    ## Description
    This PR adds
    * A redis event handler to react on event `DeleteAPICache`, this is used
    when gateway is used in pro mode.
    * A processor in edge gateways to invalidate cache via `DeleteAPICache`
    action via mdcb RPC.
    
    ## Related Issue
    https://tyktech.atlassian.net/browse/TT-11585
    
    ## Motivation and Context
    
    <!-- Why is this change required? What problem does it solve? -->
    
    ## How This Has Been Tested
    
    <!-- Please describe in detail how you tested your changes -->
    <!-- Include details of your testing environment, and the tests -->
    <!-- you ran to see how your change affects other areas of the code,
    etc. -->
    <!-- This information is helpful for reviewers and QA. -->
    
    ## Screenshots (if appropriate)
    
    ## Types of changes
    
    <!-- What types of changes does your code introduce? Put an `x` in all
    the boxes that apply: -->
    
    - [ ] Bug fix (non-breaking change which fixes an issue)
    - [ ] New feature (non-breaking change which adds functionality)
    - [ ] Breaking change (fix or feature that would cause existing
    functionality to change)
    - [ ] Refactoring or add test (improvements in base code or adds test
    coverage to functionality)
    
    ## Checklist
    
    <!-- Go over all the following points, and put an `x` in all the boxes
    that apply -->
    <!-- If there are no documentation updates required, mark the item as
    checked. -->
    <!-- Raise up any additional concerns not covered by the checklist. -->
    
    - [ ] I ensured that the documentation is up to date
    - [ ] I explained why this PR updates go.mod in detail with reasoning
    why it's required
    - [ ] I would like a code coverage CI quality gate exception and have
    explained why
    
    
    ___
    
    ## **Type**
    enhancement, bug_fix
    
    
    ___
    
    ## **Description**
    - Introduced a new method `invalidateAPICache` to centralize the logic
    for API cache invalidation.
    - Added handling for a new signal `NoticeDeleteAPICache` to trigger the
    cache invalidation process.
    - Created tests to ensure the functionality of the new cache
    invalidation method.
    - Updated key space change processing to include the `DeleteAPICache`
    action.
    
    
    ___
    
    
    
    ## **Changes walkthrough**
    <table><thead><tr><th></th><th align="left">Relevant
    files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table>
    <tr>
      <td>
        <details>
    <summary><strong>api.go</strong><dd><code>Refactor API Cache
    Invalidation Logic</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
    <hr>
    
    gateway/api.go
    <li>Refactored cache invalidation logic into a separate method
    <br><code>invalidateAPICache</code>.
    
    
    </details>
        
    
      </td>
    <td><a
    href="https://github.com/TykTechnologies/tyk/pull/6190/files#diff-644cda3aeb4ac7f325359e85fcddb810f100dd5e6fa480b0d9f9363a743c4e05">+1/-5</a>&nbsp;
    &nbsp; &nbsp; </td>
    </tr>                    
    
    <tr>
      <td>
        <details>
    <summary><strong>delete_api_cache.go</strong><dd><code>Introduce Method
    for API Cache Invalidation</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    </dd></summary>
    <hr>
    
    gateway/delete_api_cache.go
    <li>Introduced a new method <code>invalidateAPICache</code> to
    encapsulate the cache <br>invalidation logic.
    
    
    </details>
        
    
      </td>
    <td><a
    href="https://github.com/TykTechnologies/tyk/pull/6190/files#diff-8606dab58155ef5aab8c6f3364c0c6cdab44cad70addd3cc427bbeb99d412de7">+10/-0</a>&nbsp;
    &nbsp; </td>
    </tr>                    
    
    <tr>
      <td>
        <details>
    <summary><strong>redis_signals.go</strong><dd><code>Handle Delete API
    Cache Signal</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    </dd></summary>
    <hr>
    
    gateway/redis_signals.go
    <li>Added handling for <code>NoticeDeleteAPICache</code> signal to
    trigger cache <br>invalidation.
    
    
    </details>
        
    
      </td>
    <td><a
    href="https://github.com/TykTechnologies/tyk/pull/6190/files#diff-18cb136722c238e19b02741a85510dfd464343f85365482f0873aa60a37718af">+5/-0</a>&nbsp;
    &nbsp; &nbsp; </td>
    </tr>                    
    
    <tr>
      <td>
        <details>
    <summary><strong>rpc_storage_handler.go</strong><dd><code>Process
    DeleteAPICache Action in Key Space Changes</code>&nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
    <hr>
    
    gateway/rpc_storage_handler.go
    <li>Added <code>DeleteAPICache</code> to the list of actions to process
    for key space <br>changes.
    
    
    </details>
        
    
      </td>
    <td><a
    href="https://github.com/TykTechnologies/tyk/pull/6190/files#diff-8875f75b602664c44b62b67a4da41d748124ad270573a44db4ec977ee5d68021">+4/-0</a>&nbsp;
    &nbsp; &nbsp; </td>
    </tr>                    
    </table></td></tr><tr><td><strong>Tests</strong></td><td><table>
    <tr>
      <td>
        <details>
    <summary><strong>delete_api_cache_test.go</strong><dd><code>Add Tests
    for API Cache Invalidation</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
    <hr>
    
    gateway/delete_api_cache_test.go
    - Added tests for the new `invalidateAPICache` method.
    
    
    </details>
        
    
      </td>
    <td><a
    href="https://github.com/TykTechnologies/tyk/pull/6190/files#diff-bf04614dddae2c523c9030b8571e35816c01d916f0023b3b66f2e45f84c528bf">+34/-0</a>&nbsp;
    &nbsp; </td>
    </tr>                    
    </table></td></tr></tr></tbody></table>
    
    ___
    
    > ✨ **PR-Agent usage**:
    >Comment `/help` on the PR to get a list of all available PR-Agent tools
    and their descriptions
    
    (cherry picked from commit 43f5f5c)
    @tykbot

    tykbot Bot commented Mar 28, 2024

    Copy link
    Copy Markdown

    @jeffy-mathew Succesfully merged PR

    buger added a commit that referenced this pull request Mar 28, 2024
    [TT-11585] Process DeleteAPICache event (#6190)
    
    ## **User description**
    <!-- Provide a general summary of your changes in the Title above -->
    
    ## Description
    This PR adds
    * A redis event handler to react on event `DeleteAPICache`, this is used
    when gateway is used in pro mode.
    * A processor in edge gateways to invalidate cache via `DeleteAPICache`
    action via mdcb RPC.
    
    ## Related Issue
    https://tyktech.atlassian.net/browse/TT-11585
    
    ## Motivation and Context
    
    <!-- Why is this change required? What problem does it solve? -->
    
    ## How This Has Been Tested
    
    <!-- Please describe in detail how you tested your changes -->
    <!-- Include details of your testing environment, and the tests -->
    <!-- you ran to see how your change affects other areas of the code,
    etc. -->
    <!-- This information is helpful for reviewers and QA. -->
    
    ## Screenshots (if appropriate)
    
    ## Types of changes
    
    <!-- What types of changes does your code introduce? Put an `x` in all
    the boxes that apply: -->
    
    - [ ] Bug fix (non-breaking change which fixes an issue)
    - [ ] New feature (non-breaking change which adds functionality)
    - [ ] Breaking change (fix or feature that would cause existing
    functionality to change)
    - [ ] Refactoring or add test (improvements in base code or adds test
    coverage to functionality)
    
    ## Checklist
    
    <!-- Go over all the following points, and put an `x` in all the boxes
    that apply -->
    <!-- If there are no documentation updates required, mark the item as
    checked. -->
    <!-- Raise up any additional concerns not covered by the checklist. -->
    
    - [ ] I ensured that the documentation is up to date
    - [ ] I explained why this PR updates go.mod in detail with reasoning
    why it's required
    - [ ] I would like a code coverage CI quality gate exception and have
    explained why
    
    
    ___
    
    ## **Type**
    enhancement, bug_fix
    
    
    ___
    
    ## **Description**
    - Introduced a new method `invalidateAPICache` to centralize the logic
    for API cache invalidation.
    - Added handling for a new signal `NoticeDeleteAPICache` to trigger the
    cache invalidation process.
    - Created tests to ensure the functionality of the new cache
    invalidation method.
    - Updated key space change processing to include the `DeleteAPICache`
    action.
    
    
    ___
    
    
    
    ## **Changes walkthrough**
    <table><thead><tr><th></th><th align="left">Relevant
    files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table>
    <tr>
      <td>
        <details>
    <summary><strong>api.go</strong><dd><code>Refactor API Cache
    Invalidation Logic</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
    <hr>
    
    gateway/api.go
    <li>Refactored cache invalidation logic into a separate method
    <br><code>invalidateAPICache</code>.
    
    
    </details>
        
    
      </td>
    <td><a
    href="https://github.com/TykTechnologies/tyk/pull/6190/files#diff-644cda3aeb4ac7f325359e85fcddb810f100dd5e6fa480b0d9f9363a743c4e05">+1/-5</a>&nbsp;
    &nbsp; &nbsp; </td>
    </tr>                    
    
    <tr>
      <td>
        <details>
    <summary><strong>delete_api_cache.go</strong><dd><code>Introduce Method
    for API Cache Invalidation</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    </dd></summary>
    <hr>
    
    gateway/delete_api_cache.go
    <li>Introduced a new method <code>invalidateAPICache</code> to
    encapsulate the cache <br>invalidation logic.
    
    
    </details>
        
    
      </td>
    <td><a
    href="https://github.com/TykTechnologies/tyk/pull/6190/files#diff-8606dab58155ef5aab8c6f3364c0c6cdab44cad70addd3cc427bbeb99d412de7">+10/-0</a>&nbsp;
    &nbsp; </td>
    </tr>                    
    
    <tr>
      <td>
        <details>
    <summary><strong>redis_signals.go</strong><dd><code>Handle Delete API
    Cache Signal</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    </dd></summary>
    <hr>
    
    gateway/redis_signals.go
    <li>Added handling for <code>NoticeDeleteAPICache</code> signal to
    trigger cache <br>invalidation.
    
    
    </details>
        
    
      </td>
    <td><a
    href="https://github.com/TykTechnologies/tyk/pull/6190/files#diff-18cb136722c238e19b02741a85510dfd464343f85365482f0873aa60a37718af">+5/-0</a>&nbsp;
    &nbsp; &nbsp; </td>
    </tr>                    
    
    <tr>
      <td>
        <details>
    <summary><strong>rpc_storage_handler.go</strong><dd><code>Process
    DeleteAPICache Action in Key Space Changes</code>&nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
    <hr>
    
    gateway/rpc_storage_handler.go
    <li>Added <code>DeleteAPICache</code> to the list of actions to process
    for key space <br>changes.
    
    
    </details>
        
    
      </td>
    <td><a
    href="https://github.com/TykTechnologies/tyk/pull/6190/files#diff-8875f75b602664c44b62b67a4da41d748124ad270573a44db4ec977ee5d68021">+4/-0</a>&nbsp;
    &nbsp; &nbsp; </td>
    </tr>                    
    </table></td></tr><tr><td><strong>Tests</strong></td><td><table>
    <tr>
      <td>
        <details>
    <summary><strong>delete_api_cache_test.go</strong><dd><code>Add Tests
    for API Cache Invalidation</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
    <hr>
    
    gateway/delete_api_cache_test.go
    - Added tests for the new `invalidateAPICache` method.
    
    
    </details>
        
    
      </td>
    <td><a
    href="https://github.com/TykTechnologies/tyk/pull/6190/files#diff-bf04614dddae2c523c9030b8571e35816c01d916f0023b3b66f2e45f84c528bf">+34/-0</a>&nbsp;
    &nbsp; </td>
    </tr>                    
    </table></td></tr></tr></tbody></table>
    
    ___
    
    > ✨ **PR-Agent usage**:
    >Comment `/help` on the PR to get a list of all available PR-Agent tools
    and their descriptions
    @jeffy-mathew

    Copy link
    Copy Markdown
    Contributor Author

    /release to release-5-lts

    @tykbot

    tykbot Bot commented Mar 28, 2024

    Copy link
    Copy Markdown

    Working on it! Note that it can take a few minutes.

    tykbot Bot pushed a commit that referenced this pull request Mar 28, 2024
    <!-- Provide a general summary of your changes in the Title above -->
    
    This PR adds
    * A redis event handler to react on event `DeleteAPICache`, this is used
    when gateway is used in pro mode.
    * A processor in edge gateways to invalidate cache via `DeleteAPICache`
    action via mdcb RPC.
    
    https://tyktech.atlassian.net/browse/TT-11585
    
    <!-- Why is this change required? What problem does it solve? -->
    
    <!-- Please describe in detail how you tested your changes -->
    <!-- Include details of your testing environment, and the tests -->
    <!-- you ran to see how your change affects other areas of the code,
    etc. -->
    <!-- This information is helpful for reviewers and QA. -->
    
    <!-- What types of changes does your code introduce? Put an `x` in all
    the boxes that apply: -->
    
    - [ ] Bug fix (non-breaking change which fixes an issue)
    - [ ] New feature (non-breaking change which adds functionality)
    - [ ] Breaking change (fix or feature that would cause existing
    functionality to change)
    - [ ] Refactoring or add test (improvements in base code or adds test
    coverage to functionality)
    
    <!-- Go over all the following points, and put an `x` in all the boxes
    that apply -->
    <!-- If there are no documentation updates required, mark the item as
    checked. -->
    <!-- Raise up any additional concerns not covered by the checklist. -->
    
    - [ ] I ensured that the documentation is up to date
    - [ ] I explained why this PR updates go.mod in detail with reasoning
    why it's required
    - [ ] I would like a code coverage CI quality gate exception and have
    explained why
    
    ___
    
    enhancement, bug_fix
    
    ___
    
    - Introduced a new method `invalidateAPICache` to centralize the logic
    for API cache invalidation.
    - Added handling for a new signal `NoticeDeleteAPICache` to trigger the
    cache invalidation process.
    - Created tests to ensure the functionality of the new cache
    invalidation method.
    - Updated key space change processing to include the `DeleteAPICache`
    action.
    
    ___
    
    <table><thead><tr><th></th><th align="left">Relevant
    files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table>
    <tr>
      <td>
        <details>
    <summary><strong>api.go</strong><dd><code>Refactor API Cache
    Invalidation Logic</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
    <hr>
    
    gateway/api.go
    <li>Refactored cache invalidation logic into a separate method
    <br><code>invalidateAPICache</code>.
    
    </details>
    
      </td>
    <td><a
    href="https://github.com/TykTechnologies/tyk/pull/6190/files#diff-644cda3aeb4ac7f325359e85fcddb810f100dd5e6fa480b0d9f9363a743c4e05">+1/-5</a>&nbsp;
    &nbsp; &nbsp; </td>
    </tr>
    
    <tr>
      <td>
        <details>
    <summary><strong>delete_api_cache.go</strong><dd><code>Introduce Method
    for API Cache Invalidation</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    </dd></summary>
    <hr>
    
    gateway/delete_api_cache.go
    <li>Introduced a new method <code>invalidateAPICache</code> to
    encapsulate the cache <br>invalidation logic.
    
    </details>
    
      </td>
    <td><a
    href="https://github.com/TykTechnologies/tyk/pull/6190/files#diff-8606dab58155ef5aab8c6f3364c0c6cdab44cad70addd3cc427bbeb99d412de7">+10/-0</a>&nbsp;
    &nbsp; </td>
    </tr>
    
    <tr>
      <td>
        <details>
    <summary><strong>redis_signals.go</strong><dd><code>Handle Delete API
    Cache Signal</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    </dd></summary>
    <hr>
    
    gateway/redis_signals.go
    <li>Added handling for <code>NoticeDeleteAPICache</code> signal to
    trigger cache <br>invalidation.
    
    </details>
    
      </td>
    <td><a
    href="https://github.com/TykTechnologies/tyk/pull/6190/files#diff-18cb136722c238e19b02741a85510dfd464343f85365482f0873aa60a37718af">+5/-0</a>&nbsp;
    &nbsp; &nbsp; </td>
    </tr>
    
    <tr>
      <td>
        <details>
    <summary><strong>rpc_storage_handler.go</strong><dd><code>Process
    DeleteAPICache Action in Key Space Changes</code>&nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
    <hr>
    
    gateway/rpc_storage_handler.go
    <li>Added <code>DeleteAPICache</code> to the list of actions to process
    for key space <br>changes.
    
    </details>
    
      </td>
    <td><a
    href="https://github.com/TykTechnologies/tyk/pull/6190/files#diff-8875f75b602664c44b62b67a4da41d748124ad270573a44db4ec977ee5d68021">+4/-0</a>&nbsp;
    &nbsp; &nbsp; </td>
    </tr>
    </table></td></tr><tr><td><strong>Tests</strong></td><td><table>
    <tr>
      <td>
        <details>
    <summary><strong>delete_api_cache_test.go</strong><dd><code>Add Tests
    for API Cache Invalidation</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
    <hr>
    
    gateway/delete_api_cache_test.go
    - Added tests for the new `invalidateAPICache` method.
    
    </details>
    
      </td>
    <td><a
    href="https://github.com/TykTechnologies/tyk/pull/6190/files#diff-bf04614dddae2c523c9030b8571e35816c01d916f0023b3b66f2e45f84c528bf">+34/-0</a>&nbsp;
    &nbsp; </td>
    </tr>
    </table></td></tr></tr></tbody></table>
    
    ___
    
    > ✨ **PR-Agent usage**:
    >Comment `/help` on the PR to get a list of all available PR-Agent tools
    and their descriptions
    
    (cherry picked from commit 43f5f5c)
    @tykbot

    tykbot Bot commented Mar 28, 2024

    Copy link
    Copy Markdown

    @jeffy-mathew Succesfully merged PR

    jeffy-mathew added a commit that referenced this pull request Apr 3, 2024
    <!-- Provide a general summary of your changes in the Title above -->
    
    This PR adds
    * A redis event handler to react on event `DeleteAPICache`, this is used
    when gateway is used in pro mode.
    * A processor in edge gateways to invalidate cache via `DeleteAPICache`
    action via mdcb RPC.
    
    https://tyktech.atlassian.net/browse/TT-11585
    
    <!-- Why is this change required? What problem does it solve? -->
    
    <!-- Please describe in detail how you tested your changes -->
    <!-- Include details of your testing environment, and the tests -->
    <!-- you ran to see how your change affects other areas of the code,
    etc. -->
    <!-- This information is helpful for reviewers and QA. -->
    
    <!-- What types of changes does your code introduce? Put an `x` in all
    the boxes that apply: -->
    
    - [ ] Bug fix (non-breaking change which fixes an issue)
    - [ ] New feature (non-breaking change which adds functionality)
    - [ ] Breaking change (fix or feature that would cause existing
    functionality to change)
    - [ ] Refactoring or add test (improvements in base code or adds test
    coverage to functionality)
    
    <!-- Go over all the following points, and put an `x` in all the boxes
    that apply -->
    <!-- If there are no documentation updates required, mark the item as
    checked. -->
    <!-- Raise up any additional concerns not covered by the checklist. -->
    
    - [ ] I ensured that the documentation is up to date
    - [ ] I explained why this PR updates go.mod in detail with reasoning
    why it's required
    - [ ] I would like a code coverage CI quality gate exception and have
    explained why
    
    ___
    
    enhancement, bug_fix
    
    ___
    
    - Introduced a new method `invalidateAPICache` to centralize the logic
    for API cache invalidation.
    - Added handling for a new signal `NoticeDeleteAPICache` to trigger the
    cache invalidation process.
    - Created tests to ensure the functionality of the new cache
    invalidation method.
    - Updated key space change processing to include the `DeleteAPICache`
    action.
    
    ___
    
    <table><thead><tr><th></th><th align="left">Relevant
    files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table>
    <tr>
      <td>
        <details>
    <summary><strong>api.go</strong><dd><code>Refactor API Cache
    Invalidation Logic</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
    <hr>
    
    gateway/api.go
    <li>Refactored cache invalidation logic into a separate method
    <br><code>invalidateAPICache</code>.
    
    </details>
    
      </td>
    <td><a
    href="https://github.com/TykTechnologies/tyk/pull/6190/files#diff-644cda3aeb4ac7f325359e85fcddb810f100dd5e6fa480b0d9f9363a743c4e05">+1/-5</a>&nbsp;
    &nbsp; &nbsp; </td>
    </tr>
    
    <tr>
      <td>
        <details>
    <summary><strong>delete_api_cache.go</strong><dd><code>Introduce Method
    for API Cache Invalidation</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    </dd></summary>
    <hr>
    
    gateway/delete_api_cache.go
    <li>Introduced a new method <code>invalidateAPICache</code> to
    encapsulate the cache <br>invalidation logic.
    
    </details>
    
      </td>
    <td><a
    href="https://github.com/TykTechnologies/tyk/pull/6190/files#diff-8606dab58155ef5aab8c6f3364c0c6cdab44cad70addd3cc427bbeb99d412de7">+10/-0</a>&nbsp;
    &nbsp; </td>
    </tr>
    
    <tr>
      <td>
        <details>
    <summary><strong>redis_signals.go</strong><dd><code>Handle Delete API
    Cache Signal</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    </dd></summary>
    <hr>
    
    gateway/redis_signals.go
    <li>Added handling for <code>NoticeDeleteAPICache</code> signal to
    trigger cache <br>invalidation.
    
    </details>
    
      </td>
    <td><a
    href="https://github.com/TykTechnologies/tyk/pull/6190/files#diff-18cb136722c238e19b02741a85510dfd464343f85365482f0873aa60a37718af">+5/-0</a>&nbsp;
    &nbsp; &nbsp; </td>
    </tr>
    
    <tr>
      <td>
        <details>
    <summary><strong>rpc_storage_handler.go</strong><dd><code>Process
    DeleteAPICache Action in Key Space Changes</code>&nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
    <hr>
    
    gateway/rpc_storage_handler.go
    <li>Added <code>DeleteAPICache</code> to the list of actions to process
    for key space <br>changes.
    
    </details>
    
      </td>
    <td><a
    href="https://github.com/TykTechnologies/tyk/pull/6190/files#diff-8875f75b602664c44b62b67a4da41d748124ad270573a44db4ec977ee5d68021">+4/-0</a>&nbsp;
    &nbsp; &nbsp; </td>
    </tr>
    </table></td></tr><tr><td><strong>Tests</strong></td><td><table>
    <tr>
      <td>
        <details>
    <summary><strong>delete_api_cache_test.go</strong><dd><code>Add Tests
    for API Cache Invalidation</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
    <hr>
    
    gateway/delete_api_cache_test.go
    - Added tests for the new `invalidateAPICache` method.
    
    </details>
    
      </td>
    <td><a
    href="https://github.com/TykTechnologies/tyk/pull/6190/files#diff-bf04614dddae2c523c9030b8571e35816c01d916f0023b3b66f2e45f84c528bf">+34/-0</a>&nbsp;
    &nbsp; </td>
    </tr>
    </table></td></tr></tr></tbody></table>
    
    ___
    
    > ✨ **PR-Agent usage**:
    >Comment `/help` on the PR to get a list of all available PR-Agent tools
    and their descriptions
    
    (cherry picked from commit 43f5f5c)
    jeffy-mathew added a commit that referenced this pull request Apr 3, 2024
    ) (#6195)
    
    [TT-11585] Process DeleteAPICache event (#6190)
    
    ## **User description**
    <!-- Provide a general summary of your changes in the Title above -->
    
    ## Description
    This PR adds
    * A redis event handler to react on event `DeleteAPICache`, this is used
    when gateway is used in pro mode.
    * A processor in edge gateways to invalidate cache via `DeleteAPICache`
    action via mdcb RPC.
    
    ## Related Issue
    https://tyktech.atlassian.net/browse/TT-11585
    
    ## Motivation and Context
    
    <!-- Why is this change required? What problem does it solve? -->
    
    ## How This Has Been Tested
    
    <!-- Please describe in detail how you tested your changes -->
    <!-- Include details of your testing environment, and the tests -->
    <!-- you ran to see how your change affects other areas of the code,
    etc. -->
    <!-- This information is helpful for reviewers and QA. -->
    
    ## Screenshots (if appropriate)
    
    ## Types of changes
    
    <!-- What types of changes does your code introduce? Put an `x` in all
    the boxes that apply: -->
    
    - [ ] Bug fix (non-breaking change which fixes an issue)
    - [ ] New feature (non-breaking change which adds functionality)
    - [ ] Breaking change (fix or feature that would cause existing
    functionality to change)
    - [ ] Refactoring or add test (improvements in base code or adds test
    coverage to functionality)
    
    ## Checklist
    
    <!-- Go over all the following points, and put an `x` in all the boxes
    that apply -->
    <!-- If there are no documentation updates required, mark the item as
    checked. -->
    <!-- Raise up any additional concerns not covered by the checklist. -->
    
    - [ ] I ensured that the documentation is up to date
    - [ ] I explained why this PR updates go.mod in detail with reasoning
    why it's required
    - [ ] I would like a code coverage CI quality gate exception and have
    explained why
    
    
    ___
    
    ## **Type**
    enhancement, bug_fix
    
    
    ___
    
    ## **Description**
    - Introduced a new method `invalidateAPICache` to centralize the logic
    for API cache invalidation.
    - Added handling for a new signal `NoticeDeleteAPICache` to trigger the
    cache invalidation process.
    - Created tests to ensure the functionality of the new cache
    invalidation method.
    - Updated key space change processing to include the `DeleteAPICache`
    action.
    
    
    ___
    
    
    
    ## **Changes walkthrough**
    <table><thead><tr><th></th><th align="left">Relevant
    
    files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table>
    <tr>
      <td>
        <details>
    <summary><strong>api.go</strong><dd><code>Refactor API Cache
    Invalidation Logic</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
    <hr>
    
    gateway/api.go
    <li>Refactored cache invalidation logic into a separate method
    <br><code>invalidateAPICache</code>.
    
    
    </details>
        
    
      </td>
    <td><a
    
    href="https://github.com/TykTechnologies/tyk/pull/6190/files#diff-644cda3aeb4ac7f325359e85fcddb810f100dd5e6fa480b0d9f9363a743c4e05">+1/-5</a>&nbsp;
    &nbsp; &nbsp; </td>
    </tr>                    
    
    <tr>
      <td>
        <details>
    <summary><strong>delete_api_cache.go</strong><dd><code>Introduce Method
    for API Cache Invalidation</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    </dd></summary>
    <hr>
    
    gateway/delete_api_cache.go
    <li>Introduced a new method <code>invalidateAPICache</code> to
    encapsulate the cache <br>invalidation logic.
    
    
    </details>
        
    
      </td>
    <td><a
    
    href="https://github.com/TykTechnologies/tyk/pull/6190/files#diff-8606dab58155ef5aab8c6f3364c0c6cdab44cad70addd3cc427bbeb99d412de7">+10/-0</a>&nbsp;
    &nbsp; </td>
    </tr>                    
    
    <tr>
      <td>
        <details>
    <summary><strong>redis_signals.go</strong><dd><code>Handle Delete API
    Cache Signal</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    </dd></summary>
    <hr>
    
    gateway/redis_signals.go
    <li>Added handling for <code>NoticeDeleteAPICache</code> signal to
    trigger cache <br>invalidation.
    
    
    </details>
        
    
      </td>
    <td><a
    
    href="https://github.com/TykTechnologies/tyk/pull/6190/files#diff-18cb136722c238e19b02741a85510dfd464343f85365482f0873aa60a37718af">+5/-0</a>&nbsp;
    &nbsp; &nbsp; </td>
    </tr>                    
    
    <tr>
      <td>
        <details>
    <summary><strong>rpc_storage_handler.go</strong><dd><code>Process
    DeleteAPICache Action in Key Space Changes</code>&nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
    <hr>
    
    gateway/rpc_storage_handler.go
    <li>Added <code>DeleteAPICache</code> to the list of actions to process
    for key space <br>changes.
    
    
    </details>
        
    
      </td>
    <td><a
    
    href="https://github.com/TykTechnologies/tyk/pull/6190/files#diff-8875f75b602664c44b62b67a4da41d748124ad270573a44db4ec977ee5d68021">+4/-0</a>&nbsp;
    &nbsp; &nbsp; </td>
    </tr>                    
    </table></td></tr><tr><td><strong>Tests</strong></td><td><table>
    <tr>
      <td>
        <details>
    <summary><strong>delete_api_cache_test.go</strong><dd><code>Add Tests
    for API Cache Invalidation</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
    <hr>
    
    gateway/delete_api_cache_test.go
    - Added tests for the new `invalidateAPICache` method.
    
    
    </details>
        
    
      </td>
    <td><a
    
    href="https://github.com/TykTechnologies/tyk/pull/6190/files#diff-bf04614dddae2c523c9030b8571e35816c01d916f0023b3b66f2e45f84c528bf">+34/-0</a>&nbsp;
    &nbsp; </td>
    </tr>                    
    </table></td></tr></tr></tbody></table>
    
    ___
    
    > ✨ **PR-Agent usage**:
    >Comment `/help` on the PR to get a list of all available PR-Agent tools
    and their descriptions
    
    [TT-11585]:
    https://tyktech.atlassian.net/browse/TT-11585?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
    
    ---------
    
    Co-authored-by: Jeffy Mathew <[email protected]>
    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