Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(sns): SNS Gov should not accept an upgrade path from SNS-W that contains duplicate versions #2839

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

anchpop
Copy link
Contributor

@anchpop anchpop commented Nov 26, 2024

An upgrade path with duplicate versions from SNS-W would almost certainly be erroneous, and likely to cause the SNS to enter an infinite upgrade loop, which could be unrecoverable. We also may make the assumption in various places that the upgrade steps will not have duplicates, so it's good to enforce that.

← Previous PR

@anchpop anchpop requested a review from a team as a code owner November 26, 2024 21:27
@github-actions github-actions bot added the fix label Nov 26, 2024
@anchpop anchpop changed the base branch from master to @anchpop/move-functions-to-file November 26, 2024 21:28
@anchpop anchpop force-pushed the @anchpop/dont-accept-duplicate-versions branch 2 times, most recently from a6e6012 to 223a1f2 Compare November 26, 2024 21:58
@anchpop anchpop force-pushed the @anchpop/move-functions-to-file branch from 9f17274 to 1691020 Compare November 26, 2024 21:58
github-merge-queue bot pushed a commit that referenced this pull request Nov 27, 2024
…#2836)

This PR moves `temporarily_lock_refresh_cached_upgrade_steps`,
`should_refresh_cached_upgrade_steps`, and
`should_refresh_cached_upgrade_steps` into the already existing
`cached_upgrade_steps.rs` file. The benefit of this is improved
organization – pretty much all the upgrade-steps-related stuff is now in
one small file.

[Next PR →](#2839)

## Note

We don't do this very often in SNS governance, but I think it would be a
good habit to get into. These giant files we have are intimidating and
make it hard to find what you're looking for. Another case where we do
this currently is in `upgrade_journal.rs`
Base automatically changed from @anchpop/move-functions-to-file to master November 27, 2024 01:47
@anchpop anchpop force-pushed the @anchpop/dont-accept-duplicate-versions branch from 223a1f2 to 73693a5 Compare November 27, 2024 17:37
@anchpop anchpop added this pull request to the merge queue Nov 27, 2024
Merged via the queue into master with commit 23dfb95 Nov 27, 2024
24 checks passed
@anchpop anchpop deleted the @anchpop/dont-accept-duplicate-versions branch November 27, 2024 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants