Skip to content

Commit 869a7cf

Browse files
Saas 6291 - added logs to tasks execution (#132)
1 parent 2dd42e1 commit 869a7cf

File tree

6 files changed

+8
-6
lines changed

6 files changed

+8
-6
lines changed

jobs/TaskPullerJob/tasks/CreatePod.task.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
const Joi = require('joi');
22
const Base = require('../../BaseJob');
33
const { TASK_PRIORITY } = require('../../../constants');
4+
const _ = require('lodash');
45

56
const ERROR_MESSAGES = {
67
FAILED_TO_EXECUTE_TASK: 'Failed to run task CreatePod',
78
};
89

910
class CreatePodTask extends Base {
1011
async run(task) {
11-
this.logger.info('Running CreatePod task');
12+
this.logger.info(`Running CreatePod task - creating pod: ${_.get(task, 'spec.metadata.name')} in namespace: ${_.get(task, 'spec.metadata.namespace')}`);
1213
try {
1314
const pod = await this.kubernetesAPI.createPod(this.logger, task.spec);
1415
return pod;

jobs/TaskPullerJob/tasks/CreatePvc.task.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
const Joi = require('joi');
22
const Base = require('../../BaseJob');
33
const { TASK_PRIORITY } = require('../../../constants');
4+
const _ = require('lodash');
45

56
const ERROR_MESSAGES = {
67
FAILED_TO_EXECUTE_TASK: 'Failed to run task CreatePvc',
78
};
89

910
class CreatePvcTask extends Base {
1011
async run(task) {
11-
this.logger.info('Running CreatePvc task');
12+
this.logger.info(`Running CreatePvc task - creating pvc: ${_.get(task, 'spec.metadata.name')} in namespace: ${_.get(task, 'spec.metadata.namespace')}`);
1213
try {
1314
const pvc = await this.kubernetesAPI.createPvc(this.logger, task.spec);
1415
return pvc;

jobs/TaskPullerJob/tasks/DeletePod.task.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const ERROR_MESSAGES = {
99

1010
class DeletePodTask extends Base {
1111
async run(task) {
12-
this.logger.info('Running DeletePod task');
12+
this.logger.info(`Running DeletePod task - deleting pod: ${_.get(task, 'spec.name')} from namespace: ${_.get(task, 'spec.namespace')}`);
1313
try {
1414
await this.kubernetesAPI.deletePod(this.logger, task.spec.namespace, task.spec.name);
1515
} catch (err) {

jobs/TaskPullerJob/tasks/DeletePvc.task.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const ERROR_MESSAGES = {
99

1010
class DeletePvcTask extends Base {
1111
async run(task) {
12-
this.logger.info('Running DeletePvc task');
12+
this.logger.info(`Running DeletePvc task - deleting pvc: ${_.get(task, 'spec.name')} from namespace: ${_.get(task, 'spec.namespace')}`);
1313
try {
1414
await this.kubernetesAPI.deletePvc(this.logger, task.spec.namespace, task.spec.name);
1515
} catch (err) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "venona",
3-
"version": "0.32.0",
3+
"version": "0.32.1",
44
"description": "Codefresh agent to run on Codefresh's runtime environment and execute pipeline",
55
"main": "index.js",
66
"scripts": {

venonactl/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.32.0
1+
0.32.1

0 commit comments

Comments
 (0)