Skip to content

Comments

Bug 2009482: Remove logcat filter in eval-jexl to support NimbusTooling tag#7173

Merged
yashikakhurana merged 5 commits intomainfrom
cli_eval_jexl_logcat_fix
Jan 21, 2026
Merged

Bug 2009482: Remove logcat filter in eval-jexl to support NimbusTooling tag#7173
yashikakhurana merged 5 commits intomainfrom
cli_eval_jexl_logcat_fix

Conversation

@yashikakhurana
Copy link
Contributor

The eval-jexl feature logs results with the NimbusTooling tag, but the CLI was filtering for NimbusCLI tag which prevented it from finding results.

This commit removes the logcat filter entirely to ensure the CLI can find JEXL results regardless of the log tag used. This makes the CLI backward compatible with both old builds (using NimbusTooling) and new builds (using NimbusCLI).

Pull Request checklist

  • Breaking changes: This PR follows our breaking change policy
    • This PR follows the breaking change policy:
      • This PR has no breaking API changes, or
      • There are corresponding PRs for our consumer applications that resolve the breaking changes and have been approved
  • Quality: This PR builds and tests run cleanly
    • Note:
      • For changes that need extra cross-platform testing, consider adding [ci full] to the PR title.
      • If this pull request includes a breaking change, consider cutting a new release after merging.
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Changelog: This PR includes a changelog entry in CHANGELOG.md or an explanation of why it does not need one
    • Any breaking changes to Swift or Kotlin binding APIs are noted explicitly
  • Dependencies: This PR follows our dependency management guidelines
    • Any new dependencies are accompanied by a summary of the due diligence applied in selecting them.

This commit fixes two issues with the eval-jexl CLI:

1. Removed logcat filter (-s flag) to support both old builds that use
   'NimbusTooling' log tag and new builds that use 'NimbusCLI' tag.

2. Clear logcat before sending the eval-jexl intent to prevent reading
   old/stale results from previous runs.

3. Increased retry timing from 2 seconds to 3 seconds and max retries
   from 2 to 3 attempts to give the app enough time to start and log
   the result (total wait time: up to 9 seconds).

These changes make the CLI backward compatible and more reliable when
evaluating JEXL expressions on Android devices.
@yashikakhurana
Copy link
Contributor Author

Screenshot 2026-01-20 at 4 35 54 PM

@yashikakhurana yashikakhurana marked this pull request as ready for review January 21, 2026 00:44
Copy link
Member

@freshstrangemusic freshstrangemusic left a comment

Choose a reason for hiding this comment

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

r+wc

prompt(&mut stdout, "# Waiting for result...")?;

let max_retries = 2;
let max_retries = 3;
Copy link
Member

Choose a reason for hiding this comment

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

this should be a const MAX_RETRIES: u32 = 3; since its actually a constant.


// Clear logcat before starting to ensure we only read fresh logs
if matches!(self, Self::Android { .. }) {
let _ = self.exe()?.args(["logcat", "-c"]).output();
Copy link
Member

Choose a reason for hiding this comment

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

If this returns an Error we should still propagate it.

Suggested change
let _ = self.exe()?.args(["logcat", "-c"]).output();
self.exe()?.args(["logcat", "-c"]).output()?;

@yashikakhurana yashikakhurana added this pull request to the merge queue Jan 21, 2026
Merged via the queue into main with commit f2220ec Jan 21, 2026
13 checks passed
@yashikakhurana yashikakhurana deleted the cli_eval_jexl_logcat_fix branch January 21, 2026 20:20
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