Skip to content

feat(resume): implement spawn resume (#273)#293

Merged
plastikfan merged 1 commit intomainfrom
feat/continue-spawn-resume
Nov 5, 2024
Merged

feat(resume): implement spawn resume (#273)#293
plastikfan merged 1 commit intomainfrom
feat/continue-spawn-resume

Conversation

@plastikfan
Copy link
Copy Markdown
Contributor

@plastikfan plastikfan commented Nov 5, 2024

Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced a new Metrics field in the ActiveState struct to enhance metric tracking capabilities.
    • Added a Read method to the Mediator interface for reading directory entries.
    • New Supervisor struct for managing metrics introduced, replacing previous metric handling methods.
  • Bug Fixes

    • Improved error handling with the addition of ErrDetectedSpawnStackOverflow.
  • Documentation

    • Updated comments in traverse-api.go to clarify dependencies.
  • Chores

    • Updated module dependencies in go.mod to newer versions.
  • Tests

    • Enhanced test cases to utilize new data structures and improve metric tracking during test execution.

@plastikfan plastikfan added the feature New feature or request label Nov 5, 2024
@plastikfan plastikfan self-assigned this Nov 5, 2024
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Nov 5, 2024

Caution

Review failed

The pull request is closed.

Walkthrough

This pull request includes significant changes across multiple files, primarily focusing on the transition from the measure package to the core package for metrics management. Key updates involve the introduction of new structures and interfaces for metrics, modifications to existing methods for consistency, and the removal of deprecated files. Additionally, several test files have been updated to reflect these changes, particularly in how metrics are recorded and asserted. The overall architecture has been streamlined to enhance clarity and maintainability.

Changes

File Change Summary
builders.go Added import for core, modified Supervisor instantiation in buildAll method.
core/core-defs.go Added Metrics field to ActiveState struct.
core/errors.go Introduced new error variable ErrDetectedSpawnStackOverflow.
core/measure.go Deleted file containing Metric and Reporter interfaces, and MetricValue type alias.
core/metrics.go Introduced new metrics management types and interfaces, including Metric, MutableMetric, and NavigationMetric.
core/supervisor.go Added Supervisor struct with methods for managing metrics, including NewSupervisor, Single, Many, and Count.
director-resume_test.go Modified test cases to replace tv.ResumeStrategySpawn with tv.ResumeStrategyFastward, adjusted error handling.
go.mod Updated dependency versions for github.com/snivilised/li18ngo and github.com/snivilised/nefilim.
internal/enclave/enclave-defs.go Modified Mediator interface, added Read method, updated return types for Supervisor methods.
internal/enclave/enclave-suite_test.go Updated arrange function to change argument type, removed trigger struct.
internal/enclave/kernel-result.go Changed supervisor parameter type in NewResult, removed Merge method.
internal/enclave/kernel-result_test.go Updated variable types for metrics handling, changed trigger type to lab.Trigger.
internal/feat/filter/filter-plugin.go Updated plugin struct to use core.Crate, renamed Mums field to Metrics.
internal/feat/filter/scheme-custom.go Updated crate parameter type in matchNext function to *core.Crate.
internal/feat/filter/scheme-hybrid.go Changed crate parameter type in init method to *core.Crate.
internal/feat/filter/scheme-nanny.go Updated crate parameter type in init method, replaced Mums references with Metrics.
internal/feat/filter/scheme-sampler.go Updated references from Mums to Metrics in next method.
internal/feat/filter/schemes.go Changed crate parameter type in init method to *core.Crate.
internal/feat/hiber/hibernate_test.go Replaced recording with recall, updated logic to reflect new variable.
internal/feat/nanny/nanny-plugin.go Updated plugin struct to use core.Crate, changed Mums references to Metrics.
internal/feat/resume/resume-defs.go Removed finish() method from Strategy interface, renamed concludeInfo to conclusion.
internal/feat/resume/resume_test.go Updated variable names and test logic for clarity, activated previously ignored tests.
internal/kernel/contents.go Changed newContents function to NewContents, making it publicly accessible.
internal/kernel/guardian.go Updated anchor struct to use core.Crate, changed mums to metrics.
internal/kernel/mediator.go Replaced measure.MutableMetrics with core.Metrics, added Read method, renamed Connect to Bridge.
internal/kernel/navigation-fs.go Updated read function to use NewContents instead of newContents.
internal/kernel/navigator-agent.go Removed services import, simplified Result method logic.
internal/kernel/navigator-directories-with-files_test.go Renamed variable from recording to recall.
internal/kernel/navigator-vanilla_test.go Updated variable from recording to recall, changed type to lab.Recall.
internal/laboratory/assert.go Changed Recording field type from RecordingMap to Recall.
internal/laboratory/callbacks.go Renamed recording to recall, updated variable type.
internal/laboratory/helper-defs.go Renamed fields from RecordingMap to Recall, added new Trigger type with Times method.
internal/laboratory/matchers.go Updated matcher types to use Recall instead of RecordingMap.
internal/laboratory/static.go Added JSONSubPath field to Static struct.
internal/measure/measure-defs.go Deleted file containing MutableMetric interface and BaseMetric struct.
internal/measure/supervisor.go Deleted Supervisor struct and related methods.
internal/persist/data/test-restore.DEFAULT.json Added new keys in JSON structure for metrics.
internal/persist/marshaler-local-fs_test.go Added new variables for reporter and trig, updated test logic.
internal/persist/marshaler_test.go Renamed variable from FS to fS, updated references in tests.
test/json/unmarshal/resume-state.json Added new Metrics object in JSON structure.
traverse-api.go Updated comments to reflect changes in dependencies, removed mention of measure.

Possibly related issues

  • implement spawn resume #273: The changes in this PR may support the implementation of the spawn resume feature by refining the metrics management and enhancing the overall architecture related to resume strategies.

🐇 In the meadow, where metrics bloom,
A rabbit hops, dispelling gloom.
With core in hand, the paths are clear,
New metrics dance, bringing cheer!
The plugins sing, the tests align,
In this code garden, all is fine!
🌼


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@plastikfan plastikfan linked an issue Nov 5, 2024 that may be closed by this pull request
@plastikfan plastikfan merged commit 017648b into main Nov 5, 2024
@plastikfan plastikfan deleted the feat/continue-spawn-resume branch November 5, 2024 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

implement spawn resume

1 participant