-
-
Notifications
You must be signed in to change notification settings - Fork 194
Bump the cargo group across 2 directories with 1 update #849
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… improvements (#823) <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR consolidates multiple HQL (Helix Query Language) improvements, CLI enhancements, and infrastructure updates focused on fixing nested traversal generation and improving port management. ## Key Changes - **HQL Compiler Enhancements**: Fixed nested traversal generation to properly handle field remapping (e.g., `post: content`), `::FIRST` operator support, and scalar traversals with graph navigation steps. The compiler now correctly generates code for complex nested structures with closure parameters and proper type inference. - **CLI Port Management**: Added automatic port conflict detection and resolution. When deploying instances, the CLI now checks if the requested port is available and automatically falls back to the next available port with user notification, preventing deployment failures. - **Infrastructure Improvements**: - Changed cluster ID environment variable from `CLUSTER_ID` to `HELIX_CLUSTER_ID` for consistency - Added configurable data directory support via `HELIX_DATA_DIR` environment variable - Added metrics enablement checks before logging events to avoid unnecessary overhead - Reduced metrics buffer sizes from 65536 to 4096 for better memory efficiency - **Type System Updates**: Added `Default` trait implementation to `TraversalValue` enum and improved error serialization for better JSON responses - **Test Coverage**: Added comprehensive test cases for upsert operations and nested traversal scenarios with field remapping The changes appear well-tested with new test schemas and queries demonstrating the enhanced HQL capabilities. <details><summary><h3>Important Files Changed</h3></summary> | Filename | Overview | |----------|----------| | helix-cli/src/port.rs | Added new port management utilities for checking and finding available ports | | helix-cli/src/commands/push.rs | Added port availability checking before deployment with automatic fallback to next available port | | helix-db/src/helix_gateway/gateway.rs | Changed cluster ID env var from CLUSTER_ID to HELIX_CLUSTER_ID and added metrics enablement checks | | helix-db/src/helixc/analyzer/methods/query_validation.rs | Major refactor to support field remapping and nested traversals with improved type handling | | helix-db/src/helixc/generator/queries.rs | Enhanced nested traversal code generation with better handling for scalar traversals and Vec<TraversalValue> | | helix-db/src/helixc/generator/traversal_steps.rs | Added field_name_mappings HashMap and helper methods for property fetch handling | | helix-db/src/protocol/error.rs | Added Serialize trait implementation for HelixError to convert errors to strings | | metrics/src/lib.rs | Reduced buffer sizes for better memory efficiency and added capacity hint for NDJSON string | </details> </details> <details><summary><h3>Sequence Diagram</h3></summary> ```mermaid sequenceDiagram participant User participant CLI as helix-cli participant Port as Port Manager participant Docker as Docker Manager participant Compiler as HQL Compiler participant Gateway as Helix Gateway participant Engine as Graph Engine User->>CLI: helix push [instance] CLI->>Port: check port availability Port->>Port: is_port_available(6969) alt Port in use Port->>Port: find_available_port(6970) Port-->>CLI: return (6970, true) CLI->>User: Warning: Using port 6970 else Port available Port-->>CLI: return (6969, false) end CLI->>Compiler: build instance Compiler->>Compiler: validate query with field remapping Compiler->>Compiler: generate nested traversal code Compiler-->>CLI: compiled query code alt Port changed CLI->>Docker: generate_docker_compose(port_override) Docker->>Docker: update compose with new port end CLI->>Docker: start_instance() Docker->>Docker: docker compose up Docker-->>CLI: instance started CLI-->>User: Instance running on port User->>Gateway: POST /query Gateway->>Gateway: check METRICS_ENABLED Gateway->>Engine: execute query with nested traversals Engine->>Engine: apply field remapping Engine->>Engine: execute upsert operations Engine-->>Gateway: query results alt Metrics enabled Gateway->>Gateway: log_event(QuerySuccess) end Gateway-->>User: JSON response ``` </details> <!-- greptile_other_comments_section --> <!-- /greptile_comment -->
…es, api verification (#841) <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR implements several major improvements across the CLI, core database, and HQL compiler components. **Key Changes:** - **CLI Output System**: introduced a new structured output module (`output.rs`) with verbosity control (quiet/normal/verbose), modern spinner UI, and operation tracking - significantly improves developer experience - **Restart Command**: added `helix restart` command supporting both local Docker instances and cloud deployments (Fly.io) - **Ordered Return Values**: implemented ordered return values in HQL queries using a struct-based approach instead of json! macros, preserving field order as defined in queries - **Variable Binding Fix**: fixed bug where variable bindings and map variables weren't appearing in inline RETURN objects - now properly handles scope variables vs schema properties - **Test Infrastructure**: added comprehensive test utilities with isolated temp directories and extensive lifecycle tests for build/start/stop/restart workflows - **API Key Verification**: added conditional API key verification for schema introspection endpoint with feature flag support **Technical Improvements:** - Switched from `HashMap` to `IndexMap` in object validation to preserve field ordering - Enhanced return value generation to distinguish primitive types (Count/Boolean/Scalar) from complex types (Nodes/Edges/Objects) - Improved nested traversal handling with variable reference detection - Updated all CLI commands to use new `Output`/`Step` helpers for consistent UX **Critical Issues:** The test utilities use `unsafe` blocks to modify environment variables, claiming safety based on isolation. However, environment variables are process-global and this creates actual data races when tests run in parallel. The `unsafe` blocks should be removed - the operations aren't actually unsafe in Rust's memory safety sense, but the concurrency issue remains. <details><summary><h3>Important Files Changed</h3></summary> | Filename | Overview | |----------|----------| | helix-cli/src/tests/test_utils.rs | new test utilities with isolated temp directories and env variable management | | helix-db/src/helixc/generator/queries.rs | implemented ordered return values with struct-based approach and variable reference handling | | helix-db/src/helixc/analyzer/methods/query_validation.rs | fixed variable binding and map variable handling in return objects, added primitive type detection | | helix-db/src/helixc/analyzer/methods/object_validation.rs | improved scope variable handling in property access, switched HashMap to IndexMap for ordering | </details> </details> <details><summary><h3>Sequence Diagram</h3></summary> ```mermaid sequenceDiagram participant User participant CLI participant Output participant Docker participant Compiler participant Generator participant Gateway User->>CLI: helix restart dev CLI->>Output: Operation::new("Restarting", "dev") Output-->>User: Display operation header CLI->>Docker: restart_instance() Docker->>Docker: check_runtime_available() Docker->>Docker: verify docker-compose.yml exists Docker->>Output: Step::start("Restarting container") Docker->>Docker: run_compose_command(["restart"]) Docker->>Output: Step::done() Output-->>User: Display success Note over User,Gateway: Ordered Return Values Flow User->>CLI: helix build dev CLI->>Compiler: compile HQL queries Compiler->>Compiler: analyze_return_expr() Compiler->>Compiler: build_return_fields() Compiler->>Compiler: detect primitive vs struct types alt Primitive Type (Count/Boolean/Scalar) Compiler->>Generator: create primitive ReturnValueStruct Generator->>Generator: emit variable directly (no struct def) else Complex Type (Nodes/Edges/Objects) Compiler->>Generator: create nested ReturnValueStruct Generator->>Generator: generate struct definitions Generator->>Generator: handle variable references Generator->>Generator: map closure parameters end Generator->>Generator: format ordered return JSON Generator-->>CLI: compiled Rust code CLI->>Docker: build_instance() Docker-->>User: Built instance Note over User,Gateway: API Key Verification User->>Gateway: introspect_schema request Gateway->>Gateway: check API key feature flag alt API Key Enabled Gateway->>Gateway: validate API key alt Valid Key Gateway-->>User: return schema else Invalid Key Gateway-->>User: 401 Unauthorized end else API Key Disabled Gateway-->>User: return schema end ``` </details> <!-- greptile_other_comments_section --> <!-- /greptile_comment -->
Bumps the cargo group with 1 update in the / directory: [bytes](https://github.com/tokio-rs/bytes). Bumps the cargo group with 1 update in the /hql-tests directory: [bytes](https://github.com/tokio-rs/bytes). Updates `bytes` from 1.10.0 to 1.11.1 - [Release notes](https://github.com/tokio-rs/bytes/releases) - [Changelog](https://github.com/tokio-rs/bytes/blob/master/CHANGELOG.md) - [Commits](tokio-rs/bytes@v1.10.0...v1.11.1) Updates `bytes` from 1.10.1 to 1.11.1 - [Release notes](https://github.com/tokio-rs/bytes/releases) - [Changelog](https://github.com/tokio-rs/bytes/blob/master/CHANGELOG.md) - [Commits](tokio-rs/bytes@v1.10.0...v1.11.1) --- updated-dependencies: - dependency-name: bytes dependency-version: 1.11.1 dependency-type: indirect dependency-group: cargo - dependency-name: bytes dependency-version: 1.11.1 dependency-type: indirect dependency-group: cargo ... Signed-off-by: dependabot[bot] <[email protected]>
Contributor
|
No reviewable files after applying ignore patterns. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Bumps the cargo group with 1 update in the / directory: bytes.
Bumps the cargo group with 1 update in the /hql-tests directory: bytes.
Updates
bytesfrom 1.10.0 to 1.11.1Release notes
Sourced from bytes's releases.
Changelog
Sourced from bytes's changelog.
Commits
417dccdRelease bytes v1.11.1 (#820)d0293b0Merge commit from forka7952fbchore: prepare bytes v1.11.0 (#804)60cbb77fix:BytesMutonly reuse if src has remaining (#803)7ce330fMove drop_fn of from_owner into vtable (#801)4b53a29Tweak BytesMut::remaining_mut (#795)016fdbdReserve capacity in BytesMut::put (#794)ef7f257Specialize BytesMut::put::<Bytes> (#793)8b4f54dIgnore BytesMut::freeze doctest on wasm (#790)16132adFix latest clippy warnings (#787)Updates
bytesfrom 1.10.1 to 1.11.1Release notes
Sourced from bytes's releases.
Changelog
Sourced from bytes's changelog.
Commits
417dccdRelease bytes v1.11.1 (#820)d0293b0Merge commit from forka7952fbchore: prepare bytes v1.11.0 (#804)60cbb77fix:BytesMutonly reuse if src has remaining (#803)7ce330fMove drop_fn of from_owner into vtable (#801)4b53a29Tweak BytesMut::remaining_mut (#795)016fdbdReserve capacity in BytesMut::put (#794)ef7f257Specialize BytesMut::put::<Bytes> (#793)8b4f54dIgnore BytesMut::freeze doctest on wasm (#790)16132adFix latest clippy warnings (#787)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore <dependency name> major versionwill close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)@dependabot ignore <dependency name> minor versionwill close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)@dependabot ignore <dependency name>will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)@dependabot unignore <dependency name>will remove all of the ignore conditions of the specified dependency@dependabot unignore <dependency name> <ignore condition>will remove the ignore condition of the specified dependency and ignore conditionsYou can disable automated security fix PRs for this repo from the Security Alerts page.