Skip to content

Commit

Permalink
Merge pull request #89 from liprec/develop
Browse files Browse the repository at this point in the history
v2.5.3
  • Loading branch information
liprec authored Jun 9, 2022
2 parents ed41eff + ee4eff7 commit a211131
Show file tree
Hide file tree
Showing 20 changed files with 77 additions and 22 deletions.
11 changes: 11 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---

As all changes are publicly made available via PRs, you must agree to the terms before contributing:

- [ ] I represent that each of _my contributions_ is entirely _my original work_
- [ ] I have sole ownership of intellectual property rights to _my contribution_
- [ ] I approve that the community is free to use _my contribution_

Make sure that you have checked all tick boxes before this PR can be approved.

---
10 changes: 9 additions & 1 deletion delete-adf-items/v2/deleteadfitems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ function checkDataFactory(datafactoryOption: DatafactoryOptions): Promise<boolea
.then((result: HttpOperationResponse) => {
if (result && result.status !== 200) {
error(loc("Generic_CheckDataFactory2", dataFactoryName));
debug(`Error: ${result && result.bodyAsText}`);
reject(loc("Generic_CheckDataFactory2", dataFactoryName));
} else {
debug(`Datafactory '${dataFactoryName}' exist`);
Expand Down Expand Up @@ -459,7 +460,14 @@ async function main(): Promise<boolean> {
const scheme = azureModels.AuthScheme;
debug("Parsed task inputs");

loginAzure(clientId, key, tenantID, authorityHostUrl, scheme, taskParameters.Audience)
loginAzure(
clientId,
key,
tenantID,
authorityHostUrl,
scheme,
taskParameters.Audience || azureModels.Audience
)
.then((azureClient: AzureServiceClient) => {
datafactoryOption.azureClient = azureClient;
debug("Azure client retrieved.");
Expand Down
4 changes: 4 additions & 0 deletions delete-adf-items/v2/models/azureModels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ export class AzureModels {
return this.servicePrincipalKey;
}

public get Audience(): string {
return `https://${this.EnvironmentUrl}/.default`;
}

public get EnvironmentUrl(): string {
return new URL(this.environmentUrl).hostname as string;
}
Expand Down
3 changes: 1 addition & 2 deletions delete-adf-items/v2/models/taskParameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,8 @@ export class TaskParameters {
if (this.workspaceUrl) return new URL(this.workspaceUrl as string).hostname;
}

public get Audience(): string {
public get Audience(): string | undefined {
if (this.workspaceUrl) return "https://dev.azuresynapse.net/.default";
return "https://management.azure.com/.default";
}

public get ServiceFilter(): string | undefined {
Expand Down
2 changes: 1 addition & 1 deletion delete-adf-items/v2/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"version": {
"Major": "2",
"Minor": "5",
"Patch": "2"
"Patch": "3"
},
"minimumAgentVersion": "1.100.0",
"groups": [
Expand Down
10 changes: 9 additions & 1 deletion deploy-adf-json/v2/deployadfjson.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ function checkDataFactory(datafactoryOption: DatafactoryOptions): Promise<boolea
.then((result: HttpOperationResponse) => {
if (result && result.status !== 200) {
error(loc("Generic_CheckDataFactory2", dataFactoryName));
debug(`Error: ${result && result.bodyAsText}`);
reject(loc("Generic_CheckDataFactory2", dataFactoryName));
} else {
debug(`Datafactory '${dataFactoryName}' exist`);
Expand Down Expand Up @@ -400,7 +401,14 @@ async function main(): Promise<boolean> {
const scheme = azureModels.AuthScheme;
debug("Parsed task inputs");

loginAzure(clientId, key, tenantID, authorityHostUrl, scheme, taskParameters.Audience)
loginAzure(
clientId,
key,
tenantID,
authorityHostUrl,
scheme,
taskParameters.Audience || azureModels.Audience
)
.then((azureClient: AzureServiceClient) => {
datafactoryOption.azureClient = azureClient;
debug("Azure client retrieved.");
Expand Down
4 changes: 4 additions & 0 deletions deploy-adf-json/v2/models/azureModels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ export class AzureModels {
return this.servicePrincipalKey;
}

public get Audience(): string {
return `https://${this.EnvironmentUrl}/.default`;
}

public get EnvironmentUrl(): string {
return new URL(this.environmentUrl).hostname as string;
}
Expand Down
5 changes: 2 additions & 3 deletions deploy-adf-json/v2/models/taskParameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export class TaskParameters {
this.triggerPath =
(this.triggerPath && this.triggerPath.replace(rootPath, "")) === "" ? undefined : this.triggerPath;

this.continue = getBoolInput("Continue", false);
this.continue = getBoolInput("Continue", false) as boolean;
this.throttle = Number.parseInt(getInput("Throttle", false) as string);
this.throttle = isNaN(this.throttle) ? 5 : this.throttle;
this.detectDependency = getBoolInput("detectDependency", false);
Expand Down Expand Up @@ -125,9 +125,8 @@ export class TaskParameters {
if (this.workspaceUrl) return new URL(this.workspaceUrl as string).hostname;
}

public get Audience(): string {
public get Audience(): string | undefined {
if (this.workspaceUrl) return "https://dev.azuresynapse.net/.default";
return "https://management.azure.com/.default";
}

public get ServicePath(): string | undefined {
Expand Down
2 changes: 1 addition & 1 deletion deploy-adf-json/v2/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"version": {
"Major": "2",
"Minor": "5",
"Patch": "2"
"Patch": "3"
},
"minimumAgentVersion": "1.100.0",
"groups": [
Expand Down
2 changes: 1 addition & 1 deletion query-adf-run/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"version": {
"Major": "2",
"Minor": "5",
"Patch": "2"
"Patch": "3"
},
"instanceNameFormat": "Query Azure Data Factory runs",
"groups": [
Expand Down
4 changes: 4 additions & 0 deletions toggle-adf-trigger/v2/models/azureModels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ export class AzureModels {
return this.servicePrincipalKey;
}

public get Audience(): string {
return `https://${this.EnvironmentUrl}/.default`;
}

public get EnvironmentUrl(): string {
return new URL(this.environmentUrl).hostname as string;
}
Expand Down
5 changes: 2 additions & 3 deletions toggle-adf-trigger/v2/models/taskParameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export class TaskParameters {
break;
}

this.continue = getBoolInput("Continue", false);
this.continue = getBoolInput("Continue", false) as boolean;
this.throttle = Number.parseInt(getInput("Throttle", false) as string);
this.throttle = isNaN(this.throttle) ? 5 : this.throttle;
} catch (err: unknown) {
Expand All @@ -102,9 +102,8 @@ export class TaskParameters {
if (this.workspaceUrl) return new URL(this.workspaceUrl as string).hostname;
}

public get Audience(): string {
public get Audience(): string | undefined {
if (this.workspaceUrl) return "https://dev.azuresynapse.net/.default";
return "https://management.azure.com/.default";
}

public get TriggerFilter(): string {
Expand Down
2 changes: 1 addition & 1 deletion toggle-adf-trigger/v2/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"version": {
"Major": "2",
"Minor": "5",
"Patch": "2"
"Patch": "3"
},
"minimumAgentVersion": "1.100.0",
"groups": [
Expand Down
10 changes: 9 additions & 1 deletion toggle-adf-trigger/v2/toggleadftrigger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ function checkDataFactory(datafactoryOption: DatafactoryOptions): Promise<boolea
.then((result: HttpOperationResponse) => {
if (result && result.status !== 200) {
error(loc("Generic_CheckDataFactory2", dataFactoryName));
debug(`Error: ${result && result.bodyAsText}`);
reject(loc("Generic_CheckDataFactory2", dataFactoryName));
} else {
debug(`Datafactory '${dataFactoryName}' exist`);
Expand Down Expand Up @@ -365,7 +366,14 @@ async function main(): Promise<boolean> {
const scheme = azureModels.AuthScheme;
debug("Parsed task inputs");

loginAzure(clientId, key, tenantID, authorityHostUrl, scheme, taskParameters.Audience)
loginAzure(
clientId,
key,
tenantID,
authorityHostUrl,
scheme,
taskParameters.Audience || azureModels.Audience
)
.then((azureClient: AzureServiceClient) => {
datafactoryOption.azureClient = azureClient;
debug("Azure client retrieved.");
Expand Down
4 changes: 4 additions & 0 deletions trigger-adf-pipeline/v2/models/azureModels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ export class AzureModels {
return this.servicePrincipalKey;
}

public get Audience(): string {
return `https://${this.EnvironmentUrl}/.default`;
}

public get EnvironmentUrl(): string {
return new URL(this.environmentUrl).hostname as string;
}
Expand Down
5 changes: 2 additions & 3 deletions trigger-adf-pipeline/v2/models/taskParameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export class TaskParameters {
(pipelineParameterType as string).toLowerCase() === "path"
) as string;

this.continue = getBoolInput("Continue", false);
this.continue = getBoolInput("Continue", false) as boolean;
this.throttle = Number.parseInt(getInput("Throttle", false) as string);
this.throttle = isNaN(this.throttle) ? 5 : this.throttle;
this.deploymentOutputs = getInput("deploymentOutputs", false) as string;
Expand Down Expand Up @@ -122,9 +122,8 @@ export class TaskParameters {
if (this.workspaceUrl) return new URL(this.workspaceUrl as string).hostname;
}

public get Audience(): string {
public get Audience(): string | undefined {
if (this.workspaceUrl) return "https://dev.azuresynapse.net/.default";
return "https://management.azure.com/.default";
}

public get PipelineFilter(): string {
Expand Down
2 changes: 1 addition & 1 deletion trigger-adf-pipeline/v2/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"version": {
"Major": "2",
"Minor": "5",
"Patch": "2"
"Patch": "3"
},
"minimumAgentVersion": "1.100.0",
"groups": [
Expand Down
10 changes: 9 additions & 1 deletion trigger-adf-pipeline/v2/triggeradfpipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ function checkDataFactory(datafactoryOption: DatafactoryOptions): Promise<boolea
.then((result: HttpOperationResponse) => {
if (result && result.status !== 200) {
error(loc("Generic_CheckDataFactory2", dataFactoryName));
debug(`Error: ${result && result.bodyAsText}`);
reject(loc("Generic_CheckDataFactory2", dataFactoryName));
} else {
debug(`Datafactory '${dataFactoryName}' exist`);
Expand Down Expand Up @@ -389,7 +390,14 @@ async function main(): Promise<boolean> {
const scheme = azureModels.AuthScheme;
debug("Parsed task inputs");

loginAzure(clientId, key, tenantID, authorityHostUrl, scheme, taskParameters.Audience)
loginAzure(
clientId,
key,
tenantID,
authorityHostUrl,
scheme,
taskParameters.Audience || azureModels.Audience
)
.then((azureClient: AzureServiceClient) => {
datafactoryOption.azureClient = azureClient;
debug("Azure client retrieved.");
Expand Down
2 changes: 1 addition & 1 deletion vss-extension-preview.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifestVersion": 1,
"id": "vsts-publish-adf-preview",
"version": "2.5.2",
"version": "2.5.3",
"name": "Azure Data Factory (Preview)",
"publisher": "liprec",
"public": false,
Expand Down
2 changes: 1 addition & 1 deletion vss-extension.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifestVersion": 1,
"id": "vsts-publish-adf",
"version": "2.5.2",
"version": "2.5.3",
"name": "Azure Data Factory",
"publisher": "liprec",
"public": true,
Expand Down

0 comments on commit a211131

Please sign in to comment.