You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Setting the HelloWorldApp delete & update parameters to is_local and on_update behavior to be dependent on the network on which it is deployed (UpdateApp locally but Fail on any other network) creates an unintuitive foot-gun for developers new to AlgoKit.
This is because the default behavior will work smoothly on the Localnet but then sets the developer up for the GH Actions workflow to fail the first time an updated contract is pushed to GH.
The automated deploy-testnet job will attempt to update the testnet contact, but it will have defaulted to being non-updatable/deletable unless the developer has thought to reconfigure this:
on_schema_break=(
OnSchemaBreak.ReplaceApp if is_local else OnSchemaBreak.Fail
),
on_update=OnUpdate.UpdateApp if is_local else OnUpdate.Fail,
allow_delete=is_local,
allow_update=is_local,
)
I think this would both better demonstrate the idempotent deployment approach harmoniously with the automated CI/CD and also be a reasonably good practice for production smart contract development until the developer makes a conscious decision to have the contract be permanent and/or immutable.
The text was updated successfully, but these errors were encountered:
Thanks for the feedback @SilentRhetoric, we will have a change coming soon that will give a nicer default experience for localnet and testnet as well as having a conservative default for mainnet
Setting the HelloWorldApp delete & update parameters to
is_local
andon_update
behavior to be dependent on the network on which it is deployed (UpdateApp
locally butFail
on any other network) creates an unintuitive foot-gun for developers new to AlgoKit.This is because the default behavior will work smoothly on the Localnet but then sets the developer up for the GH Actions workflow to fail the first time an updated contract is pushed to GH.
The automated deploy-testnet job will attempt to update the testnet contact, but it will have defaulted to being non-updatable/deletable unless the developer has thought to reconfigure this:
To something like:
I think this would both better demonstrate the idempotent deployment approach harmoniously with the automated CI/CD and also be a reasonably good practice for production smart contract development until the developer makes a conscious decision to have the contract be permanent and/or immutable.
The text was updated successfully, but these errors were encountered: