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

control-service: fix control service post deployment test #2790

Merged

Conversation

mivanov1988
Copy link
Contributor

@mivanov1988 mivanov1988 commented Oct 11, 2023

Why

We observed the following post-deployment test failure: https://gitlab.com/vmware-analytics/versatile-data-kit/-/jobs/5192553226.

This change is the culprit #2714
It’s the first pipeline that started having this issue https://gitlab.com/vmware-analytics/versatile-data-kit/-/jobs/5210024385
The previous change for the control service that triggered the same tests passed fine. There weren’t any changes to heartbeat or control-cli in between, as far as I can tell. You can see from the logs that the schedule is written to the data job table for the previous control service change that triggered the same tests.

https://gitlab.com/vmware-analytics/versatile-data-kit/-/pipelines/1020826286
https://gitlab.com/vmware-analytics/versatile-data-kit/-/jobs/5192553226

The control-cli does a PUT request after creating the data job. This updates the config, which includes the schedule. For some reason, the config doesn’t get updated. The change touches some of the update code, namely, it passes the new DesiredJobDeployment entity into the JobImageBuilder, which is used in the JobService update method, which gets called when we do a PUT request to update the job.

What

Removed the unnecessary @transactional annotation from the DesiredJobDeploymentRepository methods which prevent from committing the transaction started in JobsService.updateJob().

Testing done

Manually created data job through the DataJob API and then updated it through the DataJob API.

create: localhost:8092/data-jobs/for-team/taurus/jobs

{
	"job_name": "miroslavi-test6",
	"team": "taurus",
        "config": {
          "schedule": {
	          "schedule_cron": "* * * * *"
          }
	}
}

update: localhost:8092/data-jobs/for-team/taurus/jobs/miroslavi-test6

{
	"team": "taurus",
	"config": {
          "schedule": {
	          "schedule_cron": "* * * * 1"
          }
	}
}

Signed-off-by: Miroslav Ivanov miroslavi@vmware.com

@antoniivanov
Copy link
Collaborator

antoniivanov commented Oct 11, 2023

The 'Why' section only mentions a test failure with a link. Briefly describe the issue in a sentence or two.

Manually against CI/CD environment.

This is rather vague. Be specific about what tests were run, add links, what the expected outcomes were, and what the results were.

@mivanov1988
Copy link
Contributor Author

The 'Why' section only mentions a test failure with a link. Briefly describe the issue in a sentence or two.

Manually against CI/CD environment.

This is rather vague. Be specific about what tests were run, add links, what the expected outcomes were, and what the results were.

Updated the description.

Why
We observed the following post deployment test failure:
https://gitlab.com/vmware-analytics/versatile-data-kit/-/jobs/5192553226

What
Removed the unnessesary @transactional annotation from the
DesiredJobDeploymentRepository methods which prevents from commit the
transaction started in JobsService.updateJob().

Testing done
Manually against CI/CD envirnment.

Signed-off-by: Miroslav Ivanov miroslavi@vmware.com
@mivanov1988 mivanov1988 force-pushed the person/miroslavi/fix-control-service-post-deployment-test branch from ccf4def to cfa25e8 Compare October 11, 2023 15:05
@mivanov1988 mivanov1988 merged commit 0297600 into main Oct 11, 2023
7 checks passed
@mivanov1988 mivanov1988 deleted the person/miroslavi/fix-control-service-post-deployment-test branch October 11, 2023 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants