Skip to content

Commit 8aabbc0

Browse files
committed
feat: comment out condition for new action docker hub namespace to start with rslethz
1 parent 6705f0a commit 8aabbc0

File tree

4 files changed

+26
-26
lines changed

4 files changed

+26
-26
lines changed

backend/src/services/action.service.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,11 @@ export class ActionService {
100100
data: CreateTemplateDto,
101101
auth: AuthHeader,
102102
): Promise<ActionTemplateDto> {
103-
if (!data.dockerImage.startsWith('rslethz/')) {
104-
throw new ConflictException(
105-
'Only images from the rslethz namespace are allowed',
106-
);
107-
}
103+
//if (!data.dockerImage.startsWith('rslethz/')) {
104+
// throw new ConflictException(
105+
// 'Only images from the rslethz namespace are allowed',
106+
// );
107+
//}
108108
const exists = await this.actionTemplateRepository.exists({
109109
where: {
110110
name: data.name,
@@ -140,11 +140,11 @@ export class ActionService {
140140
data: UpdateTemplateDto,
141141
auth: AuthHeader,
142142
): Promise<ActionTemplateDto> {
143-
if (!data.dockerImage.startsWith('rslethz/')) {
144-
throw new ConflictException(
145-
'Only images from the rslethz namespace are allowed',
146-
);
147-
}
143+
//if (!data.dockerImage.startsWith('rslethz/')) {
144+
// throw new ConflictException(
145+
// 'Only images from the rslethz namespace are allowed',
146+
// );
147+
//}
148148
const template = await this.actionTemplateRepository.findOneOrFail({
149149
where: { uuid: data.uuid },
150150
});

examples/actions/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM python:latest
22

33
# install kleinkram as CLI
4-
RUN pip install kleinkram --pre --force-reinstall
4+
RUN pip install kleinkram --pre --force-reinstall && pip install "httpx==0.26.0"
55

66
# copy entrypoint and make it executable
77
COPY ./entrypoint.sh /entrypoint.sh

frontend/src/components/action-configuration.vue

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -515,16 +515,16 @@ async function submitAnalysis() {
515515
});
516516
return;
517517
}
518-
if (!editingTemplate.value.imageName.startsWith('rslethz/')) {
519-
Notify.create({
520-
group: false,
521-
message: 'The image name must start with "rslethz/"',
522-
color: 'negative',
523-
position: 'bottom',
524-
timeout: 2000,
525-
});
526-
return;
527-
}
518+
//if (!editingTemplate.value.imageName.startsWith('rslethz/')) {
519+
// Notify.create({
520+
// group: false,
521+
// message: 'The image name must start with "rslethz/"',
522+
// color: 'negative',
523+
// position: 'bottom',
524+
// timeout: 2000,
525+
// });
526+
// return;
527+
//}
528528
529529
// post: the input should be valid now
530530
let template = editingTemplate.value;

queueConsumer/src/actions/services/docker-daemon.service.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -304,11 +304,11 @@ export class DockerDaemon {
304304
@tracing()
305305
private async getImage(dockerImage: string) {
306306
// assert that we only run rslethz images
307-
if (!dockerImage.startsWith('rslethz/')) {
308-
throw new Error(
309-
'Only images from the rslethz organization are allowed',
310-
);
311-
}
307+
//if (!dockerImage.startsWith('rslethz/')) {
308+
// throw new Error(
309+
// 'Only images from the rslethz organization are allowed',
310+
// );
311+
//}
312312

313313
// check if docker socket is available
314314
if (!this.docker || !(await this.docker.ping())) {

0 commit comments

Comments
 (0)