Skip to content

Commit 6330249

Browse files
fix rerun
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
1 parent 7781170 commit 6330249

3 files changed

Lines changed: 68 additions & 60 deletions

File tree

build/dockerfiles/assembly.Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# Grab content from previously build images
1010
FROM linux-libc-ubi8 as linux-libc-ubi8-content
1111
FROM linux-libc-ubi9 as linux-libc-ubi9-content
12-
FROM linux-musl as linux-musl-content
12+
# FROM linux-musl as linux-musl-content
1313

1414
# https://quay.io/eclipse/che-machine-exec#^7\.
1515
FROM quay.io/eclipse/che-machine-exec:7.56.0 as machine-exec
@@ -24,7 +24,7 @@ WORKDIR /mnt/rootfs
2424

2525
COPY --from=linux-musl-content --chown=0:0 /checode-linux-musl /mnt/rootfs/checode-linux-musl
2626
COPY --from=linux-libc-ubi8-content --chown=0:0 /checode-linux-libc/ubi8 /mnt/rootfs/checode-linux-libc/ubi8
27-
COPY --from=linux-libc-ubi9-content --chown=0:0 /checode-linux-libc/ubi9 /mnt/rootfs/checode-linux-libc/ubi9
27+
# COPY --from=linux-libc-ubi9-content --chown=0:0 /checode-linux-libc/ubi9 /mnt/rootfs/checode-linux-libc/ubi9
2828

2929
RUN mkdir -p /mnt/rootfs/projects && mkdir -p /mnt/rootfs/home/che && mkdir -p /mnt/rootfs/bin/
3030
RUN cat /mnt/rootfs/etc/passwd | sed s#root:x.*#root:x:\${USER_ID}:\${GROUP_ID}::\${HOME}:/bin/bash#g > /mnt/rootfs/home/che/.passwd.template \

build/dockerfiles/linux-musl.Dockerfile

Lines changed: 58 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -7,74 +7,74 @@
77
#
88

99
# Make an assembly including both musl and libc variant to be able to run on all linux systems
10-
FROM docker.io/node:22-alpine3.22 as linux-musl-builder
10+
# FROM docker.io/node:22-alpine3.22 as linux-musl-builder
1111

12-
RUN apk add --update --no-cache \
13-
# Download some files
14-
curl \
15-
# compile some javascript native stuff (node-gyp)
16-
make gcc g++ python3 py3-pip \
17-
# git
18-
git \
19-
# bash shell
20-
bash \
21-
# some lib to compile 'native-keymap' npm mpdule
22-
libx11-dev libxkbfile-dev \
23-
# requirements for keytar
24-
libsecret libsecret-dev \
25-
# kerberos authentication
26-
krb5-dev
12+
# RUN apk add --update --no-cache \
13+
# # Download some files
14+
# curl \
15+
# # compile some javascript native stuff (node-gyp)
16+
# make gcc g++ python3 py3-pip \
17+
# # git
18+
# git \
19+
# # bash shell
20+
# bash \
21+
# # some lib to compile 'native-keymap' npm mpdule
22+
# libx11-dev libxkbfile-dev \
23+
# # requirements for keytar
24+
# libsecret libsecret-dev \
25+
# # kerberos authentication
26+
# krb5-dev
2727

28-
#########################################################
29-
#
30-
# Copy Che-Code to the container
31-
#
32-
#########################################################
33-
COPY code /checode-compilation
34-
WORKDIR /checode-compilation
35-
ENV ELECTRON_SKIP_BINARY_DOWNLOAD=1
36-
ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
28+
# #########################################################
29+
# #
30+
# # Copy Che-Code to the container
31+
# #
32+
# #########################################################
33+
# COPY code /checode-compilation
34+
# WORKDIR /checode-compilation
35+
# ENV ELECTRON_SKIP_BINARY_DOWNLOAD=1
36+
# ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
3737

38-
# workaround for https://github.com/nodejs/node/issues/52229
39-
ENV CXXFLAGS='-DNODE_API_EXPERIMENTAL_NOGC_ENV_OPT_OUT'
38+
# # workaround for https://github.com/nodejs/node/issues/52229
39+
# ENV CXXFLAGS='-DNODE_API_EXPERIMENTAL_NOGC_ENV_OPT_OUT'
4040

41-
# Initialize a git repository for code build tools
42-
RUN git init .
41+
# # Initialize a git repository for code build tools
42+
# RUN git init .
4343

44-
# change network timeout (slow using multi-arch build)
45-
RUN npm config set fetch-retry-mintimeout 100000 && npm config set fetch-retry-maxtimeout 600000
44+
# # change network timeout (slow using multi-arch build)
45+
# RUN npm config set fetch-retry-mintimeout 100000 && npm config set fetch-retry-maxtimeout 600000
4646

47-
# Grab dependencies (and force to rebuild them)
48-
RUN rm -rf /checode-compilation/node_modules && npm install --force
47+
# # Grab dependencies (and force to rebuild them)
48+
# RUN rm -rf /checode-compilation/node_modules && npm install --force
4949

50-
# Rebuild platform specific dependencies
51-
RUN npm rebuild
50+
# # Rebuild platform specific dependencies
51+
# RUN npm rebuild
5252

