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: gemspec files test - bypass cache #2130

Merged
merged 5 commits into from
Jul 11, 2023
Merged

CI: gemspec files test - bypass cache #2130

merged 5 commits into from
Jul 11, 2023

Conversation

fallwith
Copy link
Contributor

@fallwith fallwith commented Jul 11, 2023

Fixes to get the .gemspec test to work with our automated CI system:

  • effectively fork Gem::Specification.load to bypass its internal caching mechanism
    • In so doing, the CI logs now report the actual underlying issue that caused a .gemspec eval to fail
  • Assert that the parse succeeded before working with the result
  • Update newrelic_rpm.gemspec to use an absolute path to the .build_ignore file
  • chdir to the agent root for the evaluation of the .gemspec file

effectively fork `Gem::Specification.load` to bypass its internal
caching mechanism, and catch parse failures with an assertion.
When parsing `newrelic_rpm.gemspec` from a directory other than the
project root, make sure that the `.build_ignore` file can be found by
leveraging its absolute path
We were previously skipping the `rails<version>` env tests, but not the
`norails` ones. Skip those too.
@fallwith fallwith marked this pull request as ready for review July 11, 2023 19:51
@fallwith
Copy link
Contributor Author

resolves #2117

@fallwith fallwith changed the title CI: gemspec files test - bypass cache CI: gemspec files test - bypass cache and 'norails' env Jul 11, 2023
@github-actions
Copy link
Contributor

SimpleCov Report

Coverage Threshold
Line 94.26% 94%
Branch 85.75% 85%

@fallwith fallwith changed the title CI: gemspec files test - bypass cache and 'norails' env CI: gemspec files test - bypass cache Jul 11, 2023
The automated CI tests only run the 'env' suites, so we can't skip
`norails`. Instead, just chdir to the root of the agent dir, which is
where any production targetting `gem build` process will take place.
@kaylareopelle kaylareopelle self-requested a review July 11, 2023 20:19
Skip older Rubygems based contexts
@fallwith fallwith merged commit 91265ef into 2117_gemspec_test Jul 11, 2023
@fallwith fallwith deleted the composure branch July 11, 2023 22:59
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

Successfully merging this pull request may close these issues.

2 participants