Skip to content

Conversation

@Zerpet
Copy link
Member

@Zerpet Zerpet commented Mar 13, 2025

Proposed Changes

Remove Bazel files. We are no longer using Bazel to build or to test. Bazel was a great tool for our team,
it provided a much needed capability of caching and build optimisation. However, in recent times, we decided
to focus on Make and erlang.mk, thus this PR has taken place.

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

Further Comments

Closes #13494

@Zerpet
Copy link
Member Author

Zerpet commented Mar 13, 2025

This is what's left of Bazel in our code base after this change.

git grep bazel
# deps/rabbit/test/amqp_client_SUITE.erl:    %% rabbit/Makefile and rabbit/BUILD.bazel declare a test dependency on the rabbitmq_amqp1_0 plugin.
# deps/rabbit/test/feature_flags_SUITE.erl:                        %% bazel
# deps/rabbitmq_cli/mix.exs:    is_bazel = System.get_env("IS_BAZEL") != nil
# deps/rabbitmq_cli/mix.exs:        compile: if(is_bazel, do: fake_cmd, else: make_cmd)
# deps/rabbitmq_cli/mix.exs:        compile: if(is_bazel, do: fake_cmd, else: make_cmd),
# deps/rabbitmq_cli/mix.exs:              compile: if(is_bazel, do: fake_cmd, else: make_cmd),
# deps/rabbitmq_cli/mix.exs:              compile: if(is_bazel, do: fake_cmd, else: make_cmd),
# deps/rabbitmq_ct_helpers/src/rabbit_ct_broker_helpers.erl:      %% bazel coverage
# deps/rabbitmq_ct_helpers/src/rabbit_ct_helpers.erl:    % Some tests under bazel use this value, others do not.
# deps/rabbitmq_ct_helpers/src/rabbit_ct_helpers.erl:            %% skip if bazel
# release-notes/3.9.0.md:  [Bazel support for Erlang](https://github.com/rabbitmq/bazel-erlang) is a new project open sourced by the RabbitMQ Core team as a result.
# selenium/README.md:>> Equivalent bazel command: `bazelisk run packaging/docker-image:rabbitmq`
# selenium/README.md:Or if you prefer to use bazel run instead:
# selenium/README.md:bazelisk run packaging/docker-image:rabbitmq
# selenium/README.md:or like this if you built the docker image using bazel:
# selenium/README.md:RABBITMQ_DOCKER_IMAGE=bazel/packaging/docker-image:rabbitmq suites/authnz-mgt/oauth-with-uaa-with-mgt-prefix.sh
git grep bzl
# Makefile:              --exclude '*.bzl'                        \

I'm not sure how to make the changes to mix, or if it makes a functional difference. The same for CT helpers. I tried make build xref locally and it works.

@dumbbell
Copy link
Collaborator

Don’t worry about mix(1), we will stop using it shortly, thanks to #12922. And mid/long-term, we will get rid of Elixir entirely.

For rabbitmq_ct_helpers, that’s ok too, it works with GNU make. We can clean up the code later when we have an opportunity.

@lhoguin
Copy link
Contributor

lhoguin commented Mar 13, 2025

# Makefile:              --exclude '*.bzl'

At least this one can be safely removed (the line).

@lhoguin
Copy link
Contributor

lhoguin commented Mar 13, 2025

The --exclude 'moduleindex.yaml' is also Bazel.

@Zerpet Zerpet force-pushed the remove-bazel-files branch from 053c952 to 43f9991 Compare March 13, 2025 17:46
@Zerpet
Copy link
Member Author

Zerpet commented Mar 13, 2025

I removed the lines suggested by @lhoguin ✂️ The first commit run without any major incidents. I saw some errors in mixed clusters, but none of them looked related to Bazel removal. Example run: https://github.com/rabbitmq/rabbitmq-server/actions/runs/13836164154

@Zerpet Zerpet merged commit dcd5415 into main Mar 14, 2025
272 of 274 checks passed
@Zerpet Zerpet deleted the remove-bazel-files branch March 14, 2025 12:06
@mergify mergify bot mentioned this pull request Mar 14, 2025
12 tasks
Zerpet added a commit that referenced this pull request Mar 14, 2025
Zerpet added a commit that referenced this pull request Mar 17, 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.

Remove Bazel related files

4 participants