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

Bandersnatch sync error #809

Open
ianballou opened this issue Feb 27, 2025 · 4 comments
Open

Bandersnatch sync error #809

ianballou opened this issue Feb 27, 2025 · 4 comments

Comments

@ianballou
Copy link

Version

      "versions": {
        "deb": "3.5.1",
        "rpm": "3.28.0",
        "core": "3.70.0",
        "file": "3.70.0",
        "ostree": "2.4.6",
        "python": "3.13.2",
        "ansible": "0.24.1",
        "certguard": "3.70.0",
        "container": "2.24.0"
      }
$ sudo pip3.12 list | grep bander
bandersnatch                             6.6.0

Describe the bug
When syncing from PyPI:

  error:
    traceback: |2
        File "/usr/local/lib/python3.12/site-packages/pulpcore/tasking/tasks.py", line 68, in _execute_task
          result = func(*args, **kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^
        File "/usr/local/lib/python3.12/site-packages/pulp_python/app/tasks/sync.py", line 56, in sync
          first_stage = PythonBanderStage(remote)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/local/lib/python3.12/site-packages/pulp_python/app/tasks/sync.py", line 107, in __init__
          create_bandersnatch_config(remote)
        File "/usr/local/lib/python3.12/site-packages/pulp_python/app/tasks/sync.py", line 62, in create_bandersnatch_config
          config = BandersnatchConfig().config
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    description: "'BandersnatchConfig' object has no attribute 'config'"

To Reproduce
Create a Pulp Python remote with the following options:

[
  {
    "pulp_href": "/pulp/api/v3/remotes/python/python/01954910-ea53-7786-8440-7bbb58197dcb/",
    "prn": "prn:python.pythonremote:01954910-ea53-7786-8440-7bbb58197dcb",
    "pulp_created": "2025-02-27T20:20:00.213100Z",
    "pulp_last_updated": "2025-02-27T20:33:56.358740Z",
    "name": "Python_Test-1129507",
    "url": "https://pypi.org",
    "ca_cert": null,
    "client_cert": null,
    "tls_validation": true,
    "proxy_url": null,
    "pulp_labels": {},
    "download_concurrency": null,
    "max_retries": null,
    "policy": "on_demand",
    "total_timeout": 3600.0,
    "connect_timeout": 60.0,
    "sock_connect_timeout": 60.0,
    "sock_read_timeout": 3600.0,
    "headers": null,
    "rate_limit": 0,
    "hidden_fields": [
      {
        "name": "client_key",
        "is_set": false
      },
      {
        "name": "proxy_username",
        "is_set": false
      },
      {
        "name": "proxy_password",
        "is_set": false
      },
      {
        "name": "username",
        "is_set": false
      },
      {
        "name": "password",
        "is_set": false
      }
    ],
    "includes": [
      "pulp-rpm"
    ],
    "excludes": [],
    "prereleases": false,
    "package_types": [],
    "keep_latest_packages": 1,
    "exclude_platforms": []
  }
]

Sync it with content only mirroring.

Expected behavior
Sync works

@ianballou
Copy link
Author

Downgrading bandersnatch to 6.5.0 fixes the issue.

@ggainey
Copy link
Contributor

ggainey commented Feb 27, 2025

As of 6.6:

"As (mostly) an implementation detail, BandersnatchConfig is changed to be a subclass of ConfigParser. The BandersnatchConfig singleton can be used anywhere a ConfigParser instance is expected without having to use '.config' to access a nested ConfigParser."

Looks like CI is finding 6.3.0, so even tho we "allow" for <7.0, we're not seeing 6.6.0 in CI and therefore didn't get hit by this.

@ggainey
Copy link
Contributor

ggainey commented Feb 27, 2025

6.6 is the first version that supports python-3.12, which is the environment the report was generated in

@ggainey
Copy link
Contributor

ggainey commented Feb 27, 2025

I opened an issue w/ bandersnatch - pypa/bandersnatch#1892. Short term, we should prob pin to 6.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants