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

Validate actions during their creation #1354

Merged
merged 8 commits into from
Aug 7, 2024

Conversation

despadam
Copy link

@despadam despadam commented Aug 5, 2024

Description

As seen in issue #1341

Motivation

Method validate() in the JobAction class was never used. All validation was done inside the action's constructor.

Changes:

  • Removed method validate() from the JobAction class and all its subclasses.
  • There is no longer the need to validate the actions before creating a job. This part has been commented out in the interceptor.
  • In fact, there is no longer the need to use job-create.interceptor at all. It has been removed from create in the jobs.controller. The reason for this is that the interceptor was doing two things: Apart from action validation which has already been removed, it was also adding the configuration field in the job instance to be created. However this part is already covered by the instanceAuthorizationJobCreate function in jobs.controller.
  • checkAuthenticatedUser has been removed from jobs.controller, as it was never used.
  • Before statusUpdate we check whether the configuration file has been updated by comparing the new with the one stored inside the job. However, even if they are different, we still proceed with the update as usual, as all actions have been automatically re-initialized with the new configuration. This is a point to be discussed later.

@despadam despadam self-assigned this Aug 5, 2024
@despadam despadam added the Release Jobs Jobs migration label Aug 5, 2024
@despadam despadam changed the title Validate actions during their creation, store only configVersion for each job Validate actions during their creation Aug 7, 2024
Copy link
Contributor

@sofyalaski sofyalaski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!

@despadam despadam merged commit b218952 into release-jobs Aug 7, 2024
7 checks passed
@despadam despadam deleted the 1341-validate-actions-during-their-creation branch August 7, 2024 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release Jobs Jobs migration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants