Skip to content

Commit

Permalink
fix(actor): increase max actor & build tag length
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanFlurry authored and MasterPtato committed Jan 2, 2025
1 parent 16e5c2d commit 35f4e53
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
12 changes: 6 additions & 6 deletions packages/api/actor/src/route/actors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -573,11 +573,11 @@ pub async fn upgrade_all(
error = "tags[]: Tag label cannot be empty."
);
ensure_with!(
k.len() <= 16,
k.len() <= 32,
API_BAD_BODY,
error = format!(
"tags[{:?}]: Tag label too large (max 256 bytes).",
util::safe_slice(k, 0, 16),
"tags[{:?}]: Tag label too large (max 32 bytes).",
util::safe_slice(k, 0, 32),
),
);
ensure_with!(
Expand Down Expand Up @@ -937,11 +937,11 @@ async fn resolve_build(
error = "build_tags[]: Build tag label cannot be empty."
);
ensure_with!(
k.len() < 16,
k.len() < 32,
API_BAD_BODY,
error = format!(
"build_tags[{:?}]: Build tag label too large (max 16 bytes).",
util::safe_slice(k, 0, 16),
"build_tags[{:?}]: Build tag label too large (max 32 bytes).",
util::safe_slice(k, 0, 32),
)
);
ensure_with!(
Expand Down
6 changes: 3 additions & 3 deletions packages/api/actor/src/route/builds.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,11 @@ pub async fn patch_tags(
error = "tags[]: Tag label cannot be empty."
);
ensure_with!(
k.len() <= 16,
k.len() <= 32,
ACTOR_BUILD_INVALID_PATCH_CONFIG,
error = format!(
"tags[{:?}]: Tag label too large (max 16).",
util::safe_slice(k, 0, 16),
"tags[{:?}]: Tag label too large (max 32).",
util::safe_slice(k, 0, 32),
)
);
if let Some(v) = v {
Expand Down
6 changes: 3 additions & 3 deletions packages/services/ds/src/workflows/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,10 @@ async fn validate(ctx: &ActivityCtx, input: &ValidateInput) -> GlobalResult<Opti
if k.is_empty() {
return Ok(Some("tags[]: Tag label cannot be empty.".into()));
}
if k.len() > 16 {
if k.len() > 32 {
return Ok(Some(format!(
"tags[{:?}]: Tag label too large (max 16 bytes).",
util::safe_slice(k, 0, 16),
"tags[{:?}]: Tag label too large (max 32 bytes).",
util::safe_slice(k, 0, 32),
)));
}
if v.is_empty() {
Expand Down
2 changes: 1 addition & 1 deletion site/src/content/docs/limitations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
| Feature | Limit |
| ------------- | ---------- |
| **Tags** | 8 tags |
| **Tag Key** | 16 bytes |
| **Tag Key** | 32 bytes |
| **Tag Value** | 1024 bytes |

{/* TODO: Rivet Guard: max in flight & request rate limit once this is finalized */}

0 comments on commit 35f4e53

Please sign in to comment.