Forward restorer build configuration when constructing a sandbox from a snapshot
Mantenedores costumam responder em até 7 dias
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 55/100
Direção de pesquisa
Start with hyperlight_js::SandboxBuilder::build_from_snapshot() and ProtoJSSandbox::from_snapshot(), then check the upstream API tracked by hyperlight-dev/hyperlight#1862. Confirm that the existing SandboxConfiguration reaches the upstream snapshot builder while snapshot-owned geometry and separately handled callbacks remain unchanged; done when restored sandboxes retain the supported construction settings.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Blocked by: https://github.com/hyperlight-dev/hyperlight/issues/1862
Problem
hyperlight_js::SandboxBuilder stores Hyperlight construction settings in a SandboxConfiguration.
For a fresh sandbox, build() forwards that complete configuration to Hyperlight:
ProtoJSSandbox::new(
guest_binary,
Some(self.config),
self.host_print_fn,
)
The persistent snapshot path does not:
pub fn build_from_snapshot(
self,
snapshot: Snapshot,
) -> Result<ProtoJSSandbox> {
ProtoJSSandbox::from_snapshot(
snapshot,
self.host_print_fn,
)
}
self.config is discarded.
ProtoJSSandbox::from_snapshot() creates a private hyperlight_host::SandboxBuilder::from_snapshot() using Hyperlight defaults. The eventual MultiUseSandbox is not created until restore_js_sandbox() or restore_loaded_sandbox(), but ProtoJSSandbox does not expose configuration methods for the private upstream builder.
Consequently, callers have no opportunity to reapply immutable construction settings before restoration completes.
Affected settings, where supported by the target and enabled features, include:
- VCPU interrupt signal offset
- Interrupt retry delay
- Per-sandbox crashdump enablement
- GDB configuration
After the restored MultiUseSandbox has been created, these settings cannot be changed.
Host print callbacks are not affected because they are stored and forwarded separately. Host functions are also re-registered before the upstream snapshot builder is built.
Heap, scratch, and transport geometry are snapshot-owned and should continue to come from the snapshot.
Proposed change
After the upstream API in hyperlight-dev/hyperlight#1862 is available, forward the existing configuration through the snapshot construction path:
pub fn build_from_snapshot(
self,
snapshot: Snapshot,
) -> Result<ProtoJSSandbox> {
ProtoJSSandbox::from_snapshot(
snapshot,
self.config,
self.host_print_fn,
)
}
ProtoJSSandbox::from_snapshot() should apply it to the upstream builder:
let mut builder =
HyperlightSandboxBuilder::from_snapshot(snapshot.inner())
.sandbox_configuration(config);
- Linguagem predominante
- Rust
- Estrelas
- 16
- Forks
- 5
- Merge médio
- 7d 3h
- PRs com merge (30d)
- 28
Preparar o ambiente
Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de hyperlight-dev/hyperlight-js
-
lifecycle/needs-review
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
hyperlight-dev/hyperlight-js#81 ·
Mantenedores costumam responder em até 7 dias
-
lifecycle/needs-review
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
hyperlight-dev/hyperlight-js#340 ·
Mantenedores costumam responder em até 7 dias
-
lifecycle/needs-review
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 35/100
hyperlight-dev/hyperlight-js#339 ·
Mantenedores costumam responder em até 7 dias
-
lifecycle/needs-review
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 52/100
hyperlight-dev/hyperlight-js#338 ·
Mantenedores costumam responder em até 7 dias
-
lifecycle/needs-review
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 35/100
hyperlight-dev/hyperlight-js#312 ·
Mantenedores costumam responder em até 7 dias
Todas as issues de hyperlight-dev/hyperlight-js
Issues semelhantes
-
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 88/100
fritzprix/libr-agent#2165 ·
Mantenedores costumam responder em até 1 dia
-
area:ecosystem bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
Chelis-Lang/chelis#3942 ·
Mantenedores costumam responder em até 1 dia
-
needs-triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 63/100
Mantenedores costumam responder em até 1 dia
-
review-bot
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 90/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 86/100
Mantenedores costumam responder em até 1 dia