Compare commits

...

7 Commits

Author SHA1 Message Date
Gokul
81d8d7ab6d Merge pull request #63 from bahdotsh/fix/remote-workflow-tempdir-lifecycle
fix: resolve tempdir lifecycle issue in remote workflow execution
2025-09-05 10:39:09 +05:30
bahdotsh
1d2008852e fix: resolve tempdir lifecycle issue in remote workflow execution
- Fix remote workflow execution failing with 'No such file or directory'
- Move workflow parsing and execution inside tempdir scope to prevent
  premature cleanup of temporary directory
- Ensure TempDir stays alive during entire remote workflow lifecycle
- Remote workflows like pytorch/test-infra/.github/workflows/*.yml@main
  now execute successfully

Resolves #47
2025-09-05 09:46:43 +05:30
Gokul
c707bf8b97 Merge pull request #61 from bahdotsh/fix/docker-github-env-volume-mounting
fix(docker): mount GitHub environment files directory into containers
2025-09-05 08:28:10 +05:30
bahdotsh
b1cc74639c version fix 2025-09-05 08:22:15 +05:30
bahdotsh
f45babc605 fix(docker): mount GitHub environment files directory into containers
- Mount GitHub environment files directory containing GITHUB_ENV, GITHUB_OUTPUT, GITHUB_PATH, and GITHUB_STEP_SUMMARY
- Resolves Docker container exit code -1 when writing to $GITHUB_ENV
- Update volume mapping in both step execution contexts in engine.rs
- Tested on macOS with Docker Desktop

Closes: Issue where echo "VAR=value" >> "$GITHUB_ENV" fails in Docker runtime
2025-09-05 08:01:29 +05:30
bahdotsh
7970e6ad7d Release 0.7.3
wrkflw@0.7.3
wrkflw-evaluator@0.7.3
wrkflw-executor@0.7.3
wrkflw-github@0.7.3
wrkflw-gitlab@0.7.3
wrkflw-logging@0.7.3
wrkflw-matrix@0.7.3
wrkflw-parser@0.7.3
wrkflw-runtime@0.7.3
wrkflw-secrets@0.7.3
wrkflw-ui@0.7.3
wrkflw-utils@0.7.3
wrkflw-validators@0.7.3

Generated by cargo-workspaces
2025-08-28 12:58:32 +05:30
bahdotsh
51a655f07b version fixes 2025-08-28 12:56:05 +05:30
22 changed files with 599 additions and 129 deletions

28
Cargo.lock generated
View File

@@ -3080,7 +3080,7 @@ checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb"
[[package]] [[package]]
name = "wrkflw" name = "wrkflw"
version = "0.7.2" version = "0.7.3"
dependencies = [ dependencies = [
"bollard", "bollard",
"chrono", "chrono",
@@ -3127,7 +3127,7 @@ dependencies = [
[[package]] [[package]]
name = "wrkflw-evaluator" name = "wrkflw-evaluator"
version = "0.7.2" version = "0.7.3"
dependencies = [ dependencies = [
"colored", "colored",
"serde_yaml", "serde_yaml",
@@ -3137,7 +3137,7 @@ dependencies = [
[[package]] [[package]]
name = "wrkflw-executor" name = "wrkflw-executor"
version = "0.7.2" version = "0.7.3"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"bollard", "bollard",
@@ -3169,7 +3169,7 @@ dependencies = [
[[package]] [[package]]
name = "wrkflw-github" name = "wrkflw-github"
version = "0.7.2" version = "0.7.3"
dependencies = [ dependencies = [
"lazy_static", "lazy_static",
"regex", "regex",
@@ -3183,7 +3183,7 @@ dependencies = [
[[package]] [[package]]
name = "wrkflw-gitlab" name = "wrkflw-gitlab"
version = "0.7.2" version = "0.7.3"
dependencies = [ dependencies = [
"lazy_static", "lazy_static",
"regex", "regex",
@@ -3198,7 +3198,7 @@ dependencies = [
[[package]] [[package]]
name = "wrkflw-logging" name = "wrkflw-logging"
version = "0.7.2" version = "0.7.3"
dependencies = [ dependencies = [
"chrono", "chrono",
"once_cell", "once_cell",
@@ -3209,7 +3209,7 @@ dependencies = [
[[package]] [[package]]
name = "wrkflw-matrix" name = "wrkflw-matrix"
version = "0.7.2" version = "0.7.3"
dependencies = [ dependencies = [
"indexmap 2.10.0", "indexmap 2.10.0",
"serde", "serde",
@@ -3220,7 +3220,7 @@ dependencies = [
[[package]] [[package]]
name = "wrkflw-models" name = "wrkflw-models"
version = "0.7.2" version = "0.7.3"
dependencies = [ dependencies = [
"serde", "serde",
"serde_json", "serde_json",
@@ -3230,7 +3230,7 @@ dependencies = [
[[package]] [[package]]
name = "wrkflw-parser" name = "wrkflw-parser"
version = "0.7.2" version = "0.7.3"
dependencies = [ dependencies = [
"jsonschema", "jsonschema",
"serde", "serde",
@@ -3244,7 +3244,7 @@ dependencies = [
[[package]] [[package]]
name = "wrkflw-runtime" name = "wrkflw-runtime"
version = "0.7.2" version = "0.7.3"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"futures", "futures",
@@ -3264,7 +3264,7 @@ dependencies = [
[[package]] [[package]]
name = "wrkflw-secrets" name = "wrkflw-secrets"
version = "0.7.1" version = "0.7.3"
dependencies = [ dependencies = [
"aes-gcm", "aes-gcm",
"anyhow", "anyhow",
@@ -3293,7 +3293,7 @@ dependencies = [
[[package]] [[package]]
name = "wrkflw-ui" name = "wrkflw-ui"
version = "0.7.2" version = "0.7.3"
dependencies = [ dependencies = [
"chrono", "chrono",
"crossterm 0.26.1", "crossterm 0.26.1",
@@ -3315,7 +3315,7 @@ dependencies = [
[[package]] [[package]]
name = "wrkflw-utils" name = "wrkflw-utils"
version = "0.7.2" version = "0.7.3"
dependencies = [ dependencies = [
"nix", "nix",
"serde", "serde",
@@ -3325,7 +3325,7 @@ dependencies = [
[[package]] [[package]]
name = "wrkflw-validators" name = "wrkflw-validators"
version = "0.7.2" version = "0.7.3"
dependencies = [ dependencies = [
"serde", "serde",
"serde_yaml", "serde_yaml",

View File

@@ -1,11 +1,9 @@
[workspace] [workspace]
members = [ members = ["crates/*"]
"crates/*"
]
resolver = "2" resolver = "2"
[workspace.package] [workspace.package]
version = "0.7.2" version = "0.7.3"
edition = "2021" edition = "2021"
description = "A GitHub Actions workflow validator and executor" description = "A GitHub Actions workflow validator and executor"
documentation = "https://github.com/bahdotsh/wrkflw" documentation = "https://github.com/bahdotsh/wrkflw"
@@ -16,6 +14,22 @@ categories = ["command-line-utilities"]
license = "MIT" license = "MIT"
[workspace.dependencies] [workspace.dependencies]
# Internal crate dependencies
wrkflw-models = { path = "crates/models", version = "0.7.3" }
wrkflw-evaluator = { path = "crates/evaluator", version = "0.7.3" }
wrkflw-executor = { path = "crates/executor", version = "0.7.3" }
wrkflw-github = { path = "crates/github", version = "0.7.3" }
wrkflw-gitlab = { path = "crates/gitlab", version = "0.7.3" }
wrkflw-logging = { path = "crates/logging", version = "0.7.3" }
wrkflw-matrix = { path = "crates/matrix", version = "0.7.3" }
wrkflw-parser = { path = "crates/parser", version = "0.7.3" }
wrkflw-runtime = { path = "crates/runtime", version = "0.7.3" }
wrkflw-secrets = { path = "crates/secrets", version = "0.7.3" }
wrkflw-ui = { path = "crates/ui", version = "0.7.3" }
wrkflw-utils = { path = "crates/utils", version = "0.7.3" }
wrkflw-validators = { path = "crates/validators", version = "0.7.3" }
# External dependencies
clap = { version = "4.3", features = ["derive"] } clap = { version = "4.3", features = ["derive"] }
colored = "2.0" colored = "2.0"
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }
@@ -44,7 +58,10 @@ rayon = "1.7.0"
num_cpus = "1.16.0" num_cpus = "1.16.0"
regex = "1.10" regex = "1.10"
lazy_static = "1.4" lazy_static = "1.4"
reqwest = { version = "0.11", default-features = false, features = ["rustls-tls", "json"] } reqwest = { version = "0.11", default-features = false, features = [
"rustls-tls",
"json",
] }
libc = "0.2" libc = "0.2"
nix = { version = "0.27.1", features = ["fs"] } nix = { version = "0.27.1", features = ["fs"] }
urlencoding = "2.1.3" urlencoding = "2.1.3"

279
VERSION_MANAGEMENT.md Normal file
View File

@@ -0,0 +1,279 @@
# Version Management Guide
This guide explains how to manage versions in the wrkflw workspace, both for the entire workspace and for individual crates.
## Overview
The wrkflw project uses a Cargo workspace with flexible version management that supports:
- **Workspace-wide versioning**: All crates share the same version
- **Individual crate versioning**: Specific crates can have their own versions
- **Automatic dependency management**: Internal dependencies are managed through workspace inheritance
## Current Setup
### Workspace Dependencies
All internal crate dependencies are defined in the root `Cargo.toml` under `[workspace.dependencies]`:
```toml
[workspace.dependencies]
# Internal crate dependencies
wrkflw-models = { path = "crates/models", version = "0.7.2" }
wrkflw-evaluator = { path = "crates/evaluator", version = "0.7.2" }
# ... other crates
```
### Crate Dependencies
Individual crates reference internal dependencies using workspace inheritance:
```toml
[dependencies]
# Internal crates
wrkflw-models.workspace = true
wrkflw-validators.workspace = true
```
This approach means:
- ✅ No hard-coded versions in individual crates
- ✅ Single source of truth for internal crate versions
- ✅ Easy individual crate versioning without manual updates everywhere
## Version Management Strategies
### Strategy 1: Workspace-Wide Versioning (Recommended for most cases)
Use this when changes affect multiple crates or for major releases.
```bash
# Bump all crates to the same version
cargo ws version patch # 0.7.2 → 0.7.3
cargo ws version minor # 0.7.2 → 0.8.0
cargo ws version major # 0.7.2 → 1.0.0
# Or specify exact version
cargo ws version 1.0.0
# Commit and tag
git add .
git commit -m "chore: bump workspace version to $(grep '^version' Cargo.toml | head -1 | sed 's/.*= *"\([^"]*\)".*/\1/')"
git tag v$(grep '^version' Cargo.toml | head -1 | sed 's/.*= *"\([^"]*\)".*/\1/')
git push origin main --tags
```
### Strategy 2: Individual Crate Versioning
Use this when changes are isolated to specific crates.
#### Using the Helper Script
```bash
# Bump a specific crate
./scripts/bump-crate.sh wrkflw-models patch # 0.7.2 → 0.7.3
./scripts/bump-crate.sh wrkflw-models minor # 0.7.2 → 0.8.0
./scripts/bump-crate.sh wrkflw-models 0.8.5 # Specific version
# The script will:
# 1. Update the crate's Cargo.toml to use explicit version
# 2. Update workspace dependencies
# 3. Show you next steps
```
#### Manual Individual Versioning
If you prefer manual control:
1. **Update the crate's Cargo.toml**:
```toml
# Change from:
version.workspace = true
# To:
version = "0.7.3"
```
2. **Update workspace dependencies**:
```toml
[workspace.dependencies]
wrkflw-models = { path = "crates/models", version = "0.7.3" }
```
3. **Test and commit**:
```bash
cargo check
git add .
git commit -m "bump: wrkflw-models to 0.7.3"
git tag v0.7.3-wrkflw-models
git push origin main --tags
```
## Release Workflows
### Full Workspace Release
```bash
# 1. Make your changes
# 2. Bump version
cargo ws version patch --no-git-commit
# 3. Commit and tag
git add .
git commit -m "chore: release version $(grep '^version' Cargo.toml | head -1 | sed 's/.*= *"\([^"]*\)".*/\1/')"
git tag v$(grep '^version' Cargo.toml | head -1 | sed 's/.*= *"\([^"]*\)".*/\1/')
# 4. Push (this triggers GitHub Actions)
git push origin main --tags
```
### Individual Crate Release
```bash
# 1. Use helper script or manual method above
./scripts/bump-crate.sh wrkflw-models patch
# 2. Follow the script's suggestions
git add .
git commit -m "bump: wrkflw-models to X.Y.Z"
git tag vX.Y.Z-wrkflw-models
git push origin main --tags
# 3. Optionally publish to crates.io
cd crates/models
cargo publish
```
## Publishing to crates.io
### Publishing Individual Crates
```bash
# Navigate to the crate
cd crates/models
# Ensure all dependencies are published first
# (or available on crates.io)
cargo publish --dry-run
# Publish
cargo publish
```
### Publishing All Crates
```bash
# Use cargo-workspaces
cargo ws publish --from-git
```
## Integration with GitHub Actions
The existing `.github/workflows/release.yml` works with both strategies:
- **Tag format `v1.2.3`**: Triggers full workspace release
- **Tag format `v1.2.3-crate-name`**: Could be used for individual crate releases (needs workflow modification)
### Modifying for Individual Crate Releases
To support individual crate releases, you could modify the workflow to:
```yaml
on:
push:
tags:
- 'v*' # Full releases: v1.2.3
- 'v*-wrkflw-*' # Individual releases: v1.2.3-wrkflw-models
```
## Best Practices
### When to Use Each Strategy
**Use Workspace-Wide Versioning when:**
- Making breaking changes across multiple crates
- Major feature releases
- Initial development phases
- Simpler release management is preferred
**Use Individual Crate Versioning when:**
- Changes are isolated to specific functionality
- Different crates have different stability levels
- You want to minimize dependency updates for users
- Publishing to crates.io with different release cadences
### Version Numbering
Follow [Semantic Versioning](https://semver.org/):
- **Patch (0.7.2 → 0.7.3)**: Bug fixes, internal improvements
- **Minor (0.7.2 → 0.8.0)**: New features, backward compatible
- **Major (0.7.2 → 1.0.0)**: Breaking changes
### Dependency Management
- Keep internal dependencies using workspace inheritance
- Only specify explicit versions when a crate diverges from workspace version
- Always test with `cargo check` and `cargo test` before releasing
- Use `cargo tree` to verify dependency resolution
## Troubleshooting
### Common Issues
**Issue**: Cargo complains about version mismatches
```bash
# Solution: Check workspace dependencies match crate versions
grep -r "version.*=" crates/*/Cargo.toml
grep "wrkflw-.*version" Cargo.toml
```
**Issue**: Published crate can't find dependencies
```bash
# Solution: Ensure all dependencies are published to crates.io first
# Or use path dependencies only for local development
```
**Issue**: GitHub Actions fails on tag
```bash
# Solution: Ensure tag format matches workflow trigger
git tag -d v1.2.3 # Delete local tag
git push origin :refs/tags/v1.2.3 # Delete remote tag
git tag v1.2.3 # Recreate with correct format
git push origin v1.2.3
```
## Tools and Commands
### Useful Commands
```bash
# List all workspace members with versions
cargo ws list
# Check all crates
cargo check --workspace
# Test all crates
cargo test --workspace
# Show dependency tree
cargo tree
# Show outdated dependencies
cargo outdated
# Verify publishability
cargo publish --dry-run --manifest-path crates/models/Cargo.toml
```
### Recommended Tools
- `cargo-workspaces`: Workspace management
- `cargo-outdated`: Check for outdated dependencies
- `cargo-audit`: Security audit
- `cargo-machete`: Find unused dependencies
## Migration Notes
If you're migrating from the old hard-coded version system:
1. All internal crate versions are now managed in workspace `Cargo.toml`
2. Individual crates use `crate-name.workspace = true` for internal dependencies
3. Use the helper script or manual process above for individual versioning
4. The system is fully backward compatible with existing workflows

View File

@@ -1,12 +0,0 @@
name: Clippy Test
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Test secrets after clippy fixes
env:
TEST_VAR: ${{ secrets.TEST_SECRET }}
run: |
echo "Secret length: ${#TEST_VAR}"

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "wrkflw-evaluator" name = "wrkflw-evaluator"
version.workspace = true version = "0.7.3"
edition.workspace = true edition.workspace = true
description = "Workflow evaluation functionality for wrkflw execution engine" description = "Workflow evaluation functionality for wrkflw execution engine"
license.workspace = true license.workspace = true
@@ -12,9 +12,9 @@ categories.workspace = true
[dependencies] [dependencies]
# Internal crates # Internal crates
wrkflw-models = { path = "../models", version = "0.7.0" } wrkflw-models.workspace = true
wrkflw-validators = { path = "../validators", version = "0.7.0" } wrkflw-validators.workspace = true
# External dependencies # External dependencies
colored.workspace = true colored.workspace = true
serde_yaml.workspace = true serde_yaml.workspace = true

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "wrkflw-executor" name = "wrkflw-executor"
version.workspace = true version = "0.7.3"
edition.workspace = true edition.workspace = true
description = "Workflow execution engine for wrkflw" description = "Workflow execution engine for wrkflw"
license.workspace = true license.workspace = true
@@ -12,13 +12,13 @@ categories.workspace = true
[dependencies] [dependencies]
# Internal crates # Internal crates
wrkflw-models = { path = "../models", version = "0.7.0" } wrkflw-models.workspace = true
wrkflw-parser = { path = "../parser", version = "0.7.0" } wrkflw-parser.workspace = true
wrkflw-runtime = { path = "../runtime", version = "0.7.0" } wrkflw-runtime.workspace = true
wrkflw-logging = { path = "../logging", version = "0.7.0" } wrkflw-logging.workspace = true
wrkflw-matrix = { path = "../matrix", version = "0.7.0" } wrkflw-matrix.workspace = true
wrkflw-secrets = { path = "../secrets", version = "0.7.0" } wrkflw-secrets.workspace = true
wrkflw-utils = { path = "../utils", version = "0.7.0" } wrkflw-utils.workspace = true
# External dependencies # External dependencies
async-trait.workspace = true async-trait.workspace = true

View File

@@ -1538,7 +1538,16 @@ async fn execute_step(ctx: StepExecutionContext<'_>) -> Result<StepResult, Execu
let container_workspace = Path::new("/github/workspace"); let container_workspace = Path::new("/github/workspace");
// Set up volume mapping from host working dir to container workspace // Set up volume mapping from host working dir to container workspace
let volumes: Vec<(&Path, &Path)> = vec![(ctx.working_dir, container_workspace)]; let mut volumes: Vec<(&Path, &Path)> = vec![(ctx.working_dir, container_workspace)];
// Also mount the GitHub environment files directory if GITHUB_ENV is set
if let Some(github_env_path) = ctx.job_env.get("GITHUB_ENV") {
if let Some(github_dir) = Path::new(github_env_path).parent() {
if let Some(github_parent) = github_dir.parent() {
volumes.push((github_parent, github_parent));
}
}
}
let output = ctx let output = ctx
.runtime .runtime
@@ -1687,7 +1696,16 @@ async fn execute_step(ctx: StepExecutionContext<'_>) -> Result<StepResult, Execu
let container_workspace = Path::new("/github/workspace"); let container_workspace = Path::new("/github/workspace");
// Set up volume mapping from host working dir to container workspace // Set up volume mapping from host working dir to container workspace
let volumes: Vec<(&Path, &Path)> = vec![(ctx.working_dir, container_workspace)]; let mut volumes: Vec<(&Path, &Path)> = vec![(ctx.working_dir, container_workspace)];
// Also mount the GitHub environment files directory if GITHUB_ENV is set
if let Some(github_env_path) = ctx.job_env.get("GITHUB_ENV") {
if let Some(github_dir) = Path::new(github_env_path).parent() {
if let Some(github_parent) = github_dir.parent() {
volumes.push((github_parent, github_parent));
}
}
}
// Execute the command // Execute the command
match ctx match ctx
@@ -2071,6 +2089,10 @@ async fn execute_reusable_workflow_job(
ExecutionError::Execution(format!("Failed to create temp dir: {}", e)) ExecutionError::Execution(format!("Failed to create temp dir: {}", e))
})?; })?;
let repo_url = format!("https://github.com/{}/{}.git", owner, repo); let repo_url = format!("https://github.com/{}/{}.git", owner, repo);
// Clone into a subdirectory within tempdir to get clean structure
let repo_dir = tempdir.path().join("cloned_repo");
// git clone // git clone
let status = Command::new("git") let status = Command::new("git")
.arg("clone") .arg("clone")
@@ -2079,7 +2101,7 @@ async fn execute_reusable_workflow_job(
.arg("--branch") .arg("--branch")
.arg(&r#ref) .arg(&r#ref)
.arg(&repo_url) .arg(&repo_url)
.arg(tempdir.path()) .arg(&repo_dir)
.status() .status()
.map_err(|e| ExecutionError::Execution(format!("Failed to execute git: {}", e)))?; .map_err(|e| ExecutionError::Execution(format!("Failed to execute git: {}", e)))?;
if !status.success() { if !status.success() {
@@ -2088,18 +2110,93 @@ async fn execute_reusable_workflow_job(
repo_url, r#ref repo_url, r#ref
))); )));
} }
let joined = tempdir.path().join(path); let joined = repo_dir.join(path);
if !joined.exists() { if !joined.exists() {
return Err(ExecutionError::Execution(format!( return Err(ExecutionError::Execution(format!(
"Reusable workflow file not found in repo: {}", "Reusable workflow file not found in repo: {}",
joined.display() joined.display()
))); )));
} }
joined
// Parse called workflow while keeping tempdir alive
let called = parse_workflow(&joined)?;
// Create child env context
let mut child_env = ctx.env_context.clone();
if let Some(with_map) = with {
for (k, v) in with_map {
child_env.insert(format!("INPUT_{}", k.to_uppercase()), v.clone());
}
}
if let Some(secrets_val) = secrets {
if let Some(map) = secrets_val.as_mapping() {
for (k, v) in map {
if let (Some(key), Some(value)) = (k.as_str(), v.as_str()) {
child_env.insert(
format!("SECRET_{}", key.to_uppercase()),
value.to_string(),
);
}
}
}
}
// Execute called workflow
let plan = dependency::resolve_dependencies(&called)?;
let mut all_results = Vec::new();
let mut any_failed = false;
for batch in plan {
let results = execute_job_batch(
&batch,
&called,
ctx.runtime,
&child_env,
ctx.verbose,
None,
None,
)
.await?;
for r in &results {
if r.status == JobStatus::Failure {
any_failed = true;
}
}
all_results.extend(results);
}
// Summarize into a single JobResult
let mut logs = String::new();
logs.push_str(&format!("Called workflow: {}\n", joined.display()));
for r in &all_results {
logs.push_str(&format!("- {}: {:?}\n", r.name, r.status));
}
// Represent as one summary step for UI
let summary_step = StepResult {
name: format!("Run reusable workflow: {}", uses),
status: if any_failed {
StepStatus::Failure
} else {
StepStatus::Success
},
output: logs.clone(),
};
return Ok(JobResult {
name: ctx.job_name.to_string(),
status: if any_failed {
JobStatus::Failure
} else {
JobStatus::Success
},
steps: vec![summary_step],
logs,
});
} }
}; };
// Parse called workflow // Parse called workflow (for local paths)
let called = parse_workflow(&workflow_path)?; let called = parse_workflow(&workflow_path)?;
// Create child env context // Create child env context

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "wrkflw-github" name = "wrkflw-github"
version.workspace = true version = "0.7.3"
edition.workspace = true edition.workspace = true
description = "GitHub API integration for wrkflw workflow execution engine" description = "GitHub API integration for wrkflw workflow execution engine"
license.workspace = true license.workspace = true
@@ -12,7 +12,7 @@ categories.workspace = true
[dependencies] [dependencies]
# Internal crates # Internal crates
wrkflw-models = { path = "../models", version = "0.7.0" } wrkflw-models.workspace = true
# External dependencies from workspace # External dependencies from workspace
serde.workspace = true serde.workspace = true

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "wrkflw-gitlab" name = "wrkflw-gitlab"
version.workspace = true version = "0.7.3"
edition.workspace = true edition.workspace = true
description = "GitLab API integration for wrkflw workflow execution engine" description = "GitLab API integration for wrkflw workflow execution engine"
license.workspace = true license.workspace = true
@@ -12,7 +12,7 @@ categories.workspace = true
[dependencies] [dependencies]
# Internal crates # Internal crates
wrkflw-models = { path = "../models", version = "0.7.0" } wrkflw-models.workspace = true
# External dependencies # External dependencies
lazy_static.workspace = true lazy_static.workspace = true

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "wrkflw-logging" name = "wrkflw-logging"
version.workspace = true version = "0.7.3"
edition.workspace = true edition.workspace = true
description = "Logging functionality for wrkflw workflow execution engine" description = "Logging functionality for wrkflw workflow execution engine"
license.workspace = true license.workspace = true
@@ -12,7 +12,7 @@ categories.workspace = true
[dependencies] [dependencies]
# Internal crates # Internal crates
wrkflw-models = { path = "../models", version = "0.7.0" } wrkflw-models.workspace = true
# External dependencies # External dependencies
chrono.workspace = true chrono.workspace = true

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "wrkflw-matrix" name = "wrkflw-matrix"
version.workspace = true version = "0.7.3"
edition.workspace = true edition.workspace = true
description = "Matrix job parallelization for wrkflw workflow execution engine" description = "Matrix job parallelization for wrkflw workflow execution engine"
license.workspace = true license.workspace = true
@@ -12,7 +12,7 @@ categories.workspace = true
[dependencies] [dependencies]
# Internal crates # Internal crates
wrkflw-models = { path = "../models", version = "0.7.0" } wrkflw-models.workspace = true
# External dependencies # External dependencies
indexmap.workspace = true indexmap.workspace = true

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "wrkflw-models" name = "wrkflw-models"
version.workspace = true version = "0.7.3"
edition.workspace = true edition.workspace = true
description = "Data models and structures for wrkflw workflow execution engine" description = "Data models and structures for wrkflw workflow execution engine"
license.workspace = true license.workspace = true
@@ -14,4 +14,4 @@ categories.workspace = true
serde.workspace = true serde.workspace = true
serde_yaml.workspace = true serde_yaml.workspace = true
serde_json.workspace = true serde_json.workspace = true
thiserror.workspace = true thiserror.workspace = true

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "wrkflw-parser" name = "wrkflw-parser"
version.workspace = true version = "0.7.3"
edition.workspace = true edition.workspace = true
description = "Workflow parsing functionality for wrkflw execution engine" description = "Workflow parsing functionality for wrkflw execution engine"
license.workspace = true license.workspace = true
@@ -12,8 +12,8 @@ categories.workspace = true
[dependencies] [dependencies]
# Internal crates # Internal crates
wrkflw-models = { path = "../models", version = "0.7.0" } wrkflw-models.workspace = true
wrkflw-matrix = { path = "../matrix", version = "0.7.0" } wrkflw-matrix.workspace = true
# External dependencies # External dependencies
jsonschema.workspace = true jsonschema.workspace = true

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "wrkflw-runtime" name = "wrkflw-runtime"
version.workspace = true version = "0.7.3"
edition.workspace = true edition.workspace = true
description = "Runtime execution environment for wrkflw workflow engine" description = "Runtime execution environment for wrkflw workflow engine"
license.workspace = true license.workspace = true
@@ -12,19 +12,19 @@ categories.workspace = true
[dependencies] [dependencies]
# Internal crates # Internal crates
wrkflw-models = { path = "../models", version = "0.7.0" } wrkflw-models.workspace = true
wrkflw-logging = { path = "../logging", version = "0.7.0" } wrkflw-logging.workspace = true
# External dependencies # External dependencies
async-trait.workspace = true async-trait.workspace = true
once_cell = "1.19" once_cell.workspace = true
serde.workspace = true serde.workspace = true
serde_yaml.workspace = true serde_yaml.workspace = true
tempfile = "3.9" tempfile.workspace = true
tokio.workspace = true tokio.workspace = true
futures = "0.3" futures.workspace = true
ignore = "0.4" ignore = "0.4"
wrkflw-utils = { path = "../utils", version = "0.7.0" } wrkflw-utils.workspace = true
which = "4.4" which.workspace = true
regex = "1.10" regex.workspace = true
thiserror = "1.0" thiserror.workspace = true

View File

@@ -1,30 +1,35 @@
[package] [package]
name = "wrkflw-secrets" name = "wrkflw-secrets"
version = "0.7.1" version = "0.7.3"
edition = "2021" edition.workspace = true
authors = ["wrkflw contributors"] description = "Secrets management for wrkflw workflow execution engine"
description = "Secrets management for wrkflw workflow execution" license.workspace = true
license = "MIT" documentation.workspace = true
keywords = ["secrets", "workflow", "ci-cd", "github-actions"] homepage.workspace = true
categories = ["development-tools"] repository.workspace = true
keywords.workspace = true
categories.workspace = true
[dependencies] [dependencies]
serde = { version = "1.0", features = ["derive"] } # External dependencies
serde_json = "1.0" serde.workspace = true
serde_yaml = "0.9" serde_json.workspace = true
tokio = { version = "1.0", features = ["full"] } serde_yaml.workspace = true
tokio.workspace = true
thiserror.workspace = true
dirs.workspace = true
regex.workspace = true
lazy_static.workspace = true
chrono = { workspace = true, features = ["serde"] }
async-trait.workspace = true
# Dependencies not in workspace
anyhow = "1.0" anyhow = "1.0"
thiserror = "1.0"
base64 = "0.21" base64 = "0.21"
aes-gcm = "0.10" aes-gcm = "0.10"
rand = "0.8" rand = "0.8"
dirs = "5.0"
tracing = "0.1" tracing = "0.1"
regex = "1.10"
url = "2.4" url = "2.4"
async-trait = "0.1"
lazy_static = "1.4"
chrono = { version = "0.4", features = ["serde"] }
pbkdf2 = "0.12" pbkdf2 = "0.12"
hmac = "0.12" hmac = "0.12"
sha2 = "0.10" sha2 = "0.10"
@@ -46,9 +51,9 @@ file-provider = []
# all-providers = ["vault-provider", "aws-provider", "azure-provider", "gcp-provider"] # all-providers = ["vault-provider", "aws-provider", "azure-provider", "gcp-provider"]
[dev-dependencies] [dev-dependencies]
tempfile = "3.8" tempfile.workspace = true
tokio-test = "0.4" tokio-test = "0.4"
uuid = { version = "1.6", features = ["v4"] } uuid.workspace = true
criterion = { version = "0.5", features = ["html_reports"] } criterion = { version = "0.5", features = ["html_reports"] }
[[bench]] [[bench]]

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "wrkflw-ui" name = "wrkflw-ui"
version.workspace = true version = "0.7.3"
edition.workspace = true edition.workspace = true
description = "Terminal user interface for wrkflw workflow execution engine" description = "Terminal user interface for wrkflw workflow execution engine"
license.workspace = true license.workspace = true
@@ -12,12 +12,12 @@ categories.workspace = true
[dependencies] [dependencies]
# Internal crates # Internal crates
wrkflw-models = { path = "../models", version = "0.7.0" } wrkflw-models.workspace = true
wrkflw-evaluator = { path = "../evaluator", version = "0.7.0" } wrkflw-evaluator.workspace = true
wrkflw-executor = { path = "../executor", version = "0.7.0" } wrkflw-executor.workspace = true
wrkflw-logging = { path = "../logging", version = "0.7.0" } wrkflw-logging.workspace = true
wrkflw-utils = { path = "../utils", version = "0.7.0" } wrkflw-utils.workspace = true
wrkflw-github = { path = "../github", version = "0.7.0" } wrkflw-github.workspace = true
# External dependencies # External dependencies
chrono.workspace = true chrono.workspace = true

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "wrkflw-utils" name = "wrkflw-utils"
version.workspace = true version = "0.7.3"
edition.workspace = true edition.workspace = true
description = "Utility functions for wrkflw workflow execution engine" description = "Utility functions for wrkflw workflow execution engine"
license.workspace = true license.workspace = true
@@ -12,7 +12,7 @@ categories.workspace = true
[dependencies] [dependencies]
# Internal crates # Internal crates
wrkflw-models = { path = "../models", version = "0.7.0" } wrkflw-models.workspace = true
# External dependencies # External dependencies
serde.workspace = true serde.workspace = true

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "wrkflw-validators" name = "wrkflw-validators"
version.workspace = true version = "0.7.3"
edition.workspace = true edition.workspace = true
description = "Workflow validation functionality for wrkflw execution engine" description = "Workflow validation functionality for wrkflw execution engine"
license.workspace = true license.workspace = true
@@ -12,8 +12,8 @@ categories.workspace = true
[dependencies] [dependencies]
# Internal crates # Internal crates
wrkflw-models = { path = "../models", version = "0.7.0" } wrkflw-models.workspace = true
wrkflw-matrix = { path = "../matrix", version = "0.7.0" } wrkflw-matrix.workspace = true
# External dependencies # External dependencies
serde.workspace = true serde.workspace = true

View File

@@ -12,18 +12,18 @@ license.workspace = true
[dependencies] [dependencies]
# Workspace crates # Workspace crates
wrkflw-models = { path = "../models", version = "0.7.0" } wrkflw-models.workspace = true
wrkflw-executor = { path = "../executor", version = "0.7.0" } wrkflw-executor.workspace = true
wrkflw-github = { path = "../github", version = "0.7.0" } wrkflw-github.workspace = true
wrkflw-gitlab = { path = "../gitlab", version = "0.7.0" } wrkflw-gitlab.workspace = true
wrkflw-logging = { path = "../logging", version = "0.7.0" } wrkflw-logging.workspace = true
wrkflw-matrix = { path = "../matrix", version = "0.7.0" } wrkflw-matrix.workspace = true
wrkflw-parser = { path = "../parser", version = "0.7.0" } wrkflw-parser.workspace = true
wrkflw-runtime = { path = "../runtime", version = "0.7.0" } wrkflw-runtime.workspace = true
wrkflw-ui = { path = "../ui", version = "0.7.0" } wrkflw-ui.workspace = true
wrkflw-utils = { path = "../utils", version = "0.7.0" } wrkflw-utils.workspace = true
wrkflw-validators = { path = "../validators", version = "0.7.0" } wrkflw-validators.workspace = true
wrkflw-evaluator = { path = "../evaluator", version = "0.7.0" } wrkflw-evaluator.workspace = true
# External dependencies # External dependencies
clap.workspace = true clap.workspace = true
@@ -62,4 +62,4 @@ path = "src/lib.rs"
[[bin]] [[bin]]
name = "wrkflw" name = "wrkflw"
path = "src/main.rs" path = "src/main.rs"

View File

@@ -1,13 +0,0 @@
name: Final Secrets Test
on: [push]
jobs:
verify-secrets:
runs-on: ubuntu-latest
steps:
- name: Test secrets are working
env:
SECRET_VAL: ${{ secrets.TEST_SECRET }}
run: |
echo "Secret length: ${#SECRET_VAL}"
echo "All secrets functionality verified!"

97
scripts/bump-crate.sh Executable file
View File

@@ -0,0 +1,97 @@
#!/bin/bash
# Script to bump individual crate versions and update workspace dependencies
# Usage: ./scripts/bump-crate.sh <crate-name> <version-type>
# Example: ./scripts/bump-crate.sh wrkflw-models patch
# Example: ./scripts/bump-crate.sh wrkflw-models 0.7.5
set -e
CRATE_NAME="$1"
VERSION_TYPE="$2"
if [[ -z "$CRATE_NAME" || -z "$VERSION_TYPE" ]]; then
echo "Usage: $0 <crate-name> <version-type>"
echo " crate-name: Name of the crate to bump (e.g., wrkflw-models)"
echo " version-type: patch|minor|major or specific version (e.g., 0.7.5)"
echo ""
echo "Available crates:"
ls crates/ | grep -v README.md
exit 1
fi
CRATE_DIR="crates/${CRATE_NAME#wrkflw-}"
if [[ ! -d "$CRATE_DIR" ]]; then
echo "Error: Crate directory '$CRATE_DIR' not found"
echo "Available crates:"
ls crates/ | grep -v README.md
exit 1
fi
echo "Bumping $CRATE_NAME with $VERSION_TYPE..."
# Get current version from the crate's Cargo.toml
CURRENT_VERSION=$(grep "^version" "$CRATE_DIR/Cargo.toml" | head -1 | sed 's/.*= *"\([^"]*\)".*/\1/' | sed 's/.*workspace *= *true.*//')
if [[ "$CURRENT_VERSION" == "" ]]; then
# If using workspace version, get it from workspace Cargo.toml
CURRENT_VERSION=$(grep "^version" Cargo.toml | head -1 | sed 's/.*= *"\([^"]*\)".*/\1/')
echo "Current workspace version: $CURRENT_VERSION"
else
echo "Current crate version: $CURRENT_VERSION"
fi
# Calculate new version
if [[ "$VERSION_TYPE" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
NEW_VERSION="$VERSION_TYPE"
else
# Use semver logic for patch/minor/major
IFS='.' read -ra VERSION_PARTS <<< "$CURRENT_VERSION"
MAJOR="${VERSION_PARTS[0]}"
MINOR="${VERSION_PARTS[1]}"
PATCH="${VERSION_PARTS[2]}"
case "$VERSION_TYPE" in
"patch")
NEW_VERSION="$MAJOR.$MINOR.$((PATCH + 1))"
;;
"minor")
NEW_VERSION="$MAJOR.$((MINOR + 1)).0"
;;
"major")
NEW_VERSION="$((MAJOR + 1)).0.0"
;;
*)
echo "Error: Invalid version type. Use patch|minor|major or specify exact version"
exit 1
;;
esac
fi
echo "New version: $NEW_VERSION"
# Update the crate's Cargo.toml to use explicit version instead of workspace
sed -i.bak "s/version\.workspace = true/version = \"$NEW_VERSION\"/" "$CRATE_DIR/Cargo.toml"
# Update the workspace Cargo.toml with the new version
if grep -q "$CRATE_NAME.*version.*=" Cargo.toml; then
sed -i.bak "s/\($CRATE_NAME.*version = \"\)[^\"]*\"/\1$NEW_VERSION\"/" Cargo.toml
else
echo "Warning: $CRATE_NAME not found in workspace dependencies"
fi
# Clean up backup files
rm -f "$CRATE_DIR/Cargo.toml.bak" Cargo.toml.bak
echo ""
echo "✅ Successfully bumped $CRATE_NAME to version $NEW_VERSION"
echo ""
echo "Next steps:"
echo "1. Review the changes: git diff"
echo "2. Test the build: cargo check"
echo "3. Commit the changes: git add . && git commit -m 'bump: $CRATE_NAME to $NEW_VERSION'"
echo "4. Create a tag: git tag v$NEW_VERSION-$CRATE_NAME"
echo "5. Push: git push origin main --tags"
echo ""
echo "To publish individual crate:"
echo " cd $CRATE_DIR && cargo publish"