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

FEATURE: resolve commit id from branch names when applying SAT files #44

Open
Masber opened this issue Feb 26, 2024 · 0 comments
Open

Comments

@Masber
Copy link
Collaborator

Masber commented Feb 26, 2024

manta currently does not resolves branch names in SAT files, it instead leverages this task to the CFS service. This has work for now but recently we found a bug in CFS where it could not resolve the branch name.

Error when creating a CFS configuration:

Error: Command '['git', 'checkout', 'cfs-layer-psi']' returned non-zero exit status 128.

This error while creating a CFS configuration means, CFS service could not validate the branch name and fails.

When using SAT file, the default behavior hides this because SAT will resolve the branch name on behalf of CFS service.

# sudo sat bootprep run --help
usage: sat bootprep run [-h] [--dry-run] [--save-files] [--no-resolve-branches] [--delete-ims-jobs] [--bos-version {v1,v2}] [--recipe-version RECIPE_VERSION] [--vars-file VARS_FILE] [--vars VARS] [--skip-existing-configs | --overwrite-configs]
                        [--skip-existing-images | --overwrite-images] [--skip-existing-templates | --overwrite-templates] [--output-dir OUTPUT_DIR] [--public-key-file-path PUBLIC_KEY_FILE_PATH | --public-key-id PUBLIC_KEY_ID]
                        input_file

Create images, configurations and session templates.

positional arguments:
  input_file            Path to the input YAML file that defines the configurations, images, and session templates to create.

optional arguments:
  -h, --help            show this help message and exit
  --dry-run, -d         Do a dry-run. Do not actually create CFS configurations, build images, customize images, or create BOS session templates, but walk through all the other steps.
  --save-files, -s      Save files that could be passed to the CFS and BOS to create CFS configurations and BOS session templates, respectively.
  --no-resolve-branches

As shown above, you can instruct SAT command to leverage the resolving branch behavior to CFS by using argument --no-resolve-branches

Manta should do the same as SAT and resolve git branches automatically, this will make the command slower but safer to run.

Important: keep the branch name in the request json payload so we can retrieve this information in the future when inspecting the CFS configuration layer details.

@Masber Masber changed the title FEATURE: resolve branch names when applying SAT files FEATURE: resolve commit id from branch names when applying SAT files Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant