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

CI: JRuby v9.4.x.x issues #2298

Closed
fallwith opened this issue Oct 27, 2023 · 2 comments
Closed

CI: JRuby v9.4.x.x issues #2298

fallwith opened this issue Oct 27, 2023 · 2 comments

Comments

@fallwith
Copy link
Contributor

At least the latest 2 (v9.4.4.0 and v9.4.3.0) JRuby releases are seeing failures when running through our JRuby specific GitHub Actions CI tests.

We are currently operating under the understanding that these issues:

  • Only impact CI behavior, not real world agent usage
  • Only take place with GitHub Actions run, and are difficult to reproduce with JRuby on a local workstation

Hypothesis: the issues seem to be caused by the tests' use of a Ruby global, $collector, to serve as a fake collector object (one that can't really send collected data up to New Relic's servers). With JRuby, $collector.calls_for('subject') occasionally return 2 calls instead of 1. If we relax the "exactly 1 should be seen" assertion to "at least 1 should be seen" and operate on the first call seen, everything works.

We could put this method into a test helper and refactor all $collector.calls_for calls in every test:

# instead of
calls = $collector.calls_for(subject)
assert_equal(1, calls.size)

# use the helper
call = first_call_for(subject)

def first_call_for(subject)
  items = $collector.calls_for(subject)

  if defined?(JRUBY_VERSION)
    refute_predicate items.size, :zero?
  else
    assert_equal(1, items.size)
  end

  items.first
end

We could also troubleshoot why there is more than 1 call seen. But unfortunately the fact that this behavior is not reproducible locally and sporadic in where it appears in GitHub Actions, it's a tough one to narrow down.

@workato-integration
Copy link

@workato-integration workato-integration bot changed the title CI: JRuby v9.4.x.x issues CI: JRuby v9.4.x.x issues Oct 27, 2023
@kford-newrelic kford-newrelic added estimate Issue needing estimation jan-mar qtr Possible FY Q4 candidate labels Nov 20, 2023
@fallwith
Copy link
Contributor Author

resolved with #2282

@kford-newrelic kford-newrelic removed estimate Issue needing estimation jan-mar qtr Possible FY Q4 candidate labels Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants