worker: update ostree job structs

Change the OSTreeResolveSpec to match the ostree SourceSpec by removing
the Parent field.

Change OSTreeResolveResultSpec to match the CommitSpec by adding the
Secrets field.  The RHSM field is kept for backwards compatibility with
older workers.
This commit is contained in:
Achilleas Koutsou 2023-06-06 17:19:20 +02:00 committed by Ondřej Budai
parent 7e2855bbb3
commit 8e5ac9790e
2 changed files with 7 additions and 11 deletions

View file

@ -51,12 +51,7 @@ func (impl *OSTreeResolveJobImpl) Run(job worker.Job) error {
logWithId.Infof("Resolving (%d) ostree commits", len(args.Specs))
for i, s := range args.Specs {
reqParams := ostree.SourceSpec{
URL: s.URL,
Ref: s.Ref,
RHSM: s.RHSM,
}
reqParams := ostree.SourceSpec(s)
commitSpec, err := ostree.Resolve(reqParams)
if err != nil {
logWithId.Infof("Resolving ostree params failed: %v", err)
@ -68,6 +63,7 @@ func (impl *OSTreeResolveJobImpl) Run(job worker.Job) error {
URL: commitSpec.URL,
Ref: commitSpec.Ref,
Checksum: commitSpec.Checksum,
Secrets: commitSpec.Secrets,
RHSM: s.RHSM,
}
}