Skip to content

Commit 871508c

Browse files
Merge pull request #935 from Azure/master
Merge master to stable for fix release 0.10.1
2 parents a35b1ba + 066a691 commit 871508c

File tree

12 files changed

+100
-43
lines changed

12 files changed

+100
-43
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# 0.10.1
2+
[All items](https://github.com/Azure/BatchLabs/milestone/13?closed=1)
3+
4+
### Bug:
5+
6+
* Nodes with start task failed state don't show the files [\#929](https://github.com/Azure/BatchLabs/issues/929)
7+
* OS Family Not Reported on Pool Correctly [\#927](https://github.com/Azure/BatchLabs/issues/927)
8+
* Error reading job prep-task [\#926](https://github.com/Azure/BatchLabs/issues/926)
9+
10+
111
# 0.10.0
212
[All items](https://github.com/Azure/BatchLabs/milestone/11?closed=1)
313

app/components/file/browse/node-file-browse.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { FileLoader, FileNavigator } from "app/services/file";
77
import "./node-file-browse.scss";
88

99
const availableStates = new Set([
10-
NodeState.idle, NodeState.running, NodeState.waitingForStartTask,
10+
NodeState.idle, NodeState.running, NodeState.waitingForStartTask, NodeState.startTaskFailed,
1111
]);
1212

1313
/**

app/components/job/job-hook-task/job-hook-task-details/job-hook-task-details.component.ts

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,45 @@
1-
import { Component, Input } from "@angular/core";
2-
import { JobHookTask } from "app/models";
1+
import { Component, Input, OnInit } from "@angular/core";
32

43
import { FileExplorerConfig } from "app/components/file/browse/file-explorer";
4+
import { JobHookTask, Node } from "app/models";
5+
import { NodeParams, NodeService } from "app/services";
6+
import { EntityView } from "app/services/core";
57
import "./job-hook-task-details.scss";
68

79
@Component({
810
selector: "bl-job-hook-task-details",
911
templateUrl: "job-hook-task-details.html",
1012
})
11-
export class JobHookTaskDetailsComponent {
13+
export class JobHookTaskDetailsComponent implements OnInit {
1214
@Input() public task: JobHookTask;
13-
1415
@Input() public type: string = "preparationTask";
16+
public node: Node;
17+
public loading = true;
1518

1619
public fileExplorerConfig: FileExplorerConfig = {
1720
showTreeView: false,
1821
};
22+
23+
private _nodeData: EntityView<Node, NodeParams>;
24+
25+
constructor(nodeService: NodeService) {
26+
this._nodeData = nodeService.view();
27+
this._nodeData.item.subscribe((node) => {
28+
this.node = node;
29+
});
30+
}
31+
32+
public ngOnInit() {
33+
this._nodeData.fetch().subscribe({
34+
next: () => {
35+
this.loading = false;
36+
},
37+
error: () => {
38+
this.loading = false;
39+
},
40+
});
41+
}
42+
1943
public get currentFolder() {
2044
const info = this.task[this.type];
2145
return info && info.taskRootDirectory;
Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
<div *ngIf="task">
22
<div class="info">
3-
<span>Node: <a [routerLink]="['/pools', task.poolId, 'nodes', task.nodeId]">{{task.nodeId}}</a></span>
3+
<span>Node:
4+
<a [routerLink]="['/pools', task.poolId, 'nodes', task.nodeId]">{{task.nodeId}}</a>
5+
</span>
46
</div>
5-
<bl-node-file-browse [poolId]="task.poolId" [nodeId]="task.nodeId" [fileExplorerConfig]="fileExplorerConfig" [folder]="currentFolder"
6-
*ngIf="currentFolder">
7+
<bl-node-file-browse [poolId]="task.poolId" [nodeId]="task.nodeId" [node]="node" [fileExplorerConfig]="fileExplorerConfig"
8+
[folder]="currentFolder" *ngIf="node && currentFolder">
79
</bl-node-file-browse>
10+
11+
<div *ngIf="!node && !loading" class="info-overlay node-unavailable">
12+
Node where this task ran doesn't exists anymore.
13+
</div>
814
</div>

app/components/job/job-hook-task/job-hook-task-details/job-hook-task-details.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
bl-job-hook-task-details {
2+
display: block;
3+
position: relative;
4+
height: 100%;
25
.info {
36
padding: 0 10px;
47
}
Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
1-
import { Record } from "immutable";
2-
3-
// tslint:disable:variable-name object-literal-sort-keys
4-
const CloudServiceConfigurationRecord = Record({
5-
osFamily: null,
6-
targetOSVersion: null,
7-
currentOSVersion: null,
8-
});
1+
import { Model, Prop, Record } from "app/core";
92

3+
export interface CloudServiceConfigurationAttributes {
4+
osFamily: CloudServiceOsFamily;
5+
targetOSVersion: string;
6+
currentOSVersion: string;
7+
}
108
/**
119
* Class for displaying Batch CloudServiceConfiguration information.
1210
*/
13-
export class CloudServiceConfiguration extends CloudServiceConfigurationRecord {
14-
public osFamily: number;
15-
public targetOSVersion: string;
16-
public currentOSVersion: string;
11+
@Model()
12+
export class CloudServiceConfiguration extends Record<CloudServiceConfigurationAttributes> {
13+
@Prop() public osFamily: CloudServiceOsFamily;
14+
@Prop() public targetOSVersion: string;
15+
@Prop() public currentOSVersion: string;
16+
}
17+
18+
export enum CloudServiceOsFamily {
19+
windowsServer2008R2 = "2",
20+
windowsServer2012 = "3",
21+
windowsServer2012R2 = "4",
22+
windowsServer2016 = "5",
1723
}

app/models/decorators/cloud-service-configuration-decorator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { CloudServiceConfiguration } from "app/models";
1+
import { CloudServiceConfiguration, CloudServiceOsFamily } from "app/models";
22
import { DecoratorBase } from "app/utils/decorators";
33

44
export class CloudServiceConfigurationDecorator extends DecoratorBase<CloudServiceConfiguration> {
@@ -14,7 +14,7 @@ export class CloudServiceConfigurationDecorator extends DecoratorBase<CloudServi
1414
this.currentOSVersion = this.stringField(cloudServiceConfiguration.currentOSVersion);
1515
}
1616

17-
private _translateOSFamily(osName: string, osFamilyId: number): string {
17+
private _translateOSFamily(osName: string, osFamilyId: CloudServiceOsFamily): string {
1818
return `${osName}, (ID: ${osFamilyId})`;
1919
}
2020
}

app/utils/pool-utils.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Icon, IconSources } from "app/components/base/icon";
2-
import { Pool, PoolAllocationState, SpecCost } from "app/models";
2+
import { CloudServiceOsFamily, Pool, PoolAllocationState, SpecCost } from "app/models";
33
import { LowPriDiscount } from "app/utils/constants";
44
import * as Icons from "./icons";
55

@@ -113,12 +113,11 @@ export class PoolUtils {
113113
public static getOsName(pool: Pool): string {
114114
if (pool.cloudServiceConfiguration) {
115115
let osFamily = pool.cloudServiceConfiguration.osFamily;
116-
117-
if (osFamily === 2) {
116+
if (osFamily === CloudServiceOsFamily.windowsServer2008R2) {
118117
return "Windows Server 2008 R2 SP1";
119-
} else if (osFamily === 3) {
118+
} else if (osFamily === CloudServiceOsFamily.windowsServer2012) {
120119
return "Windows Server 2012";
121-
} else if (osFamily === 4) {
120+
} else if (osFamily === CloudServiceOsFamily.windowsServer2012R2) {
122121
return "Windows Server 2012 R2";
123122
} else {
124123
return "Windows Server 2016";

docs/images/merge-commit.png

36 KB
Loading

docs/new-release.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,18 @@ Running the following command will update any required third party notices.
5353
npm run ts scripts/lca/generate-third-party
5454
```
5555

56-
You might see an error like:
56+
**Important:** Make sure you have an environment variable called GH_TOKEN set that contains a valid GitHub API auth token.
57+
You can manage and setup personal access tokens here: [https://github.com/settings/tokens](https://github.com/settings/tokens)
58+
59+
If you see an error like the following while executing the 'generate-third-party' script:
5760
```
5861
const value = match[1];
5962
^
6063
TypeError: Cannot read property '1' of null
6164
```
6265

6366
This probably means that a dependancy in package.json has a differnt format to what we are expecting.
67+
You will need to modify '\scripts\lca\generate-third-party.ts' in order to get it to work.
6468

6569
#### Double check the prod build is working
6670

@@ -80,13 +84,18 @@ Now create a pull request against stable. Wait for the CI to pass.
8084

8185
**Important:** DO NOT squash merge the changes.(Go in BatchLabs [settings](https://github.com/Azure/BatchLabs/settings) and renenable "Allow merge commits")
8286
Then click on merge commit(Make sure it is not squash merge)
87+
88+
![](images/merge-commit.png)
89+
8390
All the commits in master should now be in stable with the merge commit.
8491
Now disable the "Allow merge commit" again to prevent mistake when merging to master.
8592

8693
## Step 5: Publish the release
87-
* Wait for the CI to test and build stable branch [Travis](https://travis-ci.org/Azure/BatchLabs/branches)
94+
* Wait for the CI to test and build stable branch [Travis](https://travis-ci.org/Azure/BatchLabs/branches).
8895
* Go to github [release](https://github.com/Azure/BatchLabs/releases).
89-
* You should see a new draft release with the new version
90-
* Double check every platform executable and installer is present(exe, app, zip, dmg, deb, rpm)
91-
* Copy the changelog(only for the version) in the description
92-
* Click publish release(Mark as pre-release for now)
96+
* You should see a new draft release with the new version.
97+
* Double check every platform executable and installer is present (exe, app, zip, dmg, deb, rpm).
98+
* Download and install one of the versions to make sure it runs and validate that the Python server is correctly running by creating an empty file-group or kicking off an NCJ job.
99+
* Copy the changelog(only for the version) in the description in MD format.
100+
* Change the "Target: master" to "Target: stable" if applicable by the "create a new tag on publish".
101+
* Click publish release (Mark as pre-release for now).

0 commit comments

Comments
 (0)