TheRacetrack / racetrack

An opinionated framework for deploying, managing, and serving application workloads
https://theracetrack.github.io/racetrack/
Apache License 2.0
28 stars 5 forks source link

Verify if the submitted manifest YAML is consistent with the git repository #462

Closed iszulcdeepsense closed 1 month ago

iszulcdeepsense commented 1 month ago

Added

anders314159 commented 1 month ago

Looks good to me. Here's what I tested: VMC = verify_manifest_consistency: false/verify_manifest_consistency: true in the image_builder config. local/git is --build-context=local/--build-context=git. no complain = job is built and pushed. complain = it complains about diff in job.yaml vs job.yaml on git.

job.yaml VMC=False, local VMC=True, local VMC=False, git VMC=True, git
No diff no complain no complain no complain no complain
Diff no complain no complain no complain complain
piped input, no diff no complain no complain no complain no complain
piped input, diff no complain no complain no complain complain

Although I am wondering if VMC=True should check for changes even if --build-context=local, or maybe it should print an info line saying something like "VMC=True, but --build-context=local, so not checking changes against git" - but worded more smartly'er than that.

iszulcdeepsense commented 1 month ago

@anders314159

Although I am wondering if VMC=True should check for changes even if --build-context=local, or maybe it should print an info line saying something like "VMC=True, but --build-context=local, so not checking changes against git" - but worded more smartly'er than that.

Right, it makes sense not to check it for local build context, even though it should always pass having the same local file in the image builder.