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

refactor(sns): Move upgrade-steps-related functions to their own file #2836

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

anchpop
Copy link
Contributor

@anchpop anchpop commented Nov 26, 2024

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 →

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

@anchpop anchpop force-pushed the @anchpop/move-functions-to-file branch from 9f17274 to 1691020 Compare November 26, 2024 21:58
@anchpop anchpop added this pull request to the merge queue Nov 27, 2024
Merged via the queue into master with commit 959a5eb Nov 27, 2024
24 checks passed
@anchpop anchpop deleted the @anchpop/move-functions-to-file branch November 27, 2024 01:47
github-merge-queue bot pushed a commit that referenced this pull request Nov 27, 2024
…ontains duplicate versions (#2839)

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](#2836)
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