Skip to content

Basic support for extension bundles #1204

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

Merged
merged 3 commits into from
Apr 22, 2019
Merged

Basic support for extension bundles #1204

merged 3 commits into from
Apr 22, 2019

Conversation

ejizba
Copy link
Contributor

@ejizba ejizba commented Apr 19, 2019

No more dependency on .NET Core!!! Instead of running func extensions install in every project, users just have to specify a default bundle version in their "host.json" file and it will pull down the right binaries for them.

This PR will only affect new projects going forward. In the future, we might consider prompting users to "convert" their project from func extensions install to bundles, but I'd rather let this bake a bit before we do that.

There's still some pending open questions being discussed offline. Tracking that here: #1203 #1202

@ejizba ejizba requested a review from a team as a code owner April 19, 2019 23:26
@ejizba
Copy link
Contributor Author

ejizba commented Apr 22, 2019

ping @StephenWeatherford @PrashanthCorp got some work that builds off this PR and would like it reviewed ASAP

// https://github.com/Microsoft/vscode-azurefunctions/issues/1202
hostJson.extensionBundle = {
id: 'Microsoft.Azure.Functions.ExtensionBundle',
version: '[1.*, 2.0.0)'

Choose a reason for hiding this comment

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

This looks like a line that needs to be changed often. Is there an API call you can make to reduce how much this needs to be maintained?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See linked issue a few lines up

Choose a reason for hiding this comment

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

I was writing in the context of #1202. If they bump up the version often, does it make sense to ask an API endpoint to poll for the supported versions?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That issue is about getting it from an api. Specifically this one:
https://functionscdn.azureedge.net/public/cli-feed-v3.json

Copy link
Member

@nturinski nturinski Apr 22, 2019

Choose a reason for hiding this comment

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

Well ideally the cli-feed will provide this property anyway, right? We only write it manually if it didn't exist?

const tasks: TaskDefinition[] = [
{
type: func,
command: hostStartCommand,
problemMatcher: funcWatchProblemMatcher,
isBackground: true,
dependsOn: extInstallTaskName
dependsOn
Copy link
Member

Choose a reason for hiding this comment

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

If there is an extInstallCommand the dependsOn property would just have the venv name, wouldn't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So I don't know about you, but my diff gets cut off at the edge. It looks like this:
Screen Shot 2019-04-22 at 3 38 48 PM

But if you scroll over, I feel like the rest of the line answers your question:
Screen Shot 2019-04-22 at 3 38 55 PM

dependsOn will never evaluate to the venvName. Instead it either evaluates to pipInstallLabel or undefined

@@ -196,8 +194,7 @@ export function getPowerShellValidateOptions(): IValidateProjectOptions {
expectedSettings: {
projectLanguage: ProjectLanguage.PowerShell,
projectRuntime: ProjectRuntime.v2,
deploySubpath: '.',
preDeployTask: 'func: extensions install'
Copy link
Member

Choose a reason for hiding this comment

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

🎉

@daxian-dbw
Copy link
Member

Does this PR really remove the dependency of dotnet SDK? What the Azure Function VSCode extension do for the function.proj files used in a C# script function? I think dotnet SDK is needed to restore function.proj file to pull down the dependent nuget packages declared in it.

@ejizba
Copy link
Contributor Author

ejizba commented Apr 30, 2019

This only affects new projects. When you say function.proj do you mean extensions.csproj? If so, that file will no longer be written down in new projects. You're welcome to try this out in the latest build from master as described here: https://aka.ms/azcodeInsiders

There will also be more documentation on this feature coming in the near future.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 15, 2021
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.

4 participants