-
Notifications
You must be signed in to change notification settings - Fork 0
chore: upgrade SDK catalog + block structure, fix build errors #5
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| --- | ||
| "@platforma-open/milaboratories.gpu-test": patch | ||
| "@platforma-open/milaboratories.gpu-test.model": patch | ||
| "@platforma-open/milaboratories.gpu-test.ui": patch | ||
| "@platforma-open/milaboratories.gpu-test.workflow": patch | ||
| "@platforma-open/milaboratories.gpu-test.gpu-info": patch | ||
| --- | ||
|
|
||
| Upgrade SDK catalog and apply the block-tools structure upgrade. Migrate the | ||
| workflow exec resource request to the new `resources({ onCPU, onGPU })` API, | ||
| pin `vue` to `3.5.24`, drop the removed `@platforma-sdk/ui-vue/styles` import, | ||
| and rename the model export `model` -> `platforma`. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| name: Mark Platforma Block as Stable | ||
| on: | ||
| workflow_dispatch: {} | ||
| jobs: | ||
| init: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: milaboratory/github-ci/actions/context/init@v4 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The new stable-release workflow loads both its initialization action and publishing workflow through mutable Prompt To Fix With AIThis is a comment left during a code review.
Path: .github/workflows/mark-stable.yaml
Line: 8
Comment:
**Release actions use mutable tags**
The new stable-release workflow loads both its initialization action and publishing workflow through mutable `v4` tags while passing npm and AWS credentials, allowing a moved upstream tag to run unreviewed code with release credentials. Pin both references to reviewed commit SHAs. **How this was verified:** the workflow uses tag-based `uses` references and passes publishing credentials to the referenced workflow.
How can I resolve this? If you propose a fix, please make it concise.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time! |
||
| with: | ||
| version-canonize: false | ||
| branch-versioning: main | ||
| run: | ||
| needs: | ||
| - init | ||
| uses: milaboratory/github-ci/.github/workflows/block-mark-stable.yaml@v4 | ||
| with: | ||
| app-name: 'Block: Gpu Test - Mark Stable' | ||
| node-version: '20.x' | ||
| npmrc-config: | | ||
| { | ||
| "registries": { | ||
| "https://registry.npmjs.org/": { | ||
| "scopes": ["milaboratories", "platforma-sdk", "platforma-open"], | ||
| "tokenVar": "NPMJS_TOKEN" | ||
| } | ||
| } | ||
| } | ||
| secrets: | ||
| env: | | ||
| { "NPMJS_TOKEN": ${{ toJSON(secrets.NPMJS_TOKEN) }}, | ||
| "AWS_CI_IAM_MONOREPO_SIMPLE_ROLE": ${{ toJSON(secrets.AWS_CI_IAM_MONOREPO_SIMPLE_ROLE) }} } | ||
|
|
||
| SLACK_CHANNEL: ${{ secrets.SLACK_BLOCKS_CI_CHANNEL }} | ||
| SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | ||
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| // This file is managed by `block-tools structure`. Do not edit by hand. | ||
| // Narrow MCP / AI surface. | ||
|
|
||
| export type { BlockContract, BlockOutputs, BlockData } from "./index"; | ||
| export * from "./agents-extra"; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| // Author-owned. `block-tools structure` does not modify this file. | ||
| // MCP / AI extension surface. Add types and functions the agent | ||
| // surface should expose. | ||
| // | ||
| // In the future this file will host JS functions the MCP runtime | ||
| // can execute. The `.d.ts` declarations stay visible to the agent; | ||
| // the JS bodies execute in the MCP code-execution context (the | ||
| // agent sees the types but not the implementation). |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| // Author-owned. `block-tools structure` does not modify this file. | ||
| // Add block-specific helper types or values the consumer surface | ||
| // should expose. Anything you `export` here flows out via the | ||
| // main entry (./index re-exports this file). | ||
| // | ||
| // Do NOT redefine: BlockContract, BlockOutputs, BlockData, | ||
| // BlockPointer, platforma, or the block-named <PascalName>Block* | ||
| // aliases — those names come from ./index and `export *` from this | ||
| // file would shadow them. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| // This file is managed by `block-tools structure`. Do not edit by hand. | ||
| // Author content lives in ./block-extra.ts. | ||
|
|
||
| import { platforma } from "@platforma-open/milaboratories.gpu-test.model"; | ||
| import { | ||
| InferOutputsType, | ||
| InferDataType, | ||
| InferHrefType, | ||
| } from "@platforma-sdk/model"; | ||
|
|
||
| export { platforma }; | ||
|
|
||
| export type BlockContract = { | ||
| outputs: InferOutputsType<typeof platforma>; | ||
| data: InferDataType<typeof platforma>; | ||
| href: InferHrefType<typeof platforma>; | ||
| }; | ||
|
|
||
| export type BlockOutputs = BlockContract["outputs"]; | ||
| export type BlockData = BlockContract["data"]; | ||
|
|
||
| // import.meta.url is a file: URL (always forward-slash, even on Windows: | ||
| // file:///C:/…). We expose URLs, NOT paths — the facade stays dependency-free | ||
| // and loadable in minimal engines (e.g. QuickJS), and each consumer converts | ||
| // at its own edge with the right tool (fileURLToPath in Node), where Windows | ||
| // drive letters / %-encoding / UNC are handled correctly. The bundled entry | ||
| // sits one dir under the package root (dist/index.js, or src/index.ts in dev), | ||
| // so the root is two URL segments up. The structurer owns this layout — | ||
| // consumers read these URLs, they never reconstruct <root>/block-pack. | ||
| // | ||
| // TypeScript ships `ImportMeta.url` only in the `dom`/`webworker` libs; the | ||
| // facade tsconfig is lib-minimal (no `dom`, no `@types/node`) by design. We | ||
| // type the one ESM-standard member we use with a local cast rather than a | ||
| // `declare global` — a global augmentation would leak into the published | ||
| // `dist/index.d.ts` and clash with `@types/node`'s `ImportMeta` in full-Node | ||
| // consumers (test packages, the Middle Layer). | ||
| const selfUrl = (import.meta as ImportMeta & { url: string }).url; | ||
| const dirUrl = selfUrl.slice(0, selfUrl.lastIndexOf("/")); | ||
| const rootUrl = dirUrl.slice(0, dirUrl.lastIndexOf("/")); | ||
|
|
||
| export const BlockPointer = { | ||
| type: "from-pack-v2" as const, | ||
| packUrl: rootUrl + "/block-pack", | ||
| rootUrl, | ||
| } as const; | ||
|
|
||
| // Block-named aliases for readable cross-block imports in tests and | ||
| // consumer code. Same types / same runtime value as the universal | ||
| // names above; the aliases avoid `as`-renames at the import site. | ||
| export type GpuTestBlockContract = BlockContract; | ||
| export type GpuTestBlockOutputs = BlockOutputs; | ||
| export type GpuTestBlockData = BlockData; | ||
| export const GpuTestBlockPointer = BlockPointer; | ||
|
|
||
| export * from "./block-extra"; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "extends": "@milaboratories/ts-configs/block/facade", | ||
| "include": ["src/**/*"] | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When CI runs the newly enabled test phase, the root script delegates to
turbo run test, which executes the retainedtest: vitestscripts in the model and UI workspaces even though this change removes their Vitest dependencies, causing the build workflow to terminate withvitest: command not found.Prompt To Fix With AI