NYPL-Simplified / server_core

Shared data model and utilities for Library Simplified server applications
7 stars 11 forks source link

Pass the feed URL into assert_importable_content, not an unrelated value #1243

Closed leonardr closed 3 years ago

leonardr commented 3 years ago

This branch addresses https://jira.nypl.org/browse/SIMPLY-3588. The OPDS importer resolves relative links when doing a real import, but not when running a self-test. It looks like the signature of OPDSImporter.follow_one_link changed so that the first item of the return value is a list of "next" links, not the URL of the original page. That's the value we were passing in to assert_importable_content, and since it wasn't a URL (it was an empty list), we weren't able to resolve relative links.

Fortunately, we have the URL of the original request -- we used it to make the original request -- so it's an easy fix to just pass that information in to assert_importable_content.

leonardr commented 3 years ago

The PR build is failing because it exceeds a Docker Hub rate limit. I filed https://jira.nypl.org/browse/SIMPLY-3592 to deal with this. I feel like we don't need the PR build given that we run the tests on every push. What do you think?

EdwinGuzman commented 3 years ago

Yeah, both builds are essentially the same so we may not need the specific PR branch build. I ran into this issue yesterday but pushed another commit about 10 minutes later and it worked. If there's a 100 pull limit every 6 hours, I'm not sure if it's actually being applied.

leonardr commented 3 years ago

I shut off Travis notifications on PRs for server_core, let's see what that does.