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

Drop specs when building gem #9249

Merged
merged 1 commit into from
Feb 9, 2024
Merged

Conversation

joshcooper
Copy link
Contributor

@joshcooper joshcooper commented Feb 9, 2024

Previously our key and cert test fixtures were shipped in the gem, which
triggered security scanners. This deletes the spec directory from each
platform specific gem and reduces the size of each gem by about 1MB when
using the bundle exec rake package:gem task:

Before:

$ ls -la pkg/puppet-8.4.0.178.gem
-rw-rw-r-- 1 josh 1.5M Feb  9 11:21 pkg/puppet-8.4.0.178.gem

After:

$ ls -la pkg/puppet-8.4.0.177.gem
-rw-rw-r-- 1 josh 2.8M Feb  9 11:21 pkg/puppet-8.4.0.177.gem

For reasons described in PA-5400 we don't currently use gem build .gemspec
to build puppet gems.

No changes are needed to the .gemspec or Gemfile, because they both
include the content from project_data.yaml.

@joshcooper joshcooper requested a review from a team as a code owner February 9, 2024 19:20
Previously our key and cert test fixtures were shipped in the gem, which
triggered security scanners. This deletes the `spec` directory from each
platform specific gem and reduces the size of each gem by about 1MB when
using the `bundle exec rake package:gem` task:

Before:

```
$ ls -la pkg/puppet-8.4.0.178.gem
-rw-rw-r-- 1 josh 1.5M Feb  9 11:21 pkg/puppet-8.4.0.178.gem
```

After:

```
$ ls -la pkg/puppet-8.4.0.177.gem
-rw-rw-r-- 1 josh 2.8M Feb  9 11:21 pkg/puppet-8.4.0.177.gem
```

For reasons described in PA-5400 we don't currently use `gem build .gemspec`
to build puppet gems.

No changes are needed to the .gemspec or Gemfile, because they both
include the content from project_data.yaml.
@joshcooper
Copy link
Contributor Author

@bastelfreak

@mhashizume mhashizume added the maintenance Maintenance chores are excluded from changelogs label Feb 9, 2024
@mhashizume mhashizume merged commit 6a0c689 into puppetlabs:main Feb 9, 2024
9 checks passed
@mhashizume mhashizume added the backport 7.x Generate a backport PR to 7.x label Feb 9, 2024
Copy link

github-actions bot commented Feb 9, 2024

Backport failed for 7.x, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally.

git fetch origin 7.x
git worktree add -d .worktree/backport-9249-to-7.x origin/7.x
cd .worktree/backport-9249-to-7.x
git checkout -b backport-9249-to-7.x
ancref=$(git merge-base a3e77e78b4952f8685c66a51bc98e12690bef4c2 107a8e572450c1a178b309e0e38c0d30796a068d)
git cherry-pick -x $ancref..107a8e572450c1a178b309e0e38c0d30796a068d

@joshcooper joshcooper deleted the drop_specs branch February 9, 2024 21:11
@joshcooper
Copy link
Contributor Author

@mhashizume I had to manually cherry-pick due to a conflict #9250

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 7.x Generate a backport PR to 7.x maintenance Maintenance chores are excluded from changelogs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants