Allow skipping the redundant Pulp CLI publish after RPM uploads

What does this MR do?

Allow uploading RPM packages to Pulp with pulp rpm content upload --no-publish, when the CI/CD variable PULP_CLI_PUBLISH is false.

The Pulp RPM repositories have autopublish enabled: create_rpm_repo in pulp-resources-automation creates every RPM repository with autopublish: true and sets it back if it changes. So Pulp already publishes the repository inside the upload task. The pulp CLI then started a second, redundant publish of the full repository. During the 18.11.13 and 19.0.10 releases, 27 of the 32 publishes on gitlab-pre-release-el-8-x86_64 came from the CLI (207 of 246 worker minutes). They caused most of the repository lock contention that made the staging upload jobs time out.

  • By default (PULP_CLI_PUBLISH unset or true), the CLI publishes after each upload as before. Set PULP_CLI_PUBLISH=false on dev.gitlab.org to turn on --no-publish.
  • Deb uploads do not change. pulp deb content upload has no publish option.
  • The behavior was tested on the Pulp pre environment: with autopublish: true, a --no-publish upload is still published, and no separate publish task runs. With autopublish: false, the package is not published. Test and results: gitlab-com/gl-infra/delivery#22494 (comment 4058773453)

Related to gitlab-com/gl-infra/delivery#22495 (closed)

Checklist

See Definition of done.

For anything in this list which will not be completed, please provide a reason in the MR discussion.

Required

  • MR title and description are up to date, accurate, and descriptive.
  • MR targeting the appropriate branch.
  • Latest Merge Result pipeline is green.
  • When ready for review, MR is marked as ready (not a draft) and a reviewer is requested. Pick the reviewer suggested by the reviewer roulette, or one of the project maintainers.
  • The UBT version and corresponding checksum hash have been updated and referenced in the merge request if applicable.
    • UBT EE pipeline (Trigger:ee-package-ubt) is green

For GitLab team members

If you don't have access to this, the reviewer should trigger these jobs for you during the review process.

  • The manual Trigger:ee-package jobs have a green pipeline running against latest commit.
  • If config/software or config/patches directories are changed, make sure the build-package-on-all-os job within the Trigger:ee-package downstream pipeline succeeded.
  • If you are changing anything SSL related, then the Trigger:package:fips manual job within the Trigger:ee-package downstream pipeline must succeed.
  • If CI configuration is changed, the branch must be pushed to dev.gitlab.org to confirm regular branch builds aren't broken.

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes. Tested on the Pulp pre environment: gitlab-com/gl-infra/delivery#22494 (comment 4058773453)
  • Documentation created/updated. Added the PULP_* variables to doc/development/ci-variables.md.
  • Tests added.
  • Integration tests added to GitLab QA.
  • Equivalent MR/issue for the GitLab Chart opened.
  • Validate potential values for new configuration settings. Formats such as integer 10, duration 10s, URI scheme://user:passwd@host:port may require quotation or other special handling when rendered in a template and written to a configuration file.

Reviewer checklist

  • As soon as you begin reviewing, select Start a review on your first comment so the MR shows Reviewer started review.
Edited by Dat Tang

Merge request reports

Loading
Loading