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

[Reverted] Adding a "source-bundle" target to the Makefile #13385

Merged
merged 2 commits into from
Feb 22, 2025

Conversation

kartg
Copy link
Contributor

@kartg kartg commented Feb 20, 2025

Proposed Changes

This change adds a source-bundle build target to the RabbitMQ Makefile. This target is identical to the existing source-dist target but it also allows for packaging and testing of the source archive.

Types of Changes

What types of changes does your code introduce to this project?
Put an x in the boxes that apply

  • Bug fix (non-breaking change which fixes issue #NNNN)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause an observable behavior change in existing systems)
  • Documentation improvements (corrections, new content, etc)
  • Cosmetic change (whitespace, formatting, etc)
  • Build system and/or CI

Checklist

Put an x in the boxes that apply.
You can also fill these out after creating the PR.
If you're unsure about any of them, don't hesitate to ask on the mailing list.
We're here to help!
This is simply a reminder of what we are going to look for before merging your code.

  • I have read the CONTRIBUTING.md document
  • I have signed the CA (see https://cla.pivotal.io/sign/rabbitmq)
  • I have added tests that prove my fix is effective or that my feature works
  • All tests pass locally with my changes
  • If relevant, I have added necessary documentation to https://github.com/rabbitmq/rabbitmq-website
  • If relevant, I have added this change to the first version(s) in release-notes that I expect to introduce it

This target is identical to the existing "source-dist" target, except that it allows for packaging and testing of the source archive. This is done by including the packaging/ and tests/ directories in the output tarball, along with specific subdirectories that are required by tests.

Signed-off-by: Kartik Ganesh <gkart@amazon.com>
@mergify mergify bot added the make label Feb 20, 2025
@kartg
Copy link
Contributor Author

kartg commented Feb 21, 2025

I have added tests that prove my fix is effective or that my feature works
All tests pass locally with my changes

I have not added any tests for the Makefile target but i've confirmed the following via local testing:

  • The output of source-dist remains unchanged (ignoring build info)
% diff <(sed 's#\+beta.*/##g' main.manifest) <(sed 's#\+beta.*/##g' source-dist.manifest)

1c1
< rabbitmq-server-4.1.0+beta.4.58.gcc0458a
---
> rabbitmq-server-4.1.0+beta.4.59.gaa9e0a5

% diff <(tar -tf main.tar.xz | sed 's#\+beta.*/##g') <(tar -tf source-dist.tar.xz | sed 's#\+beta.*/##g')
%
  • The only difference between source-dist and build-dist is with the inclusion of the packaging and test directories, and the additional --include files
% comm -13 source-dist.manifest build-dist.manifest | wc -l
    1363

% comm -13 source-dist.manifest build-dist.manifest | grep -c "test"
1327

% comm -13 source-dist.manifest build-dist.manifest | grep -c "packaging"
16

% comm -13 source-dist.manifest build-dist.manifest | grep -v "test" | grep -v "packaging"
rabbitmq-server-4.1.0+beta.4.59.gaa9e0a5/deps/rabbitmq_ct_helpers/tools
rabbitmq-server-4.1.0+beta.4.59.gaa9e0a5/deps/rabbitmq_ct_helpers/tools/terraform
rabbitmq-server-4.1.0+beta.4.59.gaa9e0a5/deps/rabbitmq_ct_helpers/tools/terraform/autoscaling-group
rabbitmq-server-4.1.0+beta.4.59.gaa9e0a5/deps/rabbitmq_ct_helpers/tools/terraform/autoscaling-group/main.tf
rabbitmq-server-4.1.0+beta.4.59.gaa9e0a5/deps/rabbitmq_ct_helpers/tools/terraform/autoscaling-group/outputs.tf
rabbitmq-server-4.1.0+beta.4.59.gaa9e0a5/deps/rabbitmq_ct_helpers/tools/terraform/autoscaling-group/setup-vms.sh
rabbitmq-server-4.1.0+beta.4.59.gaa9e0a5/deps/rabbitmq_ct_helpers/tools/terraform/autoscaling-group/variables.tf
rabbitmq-server-4.1.0+beta.4.59.gaa9e0a5/deps/rabbitmq_ct_helpers/tools/terraform/direct-vms
rabbitmq-server-4.1.0+beta.4.59.gaa9e0a5/deps/rabbitmq_ct_helpers/tools/terraform/direct-vms/main.tf
rabbitmq-server-4.1.0+beta.4.59.gaa9e0a5/deps/rabbitmq_ct_helpers/tools/terraform/direct-vms/outputs.tf
rabbitmq-server-4.1.0+beta.4.59.gaa9e0a5/deps/rabbitmq_ct_helpers/tools/terraform/direct-vms/setup-vms.sh
rabbitmq-server-4.1.0+beta.4.59.gaa9e0a5/deps/rabbitmq_ct_helpers/tools/terraform/direct-vms/templates
rabbitmq-server-4.1.0+beta.4.59.gaa9e0a5/deps/rabbitmq_ct_helpers/tools/terraform/direct-vms/templates/setup-erlang.sh
rabbitmq-server-4.1.0+beta.4.59.gaa9e0a5/deps/rabbitmq_ct_helpers/tools/terraform/direct-vms/variables.tf
rabbitmq-server-4.1.0+beta.4.59.gaa9e0a5/deps/rabbitmq_ct_helpers/tools/terraform/vms-query
rabbitmq-server-4.1.0+beta.4.59.gaa9e0a5/deps/rabbitmq_ct_helpers/tools/terraform/vms-query/main.tf
rabbitmq-server-4.1.0+beta.4.59.gaa9e0a5/deps/rabbitmq_ct_helpers/tools/terraform/vms-query/outputs.tf
rabbitmq-server-4.1.0+beta.4.59.gaa9e0a5/deps/rabbitmq_ct_helpers/tools/terraform/vms-query/query-vms.sh
rabbitmq-server-4.1.0+beta.4.59.gaa9e0a5/deps/rabbitmq_ct_helpers/tools/terraform/vms-query/variables.tf
rabbitmq-server-4.1.0+beta.4.59.gaa9e0a5/deps/rabbitmq_ct_helpers/tools/tls-certs
rabbitmq-server-4.1.0+beta.4.59.gaa9e0a5/deps/rabbitmq_ct_helpers/tools/tls-certs/Makefile
rabbitmq-server-4.1.0+beta.4.59.gaa9e0a5/deps/rabbitmq_ct_helpers/tools/tls-certs/openssl.cnf.in

% comm -13 <(tar -tf source-dist.tar.xz) <(tar -tf build-dist.tar.xz) | wc -l
    1363
% comm -13 <(tar -tf source-dist.tar.xz) <(tar -tf build-dist.tar.xz) | grep -c "test"
1327
% comm -13 <(tar -tf source-dist.tar.xz) <(tar -tf build-dist.tar.xz) | grep -c "packaging"
16
% comm -13 <(tar -tf source-dist.tar.xz) <(tar -tf build-dist.tar.xz) | grep -c "tools"
22

@michaelklishin
Copy link
Member

michaelklishin commented Feb 21, 2025

@kartg thank you, we will discuss this with the team. We don't have any tests for the Make targets, usually any serious issue would break packaging/alpha builds.

I'm afraid the word "build" may be misleading here. It suggests that it might have something to do with producing binary builds, a task handled by rabbitmq/rabbitmq-packaging and server-packages (or their alternatives).

@kartg
Copy link
Contributor Author

kartg commented Feb 21, 2025

I'm afraid the word "build" may be misleading here. It suggests that it might have something to do with producing binary builds, a task handled by rabbitmq/rabbitmq-packaging (or its alternative).

@michaelklishin Fair point 😄 Any suggestions on a more accurate term? Maybe "bundle" or "snapshot" ?

@michaelklishin
Copy link
Member

@kartg if the focus of these targets is on validation, how about "validated source bundle" or just "source bundle"?

@kartg
Copy link
Contributor Author

kartg commented Feb 21, 2025

source-bundle sounds good to me 👍 I'll make those updates.

This incorporates PR feedback from @michaelklishin

Signed-off-by: Kartik Ganesh <gkart@amazon.com>
@kartg kartg changed the title Adding a "build-dist" target to the Makefile Adding a "source-bundle" target to the Makefile Feb 21, 2025
@michaelklishin michaelklishin merged commit ea4bdac into rabbitmq:main Feb 22, 2025
264 checks passed
michaelklishin added a commit that referenced this pull request Feb 22, 2025
Adding a "source-bundle" target to the Makefile (backport #13385)
michaelklishin added a commit that referenced this pull request Feb 22, 2025
Adding a "source-bundle" target to the Makefile (backport #13385) (backport #13395)
@kartg
Copy link
Contributor Author

kartg commented Feb 22, 2025

thank you! 😀

@michaelklishin
Copy link
Member

@kartg since this is a non-functional change, I'll backport it to v3.13.x.

michaelklishin added a commit that referenced this pull request Feb 22, 2025
Adding a "source-bundle" target to the Makefile

(cherry picked from commit ea4bdac)

Conflicts:
	Makefile
@michaelklishin
Copy link
Member

since this is a non-functional change, I'll backport it to v3.13.x.

Done.

@michaelklishin michaelklishin added this to the 4.1.0 milestone Feb 22, 2025
michaelklishin added a commit that referenced this pull request Feb 22, 2025
…x/pr-13395

Revert "Adding a "source-bundle" target to the Makefile (backport #13385) (backport #13395)"
@michaelklishin
Copy link
Member

@kartg this breaks

gmake package-generic-unix

in this repo, so I will revert. I cannot immediately tell why but it can be reproduced in multiple different environments.

https://github.com/rabbitmq/server-packages/actions/runs/13468260488/job/37638171804 is currently waiting for a runner but it should fail there.

michaelklishin added a commit that referenced this pull request Feb 22, 2025
@michaelklishin
Copy link
Member

michaelklishin commented Feb 22, 2025

@kartg to reproduce the failure locally

gmake source-dist RABBITMQ_VERSION=4.1.0-tanzu.392f660ed PRODUCT_VERSION=4.1.0-tanzu.392f660ed PROJECT_VERSION=4.1.0-tanzu.392f660ed
ls -l ./PACKAGES/
gmake package-generic-unix TARBALL_SUFFIX=generic-unix SOURCE_DIST_FILE=./PACKAGES/rabbitmq-server-4.1.0-tanzu.392f660ed.tar.xz PROJECT_VERSION=4.1.0-beta.392f660ed

michaelklishin added a commit that referenced this pull request Feb 22, 2025
…x/pr-13385

Revert "Adding a "source-bundle" target to the Makefile (backport #13385)"
@michaelklishin michaelklishin changed the title Adding a "source-bundle" target to the Makefile [Reverted] Adding a "source-bundle" target to the Makefile Feb 22, 2025
michaelklishin added a commit that referenced this pull request Feb 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants