filter packages for os compatibility before fetching metadata (#117)

* filter packages for os compatibility before fetching metadata

* address PR feedback and add os filtering to get package latest version endpoint

* additional test suite data

* filter empty version sets

* attempt to fix leak

Co-authored-by: Keagan McClelland <keagan.mcclelland@gmail.com>
This commit is contained in:
Lucy C
2022-07-12 15:06:21 -06:00
committed by GitHub
parent 18b951388b
commit e42cd787b4
16 changed files with 742 additions and 91 deletions

View File

@@ -229,8 +229,8 @@ getDependencyVersions pkgDepRecord = do
pure $ entityVal <$> depVers
fetchAllAppVersions :: MonadUnliftIO m => ConnectionPool -> PkgId -> m [VersionRecord]
fetchAllAppVersions appConnPool appId = do
fetchAllPkgVersions :: MonadUnliftIO m => ConnectionPool -> PkgId -> m [VersionRecord]
fetchAllPkgVersions appConnPool appId = do
entityAppVersions <- runSqlPool (P.selectList [VersionRecordPkgId P.==. PkgRecordKey appId] []) appConnPool
pure $ entityVal <$> entityAppVersions