ColumnMap/Once no longer behaving consistently after upgrade from 5.0.1 to 5.0.2

After an update from 5.0.1 to 5.0.2, our customisations are sometimes rendered. We add a badge-pill to the status to make it standout more and since the update, testing has shown that sometimes the Once file is used and sometimes it isnt.

It appears as if there is some sort of race condition/event happening where Once is sometimes processed and sometimes it is not.

local/html/Callbacks/OurApp/Elements/RT__Ticket/ColumnMap/Once:

<%INIT>

sub StatusInColour {

  my $Ticket = shift;
  my $status = $Ticket->Status;
  my $badge = undef;

  $badge = "badge-light";
  if (not defined($status)) {
    $status = "Not Set";
    $badge = "dark-light";
  }

  if ($status eq 'new') {
    $badge = "badge-info";
  } elsif ($status eq 'open') {
    $badge = "badge-warning";
  } elsif ($status eq 'resolved') {
    $badge = "badge-success";
  } elsif ($status eq 'rejected') {
    $badge = "badge-dark";
  } elsif ($status eq 'stalled') {
    $badge = "badge-secondary";
  }


  if ($badge) {
    $status = "<span class=\"badge badge-pill $badge\" style=\"font-size: calc(100% + 1px);\">$status</span>";
  }

  return \"<b>$status</b>";

}

$COLUMN_MAP->{Status}->{value} = \&StatusInColour;
</%INIT>
<%ARGS>
$COLUMN_MAP => undef
</%ARGS>

Has anyone else experienced this?

The “<%Once%>” block in mason is only called once, and looking in the code I see:

=item CallbackOnce

By default is false, otherwise runs callbacks only once per
process of the server. Such callbacks can be used to fill
structures.

Which is also used for this callback, so it makes sense that sometimes you don’t see this code run. I’d expect every process to have the callback though

Indeed - on 5.0.1 all is well. I couldn’t see this in the changelog but did see that Status ColumnMap was updated. Maybe the Once has been fixed afterall.

The 5.0.1 release is a major upgrade and as such there are more changes than in a minor bugfix release and some of these changes are backward-incompatible. The following lists some of the notable changes, especially those that might require you to change a configuration option or other setting due to a change in RT. Read this section carefully before you upgrade and look for changes to features you currently use.
See devel/docs/UPGRADING-5.0.2 for internals changes relevant to extension writers.
RT now natively supports external authentication systems like LDAP and custom database setups. For new users wishing to use this functionality, see the RT::Authen::ExternalAuth::LDAP or RT::Authen::ExternalAuth::DBI documentation.
Users of the existing RT::Authen::ExternalAuth extension should remove RT::Authen::ExternalAuth from the plugins list. Please also remove local/plugins/RT-Authen-ExternalAuth from your RT installation.

Target MyBalanceNow

I value and respect your opinion.