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

better way to differentiate development and production builds #17465

Open
Tracked by #17446
BugenZhao opened this issue Jun 26, 2024 · 1 comment
Open
Tracked by #17446

better way to differentiate development and production builds #17465

BugenZhao opened this issue Jun 26, 2024 · 1 comment
Labels
component/dev Dev related issues, such as rise dev, ci. no-issue-activity type/enhancement Improvements to existing implementation.

Comments

@BugenZhao
Copy link
Member

BugenZhao commented Jun 26, 2024

Sometimes, we may expect different behaviors in development and production builds for various reasons:

Currently the best way to differentiate them is through the compiling flag of debug_assertions, given that it's a common convention in Rust to differentiate dev and release profile. This works adequately, but it could be improved further.

  • when we are going to run tests on optimized builds, we should pay special attention to using ci-release (which enables debug_assertions intentionally) instead of release profile
  • end-to-end benchmarks, which directly operate on the release/nightly docker images for production usages, are not able to leverage those development-only features

It would be better if we can find a better way to do this.

Note that we are mainly focusing on the compile-time flag here over runtime flag (like args, configuration, or env vars), in order to build a stricter boundary.


You reminds me of this: https://github.com/tikv/tikv/blob/master/etc/cargo.config.dist "really prod/dist config" (e.g., fat LTO) vs "release/bench" config. I also wanted a "release without LTO" before, because LTO compiles for too long. 🤣

Originally posted by @xxchan in #17396 (comment)

@github-actions github-actions bot added this to the release-1.10 milestone Jun 26, 2024
@BugenZhao BugenZhao added type/enhancement Improvements to existing implementation. component/dev Dev related issues, such as rise dev, ci. labels Jun 26, 2024
@BugenZhao BugenZhao removed this from the release-1.10 milestone Jul 8, 2024
Copy link
Contributor

github-actions bot commented Sep 7, 2024

This issue has been open for 60 days with no activity.

If you think it is still relevant today, and needs to be done in the near future, you can comment to update the status, or just manually remove the no-issue-activity label.

You can also confidently close this issue as not planned to keep our backlog clean.
Don't worry if you think the issue is still valuable to continue in the future.
It's searchable and can be reopened when it's time. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/dev Dev related issues, such as rise dev, ci. no-issue-activity type/enhancement Improvements to existing implementation.
Projects
None yet
Development

No branches or pull requests

1 participant