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

ImportedFile: remove slug 1/2 #7228

Merged
merged 5 commits into from Nov 19, 2020
Merged

ImportedFile: remove slug 1/2 #7228

merged 5 commits into from Nov 19, 2020

Conversation

stsewd
Copy link
Member

@stsewd stsewd commented Jun 24, 2020

We are not using this field,
actually we are not even setting it.

model_class.objects.create(
project=version.project,
version=version,
path=relpath,
name=filename,
md5=md5,
commit=commit,
build=build,
)

In production all files have that field empty.

I'm making this a two-step operation, so we don't have downtime.

We are not using this field,
actually we are not even setting it.

https://github.com/readthedocs/readthedocs.org/blob/98463241148f86dd37cc38e1102926ca2f976969/readthedocs/projects/tasks.py#L1551-L1559

In production all files have that field empty
@stsewd stsewd requested a review from a team June 24, 2020 01:08
@stsewd
Copy link
Member Author

stsewd commented Jul 29, 2020

The migration needs to be updated after #7274 is merged

Copy link
Member

@humitos humitos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are not setting it when creating the object, it wasn't null=True and it has not default= value, how it was working?

@stsewd
Copy link
Member Author

stsewd commented Aug 25, 2020

@humitos who knows 🤷‍♂️

@humitos
Copy link
Member

humitos commented Aug 25, 2020

Weird...

                                        Table "public.projects_importedfile"
    Column     |           Type           | Collation | Nullable |                      Default                      
---------------+--------------------------+-----------+----------+---------------------------------------------------
...
 slug          | character varying(50)    |           | not null |
...

slug is being set to '' for some reason. We must be doing something somewhere else.

@stale
Copy link

stale bot commented Oct 10, 2020

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 Oct 10, 2020
@stale stale bot closed this Oct 17, 2020
@stsewd stsewd reopened this Oct 19, 2020
@stsewd stsewd requested a review from a team October 19, 2020 14:51
@stale stale bot removed the Status: stale Issue will be considered inactive soon label Oct 19, 2020
Copy link
Member

@ericholscher ericholscher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me -- is part 2 of this work tracked somewhere?

@stsewd
Copy link
Member Author

stsewd commented Nov 19, 2020

is part 2 of this work tracked somewhere?

Part two is just to the actual deletion of the field, I was about to make that PR after this one was merged

@stsewd stsewd merged commit c5878dc into master Nov 19, 2020
3 checks passed
@stsewd stsewd deleted the remove-file-slug branch November 19, 2020 14:49
stsewd added a commit that referenced this pull request Nov 19, 2020
stsewd added a commit that referenced this pull request Nov 19, 2020
stsewd added a commit that referenced this pull request Dec 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants