Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ JSON_LOGS=false # Set to 'true' for JSON-formatted logs (recommended for produc
# UPSTASH_REDIS_TOKEN=your-redis-token

# S3 Assets Configuration
CRITERIA_ASSETS_BUCKET_NAME=autograder-assets
CRITERIA_ASSETS_IN_MEMORY_CACHE_LIMIT=100
EXTERNAL_ASSETS_BUCKET_NAME=autograder-assets
EXTERNAL_ASSETS_IN_MEMORY_CACHE_LIMIT=100
AWS_ACCESS_KEY_ID=test
AWS_SECRET_ACCESS_KEY=test
AWS_REGION=us-east-1
Expand Down
2 changes: 1 addition & 1 deletion autograder/services/assets/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class AssetSourceResolver:
def __init__(self):
in_memory_limit = int(os.getenv("CRITERIA_ASSETS_IN_MEMORY_CACHE_LIMIT", "100"))
in_memory_limit = int(os.getenv("EXTERNAL_ASSETS_IN_MEMORY_CACHE_LIMIT", "100"))
self.cache_manager = AssetCacheManager(in_memory_limit=in_memory_limit)
self.provider = S3AssetProvider(self.cache_manager)
Comment on lines 12 to 15
Comment on lines 12 to 15

Expand Down
2 changes: 1 addition & 1 deletion autograder/services/assets/s3_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def __init__(self, cache_manager: AssetCacheManager):
self.cache_manager = cache_manager

# Environment variables
self.bucket_name = os.getenv("CRITERIA_ASSETS_BUCKET_NAME")
self.bucket_name = os.getenv("EXTERNAL_ASSETS_BUCKET_NAME")
self.access_key = os.getenv("AWS_ACCESS_KEY_ID") or os.getenv("AWS_ACCESS_ID")
self.secret_key = os.getenv("AWS_SECRET_ACCESS_KEY")
self.region = os.getenv("AWS_REGION", "us-east-1")
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ services:
API_PORT: 8000

# S3 Assets Configuration
CRITERIA_ASSETS_BUCKET_NAME: autograder-assets
EXTERNAL_ASSETS_BUCKET_NAME: autograder-assets
AWS_ACCESS_ID: test
AWS_SECRET_ACCESS_KEY: test
AWS_REGION: us-east-1
Expand Down
2 changes: 1 addition & 1 deletion docs/features/setup_config_feature.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Assets are resolved and injected **before** language-specific setup commands run
For asset injection to work, the autograder API must be configured with S3 credentials. In a development environment using the provided `docker-compose.yml`, this is handled by the `ministack` service.

Required environment variables:
- `CRITERIA_ASSETS_BUCKET_NAME`: The name of the S3 bucket.
- `EXTERNAL_ASSETS_BUCKET_NAME`: The name of the S3 bucket.
- `S3_ENDPOINT_URL`: The URL of the S3 service (e.g., `http://ministack:4566`).
- `AWS_ACCESS_ID` & `AWS_SECRET_ACCESS_KEY`: Credentials for the S3 provider.

Comment on lines 70 to 71
Expand Down
Loading