-
Notifications
You must be signed in to change notification settings - Fork 133
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
Allow user to create an Event Hub namespace and/or Event Hub when creating EventHubTrigger #3713
Conversation
…ating EventHubTrigger
src/commands/addBinding/settingSteps/eventHub/EventHubListStep.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Brandon Waterloo [MSFT] <36966225+bwateratmsft@users.noreply.github.com>
@@ -11,6 +11,6 @@ export class EventHubNameStep extends StringPromptStep { | |||
public shouldPrompt(context: IEventHubWizardContext & IBindingWizardContext): boolean { | |||
// If the user decides to create a new app setting, `EventHubListStep` will take care of prompting | |||
// Otherwise, prompt to manually enter the name of the event hub using this step | |||
return !context.namespaceName && !context.eventhubname; | |||
return !context.eventHubsNamespace && !context.eventhubname; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Camel case?
eventhubname
=> eventHubName
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a note in IEventHubWizardContext
/**
* NOTE: The name of this variable should not change. It matches the name of the binding setting written to function.json
*/
eventhubname?: string;
newAuthRuleName?: string; | ||
authRule?: AuthorizationRule; | ||
newEventHubName?: string; | ||
// Netherite uses all of the eventhub namespace settings in IEventHubWizardContext |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll double check some Netherite
scenarios to make sure this doesn't break. We'll probably want CTI to pay extra attention to this flow when they do their test pass
More motivation for me to get some tests in for Durable as well...
import { ISubscriptionContext } from "@microsoft/vscode-azext-utils"; | ||
import { EventHubsConnectionTypeValues, StorageConnectionTypeValues } from "../../../../constants"; | ||
import { ISetConnectionSettingContext } from "../ISetConnectionSettingContext"; | ||
|
||
export interface IEventHubsConnectionWizardContext extends ISetConnectionSettingContext, Partial<ISubscriptionContext> { | ||
resourceGroup?: ResourceGroup; | ||
resourceGroup?: ResourceManagementModels.ResourceGroup; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean the spaces? I'm not sure what you're trying to highlight here.
Or the fact that it has resourceGroup
as a property?
@@ -24,7 +25,6 @@ import { CosmosDBListStep } from './cosmosDB/CosmosDBListStep'; | |||
import { EventHubAuthRuleListStep } from './eventHub/EventHubAuthRuleListStep'; | |||
import { EventHubConnectionCreateStep } from './eventHub/EventHubConnectionCreateStep'; | |||
import { EventHubListStep } from './eventHub/EventHubListStep'; | |||
import { EventHubNamespaceListStep } from './eventHub/EventHubNamespaceListStep'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you missing an import for: EventHubsNamespaceListStep
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No idea why that got removed...
…osoft/vscode-azurefunctions into nat/eventHubNamespaceCreate
…ions into nat/eventHubNamespaceCreate
Partially fixes #3550