saltstack / salt

Software to automate the management and configuration of any infrastructure or application at scale. Get access to the Salt software package repository here:

Home Page:https://repo.saltproject.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] Recent regression in `aptpkg`: Failed to configure repo ...': 'str' object has no attribute 'name'

myii opened this issue · comments

Description

CC: @Ch3LL.

This is the first of two regressions encountered during the Formulas' weekly testing this week (2022-W24).

Using git bisect, I've traced it down to this commit: 409072c (#61760).

A specific example of a failure:

node-package-repo-pkgrepo-managed:
  pkgrepo.managed:
    - comps: main
    - dist: buster
    - file: /etc/apt/sources.list.d/nodesource.list
    - humanname: NodeSource Node.js Repository
    - key_url: https://deb.nodesource.com/gpgkey/nodesource.gpg.key
    - keyserver: keyserver.ubuntu.com
    - name: deb https://deb.nodesource.com/node_16.x buster
    - url: https://deb.nodesource.com/
    - onlyif: True

...


      ID: node-package-repo-pkgrepo-managed
Function: pkgrepo.managed
    Name: deb https://deb.nodesource.com/node_16.x buster
  Result: False
 Comment: Failed to configure repo 'deb https://deb.nodesource.com/node_16.x buster': 'str' object has no attribute 'name'

Detailed logs can be checked from the following:

Setup
Kitchen CI for each of the formula repos above.

Please be as specific as possible and give set-up details.

  • on-prem machine
  • VM (Virtualbox, KVM, etc. please specify)
  • VM running on a cloud service, please be explicit and add details
  • container (Kubernetes, Docker, containerd, etc. please specify)
  • or a combination, please be explicit
  • jails if it is FreeBSD

Steps to Reproduce the behavior
Run Kitchen testing for any of the formulas mentioned above.

Expected behavior
The pkgrepo.managed state shouldn't fail.

Versions Report
A current master branch installation of Salt (8253b6c).

Additional context
I have a fix that I will propose here shortly. I've rebuilt our master images with it and all jobs are passing again: