Make --ignore-validation sticky and send the flag over

As we discussed in London and now that the server checks for validation constraints, to have a consistent experience we need to

  • send ignore-validation as a flag on refresh requests
  • make --ignore-validation sticky

there is an open question how then to remove/disable this sticky flag:

  • one option is that snap refresh --ignore-validation foo would set the flag and then snap refresh foo would remove it (there was some feedback in a related bug that is not clearly intuitive)
  • another option is to have snap refresh foo keep the flag as is, and have a snap refresh --enforce/follow-validation foo anti-flag to start not ignoring it again

We already have precedence for this behavior in other flags in refresh, so it seems reasonable to follow along instead of inventing new semantics.

For example, --devmode is sticky and will remain in place if an automatic refresh is performed. But once we issue a manual refresh command, we force the flag to be used again or it will go away. It makes sense as the behavior is non-standard and clearly asks for a behavior which isn’t the recommended result for such a refresh.

opened:

I also created this to show the flag if set:

https://github.com/snapcore/snapd/pull/4112

people reminded me of notes, I reproposed as this:

created a PR to toggle the flag even if no update as we do for tracking channel:

#4111 with the main fix for now was merged, can be tested in 2.29.1+ (in beta now)

Anything else remaining here or can we take the tags off?

mostly waiting for 2.29 to go to stable

1 Like