Skip to content

Commit

Permalink
Bump Version 0.5.24
Browse files Browse the repository at this point in the history
  • Loading branch information
blythed committed Feb 6, 2025
1 parent 606dc31 commit 6867e3e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
name = "superduper-framework"
description = "🔮 Bring AI to your favourite database 🔮"
readme = "README.md"
version = '0.5.23'
version = '0.5.24'
license = {file = "LICENSE"}
maintainers = [{name = "superduper.io, Inc.", email = "[email protected]"}]
keywords = [
Expand Down
15 changes: 15 additions & 0 deletions superduper/rest/build.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import hashlib
import json
import os
import re
import shutil
import sys
import tempfile
Expand Down Expand Up @@ -213,6 +214,10 @@ def db_apply(
id: str | None = 'test',
db: 'Datalayer' = DatalayerDependency(),
):

msg = 'Identifier (name) of application should match [a-zA-Z\_0-9]+'
assert re.match('^[a-zA-Z\_0-9]+$', info['identifier']) is not None, msg

if 'REQUIRED_SECRETS' in os.environ:
load_secrets()
check_secrets()
Expand All @@ -222,6 +227,16 @@ def db_apply(
cls_path = info['_builds'][info['_base'][1:]]['_path']
cls = import_object(cls_path)
type_id = cls.type_id
if (type_id, info['identifier']) in PENDING_COMPONENTS and not db.show(type_id, info['identifier']):
raise Exception(f'The component you have added ({type_id}, {info["identifier"]}) '
'is in the pending state')

try:
if db.show(type_id, info['identifier'], -1)['status'] != 'ready':
raise Exception(f'The component {type_id}:{info["identifier"]} is being processed')
except FileNotFoundError:
logging.info(f'Processing a new component {type_id}:{info["identifier"]}')

PENDING_COMPONENTS.add((type_id, info['identifier']))
if '_variables' in info:
info['_variables']['output_prefix'] = CFG.output_prefix
Expand Down

0 comments on commit 6867e3e

Please sign in to comment.