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

Database RemoreRepository inconsistent data: multiple objects returned at .get #5351

Closed
remram44 opened this issue Feb 25, 2019 · 26 comments
Closed
Labels
Accepted Accepted issue on our roadmap Bug A bug

Comments

@remram44
Copy link

Details

  • Read the Docs project URL: N/A
  • Build URL (if applicable): N/A
  • Read the Docs username (if applicable): remram

Expected Result

A list of repositories on https://readthedocs.org/dashboard/import/

Actual Result

Every time I visit the page, there are no repositories. I can see my name and only one of my organizations on the right (I am actually in 12 organizations).

When I click the refresh icon (two arrows in circle) I see an error message in red:

There was an error with your request: get() returned more than one RemoteRepository -- it returned 2!

Seems similar to #2613 #1864 (both closed)

@stsewd
Copy link
Member

stsewd commented Feb 25, 2019

I'll take a further look later, but maybe it's the same as #4818

@stsewd stsewd added the Bug A bug label Feb 25, 2019
@stsewd
Copy link
Member

stsewd commented Mar 6, 2019

Ok, that wasn't the related sentry issue, I don't think we are logging that to sentry.

Maybe did you integrated two github accounts to your rtd account?

@remram44
Copy link
Author

remram44 commented Mar 6, 2019

I only have one GitHub account though. I do I check and/or correct this?

@stsewd stsewd added the Needed: replication Bug replication is required label Mar 6, 2019
@remram44
Copy link
Author

Today I noticed that my repository list was updated (showing thousands of repository because I'm in conda-forge) but still clicking on the refresh button shows:

There was an error with your request: get() returned more than one RemoteRepository -- it returned 2!

@stale
Copy link

stale bot commented May 4, 2019

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 May 4, 2019
@dojutsu-user
Copy link
Member

Still valid.... I think.

@stale stale bot removed the Status: stale Issue will be considered inactive soon label May 4, 2019
@stale
Copy link

stale bot commented Jun 18, 2019

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 18, 2019
@remram44
Copy link
Author

Why mark issues as stale if you're the ones not addressing them?

@stale stale bot removed the Status: stale Issue will be considered inactive soon label Jun 18, 2019
@stsewd
Copy link
Member

stsewd commented Jun 18, 2019

That's automatic, it's hard to find the problem if we can't replicate it locally.

@stale
Copy link

stale bot commented Aug 2, 2019

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 Aug 2, 2019
@remram44
Copy link
Author

remram44 commented Aug 2, 2019

This is really offensive. Makes me think that you don't care about users at all and are just waiting for them to go away.

@stale stale bot removed the Status: stale Issue will be considered inactive soon label Aug 2, 2019
@remram44
Copy link
Author

remram44 commented Aug 2, 2019

Having me re-state every month that yes I would still like you to look into my problems is really not cool. It also serves as a reminder that I've been essentially locked out from using ReadThedocs for 6 months and no one has looked into it.

I understand that this is a free service and I can't demand you spend time doing anything, but why do you think it's ok to make me spend time to come +1 this every month?

@stsewd
Copy link
Member

stsewd commented Aug 2, 2019

There isn't much we can do if we are not able to replicate the problem locally. The stale label is done by a bot, not from the read the docs team.

You can try to import your repo manually from here https://readthedocs.org/dashboard/import/manual/

@remram44
Copy link
Author

remram44 commented Aug 2, 2019

The robot was put in place by the Read The Docs team. Of course I'm not blaming the robot.

I don't understand how you can fail to reproduce that given you have access to the database. I don't know what step I can take to make this more reproducible. I gave you the ID of the account (mine) where this happens, you can do this get request and see what happens.. I cannot give more details apart from the error I see, but you can read the server's logs. If you won't do that we are at an impasse but it's only because you won't take any step to move forward, not because the steps don't exist.

@remram44
Copy link
Author

remram44 commented Aug 2, 2019

See you next month when your bot tells me my issue doesn't matter anymore, and I have to come back and say that it does to me.

@humitos
Copy link
Member

humitos commented Aug 2, 2019

Hey @remram44! We do Read the Docs with love. It's an OSS project and we also work on our free time to make it better. I suggest you to avoid any kind of message similar to the ones you wrote here.

We have a roadmap to follow. Our time is limited and we need to focus on the work that makes Read the Docs to keep working as is: free and open.

We do care about users, but here, it seems that you don't care about us. So, please stop these comments. Nobody want to read them.

@humitos
Copy link
Member

humitos commented Aug 2, 2019

Now, regarding your problem. It seems that one of the duplicated repositories in our DB is conda-forge/r-expsmooth-feedstock. This is definitely an inconsistency in our database that we need to clean up. I'm not sure how we get there yet, but I will probably have more information after research a little more and once you have said "I'm sorry" :)

@humitos
Copy link
Member

humitos commented Aug 3, 2019

Actually, for the records and when we come back to debug this, there are 2266 RemoteRepository duplicated for this user. Probably, just removing them and re-sync is the solution here.

@remram44
Copy link
Author

remram44 commented Aug 3, 2019

Thank you for taking a look. Would you consider removing the stale bot, which does nothing for your users or your image?

@humitos humitos added Accepted Accepted issue on our roadmap and removed Needed: replication Bug replication is required labels Aug 3, 2019
@humitos humitos changed the title There was an error with your request: get() returned more than one RemoteRepository -- it returned 2! Database RemoreRepository inconsistent data: multiple objects returned at .get Aug 3, 2019
@humitos
Copy link
Member

humitos commented Aug 3, 2019

Would you consider removing the stale bot, which does nothing for your users or your image?

Thanks for the suggestion. We are not consider removing the bot for now.

I removed "Needed: replication" and marked the issue as "Accepted" now that we know the reason of this.

I also changed the title of the issue to be more descriptive.

@humitos
Copy link
Member

humitos commented Aug 3, 2019

This is the chunk of code that returns multiple objects,

repo = RemoteRepository.objects.get(
full_name=fields['full_name'],
users=self.user,
account=self.account,
)

@humitos
Copy link
Member

humitos commented Aug 12, 2019

Hey @remram44! I think I fixed your issue.

Please go to https://readthedocs.org/dashboard/import/ and re-sync your social accounts clicking on the small arrows button.

Let me know if it works.

@remram44
Copy link
Author

remram44 commented Aug 12, 2019

Great news, thanks @humitos! I started the process, but it has been going for 10+ minutes. I will report back later.

I assume this is all because of the huge number of repositories in the conda-forge organization. Maybe there should be a way to prevent ReadTheDocs from enumerating repositories in specific organizations? (or you could blacklist this one since it is very much a special case, it has over 7000 repositories)

@remram44
Copy link
Author

It worked! Thank you so much @humitos. I don't know if the issue that made this happen was fixed, so I'll leave this for you to close (or not), but as far as I can see my problem is solved.

Thanks again!

@humitos
Copy link
Member

humitos commented Aug 12, 2019

Thanks! We believe the root cause of this is fixed and it seems that you were the only user hitting this problem. I will close it and we can revisit if it re-appears, but I don't think so.

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 Bug A bug
Projects
None yet
Development

No branches or pull requests

4 participants