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

ACR-3.0.0 API upgrade #506

Merged
merged 117 commits into from
Nov 9, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
05b3138
Merge pull request #21 from AzureCR/master
Jul 25, 2018
a7be0b3
Added Azure Credentials Manager Singleton (#18)
Jul 25, 2018
b2e5740
Sorted Existing Create Registry ready for code review
Jul 25, 2018
ef1ccfa
Added acquiring telemetry data for create registry
rsamai Jul 25, 2018
1fca0da
broke up createnewresourcegroup method and fixed client use
rsamai Jul 26, 2018
60f68d3
Jackson esteban/unified client nit Fix (#24)
Jul 26, 2018
26f00e2
Enabled location selection
rsamai Jul 26, 2018
fe0fe2f
Location request fixes
rsamai Jul 30, 2018
5c8d364
Refactor while loop for new res group
rsamai Jul 30, 2018
a61c728
Added SKU selection
rsamai Jul 30, 2018
9b51397
Quick fix- initializing array syntax
rsamai Jul 30, 2018
048eb67
Added specific error messages and comments
rsamai Aug 1, 2018
bc905d8
Merge pull request #30 from AzureCR/master
rsamai Aug 2, 2018
37d8a27
Merge pull request #22 from AzureCR/Esteban-Julia-Rutu/CreateRegistry
rsamai Aug 2, 2018
b80af87
Julia/delete image (#29)
julialieberman Aug 4, 2018
f4f1924
copied previous push to acr into new pull-from-azure.ts file
rsamai Aug 6, 2018
e2cf013
Merge branch 'dev' into master
jvstokes Aug 7, 2018
64c8282
Merge pull request #42 from AzureCR/master
jvstokes Aug 7, 2018
05df67c
Estebanreyl/dev merge fixes (#43)
Aug 7, 2018
2332645
added acrbuild stuff
jvstokes Aug 7, 2018
7d7a7d5
added acrbuild stuff
jvstokes Aug 7, 2018
17fedec
Update to match utility manager class
jvstokes Aug 7, 2018
126c01e
Rutusamai/list build tasks for each registry (#37)
rsamai Aug 7, 2018
0a8eba4
Added quick pick for selecting resource group and registry
jvstokes Aug 8, 2018
73f6e81
clean
jvstokes Aug 8, 2018
3106ef8
Merge branch 'dev' into Jackson/QuickBuildDev
jvstokes Aug 8, 2018
7c7dcdd
Merge branch 'Jackson/QuickBuildDev' of https://github.com/AzureCR/vs…
jvstokes Aug 8, 2018
53b215a
Added subscription support
jvstokes Aug 8, 2018
108a5bb
utility bug fix
jvstokes Aug 8, 2018
0a3d6e1
Julia/delete repository final (#49)
Aug 9, 2018
19f8b72
Julia/delete registry final (#47)
Aug 9, 2018
2b12ed0
Made loginCredentials method in acrTools more efficient, added Pull I…
rsamai Aug 9, 2018
def6162
added folder select
jvstokes Aug 10, 2018
dc34528
Split the loginCredentials function, added docker login and docker pu…
rsamai Aug 11, 2018
d26247d
Finished pull from azure right click feature
rsamai Aug 13, 2018
a16d877
deleted push to azure
rsamai Aug 13, 2018
2c16571
removed username and password from Azure Registry Node
rsamai Aug 13, 2018
06b0c99
Merge branch 'master2' into dev
Aug 13, 2018
d694255
Merge pull request #52 from AzureCR/master-dev-merge
rsamai Aug 13, 2018
57f3912
Clean up
rsamai Aug 13, 2018
6e18256
copied previous push to acr into new pull-from-azure.ts file
rsamai Aug 6, 2018
47642b1
Made loginCredentials method in acrTools more efficient, added Pull I…
rsamai Aug 9, 2018
dc02f2b
Split the loginCredentials function, added docker login and docker pu…
rsamai Aug 11, 2018
e02d9d5
Finished pull from azure right click feature
rsamai Aug 13, 2018
086a574
deleted push to azure
rsamai Aug 13, 2018
9cadc21
Clean up
rsamai Aug 13, 2018
a0ccbb5
Merge branch 'rutusamai/pullFromACR' of https://github.com/AzureCR/vs…
rsamai Aug 13, 2018
dc77b1a
Working again after rebasing and resolving merge conflicts
rsamai Aug 14, 2018
1f3b25a
Updates and fixes
jvstokes Aug 14, 2018
9736b40
Fixes from PR comments
rsamai Aug 14, 2018
8c36bb9
uncapitalize AzureRegistryNode
rsamai Aug 14, 2018
6c06d76
Refactoring, prod.
jvstokes Aug 14, 2018
90dc12e
Merge pull request #53 from AzureCR/rutusamai/pullFromACR
rsamai Aug 15, 2018
36853de
Merge branch 'dev' into Jackson/QuickBuildDev
jvstokes Aug 16, 2018
3eed8a1
Flexible OSType
jvstokes Aug 16, 2018
77dd36e
Merge branch 'Jackson/QuickBuildDev' of https://github.com/AzureCR/vs…
jvstokes Aug 16, 2018
341f097
Estebanreyl/ready for production (#55)
Aug 16, 2018
ea9e049
Merge branch 'dev' into Jackson/QuickBuildDev
jvstokes Aug 16, 2018
2331636
Merge branch 'dev' into Jackson/QuickBuildDev
jvstokes Aug 16, 2018
1ee4f10
Jackson/quick build dev (#46)
jvstokes Aug 19, 2018
0a4dcb2
added ID
jvstokes Aug 20, 2018
9912c2e
Merge branch 'dev' into master2
Aug 23, 2018
ad17751
Merge pull request #65 from AzureCR/master2
rsamai Aug 23, 2018
d174c6a
Merge pull request #67 from AzureCR/dev
jvstokes Aug 23, 2018
aa0a5ec
Merge branch 'Jackson/QuickBuildDev' of https://github.com/AzureCR/vs…
jvstokes Aug 23, 2018
c280b12
Move build to azure commands
jvstokes Aug 24, 2018
f5f3ef3
cleanup
jvstokes Aug 24, 2018
b255dad
Relative dockerfile support
jvstokes Aug 24, 2018
34a2787
Removed await, updating list in enumeration
jvstokes Aug 24, 2018
b90dee9
Merge branch 'dev' into master3
Aug 29, 2018
eab4fd8
Merge pull request #69 from AzureCR/master3
rsamai Aug 29, 2018
6a954eb
fixed chdir
jvstokes Aug 29, 2018
1465dff
Merge branch 'dev' into Jackson/QuickBuildDev
jvstokes Aug 29, 2018
71f6fa6
flexible ostype
jvstokes Aug 30, 2018
711351e
Merge branch 'Jackson/QuickBuildDev' of https://github.com/AzureCR/vs…
jvstokes Aug 30, 2018
567bf5d
Merge pull request #68 from AzureCR/Jackson/QuickBuildDev
jvstokes Sep 3, 2018
d90ed09
Rutusamai/Show Build Task properties (#70)
rsamai Sep 4, 2018
a6825ae
Merge branch 'dev' of https://github.com/AzureCR/vscode-docker into m…
Sep 7, 2018
9c4d367
merge
Sep 7, 2018
216bb2f
missed small changes
Sep 7, 2018
d74649c
Merge branch 'dev' into master4
Sep 7, 2018
cb70c48
Merge pull request #74 from AzureCR/master4
jvstokes Sep 7, 2018
32332ab
Rutusamai/Run a Build Task (#71)
rsamai Sep 13, 2018
ec20087
Estebanreyl/build logs final (#72)
Sep 14, 2018
64a7a95
Adds streaming and command standarization (ext.ui) (#73)
Sep 14, 2018
039b80c
changes for ACR 3.0.0 (#80)
rosanch Sep 18, 2018
d772951
Run task fixed. Issue ID: 79
rosanch Sep 18, 2018
3b723e3
missing changes added
rosanch Sep 18, 2018
4b1e21b
Merge pull request #81 from rosanch/roy/fix79
rosanch Sep 19, 2018
5a9c892
Fixing ACR run logs for Images
rosanch Sep 19, 2018
5580979
Merge pull request #82 from rosanch/roy/image-runlogs
sajayantony Sep 19, 2018
5e54169
Sajaya/top1 (#83)
sajayantony Sep 19, 2018
e12b963
Refactoring build to run and buildTask to task
rosanch Sep 19, 2018
5d90507
Merge pull request #84 from rosanch/roy/refactoring-3.0.0
rosanch Sep 19, 2018
71bcaf4
Update Credentail Management
Jul 25, 2018
3dc9a9c
Removed filter for top (#88)
sajayantony Sep 22, 2018
123dd9a
fixing Image Log Filter
rosanch Sep 24, 2018
acae68c
last dev branch changes added
rosanch Sep 25, 2018
d2dada7
Merge branch 'acr-3.0.0' of https://github.com/AzureCR/vscode-docker …
rosanch Sep 25, 2018
eed8c9d
Merge branch 'master' into acr-3.0.0
rosanch Oct 4, 2018
552310a
fixing tslint error messages
rosanch Oct 11, 2018
010b5e0
Merged conflicts solved.
rosanch Oct 15, 2018
bec82ee
merge conflincts 2
rosanch Oct 15, 2018
6933622
Merge branch 'acr-3.0.0' of https://github.com/AzureCR/vscode-docker …
rosanch Oct 15, 2018
078e45c
tslint fixes 2
rosanch Oct 16, 2018
37d4c75
updating branch to master: 22e45ec7c7ef6ee568f0e592ca614fdcdd3b2c8b
rosanch Oct 26, 2018
1edab2c
First PR #506 review Update include:
rosanch Nov 3, 2018
e75a205
merge conflicts update to #607
rosanch Nov 3, 2018
75f3c64
Hide Azure Quick Build if Azure Account not available
StephenWeatherford Nov 5, 2018
c7eb304
Second PR #506 review update.
rosanch Nov 6, 2018
ca23731
Merge branch 'acr-3.0.0' of https://github.com/AzureCR/vscode-docker …
rosanch Nov 6, 2018
a8ac042
Merge branch 'master' of https://github.com/Microsoft/vscode-docker i…
rosanch Nov 6, 2018
50bc53b
Improving Logs generation Error handeling
rosanch Nov 7, 2018
6d9d350
Third PR #506 review update.
rosanch Nov 7, 2018
c3dea7d
UploadSourceCode no longer has to change process working directory.
rosanch Nov 9, 2018
5f21cd9
Merge Conflict update to Microsoft/Master 611
rosanch Nov 9, 2018
ea6e794
lint fix
rosanch Nov 9, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions commands/azureCommands/acr-logs-utils/tableDataManager.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import ContainerRegistryManagementClient from "azure-arm-containerregistry";
import { Registry, Run, RunGetLogResult, RunListResult } from "azure-arm-containerregistry/lib/models";
import vscode = require('vscode');
import { parseError } from "vscode-azureextensionui";
import { ext } from "../../../extensionVariables";
import { acquireACRAccessTokenFromRegistry } from "../../../utils/Azure/acrTools";
Expand Down Expand Up @@ -50,7 +51,7 @@ export class LogData {
* the next page of logs will be saved and all preexisting data will be deleted.
* @param filter Specifies a filter for log items, if run Id is specified this will take precedence
*/
public async loadLogs(loadNext: boolean, removeOld?: boolean, filter?: Filter): Promise<void> {
public async loadLogs(webViewEvent: boolean, loadNext: boolean, removeOld?: boolean, filter?: Filter): Promise<void> {
rosanch marked this conversation as resolved.
Show resolved Hide resolved
let runListResult: RunListResult;
let options: {
filter?: string,
Expand All @@ -66,19 +67,23 @@ export class LogData {
runListResult = await this.client.runs.list(this.resourceGroup, this.registry.name, options);
} else {
runListResult = [];
// Temporal fix. Issue documented: runId must exist in the registry.
try {
runListResult.push(await this.client.runs.get(this.resourceGroup, this.registry.name, filter.runId));
} catch (err) {
if (parseError(err).errorType !== "EntityNotFound") {
const error = parseError(err);
if (!webViewEvent) {
throw err;
} else if (error.errorType !== "EntityNotFound") {
vscode.window.showErrorMessage(`Error '${error.errorType}': ${error.message}`);
}
}
}
} else {
if (loadNext) {
if (this.nextLink) {
runListResult = await this.client.runs.listNext(this.nextLink);
} else if (webViewEvent) {
vscode.window.showErrorMessage("No more logs to show.");
} else {
throw new Error('No more logs to show');
StephenWeatherford marked this conversation as resolved.
Show resolved Hide resolved
}
Expand Down
21 changes: 13 additions & 8 deletions commands/azureCommands/acr-logs-utils/tableViewManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { ImageDescriptor, Run } from "azure-arm-containerregistry/lib/models";
import * as clipboardy from 'clipboardy'
import * as path from 'path';
import * as vscode from "vscode";
import { parseError } from "vscode-azureextensionui";
import { ext } from "../../../extensionVariables";
import { accessLog } from './logFileManager';
import { Filter, LogData } from './tableDataManager'
Expand Down Expand Up @@ -30,23 +31,27 @@ export class LogTableWebview {
this.panel.webview.onDidReceiveMessage(async (message: IMessage) => {
if (message.logRequest) {
const itemNumber: number = +message.logRequest.id;
await this.logData.getLink(itemNumber).then(async (url) => {
if (url !== 'requesting') {
await accessLog(url, this.logData.logs[itemNumber].runId, message.logRequest.download);
}
});

try {
await this.logData.getLink(itemNumber).then(async (url) => {
if (url !== 'requesting') {
await accessLog(url, this.logData.logs[itemNumber].runId, message.logRequest.download);
}
});
} catch (err) {
const error = parseError(err);
vscode.window.showErrorMessage(`Error '${error.errorType}': ${error.message}`);
}
} else if (message.copyRequest) {
// tslint:disable-next-line:no-unsafe-any
clipboardy.writeSync(message.copyRequest.text);

} else if (message.loadMore) {
const alreadyLoaded = this.logData.logs.length;
await this.logData.loadLogs(true);
await this.logData.loadLogs(true, true);
this.addLogsToWebView(alreadyLoaded);

} else if (message.loadFiltered) {
await this.logData.loadLogs(false, true, message.loadFiltered.filterString);
await this.logData.loadLogs(true, false, true, message.loadFiltered.filterString);
this.addLogsToWebView();
}
});
Expand Down
6 changes: 3 additions & 3 deletions commands/azureCommands/acr-logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@ export async function viewACRLogs(context: AzureRegistryNode | AzureImageTagNode
// Filtering provided
if (context && context instanceof AzureImageTagNode) {
//ACR Image Logs
await logData.loadLogs(false, false, { image: context.label });
await logData.loadLogs(false, false, false, { image: context.label });
if (!hasValidLogContent(context, logData)) { return; }
const url = await logData.getLink(0);
await accessLog(url, logData.logs[0].runId, false);
} else {
if (context && context instanceof TaskNode) {
//ACR Task Logs
await logData.loadLogs(false, false, { task: context.label });
await logData.loadLogs(false, false, false, { task: context.label });
} else {
//ACR Registry Logs
await logData.loadLogs(false);
await logData.loadLogs(false, false);
}
if (!hasValidLogContent(context, logData)) { return; }
let webViewTitle = registry.name;
Expand Down