Closed ilovezfs closed 6 years ago
Came here to report the same. Here's how I reproduced locally:
stack unpack aws-0.19 && cd aws-0.19
edit stack.yaml # add the following stack.yaml
stack build
# stack.yaml
resolver: nightly-2018-03-10
extra-deps:
- http-conduit-2.3.0
@aristidb any ideas here?
@aristidb, I've made some progress on this in https://github.com/joeyh/aws -- that fork successfully builds with conduit-1.3.
I'm hesitant to make a pull request, because I don't understand conduit well enough to know if my changes may have caused a subtle bug along the lines of a http resource not being cleaned up as promptly as it was before. See 3758da0850575dba66fbac9a2ca45ee5ef7fc3c3 for details.
Also, I've not run the test suite at all. Anyway, I hope this will help.
To run the test suite:
diff --git a/aws.cabal b/aws.cabal
index 7c7bc09..13d3e67 100644
--- a/aws.cabal
+++ b/aws.cabal
@@ -431,7 +431,7 @@ test-suite s3-tests
QuickCheck >= 2.7,
aeson >= 0.7,
bytestring,
- conduit-combinators,
+ conduit,
errors >= 2.0,
lifted-base >= 0.2,
monad-control >= 0.3,
diff --git a/tests/S3/Main.hs b/tests/S3/Main.hs
index 6b8c8d9..5888151 100644
--- a/tests/S3/Main.hs
+++ b/tests/S3/Main.hs
@@ -236,7 +236,7 @@ test_versioning = askOption $ \(BucketOption bucket) ->
let Just vid = cmurVersionId resp
bs <- runResourceT $ do
gor <- pureAws cfg s3cfg mgr (getObject bucket k) { goVersionId = Just vid }
- responseBody (gorResponse gor) $$+- sinkLazy
+ sealConduitT (responseBody (gorResponse gor)) $$+- sinkLazy
assertEqual "data do not match" testStr bs
]
Using these changes, I was able to "run" the test suite locally against lts-11.6
. Of course it didn't really run the test suite since I didn't provide aws creds, but this at least compiles.
Thanks Dan, I've updated my fork with that.
Investigating the consequences of the removed closeResumableSource line, I see that was added as part of a memory leak in S3 multipart upload fix in 6b9c070e2ce5ea7e967c3efec9ceb0791fd21d9f. So, it may be that dealing with conduit's dropping of finalization may have led to my fork reintroducing issue #142.
The thing to test would thus be Examples/MultipartUpload.hs with a 500 mb file and see if it leaks memory.
-- see shy jo
Tested /usr/bin/time dist/build/MultipartUpload/MultipartUpload s3.amazonaws.com joeyh-test-23-apr 1gbtest 1gbtest 100
It grew to 240 mb memory, which is the same as what it used once #142 was fixed. The 1gb memory leak is not reintroduced by my fork.
@joeyh I'm trying to get git-annex to build with GHC 8.4 using your aws fork and hit this:
Preprocessing library for aws-0.18..
Building library for aws-0.18..
[ 4 of 80] Compiling Aws.Iam.Core ( Aws/Iam/Core.hs, dist/dist-sandbox-215793fc/build/Aws/Iam/Core.o )
Aws/Iam/Core.hs:63:10: error:
• No instance for (Semigroup IamMetadata)
arising from the superclasses of an instance declaration
• In the instance declaration for ‘Monoid IamMetadata’
|
63 | instance Monoid IamMetadata where
| ^^^^^^^^^^^^^^^^^^
Failed to install aws-0.18
cabal: Error: some packages failed to install:
aws-0.18-AFSHEQTGVYdDavj3oZcjYf failed during the building phase. The
exception was:
ExitFailure 1
@ilovezfs https://prime.haskell.org/wiki/Libraries/Proposals/SemigroupMonoid
-- see shy jo
@joeyh so I guess that will require another fix in aws?
The semigroup issue at least should be fixed with a PR that I just merged.
Nice! @aristidb did you have a chance to review @joeyh's fork?
@ilovezfs I don't understand the new conduit stuff well enough to know if it's good or not, I'm afraid. But once @joeyh is more confident in its stability, I'm sure he will make a PR so we can merge it. :+1:
@joeyh any news here?
@joeyh PR is merged, will release 0.20 shortly
Could you please make a metadata revision on hackage? cabal still tries to build aws-0.19 with http-conduit-2.3.2 on my computer.
@mat8913 et al.; I've performed the metadata revision as part of the effort to to repair git-annex
's install-plans (see https://github.com/haskell-infra/hackage-trustees/issues/178) at https://hackage.haskell.org/package/aws-0.19/revisions/
In the future, please file an issue in the Trustee issue tracker to help make sure the metadata is corrected asap via metadata revisions to help users have a good experience with Hackage!
Hackage matrix shows aws is now broken across the board: https://matrix.hackage.haskell.org/package/aws#GHC-8.2/aws-0.19
I am seeing the same failure locally.