-
Notifications
You must be signed in to change notification settings - Fork 111
swarm: push tags integration - request flow #1347
Conversation
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.
There are compilations errors in swarm/api/http/test_server.go and swarm/fuse/swarmfs_test.go.
I am aware of the linting and compilation errors. This is still WIP (but preliminary implementation is there).
opinions? |
@@ -297,31 +300,6 @@ func (a *API) ResolveURI(ctx context.Context, uri *URI, credentials string) (sto | |||
return addr, nil | |||
} | |||
|
|||
// Put provides singleton manifest creation on top of FileStore store | |||
func (a *API) Put(ctx context.Context, content string, contentType string, toEncrypt bool) (k storage.Address, wait func(context.Context) error, err error) { |
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.
this method was only used by tests. i think we should not export test helpers on public APIs. hence the functionality was removed from the API struct and duplicated wherever necessary
can we please work with incremental PRs? Again we cram eveything into this.
My 2c:
|
localstore integration was one PR, shed was one PR, new localstore was one PR (not integrated)
ready for review means i would have tagged it ready for review and removed the
There were two days between my last commit on that branch and the last review. Not sure what I was supposed to do in between. |
while working on this i figured there's not much use to integrate this in the response, since we lose the ability to pipe the returned hash values from |
8dc9f72
to
4f92cac
Compare
swarm/chunk: address (some) PR comments swarm/chunk: add seen field swarm/chunk: change eta status call swarm/chunk: address pr comments swarm/chunk: address pr comments swarm/chunk: address pr comments swarm/chunk: remove ambiguity of total swarm/api: wip add chunk totals swarm/api: tag test-bed swarm/api, swarm/chunk: wip rudimentary implementation for tag increments swarm/api, swarm/storage: initial TestApiPut passes swarm/api: remove logline swarm: address PR comments cmd, swarm: fix compilation errors swarm/chunk: adjust test swarm/chunk: adjust tests swarm/chunk: pointers galore swarm: fix tests and compilation swarm/storage: change pyramid chunker append signature swarm/api: make api tags private swarm/api: add test for larger content cmd, swarm: add test for http upload swarm: remove deprecated and unused code, add swarm hash to DoneSplit signature swarm/chunk: add marshalling for address field swarm/api: add handle get tag handler, add tags for post raw cmd/swarm: reinstate recursive flag swarm/api: cleanup api test swarm/api: cleanup api test swarm/api/client: add client tag check to multipart upload swarm/api/client: add more tag assertions to tests swarm/api/http: test for correct tag size estimate according to Content-Length header swarm/api/http: document test swarm/api/http: uncomment test swarm/storage: address pr comments swarm/api: remove silly comment
@zelig this is ready for review. Still left TODO:
|
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.
nice one , getting there:
STORED
increment should be afterPut
returns- if tests fail, we need syncronisation, ie wait for correct numbers with timeout
checkTag
should work on one Tag- test helpers should be DRY-ed
- chunk count estimation should become exact chunk counting and tested
…ain content-length
…ntent length and number of chunks in a trie
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.
lint. shows unnecessary conversion https://travis-ci.org/ethersphere/go-ethereum/jobs/527810385#L257
swarm/api: integrate tags to count chunks being split and stored swarm/api/http: integrate tags in middleware for HTTP `POST` calls and assert chunks being calculated and counted correctly swarm: remove deprecated and unused code, add swarm hash to DoneSplit signature, remove calls to the api client from the http package
swarm/api: integrate tags to count chunks being split and stored swarm/api/http: integrate tags in middleware for HTTP `POST` calls and assert chunks being calculated and counted correctly swarm: remove deprecated and unused code, add swarm hash to DoneSplit signature, remove calls to the api client from the http package
this pr integrates the push tags into the low level components that actually do the bead-counting.
supersedes #1318
https://hackmd.io/9eWxJ_MJS8i04onWg49UBA?both
coincidentally resolves #1364 and fixes #1350