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

repo_gpg options are deprecated but aren't supported at the model level #3357

Closed
jlsherrill opened this issue Dec 8, 2023 · 0 comments · Fixed by #3369
Closed

repo_gpg options are deprecated but aren't supported at the model level #3357

jlsherrill opened this issue Dec 8, 2023 · 0 comments · Fixed by #3369

Comments

@jlsherrill
Copy link
Contributor

Version
3.41.0

Describe the bug
#3298 deprecated the gpg key options, but i believe removed support at the model level by accident.
If you try to create a repo with these options, you get:

pulp [4762e7fd09404023ba8a793973d817bb]: pulp_rpm.deprecation:INFO: Support for gpg options will be removed from a future release of pulp_rpm.
pulp [4762e7fd09404023ba8a793973d817bb]: django.request:ERROR: Internal Server Error: /pulp/b52ad510/api/v3/repositories/rpm/rpm/
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/rest_framework/serializers.py", line 962, in create
    instance = ModelClass._default_manager.create(**validated_data)
  File "/usr/local/lib/python3.8/site-packages/django/db/models/manager.py", line 87, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/django/db/models/query.py", line 656, in create
    obj = self.model(**kwargs)
  File "/usr/local/lib/python3.8/site-packages/django_lifecycle/mixins.py", line 76, in __init__
    super().__init__(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/django/db/models/base.py", line 567, in __init__
    raise TypeError(
TypeError: RpmRepository() got unexpected keyword arguments: 'gpgcheck', 'repo_gpgcheck'

During handling of the above exception, another exception occurred:

Initially i thought this was an api issue (and the options were removed), but after looking at the Pr they were actually intended to be deprecated.

To Reproduce
Steps to reproduce the behavior:

use the rpm repository create api to create a repository with one of the deprecated gpg key options:
https://docs.pulpproject.org/pulp_rpm/restapi.html#tag/Repositories:-Rpm/operation/repositories_rpm_rpm_create

Expected behavior
The deprecated options don't cause an ISE, and continue to work (while they are deprecated)

Additional context
Add any other context about the problem here. Please provide links to any previous discussions via Discourse or Bugzilla.

pedro-psb added a commit to pedro-psb/pulp_rpm that referenced this issue Jan 2, 2024
pulp#3298 moved gpg options to a single
field called "repo_config", but the deprecated "gpgcheck" and "repo_gpgcheck"
were still being passed to the models, which caused a TypeError when trying
to use them.

closes pulp#3357
pedro-psb added a commit to pedro-psb/pulp_rpm that referenced this issue Jan 2, 2024
pulp#3298 moved gpg options to a single
field called "repo_config", but the deprecated "gpgcheck" and "repo_gpgcheck"
were still being passed to the models, which caused a TypeError when trying
to use them.

closes pulp#3357
pedro-psb added a commit to pedro-psb/pulp_rpm that referenced this issue Jan 3, 2024
pulp#3298 moved gpg options to a single
field called "repo_config", but the deprecated "gpgcheck" and "repo_gpgcheck"
were still being passed to the models, which caused a TypeError when trying
to use them.

closes pulp#3357
pedro-psb added a commit to pedro-psb/pulp_rpm that referenced this issue Jan 4, 2024
pulp#3298 moved gpg options to a single
field called "repo_config", but the deprecated "gpgcheck" and "repo_gpgcheck"
were still being passed to the models, which caused a TypeError when trying
to use them.

closes pulp#3357
dralley pushed a commit that referenced this issue Jan 4, 2024
#3298 moved gpg options to a single
field called "repo_config", but the deprecated "gpgcheck" and "repo_gpgcheck"
were still being passed to the models, which caused a TypeError when trying
to use them.

closes #3357
patchback bot pushed a commit that referenced this issue Jan 4, 2024
#3298 moved gpg options to a single
field called "repo_config", but the deprecated "gpgcheck" and "repo_gpgcheck"
were still being passed to the models, which caused a TypeError when trying
to use them.

closes #3357

(cherry picked from commit 149bb14)
dralley pushed a commit that referenced this issue Jan 5, 2024
#3298 moved gpg options to a single
field called "repo_config", but the deprecated "gpgcheck" and "repo_gpgcheck"
were still being passed to the models, which caused a TypeError when trying
to use them.

closes #3357

(cherry picked from commit 149bb14)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants