mobilecoinfoundation / cookiecutters

MobileCoin Foundation Project Templates
https://mobilecoin.foundation/
Apache License 2.0
1 stars 12 forks source link

configure crates.io owners? #60

Open cbeck88 opened 1 year ago

cbeck88 commented 1 year ago

One issue is, when you cookiecutter out a repo like this and cargo publish it for the first time, you will be the only owner, and the only one who is authorized to put it on crates.io.

Then, if such a person leaves the company, it may be impossible for us to publish any later versions of it on crates.io if we can't get a hold of them.

You can see owners on crates.io pages like here: https://crates.io/crates/aligned-array

For instance, with aligned-array, I made sure I added mobilecoinofficial/eng as a co-owner so that if I get hit by a bus, the show can go on.


It would be nice if something in the cookiecutter template would prompt people to do this, otherwise a lot of people will likely forget. I almost forgot this with mc-rand just now.


One issue I also ran into with mc-rand just now is:

chris@chris-ThinkPad-X1-Extreme-Gen-3:~/mobilecoinofficial/rand$ cargo owner --add github:mobilecoinfoundation:coredev
    Updating crates.io index
error: failed to invite owners to crate `mc-rand` on registry at https://crates.io

Caused by:
  the remote server responded with an error: only members of a team or organization owners can add it as an owner

So I am not actually authorized to add coredev to repos that I create -- it might be that James or Nick or someone has to be in the loop for this process. Or I guess I can give mobilecoinofficial/eng ownership over repos in mobilecoinfoundation?

cbeck88 commented 1 year ago

I'm noticing that mc-sgx-sync is owned in part by mobilecoinfoundation:crates-io: https://crates.io/crates/mc-sgx-sync

I didn't know about this group, sounds good

It would be cool if something in the cookiecutter template dialog just printed at the end like "template created, please remember to add mobilecoinfoundation:cratesio as a crates.io owner when you publish"

cbeck88 commented 1 year ago

I got the same error with that one:

chris@chris-ThinkPad-X1-Extreme-Gen-3:~/mobilecoinofficial/rand$ cargo owner --add github:mobilecoinfoundation:crates-io
    Updating crates.io index
error: failed to invite owners to crate `mc-rand` on registry at https://crates.io

Caused by:
  the remote server responded with an error: only members of a team or organization owners can add it as an owner
jcape commented 1 year ago

Yep, as discussed, the ideal case is to have this happen with release automation, but let me add you to the crates-io group in the interim.

Edit: You've been added now (we were adding folks on an "as-needed" basis).

jcape commented 1 year ago

One other thing I'll note: only user accounts can add/remove owners on crates.io, that's why we've got myself, nick, and eran as owners for the sgx crates.