aragon-cli icon indicating copy to clipboard operation
aragon-cli copied to clipboard

apm publish minor/patch add better error message

Open kernelwhisperer opened this issue 5 years ago • 5 comments

I'm trying to deploy a minor version of the contract:

 ℹ foo.open.aragonpm.eth has 2 published versions
 ✔ 1.0.0: 0xE636bcA5B95e94F749F63E322a04DB59362299F1 ipfs:QmR695Wu5KrHNec7pRP3kPvwYihABDAyVYdX5D5vwLgxCn
 ✔ 1.1.0: 0xE636bcA5B95e94F749F63E322a04DB59362299F1 ipfs:QmSwjUZFpv2c2e9fLoxtgFrAsAmBN4DyQGJp4RcqQcW3z3

Doing aragon apm publish minor --environment staging works, but the contract is not re-deployed. Doing aragon apm publish minor CounterApp --environment staging gives:

Transaction would not succeed ("gas required exceeds allowance or always failing transaction")

Same goes for patch. From what I can tell minor and patch only work for publishing the frontend. Is this by design?

kernelwhisperer avatar Dec 29 '18 15:12 kernelwhisperer

Yes, aragonPM only allows major upgrades to include contract upgrades. We should definitely fix the error messaging on this.

I believe it's detects minor and patch versions right now to skip contract deployment but I may be wrong cc @izqui.

sohkai avatar Jan 09 '19 07:01 sohkai

@sohkai Alright, cool!

It's a bit weird tbh, but at least it's the intended behavior.

Let's keep this issue open and re-purpose it to add a better error message.

kernelwhisperer avatar Jan 10 '19 08:01 kernelwhisperer

Agreed, I think it's mostly confusing because we don't really explain the "semver" semantics anywhere else but https://hack.aragon.org/docs/apm-ref.html#repo.

We designed these "major" versions so that they would be signed to users as potentially dangerous (due to the underlying contract upgrade).

sohkai avatar Jan 10 '19 23:01 sohkai

If I understand correctly, more than improving the error message the CLI should check the contract address in the APM and if it detects it's different than the current one throw an Error telling the user that only a major bump ok, right?

dapplion avatar Oct 27 '19 16:10 dapplion

@dapplion Yes, you nailed it. I agree with you

0xGabi avatar Oct 28 '19 14:10 0xGabi