Skip to content

Fix cache key for native modules build#2733

Merged
Dreamsorcerer merged 1 commit into
mainfrom
sam/fix-native-modules-cache
Jul 6, 2026
Merged

Fix cache key for native modules build#2733
Dreamsorcerer merged 1 commit into
mainfrom
sam/fix-native-modules-cache

Conversation

@Dreamsorcerer

Copy link
Copy Markdown
Collaborator

Made a mistake here, so the key that was being saved in the cache was being computed on the built files and not matching the original key we are checking against.

This should ensure that cmu-nav-natives is correctly built in future and unrelated PRs stop deploying to Cachix.

@greptile-apps

greptile-apps Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR reuses the native-module cache key across the marker and build jobs. The main changes are:

  • Adds a key output to the marker job.
  • Computes the native-module cache key before the build runs.
  • Reuses that computed key for cache restore and cache save.

Confidence Score: 4/5

The cache save path can behave incorrectly when the marker job fails before producing outputs.

  • The normal cache-hit path uses the same computed key for restore and save.
  • A failed marker job leaves the downstream save step with an empty key.
  • That can prevent the marker cache from being saved and keep native modules rebuilding.

.github/workflows/ci.yml

Important Files Changed

Filename Overview
.github/workflows/ci.yml Computes and shares the native-module marker cache key, with a failure-path issue when marker outputs are missing.

Reviews (1): Last reviewed commit: "Fix cache key for native modules build" | Re-trigger Greptile

Comment thread .github/workflows/ci.yml
@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
2649 1 2648 72
View the full list of 1 ❄️ flaky test(s)
dimos.e2e_tests.test_dimsim_spatial_memory::test_go_to_the_bed

Flake rate in main: 20.39% (Passed 82 times, Failed 21 times)

Stack Traces | 558s run time
lcm_spy = <dimos.e2e_tests.lcm_spy.LcmSpy object at 0x7dd712d53ce0>
start_blueprint = <function start_blueprint.<locals>.set_name_and_start at 0x7dd7103b4f40>
human_input = <function human_input.<locals>.send_human_input at 0x7dd7103b4fe0>
dim_sim = <dimos.e2e_tests.dim_sim_client.DimSimClient object at 0x7dd711f33b00>
explore_house = <function explore_house.<locals>.explore at 0x7dd7103b54e0>

    @pytest.mark.self_hosted_large
    def test_go_to_the_bed(lcm_spy, start_blueprint, human_input, dim_sim, explore_house) -> None:
        start_blueprint(
            "run",
            "unitree-go2-agentic",
            simulator="dimsim",
        )
        lcm_spy.save_topic(".../McpClient/on_system_modules/res")
        lcm_spy.wait_for_saved_topic(".../McpClient/on_system_modules/res", timeout=1200.0)
    
        explore_house()
    
        human_input("go to the bed")
    
>       lcm_spy.wait_until_odom_position(-3.567, -1.332, threshold=2, timeout=180)

dim_sim    = <dimos.e2e_tests.dim_sim_client.DimSimClient object at 0x7dd711f33b00>
explore_house = <function explore_house.<locals>.explore at 0x7dd7103b54e0>
human_input = <function human_input.<locals>.send_human_input at 0x7dd7103b4fe0>
lcm_spy    = <dimos.e2e_tests.lcm_spy.LcmSpy object at 0x7dd712d53ce0>
start_blueprint = <function start_blueprint.<locals>.set_name_and_start at 0x7dd7103b4f40>

dimos/e2e_tests/test_dimsim_spatial_memory.py:32: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
dimos/e2e_tests/lcm_spy.py:167: in wait_until_odom_position
    self.wait_for_message_result(
        predicate  = <function LcmSpy.wait_until_odom_position.<locals>.predicate at 0x7dd7103b56c0>
        self       = <dimos.e2e_tests.lcm_spy.LcmSpy object at 0x7dd712d53ce0>
        threshold  = 2
        timeout    = 180
        x          = -3.567
        y          = -1.332
dimos/e2e_tests/lcm_spy.py:153: in wait_for_message_result
    wait_until(
        event      = <threading.Event at 0x7dd711f38860: unset>
        fail_message = 'Failed to get to position x=-3.567, y=-1.332'
        listener   = <function LcmSpy.wait_for_message_result.<locals>.listener at 0x7dd7103b5580>
        predicate  = <function LcmSpy.wait_until_odom_position.<locals>.predicate at 0x7dd7103b56c0>
        self       = <dimos.e2e_tests.lcm_spy.LcmSpy object at 0x7dd712d53ce0>
        timeout    = 180
        topic      = '/odom#geometry_msgs.PoseStamped'
        type       = <class 'dimos.msgs.geometry_msgs.PoseStamped.PoseStamped'>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

predicate = <bound method Event.is_set of <threading.Event at 0x7dd711f38860: unset>>

    def wait_until(
        predicate: Callable[[], bool],
        *,
        timeout: float,
        interval: float = 0.1,
        message: str | None = None,
    ) -> None:
        """Poll ``predicate`` until it returns truthy or ``timeout`` elapses."""
        deadline = time.monotonic() + timeout
        while time.monotonic() < deadline:
            if predicate():
                return
            time.sleep(interval)
>       raise TimeoutError(message or f"Timed out after {timeout}s waiting for condition")
E       TimeoutError: Failed to get to position x=-3.567, y=-1.332

deadline   = 3452240.512773583
interval   = 0.1
message    = 'Failed to get to position x=-3.567, y=-1.332'
predicate  = <bound method Event.is_set of <threading.Event at 0x7dd711f38860: unset>>
timeout    = 180

.../utils/testing/waiting.py:35: TimeoutError

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@github-actions github-actions Bot added the ready-to-merge Required CI checks have passed on this PR label Jul 6, 2026
@Dreamsorcerer Dreamsorcerer merged commit 38f4078 into main Jul 6, 2026
30 of 32 checks passed
@Dreamsorcerer Dreamsorcerer deleted the sam/fix-native-modules-cache branch July 6, 2026 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Required CI checks have passed on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants