Skip to content

RPM `other.xml` updater

bohdan-barylo requested to merge 372735-update-other-xml into master

What does this MR do and why?

Extends BuildOtherXml builder services with build_new_node function to update existed xml files with metadata from new packages. Added more fake data to spec payload

Screenshots or screen recordings

Screenshot_2022-10-06_at_13.47.09

How to set up and validate locally

  1. Generate empty xml
empty = Packages::Rpm::RepositoryMetadata::BuildOtherXml.new.execute
  1. Set variable with parsed RPM package metadata
data = Gitlab::Json.parse(File.open('spec/fixtures/packages/rpm/payload.json').read).with_indifferent_access
  1. Call service again passing empty xml and data
Packages::Rpm::RepositoryMetadata::BuildOtherXml.new(xml: empty, data: data).execute

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #372735 (closed)

Edited by bohdan-barylo

Merge request reports