Conversation
…ded file system for schema access
…insensitive lookup
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a new Set task type to Raid’s task system to persist variables across runs and makes variable expansion prefer persisted “raid vars” over OS/.env values. It also refactors JSON schema embedding so validation loads schemas from a new top-level embedded schemas.FS.
Changes:
- Add
Settask type (schema, docs, examples) and wire it into task execution + expansion. - Introduce a persisted raid variable store (
varsfile) andexpandRaid()expansion semantics. - Move embedded schema loading to the top-level
schemaspackage (schemas.FS).
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
src/resources/app.properties |
Bumps app version to 0.4.0-beta. |
src/internal/lib/task_runner_extra_test.go |
Adds tests for Set task behavior, expansion, and precedence. |
src/internal/lib/task_runner.go |
Dispatches new Set task, uses expandRaid for Template/Print, implements execSetVar. |
src/internal/lib/task.go |
Adds Value field, introduces SetVar task type, routes expansion through expandRaid. |
src/internal/lib/schemas/raid-repo.schema.json |
Removes old embedded schema copy. |
src/internal/lib/schemas/raid-profile.schema.json |
Removes old embedded schema copy. |
src/internal/lib/schemas/raid-defs.schema.json |
Removes old embedded schema copy. |
src/internal/lib/lib.go |
Adds persisted raid var store + expandRaid, resets/loads vars on ForceLoad, switches schema embedding to schemas.FS. |
schemas/raid-defs.schema.json |
Adds schema definition for Set task. |
schemas/fs.go |
Adds embedded schema filesystem (schemas.FS). |
profile.raid.yml |
Adds an example profile demonstrating Set. |
README.md |
Documents the new Set task type and usage. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…execSetVar function
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #17 +/- ##
==========================================
- Coverage 72.41% 71.89% -0.53%
==========================================
Files 27 27
Lines 1479 1544 +65
==========================================
+ Hits 1071 1110 +39
- Misses 368 387 +19
- Partials 40 47 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request introduces a new
Settask type to the raid task system, allowing users to set and persist environment variables directly within their task configurations. The implementation includes updates to documentation, schema definitions, and the Go codebase to support variable storage, expansion, and loading. These changes make it easier to manage and reuse environment variables across tasks and runs.New Task Type and Variable Management:
Settask type, which sets an environment variable to a specified value (supporting variable expansion), persists it across runs, and gives it precedence over.envfiles and OS environment variables (README.md,schemas/raid-defs.schema.json,profile.raid.yml). [1] [2] [3] [4]Schema and Embedded Filesystem Updates:
raid-defs.schema.json) to define theSettask type, and refactored schema embedding to use Go's embed package with a newschemas.FSfor easier schema loading (schemas/fs.go,src/internal/lib/lib.go). [1] [2] [3] [4]raid-defs.schema.json,raid-profile.schema.json) as part of the migration to the new embedded schema system. [1] [2]Go Codebase Enhancements:
src/internal/lib/lib.go). [1] [2]src/internal/lib/lib.go).These changes collectively improve the flexibility and robustness of environment variable management in raid task workflows.