-
Notifications
You must be signed in to change notification settings - Fork 186
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
Change Autodiscover behaviour #1860
Conversation
c84125e
to
f7f47e8
Compare
I tested this manually with one of the reported urls and it worked just as expected. Providing "https://thomas-leister.de/index.xml" to current master will fail with an exception that it is not a feed. With my change https://thomas-leister.de/index.xml just works and also https://thomas-leister.de works because the autodiscover jumps in. In that case the log looks like this:
|
…already a feed Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
f7f47e8
to
e99728a
Compare
Co-authored-by: Sean Molenaar <SMillerDev@users.noreply.github.com> Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
Seems like with Nextcloud master also some internal stuff changes that affects us, phpunit complains about return types from the query builder
Also there are a lot of deprecation warnings. |
099bea0
to
c0fef16
Compare
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
c0fef16
to
e84f4c7
Compare
So the bats tests fail now because they used a bug in news to work before ... The check if a feed already exists is done on the basis of the input url but the feed was then added based on the discovered url which in case of our test feed from nextcloud is different ☠️ I already discovered that during the creation of the api tests, where the same feed was added over and over again without any issues. I think though that the check if the feed already exists should be moved a bit. |
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
Turns out the tests from the comand line where never running as expected at least regarding the teardown 😃 |
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
Two issues I'm not sure what exactly the unit test that fails is supposed to do. But that doesn't make sense to me. If you wanted to actually test that you would create a feed and then create the feed again. Second issue is the failing integration test, the cause is that the feed the test is trying to create is already existing, this was never an issue before because the url in the DB was different from the input url, thanks to the feed discovery. |
I will take a break and continue later to rewrite the tests |
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
looks good :) |
This should be squashed via GitHub :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good. I can't judge Bats, but it seems to work. 👍
With this, do we even need the checkbox in the UI anymore, since the discover is just the fallback anyway?
I think the checkbox is not needed anymore. Can be removed in future UI updates, if we get any 😅 |
Changed - Change autodiscover to only run after fetching the given url has failed (#1860) Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
Changed - Change autodiscover to only run after fetching the given url has failed (#1860) Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
We often get issue reports because some valid feed url is not working due to the autodiscover feature.
The actual reason is of course that the self-reference is wrong and should be fixed by the author.
But I think for news it's easier to just try to parse the feed and if it fails to check again after autodiscover.