Fanout script: Document and make executable #23154
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While dealing with a low memory page this morning, @sureshc and I spent some time figuring out what the state of our fanout scripts are and realized there's some organizational memory that hasn't been encoded in the scripts themselves. So here are a couple of changes to help with that.
644 -> 755
)This removes the need to make them executable every time you'd like to use them, and also means they'll show up in the shell autocomplete when you're logged in to the server.
I've removed some very old TODOs and added documentation to each file explaining that we expect these scripts to run on
production-daemon
and describing a previously-undocumented prerequisite that the appropriate ssh config be copied into place before the script is run. (Apparently we wipe this config on every deploy.)I think these are useful, safe changes to make on their own. I'm also interested in some discussion of other changes we could make here.
fanout
method toRakeUtils
.fanout-dryrun
andfanout-parial
ought to be flags on the mainfanout
script, both because it's DRY, and because right now I don't have confidence thatdryrun
will actually represent the behavior of fanout without doing a diff of the two scripts.