Hey all. Started trying to work with the registry locally today. I'm running the server locally, and attempting to publish packages with the cli. I'm using warg-cli publish start --init <package-name>
followed by warg-cli publish submit
and getting the following
error: Record rejected for Non-initial record contained no previous hash
Server side I see this 2023-03-08T15:58:19.092615Z ERROR warg_server: Handler failed: A bundle can not be made from no proofs
. Wondering if I'm failing to convey that the publish is an initial publish, even though the publish is started as an initial publish?
looking at the cli code that was recently refactored, i believe it's calling start_publish_init
, so it should be sending the public key to use to start the package log (it should print out that it's publishing a new package with --init
passed), so perhaps there's something wrong with the server impl?
Oh perhaps you're missing a release command in-between and it's just a bad error message?
I can see an entry for the init and for the release in the publish-info.json
after digging into the cli a bit, i think that maybe i missed a step where the packages folder was supposed to be populated? It's empty right now, and it looks like publish submit
is trying to use stuff that's in there Screen-Shot-2023-03-08-at-12.37.14-PM.png
Probably something related to the refactoring (I also need to update the demo scripts), I can look at it after the meeting
Thanks! Yeah i was messing around with the demo too and updated some of the scripts to interact with it
cool, sorry I missed that, feel free to PR those fixes in the mean time!
so i patched enough of the client/server to get it working to the point of failure you're seeing. the publish operation appears to succeed, but the updating of the client to the response checkpoint is failing a consistency check
and i believe it's due to what you're seeing, the packages directory not getting populated; likely from the refactoring of the client storage
or maybe not (still pretty unfamiliar with the client/server code)
seems like they're only stored after the checkpoint inclusion is proved
the client impl needs some non-2xx-response handling too; several places try to parse JSON responses without a JSON response (i.e. when the server 500s), although these seem more like 400s to me (something wrong with the proof request data supplied)
I put up https://github.com/bytecodealliance/registry/pull/71 with my fixes to get us to the same point of failure
@Kyle Brown would you mind looking into this issue (with PR 71 applied locally) as you're much more familiar with the server implementation than I? basically after a publish start --init
, publish release
, and publish submit
for the demo, the submit fails because the checkpoint of the submission fails its inclusion proof
it could be related to the CLI refactoring; I obviously didn't do a good enough job of verifying that the demo still worked post refactoring
fwiw i rolled back before the cli refactor and i think the behavior predates that... or we're not running the proper commands
I wouldn't be surprised if the issue does predate Peter's changes.
Looking at it now, it looks like it came from when I refactored things after CNSC.
@Peter Huene it's a pretty small issue due to my reorganization. The call to update_to
in submit_publish
fails because there is nothing to update. It's worth thinking about the right way to express this in the future, but for now you can just add self.install(name).await?;
on the line above it.
Let me know if you hit any other issues.
Pushed the fix as part of that PR
and verified it does the trick for now
thanks again!
Last updated: Dec 23 2024 at 12:05 UTC