-
Notifications
You must be signed in to change notification settings - Fork 5
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
Verify if the submitted manifest YAML is consistent with the git repository #462
Verify if the submitted manifest YAML is consistent with the git repository #462
Conversation
…ubmitted-manifest-yaml-is-consistent-with-the-git-repository
…ubmitted-manifest-yaml-is-consistent-with-the-git-repository
Looks good to me.
Although I am wondering if |
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. |
…ubmitted-manifest-yaml-is-consistent-with-the-git-repository
@@ -65,7 +65,7 @@ def build_job_image( | |||
|
|||
workspace, repo_dir, git_version = prepare_workspace(workspaces_path, manifest, git_credentials, build_context, deployment_id) | |||
|
|||
if config.verify_manifest_consistency: | |||
if config.verify_manifest_consistency and not build_context: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the racetrack CLI:
Should it be and build_context==BuildContextMethod.git
or something like that?
I think the above and not build_context
is always false for the racetrack CLI, since it selects "BuildContextMethod.default" by default.
Not sure if the build_context is set, or not set, elsewhere in the project and might be None/False.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the image builder build_context
parameter is something different. It's no longer an enum describing a type of the build context, but it's the actual compressed build context tarball, represented as bytes. It's not empty when build_context_method == BuildContextMethod.local
, thus checking not build_context
is enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Le Dot.
Glad to see the progress here and the thought which have gone into it.
Added
In case of incosistencies, the deployment is aborted.
This only happens if the optional setting
verify_manifest_consistency
is turned on in the Image Builder.