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

Refactor ci task in Rakefile for better readibility #1772

Merged
merged 2 commits into from
Nov 18, 2021

Conversation

ivoanjo
Copy link
Member

@ivoanjo ivoanjo commented Nov 17, 2021

I've been thinking about this for a long time, and today I had a bit of time between meetings to do it.

This PR squashes the per-Ruby appraisal declarations and replaces them with a single string of Rubies to be enabled/disabled, thus massively simplifying the Rakefile.

The actual list of tasks was generated using code: I copy pasted the previous declaration, and implemented a few alternative methods that kept track of what was enabled per-Ruby. In a second pass, I manually reordered a few items, restored the previous comments, and marked the items that are not usable on JRuby.

Thus, I'm quite confident that the output is equivalent to what we had before.

(Note: We previously had huge blocks of "if RUBY_PLATFORM != 'java'" for Ruby 2.6, 2.7, and 3.0 but those were actually no-ops BECAUSE we still only test with JRuby 9.2, which is 2.5. I've replaced them with the settings we have for JRuby 9.2; we can revisit once we have 9.3 going)

I dedicate this to @marcotc ;)

@ivoanjo ivoanjo requested a review from a team November 17, 2021 11:03
Copy link
Member

@marcotc marcotc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hate it, but it looks so much more maintainable than before.

I've been thinking about this for a long time, and today I had a bit of
time between meetings to do it.

This PR squashes the per-Ruby appraisal declarations and replaces them
with a single string of Rubies to be enabled/disabled, thus massively
simplifying the Rakefile.

The actual list of tasks was generated using code: I copy pasted
the previous declaration, and implemented a few alternative methods
that kept track of what was enabled per-Ruby. In a second pass,
I manually reordered a few items, restored the previous comments, and
marked the items that are not usable on JRuby.

Thus, I'm quite confident that the output is equivalent to what
we had before.
@ivoanjo ivoanjo force-pushed the ivoanjo/simplify-rakefile-ci branch from bfac0d3 to 090c36e Compare November 18, 2021 09:37
@codecov-commenter
Copy link

Codecov Report

Merging #1772 (090c36e) into master (2f413f0) will decrease coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1772      +/-   ##
==========================================
- Coverage   98.22%   98.21%   -0.01%     
==========================================
  Files         931      931              
  Lines       44912    44910       -2     
==========================================
- Hits        44113    44109       -4     
- Misses        799      801       +2     
Impacted Files Coverage Δ
lib/ddtrace/diagnostics/environment_logger.rb 98.05% <0.00%> (-1.95%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2f413f0...090c36e. Read the comment docs.

@ivoanjo ivoanjo merged commit 76000ae into master Nov 18, 2021
@ivoanjo ivoanjo deleted the ivoanjo/simplify-rakefile-ci branch November 18, 2021 09:56
@github-actions github-actions bot added this to the 0.55.0 milestone Nov 18, 2021
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.

3 participants