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

[DX-1407] Tyk Streams: Sleep Processor #5008

Merged
merged 2 commits into from
Jul 5, 2024
Merged

[DX-1407] Tyk Streams: Sleep Processor #5008

merged 2 commits into from
Jul 5, 2024

Conversation

dcs3spp
Copy link
Contributor

@dcs3spp dcs3spp commented Jul 5, 2024

User description

For internal users - Please add a Jira DX PR ticket to the subject!

DX-1407


Preview Link

preview

Description

Add sleep processor

Screenshots (if appropriate)


Checklist

  • I have added a preview link to the PR description.
  • I have reviewed the guidelines for contributing to this repository.
  • I have read the technical guidelines for contributing to this repository.
  • Make sure you have started your change off our latest master.
  • I labelled the PR

PR Type

Documentation


Description

  • Added new documentation for the Sleep processor, including configuration details and field descriptions.
  • Updated the deprecation section in the version 5.4 release notes to state there are no deprecations in this release.
  • Added the Sleep processor to the menu under Tyk Streams configuration.

Changes walkthrough 📝

Relevant files
Documentation
version-5.4.md
Update deprecation section in release notes                           

tyk-docs/content/product-stack/tyk-gateway/release-notes/version-5.4.md

  • Updated deprecation section to state there are no deprecations in this
    release.
  • +1/-1     
    sleep.md
    Add documentation for Sleep processor                                       

    tyk-docs/content/product-stack/tyk-streaming/configuration/processors/sleep.md

  • Added new documentation for the Sleep processor.
  • Included configuration details and field descriptions.
  • Provided links to interpolation functions.
  • +24/-0   
    menu.yaml
    Add Sleep processor to menu                                                           

    tyk-docs/data/menu.yaml

    • Added Sleep processor to the menu under Tyk Streams configuration.
    +4/-0     

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

    Copy link
    Contributor

    github-actions bot commented Jul 5, 2024

    PR Reviewer Guide 🔍

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Key issues to review

    None

    Copy link
    Contributor

    github-actions bot commented Jul 5, 2024

    PR Code Suggestions ✨

    CategorySuggestion                                                                                                                                    Score
    Best practice
    Add a performance impact warning for the Sleep processor

    Consider adding a warning or note about the potential impact of using the Sleep processor
    on system performance, especially in production environments. This can help users make
    informed decisions about when and how to use this processor.

    tyk-docs/content/product-stack/tyk-streaming/configuration/processors/sleep.md [7]

    -Sleep for a period of time specified as a duration string for each message. This processor will interpolate functions within the [duration](#duration) field, you can find a list of functions [here]({{< ref "/product-stack/tyk-streaming/configuration/common-configuration/interpolation#bloblang-queries" >}}).
    +Sleep for a period of time specified as a duration string for each message. Note: Using the Sleep processor, especially with long durations, can significantly impact system performance. Use cautiously, particularly in production environments. This processor will interpolate functions within the [duration](#duration) field, you can find a list of functions [here]({{< ref "/product-stack/tyk-streaming/configuration/common-configuration/interpolation#bloblang-queries" >}}).
     
    Suggestion importance[1-10]: 9

    Why: Adding a warning about the potential impact on system performance is important for users to make informed decisions, especially in production environments, making this a valuable addition.

    9
    Clarity
    Clarify the units used in the duration field description

    To improve clarity, consider rephrasing the description of the duration field to specify
    what units can be used (e.g., seconds, minutes). This will help users understand how to
    configure the duration properly without needing to refer to external documentation.

    tyk-docs/content/product-stack/tyk-streaming/configuration/processors/sleep.md [20]

    -The duration of time to sleep for each execution.
    +The duration of time to sleep for each execution, specified in units like seconds (s) or minutes (m).
     
    Suggestion importance[1-10]: 8

    Why: Specifying the units for the duration field improves clarity and helps users configure the field correctly without needing to refer to external documentation.

    8
    Explicitly mention the use of interpolation functions in the duration field to clear up potential ambiguities

    To avoid potential confusion, explicitly mention that the interpolation functions are used
    within the duration field in the main description paragraph. This makes it clear where
    these functions apply without having to infer from context.

    tyk-docs/content/product-stack/tyk-streaming/configuration/processors/sleep.md [7]

    -Sleep for a period of time specified as a duration string for each message. This processor will interpolate functions within the [duration](#duration) field, you can find a list of functions [here]({{< ref "/product-stack/tyk-streaming/configuration/common-configuration/interpolation#bloblang-queries" >}}).
    +Sleep for a period of time specified as a duration string for each message. Specifically, this processor will interpolate functions within the `duration` field, allowing dynamic sleep times. See a list of applicable functions [here]({{< ref "/product-stack/tyk-streaming/configuration/common-configuration/interpolation#bloblang-queries" >}}).
     
    Suggestion importance[1-10]: 6

    Why: While the existing description already mentions interpolation functions, making it more explicit can help avoid confusion, though it is a minor improvement.

    6
    Enhancement
    Add a default value for the duration field to improve initial user configuration

    It's recommended to provide a default value for the duration field in the Sleep processor
    configuration to enhance user experience and provide a clearer starting point for
    configuration. If a sensible default isn't feasible, consider adding a recommended value
    in the documentation.

    tyk-docs/content/product-stack/tyk-streaming/configuration/processors/sleep.md [13]

    -duration: "" # No default (required)
    +duration: "30s" # Default value (modifiable)
     
    Suggestion importance[1-10]: 7

    Why: Providing a default value for the duration field can enhance user experience by giving them a starting point, but it may not be crucial if the field is required and users are expected to provide their own values.

    7

    Copy link

    netlify bot commented Jul 5, 2024

    PS. Pls add /docs/nightly to the end of url

    Name Link
    🔨 Latest commit 24782cc
    🔍 Latest deploy log https://app.netlify.com/sites/tyk-docs/deploys/6687bdaae11c9d00082af6e1
    😎 Deploy Preview https://deploy-preview-5008--tyk-docs.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

    netlify bot commented Jul 5, 2024

    PS. Pls add /docs/nightly to the end of url

    Name Link
    🔨 Latest commit c967682
    🔍 Latest deploy log https://app.netlify.com/sites/tyk-docs/deploys/6687f839039d2000084da3d6
    😎 Deploy Preview https://deploy-preview-5008--tyk-docs.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.

    @dcs3spp dcs3spp merged commit bee4ca3 into master Jul 5, 2024
    10 checks passed
    @dcs3spp dcs3spp deleted the dx-1407-sleep branch July 5, 2024 13:51
    @dcs3spp
    Copy link
    Contributor Author

    dcs3spp commented Jul 5, 2024

    /release to release-5.4

    Copy link

    tykbot bot commented Jul 5, 2024

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

    tykbot bot pushed a commit that referenced this pull request Jul 5, 2024
    * add sleep processor
    * add link to duration field
    
    ---------
    
    Co-authored-by: Simon Pears <simon@tyk.io>
    
    (cherry picked from commit bee4ca3)
    Copy link

    tykbot bot commented Jul 5, 2024

    @dcs3spp Succesfully merged PR

    @dcs3spp
    Copy link
    Contributor Author

    dcs3spp commented Jul 5, 2024

    /release to release-5.3

    Copy link

    tykbot bot commented Jul 5, 2024

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

    tykbot bot pushed a commit that referenced this pull request Jul 5, 2024
    * add sleep processor
    * add link to duration field
    
    ---------
    
    Co-authored-by: Simon Pears <simon@tyk.io>
    
    (cherry picked from commit bee4ca3)
    Copy link

    tykbot bot commented Jul 5, 2024

    @dcs3spp Succesfully merged PR

    buger added a commit that referenced this pull request Jul 5, 2024
    [DX-1407] Tyk Streams: Sleep Processor (#5008)
    
    * add sleep processor
    * add link to duration field
    
    ---------
    
    Co-authored-by: Simon Pears <simon@tyk.io>
    dcs3spp added a commit that referenced this pull request Jul 5, 2024
    #5014)
    
    * [DX-1407] Tyk Streams: Sleep Processor (#5008)
    
    * add sleep processor
    * add link to duration field
    
    ---------
    
    Co-authored-by: Simon Pears <simon@tyk.io>
    
    (cherry picked from commit bee4ca3)
    
    * delete release notes 5.4 it should not be in PR
    
    ---------
    
    Co-authored-by: dcs3spp <dcs3spp@users.noreply.github.com>
    Co-authored-by: Simon Pears <simon@tyk.io>
    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.

    None yet

    2 participants