Skip to content

Conversation

@rescrv
Copy link
Contributor

@rescrv rescrv commented Dec 3, 2025

Description of changes

ASAN is definitely not enabled, so try again.

Test plan

Staging

Migration plan

N/A

Observability plan

N/A

Documentation Changes

N/A

It is definitely not enabled, so try again.
@github-actions
Copy link

github-actions bot commented Dec 3, 2025

Reviewer Checklist

Please leverage this checklist to ensure your code review is thorough before approving

Testing, Bugs, Errors, Logs, Documentation

  • Can you think of any use case in which the code does not behave as intended? Have they been tested?
  • Can you think of any inputs or external events that could break the code? Is user input validated and safe? Have they been tested?
  • If appropriate, are there adequate property based tests?
  • If appropriate, are there adequate unit tests?
  • Should any logging, debugging, tracing information be added or removed?
  • Are error messages user-friendly?
  • Have all documentation changes needed been made?
  • Have all non-obvious changes been commented?

System Compatibility

  • Are there any potential impacts on other parts of the system or backward compatibility?
  • Does this change intersect with any items on our roadmap, and if so, is there a plan for fitting them together?

Quality

  • Is this code of a unexpectedly high quality (Readability, Modularity, Intuitiveness)

@propel-code-bot
Copy link
Contributor

propel-code-bot bot commented Dec 3, 2025

Enable ASAN build path adjustments in rust/Dockerfile

Updates to rust/Dockerfile make the AddressSanitizer build path functional by switching RUSTFLAGS to ${ADDRESS_SANITIZER:+'-Z sanitizer=address'} and computing a conditional build_target so cargo uses --target x86_64-unknown-linux-gnu whenever ASAN is requested.

The binary packaging step now derives the correct target subdirectory for sanitizer builds and replaces the repeated mv commands with a loop that moves each service binary from the computed build directory.

Key Changes

• Set RUSTFLAGS via ${ADDRESS_SANITIZER:+'-Z sanitizer=address'} to ensure the sanitizer flag is applied only when requested
• Introduced build_target and sanitization-aware build_dir variables so cargo build emits artifacts in the correct target triple directory under ASAN
• Collapsed individual mv statements into a for loop that copies all service binaries from target/${build_dir}

Affected Areas

• rust/Dockerfile
• Rust build pipeline
• ASAN-enabled Docker builds

This summary was automatically generated by @propel-code-bot

if [ "$RELEASE_MODE" = "1" ]; then mv target/release/compaction_service ./compaction_service; else mv target/debug/compaction_service ./compaction_service; fi

build_target=$( [ "${ADDRESS_SANITIZER}" = "1" ] && echo '--target x86_64-unknown-linux-gnu' || echo '' ) && \
if [ "$RELEASE_MODE" = "1" ]; then cargo build ${build_target} --workspace $(printf -- '--exclude %s ' $EXCLUDED_PACKAGES) --release; else cargo build ${build_target} --workspace $(printf -- '--exclude %s ' $EXCLUDED_PACKAGES); fi && \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommended

[Maintainability] To avoid repeating the long cargo build command, you can use command substitution to conditionally add the --release flag. This makes the line more concise and easier to maintain.

Context for Agents
To avoid repeating the long `cargo build` command, you can use command substitution to conditionally add the `--release` flag. This makes the line more concise and easier to maintain.

File: rust/Dockerfile
Line: 59

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

later

@rescrv rescrv merged commit e567401 into main Dec 3, 2025
121 of 123 checks passed
@rescrv rescrv deleted the rescrv/dockerfile branch December 3, 2025 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants