Prune unneeded gitlab-glfm-markdown precompiled libraries
What does this MR do?
gitlab-glfm-markdown ships with precompiled shared libraries for all supported Ruby versions. Just as we do with nokogiri and other gems, keep only the version needed for the current Ruby version. This saves about 28 MB of disk space.
Test plan
- Deploy package, ensure GitLab still comes up.
- In
gitlab-rails console
, run:
irb(main):001:0> GLFMMarkdown.to_html('# header', options: {sourcepos: true})
=> "<h1 data-sourcepos=\"1:1-1:8\">header</h1>\n"```
Before
$ du -h /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/gitlab-glfm-markdown-0.0.12-x86_64-linux
16K /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/gitlab-glfm-markdown-0.0.12-x86_64-linux/ext/glfm_markdown/src
28K /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/gitlab-glfm-markdown-0.0.12-x86_64-linux/ext/glfm_markdown
32K /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/gitlab-glfm-markdown-0.0.12-x86_64-linux/ext
7.1M /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/gitlab-glfm-markdown-0.0.12-x86_64-linux/lib/glfm_markdown/3.1
7.1M /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/gitlab-glfm-markdown-0.0.12-x86_64-linux/lib/glfm_markdown/3.2
7.1M /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/gitlab-glfm-markdown-0.0.12-x86_64-linux/lib/glfm_markdown/2.7
7.1M /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/gitlab-glfm-markdown-0.0.12-x86_64-linux/lib/glfm_markdown/3.0
7.1M /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/gitlab-glfm-markdown-0.0.12-x86_64-linux/lib/glfm_markdown/3.3
36M /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/gitlab-glfm-markdown-0.0.12-x86_64-linux/lib/glfm_markdown
36M /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/gitlab-glfm-markdown-0.0.12-x86_64-linux/lib
36M /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/gitlab-glfm-markdown-0.0.12-x86_64-linux
After
# du -h /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/gitlab-glfm-markdown-0.0.12-x86_64-linux
16K /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/gitlab-glfm-markdown-0.0.12-x86_64-linux/ext/glfm_markdown/src
28K /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/gitlab-glfm-markdown-0.0.12-x86_64-linux/ext/glfm_markdown
32K /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/gitlab-glfm-markdown-0.0.12-x86_64-linux/ext
7.1M /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/gitlab-glfm-markdown-0.0.12-x86_64-linux/lib/glfm_markdown/3.1
4.0K /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/gitlab-glfm-markdown-0.0.12-x86_64-linux/lib/glfm_markdown/3.2
4.0K /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/gitlab-glfm-markdown-0.0.12-x86_64-linux/lib/glfm_markdown/2.7
4.0K /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/gitlab-glfm-markdown-0.0.12-x86_64-linux/lib/glfm_markdown/3.0
4.0K /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/gitlab-glfm-markdown-0.0.12-x86_64-linux/lib/glfm_markdown/3.3
7.2M /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/gitlab-glfm-markdown-0.0.12-x86_64-linux/lib/glfm_markdown
7.2M /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/gitlab-glfm-markdown-0.0.12-x86_64-linux/lib
7.2M /opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/gitlab-glfm-markdown-0.0.12-x86_64-linux
Checklist
See Definition of done.
For anything in this list which will not be completed, please provide a reason in the MR discussion.
Required
-
MR title and description are up to date, accurate, and descriptive. -
MR targeting the appropriate branch. -
Latest Merge Result pipeline is green. -
When ready for review, MR is labeled "~workflow::ready for review" per the Distribution MR workflow.
For GitLab team members
If you don't have access to this, the reviewer should trigger these jobs for you during the review process.
-
The manual Trigger:ee-package
jobs have a green pipeline running against latest commit. -
If config/software
orconfig/patches
directories are changed, make sure thebuild-package-on-all-os
job within theTrigger:ee-package
downstream pipeline succeeded. -
If you are changing anything SSL related, then the Trigger:package:fips
manual job within theTrigger:ee-package
downstream pipeline must succeed. -
If CI configuration is changed, the branch must be pushed to dev.gitlab.org
to confirm regular branch builds aren't broken.
Expected (please provide an explanation if not completing)
-
Test plan indicating conditions for success has been posted and passes. -
Documentation created/updated. -
Tests added. -
Integration tests added to GitLab QA. -
Equivalent MR/issue for the GitLab Chart opened: gitlab-org/build/CNG!1720 (merged) -
Validate potential values for new configuration settings. Formats such as integer 10
, duration10s
, URIscheme://user:passwd@host:port
may require quotation or other special handling when rendered in a template and written to a configuration file.
Edited by Clemens Beck