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

RSS feeds for repositories owned by organizations have duplicate entries #20986

Closed
Tracked by #19071
prologic opened this issue Aug 28, 2022 · 9 comments · Fixed by #30957
Closed
Tracked by #19071

RSS feeds for repositories owned by organizations have duplicate entries #20986

prologic opened this issue Aug 28, 2022 · 9 comments · Fixed by #30957
Labels

Comments

@prologic
Copy link

Description

The RSS feeds for repositories owned by organizations have several duplicate entries with different GUIDs, cluttering feed readers and reducing the number of unique items available in a feed. I originally ran into the bug on https://git.mills.io/yarnsocial/yarn.rss and did some testing in different contexts to try and find a pattern. The bug is definitely related to repositories owned by organizations, but the number of duplicates differs between repositories. The results of my tests are displayed below.

URL							Instance Version		Duplicates?	Notes
https://git.mills.io/yarnsocial/yarn.rss		1.17.0				Yes		Original finding
https://git.mills.io/yarnsocial/yarn.social.rss		1.17.0				Yes		Same organization, different repository
https://git.mills.io/saltyim/salty.im.rss		1.17.0				Yes		Same instance, different organization
https://git.mills.io/prologic/gonix.rss			1.17.0				No		Same instance, but repository owned by a user
https://try.gitea.io/0000000000/aaaa.rss		1.18.0+dev-350-g8bbb622bb	Yes		Demo instance, repo owned by an organization. 
https://try.gitea.io/UpYoursMicrosoft/foobar.rss	1.18.0+dev-350-g8bbb622bb	No		Demo instance, repo owned by a user

I had to use an existing repository owned by an organization on the demo instance because I was unable to create an organization myself.

Gitea Version

1.17.0, 8bbb622

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

I am not the operator of git.mills.io and I don't have any details on how it's being run.


This bug report was filed on behalf of another. As this is related to my instance, it is run as a Docker container with a SQLite database.

Database

SQLite

@yan12125
Copy link
Contributor

yan12125 commented Oct 2, 2022

This fix seems related: #20738, but it was closed without merging for performance concerns.

@DarrenPIngram
Copy link

I can confirm that I've also seen duplicate RSS entries in my own installation, but have not had the opportunity to try and troubleshoot. I had thought to just turn the feature off, but I did not see an environment to do that.

@vasvir
Copy link

vasvir commented Apr 24, 2023

I can verify that I also see multiple RSS entries per commit.

@wxiaoguang
Copy link
Contributor

It is unsolvable at the moment (the action table blocks it) unless there could be a performant solution.

@TimB87
Copy link

TimB87 commented Mar 12, 2024

This is still a problem as seen on https://git.crux.nu/ports/core.rss

@algernon
Copy link
Contributor

algernon commented May 2, 2024

FYI, I am working on a patch that addresses this issue, and gets rid of the dups in repo feeds, without using dedup or other expensive operations.

You can find my WIP PR at https://codeberg.org/forgejo/forgejo/pulls/3598. It may or may not apply to Gitea cleanly, but the change itself is small enough to port over. Hope this helps!

@wxiaoguang
Copy link
Contributor

If there is no bug or design problem, Gitea could port over. Thank you.

@algernon
Copy link
Contributor

algernon commented May 9, 2024

FYI, I rewrote the explanation of my fix to better explain what it does, and how, and why, and why I believe it is correct. There's also a test now. Initial performance testing indicates it has no noticable negative impact.

@wxiaoguang
Copy link
Contributor

@algernon Thank you very much for figuring out the problem.

I proposed a simpler and clearer fix: Filter out duplicate action(activity) items for a repository #30957 , feel free to cherry pick it if you like it.

ps: I am not a native English speaker, so I could only express directly and I am not sure whether the wording are fine to you. Feel free to suggest to improve the description if I missed anything.

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.

7 participants