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

Support different commit modes [RHELDST-20490] #364

Merged
merged 1 commit into from
Oct 4, 2023

Conversation

rohanpm
Copy link
Member

@rohanpm rohanpm commented Oct 3, 2023

This adds support to exodus-rsync for using the new commit_mode argument added to the exodus-gw commit API in [1]. The use-case is to allow rhsm-pulp to do a phase1 commit during Pulp publish tasks, to ensure that all RPMs have reached the CDN storage and later fast-forward publishes will work correctly even if the current exodus-gw publish later fails.

The default behavior is not to pass any commit_mode, which ensures that exodus-rsync remains compatible with older versions of exodus-gw.

This change is aiming for flexibility:

  • the argument's value is intentionally not validated as being "phase1" or "phase2"; validation is left to the server. This avoids exodus-rsync needing further code changes if more commit modes become supported later.

  • the mode can be configured both using command-line arguments and the config file. The intent is to use the command-line argument from pubtools-exodus, but it seems wise to also support using the config file for cases not yet anticipated.

[1] release-engineering/exodus-gw#596

This adds support to exodus-rsync for using the new commit_mode argument
added to the exodus-gw commit API in [1]. The use-case is to allow
rhsm-pulp to do a phase1 commit during Pulp publish tasks, to ensure
that all RPMs have reached the CDN storage and later fast-forward
publishes will work correctly even if the current exodus-gw publish
later fails.

The default behavior is not to pass any `commit_mode`, which ensures
that exodus-rsync remains compatible with older versions of exodus-gw.

This change is aiming for flexibility:

- the argument's value is intentionally not validated as being "phase1"
  or "phase2"; validation is left to the server. This avoids
  exodus-rsync needing further code changes if more commit modes become
  supported later.

- the mode can be configured both using command-line arguments and the
  config file. The intent is to use the command-line argument from
  pubtools-exodus, but it seems wise to also support using the config
  file for cases not yet anticipated.

[1] release-engineering/exodus-gw#596
@rohanpm rohanpm merged commit 6898c2c into release-engineering:main Oct 4, 2023
4 checks passed
@rohanpm rohanpm deleted the commit-mode branch October 4, 2023 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants