Skip to content

chore: add url to application.#287

Merged
k82cn merged 3 commits into
xflops:mainfrom
k82cn:app_url
Jan 12, 2026
Merged

chore: add url to application.#287
k82cn merged 3 commits into
xflops:mainfrom
k82cn:app_url

Conversation

@k82cn

@k82cn k82cn commented Jan 12, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Signed-off-by: Klaus Ma <klausm@nvidia.com>
@gemini-code-assist

Copy link
Copy Markdown
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 significantly extends the application definition by adding an optional URL field, providing a standardized way to link external resources to applications. The change is implemented end-to-end, from data models and RPC contracts to client SDKs and the underlying storage layer, ensuring seamless integration and persistence. Robust testing has been included to verify the new functionality and maintain backward compatibility.

Highlights

  • New 'url' field for Applications: An optional 'url' field has been introduced to the Application entity, allowing for external links or references to be associated with applications.
  • Data Model and RPC Updates: Core Rust data structures (Application, ApplicationAttributes, ApplicationContext) and Protobuf definitions (shim.proto, types.proto) have been updated to include the new 'url' field, ensuring its propagation across the system's internal and RPC interfaces.
  • SDK Integration (Python and Rust): Both the Python and Rust SDKs have been updated to support the new 'url' field, including client-side retrieval and service-side processing, enabling developers to interact with this new attribute.
  • Database Persistence and Migration: A new SQLite migration has been added to introduce a 'url' column to the 'applications' table, ensuring that the new field is properly stored and retrieved in the database.
  • Comprehensive Testing: New end-to-end and unit tests have been implemented to validate the functionality, persistence, and backward compatibility of the 'url' field across application registration, retrieval, and update operations.
  • Development Environment Enhancements: A '.cursorignore' file has been added to streamline development by ignoring common build artifacts, database files, and IDE-specific directories.
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.

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

Copy link
Copy Markdown
Contributor

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 introduces a url field to the Application entity, propagating this change across the database schema, protobuf definitions, APIs, and SDKs for both Rust and Python. The implementation is largely solid, with new tests added to validate the functionality and ensure backward compatibility. My review identifies several opportunities in the Rust code to enhance performance by eliminating unnecessary data cloning in From/TryFrom implementations.

Comment thread common/src/apis.rs
.into_iter()
.map(|e| (e.name, e.value))
.collect(),
url: spec.url.clone(),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Since spec is an owned rpc::ApplicationSpec (moved from the owned app parameter), you can move the url field instead of cloning it. This avoids an unnecessary allocation and is more idiomatic and efficient.

This principle also applies to other fields being cloned within this Ok block. Consider refactoring to move fields from spec where possible.

Suggested change
url: spec.url.clone(),
url: spec.url,

Comment thread common/src/apis.rs
shim: ctx.shim.into(),
command: ctx.command.clone(),
working_directory: ctx.working_directory.clone(),
url: ctx.url.clone(),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The ctx parameter is an owned ApplicationContext, so its fields can be moved instead of cloned. This improves efficiency by avoiding unnecessary allocations.

This applies to other fields in this from implementation as well, such as name, image, command, and working_directory. Consider refactoring the entire implementation to move fields from ctx.

Suggested change
url: ctx.url.clone(),
url: ctx.url,

Comment thread common/src/apis.rs
.map(Duration::seconds)
.unwrap_or(DEFAULT_DELAY_RELEASE),
schema: spec.schema.map(ApplicationSchema::from),
url: spec.url.clone(),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Since spec is an owned rpc::ApplicationSpec, you can move the url field instead of cloning it to avoid an unnecessary allocation. This is more efficient.

This advice applies to other fields in this from implementation as well, such as image, description, labels, command, arguments, and working_directory. Consider refactoring the implementation to move fields from spec instead of cloning them.

Suggested change
url: spec.url.clone(),
url: spec.url,

max_instances: app.max_instances,
delay_release: app.delay_release.map(|s| s.num_seconds()),
schema: app.schema.clone().map(rpc::ApplicationSchema::from),
url: app.url.clone(),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The app parameter is an owned ApplicationAttributes, so its fields can be moved instead of cloned. This improves efficiency by avoiding unnecessary allocations.

This applies to other fields in this from implementation as well. Consider refactoring the entire implementation to move fields from app instead of cloning them.

Suggested change
url: app.url.clone(),
url: app.url,

max_instances: app.max_instances,
delay_release: app.delay_release.map(Duration::seconds),
schema: app.schema.clone().map(ApplicationSchema::from),
url: app.url.clone(),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Since app is an owned ApplicationSpec, you can move the url field instead of cloning it to avoid an unnecessary allocation. This is more efficient.

This applies to other fields in this from implementation as well. Consider refactoring the entire implementation to move fields from app instead of cloning them.

Suggested change
url: app.url.clone(),
url: app.url,

k82cn added 2 commits January 12, 2026 11:33
Signed-off-by: Klaus Ma <klausm@nvidia.com>
Signed-off-by: Klaus Ma <klausm@nvidia.com>
@k82cn k82cn merged commit 2ca1f10 into xflops:main Jan 12, 2026
4 checks passed
@k82cn k82cn deleted the app_url branch January 12, 2026 12:12
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