Skip to content

Conversation

@k82cn
Copy link
Contributor

@k82cn k82cn commented Feb 12, 2026

Summary

This PR fixes the dependency caching mechanism for flamepy so that cached packages are available at runtime.

Changes

  • flmadm: Use uv pip install --target instead of non-existent uv pip download to populate the cache
  • flmadm: Set UV_CACHE_DIR to ${FLAME_HOME}/data/cache/uv during installation
  • common: Add UV_CACHE_DIR environment variable to the flmrun application configuration
  • executor_manager: Expand environment variables (like ${FLAME_HOME}) in application environment settings

Why this is needed

PR #355 introduced flamepy wheel building during installation, but the dependency caching used uv pip download which doesn't exist. Additionally, the cache was stored in the default location (~/.cache/uv) which may not be available at runtime in Docker containers.

This PR ensures:

  1. Dependencies are properly cached during flmadm install
  2. The cache is stored in a known location (${FLAME_HOME}/data/cache/uv)
  3. The flmrun application uses the same cache location at runtime
  4. Environment variables in application configs are properly expanded

- Use uv pip install --target instead of non-existent uv pip download
- Set UV_CACHE_DIR to ${FLAME_HOME}/data/cache/uv during installation
- Add UV_CACHE_DIR env var to flmrun application
- Expand env vars in executor_manager for environment settings

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @k82cn, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses critical issues with flamepy's dependency caching, ensuring that Python package dependencies are correctly cached during installation and made available to applications at runtime. It rectifies the use of an incorrect uv command for caching and standardizes the cache location, while also enabling proper expansion of environment variables within application configurations.

Highlights

  • Dependency Caching Mechanism: The dependency caching for flamepy has been fixed to ensure cached packages are available at runtime.
  • flmadm Installation: Changed flmadm to use uv pip install --target instead of the non-existent uv pip download command to populate the cache.
  • UV Cache Directory Configuration: The UV_CACHE_DIR environment variable is now explicitly set to ${FLAME_HOME}/data/cache/uv during installation and for the flmrun application.
  • Environment Variable Expansion: The executor_manager now expands environment variables (like ${FLAME_HOME}) within application environment settings.
Changelog
  • common/src/lib.rs
    • Introduced uv_cache_dir variable to define the UV cache path.
    • Configured the flmrun application to use UV_CACHE_DIR in its environment.
  • executor_manager/src/shims/host_shim.rs
    • Implemented expansion of environment variables within application environment settings using Self::expand_env_vars.
  • flmadm/src/managers/installation.rs
    • Replaced uv pip download with uv pip install --target for dependency caching.
    • Set the UV_CACHE_DIR environment variable for the uv pip install command to a specific path.
    • Created and cleaned up a temporary cache_target directory for the installation process.
    • Updated console output messages to reflect caching instead of downloading.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly fixes the dependency caching mechanism by using uv pip install --target to populate a dedicated cache directory and configuring the runtime to use it. The changes are logical and well-implemented. I've identified one minor improvement opportunity in error handling to make the installation process more robust by failing explicitly if a temporary directory cannot be created.

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@k82cn k82cn merged commit 0ba8a26 into xflops:main Feb 12, 2026
5 of 6 checks passed
@k82cn k82cn deleted the fix_uv_cache branch February 12, 2026 14:08
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.

1 participant