aragon-cli
aragon-cli copied to clipboard
apm publish minor/patch add better error message
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?
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 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.
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).
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 Yes, you nailed it. I agree with you