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

Add another field to the RepositoryVersion model to store additional information. #2998

Closed
hstct opened this issue Jul 22, 2022 · 1 comment · Fixed by #2999
Closed

Add another field to the RepositoryVersion model to store additional information. #2998

hstct opened this issue Jul 22, 2022 · 1 comment · Fixed by #2999
Labels

Comments

@hstct
Copy link
Contributor

hstct commented Jul 22, 2022

Is your feature request related to a problem? Please describe.

We are looking to implement an optimize sync feature in pulp_deb. In order to do that we want to store data in a dict format which contains information about the remote options used in the latest sync as well as sha256 values for the repository files. These will be used to compare when trying to sync a repository again to see if something has changed and skip certain steps if it hasn't.

Describe the solution you'd like

Adding another field to RepositoryVersion model that can store a .JSONField(default=dict). This way a repository can always look up the lastest version to get the previous data.

Describe alternatives you've considered

pulp_rpm uses their Repository model to save this data which works too. However there were concerns of the mutability of the data when stored this way.

Another solution would be adding a subclass of RepositoryVersion to pulp_deb. Since there is not any subclass of this model present in any plugin so far, this seems a bit overkill to just add one additional field.

Additional context

For context the PR for this feature in pulp_deb: pulp/pulp_deb#570

@quba42
Copy link
Contributor

quba42 commented Jul 25, 2022

Possible names for the new field:

  1. version_details
  2. details
  3. creation_details

It is really an arbitrary JSON field, that could be used by plugin authors for almost anything, hence my first two suggestions are very generic. The use case we have in mind for pulp_deb is most accurately described by creation_details.

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

Successfully merging a pull request may close this issue.

3 participants