File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818 runs-on : ${{ matrix.os }}
1919 steps :
2020 - name : Checkout code
21- uses : actions/checkout@v2
21+ uses : actions/checkout@v4
2222 - name : Retrieve new lists of system packages
2323 if : runner.os != 'Windows'
2424 run : sudo apt-get update
3838 - run : opam pin add cs_api_client.dev . --no-action
3939 - run : opam depext cs_api_client --yes --with-test
4040 - run : opam install . --deps-only --with-test
41+ - name : Tag substitution
42+ run : bash ./ci/subst.bash "${{ github.ref_name }}"
43+ if : startsWith(github.ref, 'refs/tags/')
4144 - run : opam exec -- dune build @all @fmt @runtest
45+ - name : Upload compiled binary
46+ uses : actions/upload-artifact@v3
47+ with :
48+ name : cs-api-${{ matrix.os }}
49+ path : _build/install/default/bin/*
50+ if-no-files-found : error
Original file line number Diff line number Diff line change @@ -9,6 +9,12 @@ project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
99
1010_ There are no unreleased changes at the moment._
1111
12+ ## [ 2.5.1] - 2023-11-08
13+
14+ ### Fixed
15+
16+ * Fix compatibility with SeaweedFS API responses
17+
1218## [ 2.5.0] - 2023-10-19
1319
1420### Fixed
Original file line number Diff line number Diff line change @@ -191,7 +191,7 @@ let parse_s3_signature_request ~body =
191191
192192let parse_s3_response ~body =
193193 try
194- let key_extractor = Str. regexp " <Key>\\ ([^<>]*\\ )</Key>" in
194+ let key_extractor = Str. regexp " <Key.* >\\ ([^<>]*\\ )</Key>" in
195195 let _ = Str. search_forward key_extractor body 0 in
196196 Ok (Str. matched_group 1 body)
197197 with
Original file line number Diff line number Diff line change @@ -24,5 +24,12 @@ let tests =
2424< PostResponse >< Bucket > cryptosense- traces< / Bucket >< Key > uploads/ 784 f2aa928404db3a958fbd779a44156< / Key >< ETag > & #34 ;82887 f4dd13a80e182aa01efc0a59e9e& #34 ;< / ETag >< Location > http :// localhost:9000 / cryptosense- traces/ uploads/ 784 f2aa928404db3a958fbd779a44156< / Location >< / PostResponse >
2525 |}
2626 ~expected: (Ok " uploads/784f2aa928404db3a958fbd779a44156" )
27+ ; test_body ~name: " Valid SeaweedFS body"
28+ ~body:
29+ {|
30+ < ?xml version= " 1.0" encoding= " UTF-8" ?>
31+ < PostResponse >< Location xmlns= " http://s3.amazonaws.com/doc/2006-03-01/" >< / Location >< Bucket xmlns= " http://s3.amazonaws.com/doc/2006-03-01/" > storage- traces< / Bucket >< Key xmlns= " http://s3.amazonaws.com/doc/2006-03-01/" > uploads/ 48 db212785054589966f84565a263e90< / Key >< ETag xmlns= " http://s3.amazonaws.com/doc/2006-03-01/" > & #34 ;4425e01772 cfdca990eff5f085d05414& #34 ;< / ETag >< / PostResponse >
32+ | }
33+ ~expected: (Ok " uploads/48db212785054589966f84565a263e90" )
2734 ; test_body ~name: " Invalid body" ~body: " This\n does not\n contain a key."
2835 ~expected: (Error " Key could not be extracted from S3 response." ) ]
You can’t perform that action at this time.
0 commit comments