Description
On a job creation or deployment, a new or modified job will be stored in the job table and then will proceed to other processes such as resolving dependency resolution, priority resolution, compilation, and deployment. When resolving priority resolution, Optimus will also check for any cyclic dependency in all the jobs in a project.
However, there is an issue when a new or modified job turns out to cause cyclic dependency. The problematic job will already be stored successfully in the job table but the job deployment process will be failed. This will be a blocker to other processes such as the job deployment of any namespaces and also job creation of any namespaces, as it is using the persisted job specs.
To avoid this, let's add prevention to catch the cyclic dependency before doing a deployment. This can be added to the validation command.