Closed hawkingrei closed 2 years ago
Just curious, if these BAZEL files are automatically generated, can they be git-ignored? It's usually not a good practice to include generated files in the git repository.
In fact, Some bazel files are automatically generated. for example flaky test (It isn't recommended) and some other config have to be controlled by development such as visibility and test size that controls the test timeout. so it must be with the repo.
BTW, the open resource repos using the bazel like abseil-cpp, cockroach, tensorflow have many BAZEl.build files in their repo.
@hawkingrei Does this mean that we need to manually maintain these BAZEL.build files instead of using auto-generated ones, as the auto-generated ones may not be desired? I would like to know, for example, when I introduced a new package in the TiDB repository (or simply, added a new file), what steps should I take in order to make sure everything works? How these BAZEL files need to be generated? What kind of modification should I make? etc. If these steps are not property done, will my tests just being ignored in CI?
Maybe you also need to introduce a CI step to ensure that people doesn't forget to generate necessary BAZEL files? I'm not sure however.
Maybe you also need to introduce a CI step to ensure that people doesn't forget to generate necessary BAZEL files? I'm not sure however.
In fact, Generate bazel config is a task that takes some time in the CI. Althought it take less time than that tests without cache. so I will remove it in the future to speed ci again in the future.
However, Gezalle just can manage the dependency in the bazel config. it cannot manage the other thing. if we need to manage the config such as flasky test and so on. Gazalle just copy the old config to the new config. it is the main reason why we cannot remove bazel.build
.
Just curious, if these BAZEL files are automatically generated, can they be git-ignored? It's usually not a good practice to include generated files in the git repository.
In fact, Some bazel files are automatically generated. for example flaky test (It isn't recommended) and some other config have to be controlled by development such as visibility and test size that controls the test timeout. so it must be with the repo. BTW, the open resource repos using the bazel like abseil-cpp, cockroach, tensorflow have many BAZEl.build files in their repo.
@hawkingrei Does this mean that we need to manually maintain these BAZEL.build files instead of using auto-generated ones, as the auto-generated ones may not be desired? I would like to know, for example, when I introduced a new package in the TiDB repository (or simply, added a new file), what steps should I take in order to make sure everything works? How these BAZEL files need to be generated? What kind of modification should I make? etc. If these steps are not property done, will my tests just being ignored in CI?
For the common developers, It will be fine that they use gazelle to generate the config. For the repo admin, it needs to control the other thing by changing the config in the bazel. in these cases, we need to change the config and save it, so that gazelle can get this changement and keep them in the new config if the dependency has been updated.
/merge
This pull request has been accepted and is ready to merge.
@hawkingrei: Your PR was out of date, I have automatically updated it for you.
At the same time I will also trigger all tests for you:
/run-all-tests
If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.
What problem does this PR solve?
Issue Number: close #34083
Problem Summary:
What is changed and how it works?
Check List
Tests
Side effects
Documentation
Release note