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

Use a named tuple for tags and branches data #7798

Open
stsewd opened this issue Jan 5, 2021 · 4 comments
Open

Use a named tuple for tags and branches data #7798

stsewd opened this issue Jan 5, 2021 · 4 comments
Labels
Accepted Accepted issue on our roadmap Good First Issue Good for new contributors Improvement Minor improvement to code

Comments

@stsewd
Copy link
Member

stsewd commented Jan 5, 2021

We are passing a list of dictionaries with verbose_name and identifier, we should use a data structure for this instead to avoid bugs.
We need to make sure that celery can serialize named tuples.

ref #7548 (comment)

@stsewd stsewd added Good First Issue Good for new contributors Improvement Minor improvement to code labels Jan 5, 2021
@stale
Copy link

stale bot commented Jun 2, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: stale Issue will be considered inactive soon label Jun 2, 2021
@stsewd stsewd added Accepted Accepted issue on our roadmap and removed Status: stale Issue will be considered inactive soon labels Jun 2, 2021
@astrojuanlu
Copy link
Contributor

Reference:

def sync_versions_task(project_pk, tags_data, branches_data, **kwargs):
"""
Sync the version data in the repo (from build server) into our database.
Creates new Version objects for tags/branches that aren't tracked in the database,
and deletes Version objects for tags/branches that don't exists in the repository.
:param tags_data: List of dictionaries with ``verbose_name`` and ``identifier``.
:param branches_data: Same as ``tags_data`` but for branches.

@vitorsv1
Copy link

Hey, I am really interested in this Issue. I'll work on it as my first contribution to the project

@humitos
Copy link
Member

humitos commented Aug 10, 2023

Update: instead of using NamedTuples, we want to use dataclasses 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Accepted issue on our roadmap Good First Issue Good for new contributors Improvement Minor improvement to code
Projects
None yet
Development

No branches or pull requests

4 participants