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

Add maximumThroughputUnits option to template #659

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

daviduash
Copy link

What does this PR do?

Allow users to set the maximumThroughputUnits option in Eventhub

Motivation

Set limit to Throughput when creating DD integration with Eventhub

Testing Guidelines

installed in my test env

Types of changes

  • Bug fix
  • New feature
  • Breaking change
  • Misc (docs, refactoring, dependency upgrade, etc.)

Check all that apply

  • This PR's description is comprehensive
  • This PR contains breaking changes that are documented in the description
  • This PR introduces new APIs or parameters that are documented and unlikely to change in the foreseeable future
  • This PR impacts documentation, and it has been updated (or a ticket has been logged)
  • This PR's changes are covered by the automated tests
  • This PR collects user input/sensitive content into Datadog
  • This PR passes the integration tests (ask a Datadog member to run the tests)
  • This PR passes the unit tests
  • This PR passes the installation tests (ask a Datadog member to run the tests)

@daviduash daviduash requested a review from a team as a code owner May 21, 2023 10:12
Copy link
Member

@mattsp1290 mattsp1290 left a comment

Choose a reason for hiding this comment

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

Thanks for opening this PR to add more options during deployment

When attempting to use this revision to deploy to Azure, Azure responds with

{"code":"InvalidTemplate","message":"Deployment template validation failed: 'The template parameters 'isAutoInflateEnabled, maximumThroughputUnits' in the parameters file are not valid; they are not present in the original template and can therefore not be provided at deployment time. The only supported parameters for this template are 'eventHubNamespace, eventHubName, partitionCount, location'. Please see https://aka.ms/arm-pass-parameter-values for usage details.'."}

Take a look at how eventHubNamespace is used in https://github.com/DataDog/datadog-serverless-functions/blob/master/azure/deploy-to-azure/parent_template.json and https://github.com/DataDog/datadog-serverless-functions/blob/master/azure/deploy-to-azure/function_template.json

You can test your changes by replacing "master" in the following link with your latest commit hash
https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FDataDog%2Fdatadog-serverless-functions%2Fmaster%2Fazure%2Fdeploy-to-azure%2Fparent_template.json

For example the link I used to test was
https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FDataDog%2Fdatadog-serverless-functions%2F8938131929d443c8d6a532d40bcc1220c14aca2a%2Fazure%2Fdeploy-to-azure%2Fparent_template.json

I am not finding any documentation on what a 0 value for maximumThroughputUnits would result in for maximumThroughputUnits. What behavior did you see during your testing of this value?

Also would be nice to note in the description of auto inflate that it related to these throughput units.

@daviduash
Copy link
Author

Hey
Thanks for the replay
it cannot be tested from the web b/c the eventHubTemplateLink is still directing to the master branch
i did tested it in my environment (im deploying using Terraform)
i changed the eventHubTemplateLink to by my template file
enabled isAutoInflateEnabled and set the maximumThroughputUnits to 3

regarding the value 0 in maximumThroughputUnits
i took it from here - ( '0' if AutoInflateEnabled = true)
https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.management.eventhub.models.ehnamespace.maximumthroughputunits?view=azure-dotnet

@mattsp1290 mattsp1290 self-requested a review June 21, 2023 01:31
@mattsp1290
Copy link
Member

Hey Thanks for the replay it cannot be tested from the web b/c the eventHubTemplateLink is still directing to the master branch i did tested it in my environment (im deploying using Terraform) i changed the eventHubTemplateLink to by my template file enabled isAutoInflateEnabled and set the maximumThroughputUnits to 3

regarding the value 0 in maximumThroughputUnits i took it from here - ( '0' if AutoInflateEnabled = true) https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.management.eventhub.models.ehnamespace.maximumthroughputunits?view=azure-dotnet

The current defaults appear to be invalid together. Either auto inflate should default to true or the maximum TPU should be set to the default maximum of 20.

@mattsp1290 mattsp1290 requested a review from natwilkinson June 21, 2023 01:33
@ashwingandhi-ddog
Copy link
Contributor

ashwingandhi-ddog commented Jun 28, 2023

Did some testing and here is what I found:

Deployment fails when:

  • IsAutoInflate: false and Maximum Throughput Units is greater than 0.
  • IsAutoInflate: true and Maximum Throughput Units is 0. (this conflicts with Azure's documentation)

Deployment succeeds when:

  • IsAutoInflate: true and Maximum Throughput Units is greater than 0.
  • IsAutoInflate: false and Maximum Throughput Units is 0.

Suggestions:

  • rename Maximum Throughput Units to Auto-Inflate Maximum Throughput Units as used by azure while creating an EventHubNamespace manually. See image.
  • add more descriptive label saying something like "Set Auto-Inflate Maximum Throughput Units to 0 if IsAutoInflate is disabled. If enabled, set it to a value from 1 to 20".

Choose your pricing tier - Microsoft Azure 2023-06-28 at 5 00 14 PM

@ashwingandhi-ddog ashwingandhi-ddog self-requested a review June 28, 2023 21:38
@natwilkinson natwilkinson removed their request for review April 22, 2024 19:50
@mattsp1290 mattsp1290 requested review from mattsp1290 and removed request for mattsp1290 and ashwingandhi-ddog October 11, 2024 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants