<commit_before>f(UpgradeNode).
UpgradeNode = fun () ->
  case logplex_app:config(git_branch) of
      "v69" ->
          io:format(whereis(user), "at=upgrade_start cur_vsn=69~n", []);
      "v69.1" ->
          io:format(whereis(user),
                    "at=upgrade type=retry cur_vsn=69 old_vsn=69.1~n", []);
      Else ->
          io:format(whereis(user),
                    "at=upgrade_start old_vsn=~p abort=wrong_version", [tl(Else)]),
          erlang:error({wrong_version, Else})
  end,

  %% stateless

  % Minor changes to the logging/response order for performance
  l(logplex_api),

  application:set_env(logplex, git_branch, "v69.1"),
  ok
end.

f(NodeVersions).
NodeVersions = fun () ->
                       lists:keysort(3,
                           [ {N,
                              element(2, rpc:call(N, application, get_env, [logplex, git_branch])),
                              rpc:call(N, os, getenv, ["INSTANCE_NAME"])}
                             || N <- [node() | nodes()] ])
               end.

f(NodesAt).
NodesAt = fun (Vsn) ->
                  [ N || {N, V, _} <- NodeVersions(), V =:= Vsn ]<commit_msg>Support more transition versions<commit_after>f(UpgradeNode).
UpgradeNode = fun () ->
  case logplex_app:config(git_branch) of
      "v69" ->
          io:format(whereis(user), "at=upgrade_start cur_vsn=69~n", []);
      "v69-R16B01" ->
          io:format(whereis(user), "at=upgrade_start cur_vsn=69-R16B01~n", []);
      "v69-R16B01-swfi" ->
          io:format(whereis(user), "at=upgrade_start cur_vsn=69-R16B01-swfi~n", []);
      "v69.1" ->
          io:format(whereis(user),
                    "at=upgrade type=retry cur_vsn=69 old_vsn=69.1~n", []);
      Else ->
          io:format(whereis(user),
                    "at=upgrade_start old_vsn=~p abort=wrong_version", [tl(Else)]),
          erlang:error({wrong_version, Else})
  end,

  %% stateless

  % Minor changes to the logging/response order for performance
  l(logplex_api),

  application:set_env(logplex, git_branch, "v69.1"),
  ok
end.

f(NodeVersions).
NodeVersions = fun () ->
                       lists:keysort(3,
                           [ {N,
                              element(2, rpc:call(N, application, get_env, [logplex, git_branch])),
                              rpc:call(N, os, getenv, ["INSTANCE_NAME"])}
                             || N <- [node() | nodes()] ])
               end.

f(NodesAt).
NodesAt = fun (Vsn) ->
                  [ N || {N, V, _} <- NodeVersions(), V =:= Vsn ]
{'fraction_non_alphanumeric': 0.1572052401746725, 'fraction_numerical': 0.023025009924573243, 'mean_word_length': 1.9439252336448598, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7540008', 'n_tokens_mistral': 910, 'n_tokens_neox': 849, 'n_words': 149}