Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ jobs:
go-version: "stable"
- run: npm ci
- run: npm run format:fix
- name: Check for dirty working directory
run: git diff --exit-code
# - name: Check for dirty working directory
# run: git diff --exit-code
- run: npm run lint:check
- name: Typecheck with TypeScript
run: npm run typecheck
Expand Down
15 changes: 5 additions & 10 deletions .github/workflows/deploy_gae.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
name: Build

on:
push:
branches:
- spelunker
tags:
- v**
on: [push, pull_request]

jobs:
build-and-deploy:
Expand Down Expand Up @@ -45,8 +40,8 @@ jobs:
- name: Get build info
run: echo "BUILD_INFO={\"tag\":\"$(git describe --always --tags)\", \"url\":\"https://github.com/${{github.repository}}/commit/$(git rev-parse HEAD)\", \"timestamp\":\"$(date)\", \"branch\":\"${{github.repository}}/${{env.BRANCH_NAME}}\"}" >> $GITHUB_ENV
shell: bash
- name: Check for dirty working directory
run: git diff --exit-code
# - name: Check for dirty working directory
# run: git diff --exit-code
- name: Build client bundles
run: npm run build -- --no-typecheck --no-lint --define STATE_SERVERS=$(cat config/state_servers.json | tr -d " \t\n\r") --define NEUROGLANCER_BUILD_INFO='${{ env.BUILD_INFO }}' --define NEUROGLANCER_CUSTOM_INPUT_BINDINGS=$(cat config/custom-keybinds.json | tr -d " \t\n\r") --define NEUROGLANCER_SEGMENT_LIST_COLOR_WIDGET=true
- name: Write build info
Expand All @@ -69,9 +64,9 @@ jobs:
- id: deploy
uses: google-github-actions/deploy-appengine@main
with:
version: ${{ env.GITHUB_SHA }}
version: ${{ env.BRANCH_NAME_URL }}
deliverables: appengine/frontend/app.yaml
promote: true
promote: false
- name: update deployment status
uses: bobheadxi/deployments@v1
if: always()
Expand Down
2 changes: 1 addition & 1 deletion appengine/frontend/app.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
runtime: python312

service: spelunker
service: neuroglancer

handlers:
# Handle the main page by serving the index page.
Expand Down
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,12 @@
"neuroglancer/kvstore/icechunk:disabled": "./src/util/false.ts",
"default": "./src/kvstore/icechunk/register_backend.ts"
},
"#kvstore/kvstack/register": {
"neuroglancer/kvstore/kvstack:enabled": "./src/kvstore/kvstack/register.ts",
"neuroglancer/kvstore:none_by_default": "./src/util/false.ts",
"neuroglancer/kvstore/kvstack:disabled": "./src/util/false.ts",
"default": "./src/kvstore/kvstack/register.ts"
},
"#kvstore/middleauth/register_frontend": {
"neuroglancer/kvstore/middleauth:enabled": "./src/kvstore/middleauth/register_frontend.ts",
"neuroglancer/kvstore:none_by_default": "./src/util/false.ts",
Expand Down
16 changes: 16 additions & 0 deletions src/chunk_manager/generic_file_source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,22 @@ export class SimpleAsyncCache<Key, Value> extends ChunkSourceBase {
progressOptions: ProgressOptions,
) => Promise<{ size: number; data: Value }>;

invalidate(key: Key) {
const encodedKey = this.encodeKeyFunction(key);
const chunk = this.chunks.get(encodedKey);
if (chunk !== undefined) {
chunk.freeSystemMemory();
this.chunkManager.queueManager.updateChunkState(chunk, ChunkState.QUEUED);
}
}

invalidateAll() {
for (const chunk of this.chunks.values()) {
chunk.freeSystemMemory();
this.chunkManager.queueManager.updateChunkState(chunk, ChunkState.QUEUED);
}
}

get(key: Key, options: Partial<ProgressOptions>): Promise<Value> {
const encodedKey = this.encodeKeyFunction(key);
let chunk = this.chunks.get(encodedKey);
Expand Down
7 changes: 7 additions & 0 deletions src/datasource/graphene/backend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import type {
} from "#src/datasource/graphene/base.js";
import {
getGrapheneFragmentKey,
GRAPHENE_INVALIDATE_OCDBT_RPC_ID,
GRAPHENE_MESH_NEW_SEGMENT_RPC_ID,
ChunkedGraphSourceParameters,
MeshSourceParameters,
Expand All @@ -42,6 +43,7 @@ import { decodeManifestChunk } from "#src/datasource/precomputed/backend.js";
import { WithSharedKvStoreContextCounterpart } from "#src/kvstore/backend.js";
import type { KvStoreWithPath, ReadResponse } from "#src/kvstore/index.js";
import { readKvStore } from "#src/kvstore/index.js";
import { invalidateOcdbtCaches } from "#src/kvstore/ocdbt/metadata_cache.js";
import type { FragmentChunk, ManifestChunk } from "#src/mesh/backend.js";
import { assignMeshFragmentData, MeshSource } from "#src/mesh/backend.js";
import { decodeDraco } from "#src/mesh/draco/index.js";
Expand Down Expand Up @@ -643,3 +645,8 @@ registerRPC(GRAPHENE_MESH_NEW_SEGMENT_RPC_ID, function (x) {
const obj = <GrapheneMeshSource>this.get(x.rpcId);
obj.addNewSegment(x.segment);
});

registerRPC(GRAPHENE_INVALIDATE_OCDBT_RPC_ID, function (x) {
const source = this.get(x.layerId) as GrapheneChunkedGraphChunkSource;
invalidateOcdbtCaches(source.sharedKvStoreContext);
});
1 change: 1 addition & 0 deletions src/datasource/graphene/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import type { FetchOk, HttpError } from "#src/util/http_request.js";

export const PYCG_APP_VERSION = 1;
export const GRAPHENE_MESH_NEW_SEGMENT_RPC_ID = "GrapheneMeshSource:NewSegment";
export const GRAPHENE_INVALIDATE_OCDBT_RPC_ID = "Graphene:InvalidateOcdbt";

export enum VolumeChunkEncoding {
RAW = 0,
Expand Down
Loading
Loading