getsolus / ferryd

Fast, safe and reliable transit for the delivery of software updates to users.
https://getsol.us
Apache License 2.0
15 stars 5 forks source link

Ensure that repository removal functionality works and is hooked up to ferryctl #34

Closed ermo closed 2 months ago

ermo commented 2 months ago

DeleteRepo pops up one time too many in a rg DeleteRepo search to be "not yet implemented" as one comment says in ferryd/core/repo.go.

We need this functionality for easy testing of the epoch bump where we need to be able to do quick successive cycles of create/index/remove <the epoch testing repo>.

livingsilver94 commented 2 months ago

Are you sure that's not a stale comment? This sequence of commands works:

mkdir bin/myRepoBase
./bin/ferryd -d bin/myRepoBase -s ./ferryd.sock &
./bin/ferryctl -s ./ferryd.sock create-repo testing
# bin/myRepoBase/repo/testing has content
./bin/ferryctl -s ./ferryd.sock remove remove testing
# bin/myRepoBase/repo/testing is now gone

Yeah, remove remove is awkward :P

ermo commented 2 months ago

Are you sure that's not a stale comment? (...)

No, I'm not. Hence why I tasked you domain experts to take a better look at it? Which (by the look of things) is already paying off...?

cc: @joebonrichie

livingsilver94 commented 2 months ago

Ok so, the core API is working according to my test, plus so is the ferryctl invocation. The HTTP API remains to be tested then.

ermo commented 2 months ago

Ok so, the core API is working according to my test, plus so is the ferryctl invocation. The HTTP API remains to be tested then.

Any chance we could rename the command-line invocation to remove-repo perhaps...?

So ./bin/ferryctl -s ./ferryd.sock remove-repo testing for instance?

livingsilver94 commented 2 months ago

Shouldn't be hard at all!

livingsilver94 commented 2 months ago

This works: curl --unix-socket /path/to/ferryd.sock http://localhost/api/v1/remove/repo/testing

So yeah, it's definitely a stale comment. Gonna implement what you requested.