53-
RUN NODE_VERSION=$(cat /checode-compilation/remote/.npmrc | grep target | cut -d '=' -f 2 | tr -d '"') \
54-
# cache node from this image to avoid to grab it from within the build
55-
&& echo "caching /checode-compilation/.build/node/v${NODE_VERSION}/linux-alpine/node" \
56-
&& mkdir -p /checode-compilation/.build/node/v${NODE_VERSION}/linux-alpine \
57-
&& cp /usr/local/bin/node /checode-compilation/.build/node/v${NODE_VERSION}/linux-alpine/node \
58-
# workaround to fix build
59-
&& cp -r /checode-compilation/node_modules/tslib /checode-compilation/remote/node_modules/
53+
# RUN NODE_VERSION=$(cat /checode-compilation/remote/.npmrc | grep target | cut -d '=' -f 2 | tr -d '"') \
54+
# # cache node from this image to avoid to grab it from within the build
55+
# && echo "caching /checode-compilation/.build/node/v${NODE_VERSION}/linux-alpine/node" \
56+
# && mkdir -p /checode-compilation/.build/node/v${NODE_VERSION}/linux-alpine \
57+
# && cp /usr/local/bin/node /checode-compilation/.build/node/v${NODE_VERSION}/linux-alpine/node \
58+
# # workaround to fix build
59+
# && cp -r /checode-compilation/node_modules/tslib /checode-compilation/remote/node_modules/
6060

61-
RUN VSCODE_MANGLE_WORKERS=2 NODE_OPTIONS="--max-old-space-size=8192" ./node_modules/.bin/gulp vscode-reh-web-linux-alpine-min
62-
RUN cp -r ../vscode-reh-web-linux-alpine /checode
61+
# RUN VSCODE_MANGLE_WORKERS=2 NODE_OPTIONS="--max-old-space-size=8192" ./node_modules/.bin/gulp vscode-reh-web-linux-alpine-min
62+
# RUN cp -r ../vscode-reh-web-linux-alpine /checode
6363

64-
RUN chmod a+x /checode/out/server-main.js \
65-
&& chgrp -R 0 /checode && chmod -R g+rwX /checode
64+
# RUN chmod a+x /checode/out/server-main.js \
65+
# && chgrp -R 0 /checode && chmod -R g+rwX /checode
6666

67-
#########################################################
68-
#
69-
# Copy VS Code launcher to the container
70-
#
71-
#########################################################
72-
COPY launcher /checode-launcher
73-
WORKDIR /checode-launcher
74-
RUN npm install \
75-
&& mkdir /checode/launcher \
76-
&& cp -r out/src/*.js /checode/launcher \
77-
&& chgrp -R 0 /checode && chmod -R g+rwX /checode
67+
# #########################################################
68+
# #
69+
# # Copy VS Code launcher to the container
70+
# #
71+
# #########################################################
72+
# COPY launcher /checode-launcher
73+
# WORKDIR /checode-launcher
74+
# RUN npm install \
75+
# && mkdir /checode/launcher \
76+
# && cp -r out/src/*.js /checode/launcher \
77+
# && chgrp -R 0 /checode && chmod -R g+rwX /checode
7878

7979
FROM scratch as linux-musl-content
80-
COPY --from=linux-musl-builder /checode /checode-linux-musl
80+
# COPY --from=linux-musl-builder /checode /checode-linux-musl

code/src/vs/workbench/contrib/tasks/browser/terminalTaskSystem.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ export class TerminalTaskSystem extends Disposable implements ITaskSystem {
156156
private _taskErrors: IStringDictionary<boolean>; // Tracks which tasks had errors from problem matchers
157157
private _taskDependencies: IStringDictionary<string[]>; // Tracks which tasks depend on which other tasks
158158
private _terminals: IStringDictionary<ITerminalData>;
159+
private _taskByMapKey: Map<string, Task>;
159160
private _idleTaskTerminals: LinkedMap<string, string>;
160161
private _sameTaskTerminals: IStringDictionary<string>;
161162
private _taskSystemInfoResolver: ITaskSystemInfoResolver;
@@ -218,6 +219,7 @@ export class TerminalTaskSystem extends Disposable implements ITaskSystem {
218219
this._taskErrors = Object.create(null);
219220
this._taskDependencies = Object.create(null);
220221
this._terminals = Object.create(null);
222+
this._taskByMapKey = new Map();
221223
this._idleTaskTerminals = new LinkedMap<string, string>();
222224
this._sameTaskTerminals = Object.create(null);
223225
this._onDidStateChange = new Emitter();
@@ -515,6 +517,7 @@ export class TerminalTaskSystem extends Disposable implements ITaskSystem {
515517
this._showTaskLoadErrors(task);
516518

517519
const mapKey = task.getMapKey();
520+
this._taskByMapKey.set(mapKey, task);
518521

519522
// It's important that we add this task's entry to _activeTasks before
520523
// any of the code in the then runs (see #180541 and #180578). Wrapping
@@ -1442,6 +1445,7 @@ export class TerminalTaskSystem extends Disposable implements ITaskSystem {
14421445
delete this._terminals[terminal.instanceId];
14431446
delete this._sameTaskTerminals[terminalData.lastTask];
14441447
this._idleTaskTerminals.delete(terminalData.lastTask);
1448+
this._taskByMapKey.delete(terminalData.lastTask);
14451449
// Delete the task now as a work around for cases when the onExit isn't fired.
14461450
// This can happen if the terminal wasn't shutdown with an "immediate" flag and is expected.
14471451
// For correct terminal re-use, the task needs to be deleted immediately.
@@ -1921,6 +1925,10 @@ export class TerminalTaskSystem extends Disposable implements ITaskSystem {
19211925
return activeTask.task;
19221926
}
19231927
}
1928+
const terminalData = this._terminals[instanceId.toString()];
1929+
if (terminalData) {
1930+
return this._taskByMapKey.get(terminalData.lastTask);
1931+
}
19241932
return undefined;
19251933
}
19261934

0 commit comments

Comments
 (0)