Skip to content

Commit 71bf9d4

Browse files
committed
Merge branch 'main' into optimization
Merge from main
2 parents 30e4074 + 62b8e9b commit 71bf9d4

13 files changed

Lines changed: 113 additions & 149 deletions

File tree

.github/workflows/build-and-deploy-dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# It builds Docker images from the current branch and deploys them to dev only.
55
#
66
# When to use:
7-
# - Testing feature branches before merging to master
7+
# - Testing feature branches before merging to main
88
# - Manual testing of changes in a controlled environment
99
# - Debugging issues that need to be tested in dev
1010
#

.github/workflows/build-edge.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Build and Push Edge Images
22
#
3-
# This workflow builds Docker images from the master branch and pushes them to the registry.
3+
# This workflow builds Docker images from the main branch and pushes them to the registry.
44
# These images are tagged as 'edge' and represent the latest production-ready code.
55
#
66
# When to use:
7-
# - Automatically triggered when code is pushed to master
7+
# - Automatically triggered when code is pushed to main
88
# - Manually triggered to rebuild edge images
99
#
1010
# What it does:
11-
# - Builds backend, frontend, and Airflow images from master branch
11+
# - Builds backend, frontend, and Airflow images from main branch
1212
# - Tags images as 'edge', commit SHA, and timestamp
1313
# - Pushes images to GitHub Container Registry
1414
# - Triggers the deploy.test.yml workflow when completed
@@ -18,7 +18,7 @@ name: Build and Push Edge Images
1818
on:
1919
push:
2020
branches:
21-
- master
21+
- main
2222
workflow_dispatch:
2323

2424
env:

.github/workflows/dependency-review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Dependency Review
22

33
on:
44
pull_request:
5-
branches: [master]
5+
branches: [main]
66

77
permissions:
88
contents: read

app/airflow/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "carrot-airflow"
3-
version = "4.2.5"
3+
version = "4.2.8"
44
description = "Add your description here"
55
readme = "README.md"
66
requires-python = ">=3.11"

app/airflow/uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/api/config/settings.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,10 @@
240240

241241
# Auth
242242

243-
ACCOUNT_EMAIL_REQUIRED = False
243+
ACCOUNT_SIGNUP_FIELDS = [
244+
"username*",
245+
"password1*",
246+
]
244247
ACCOUNT_EMAIL_VERIFICATION = "none"
245248

246249
SIMPLE_JWT = {

app/api/mapping/management/commands/automatic_queue_and_containers_creation.py

Lines changed: 6 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import os
22

3-
from azure.storage.blob import BlobServiceClient # type: ignore
4-
from azure.storage.queue import QueueServiceClient # type: ignore
5-
from django.core.management.base import BaseCommand # type: ignore
6-
from minio import Minio # type: ignore
3+
from azure.storage.blob import BlobServiceClient
4+
from django.core.management.base import BaseCommand
5+
from minio import Minio
76

87

98
class Command(BaseCommand):
@@ -29,42 +28,7 @@ class Command(BaseCommand):
2928

3029
CONTAINERS = ["scan-reports", "data-dictionaries", "rules-exports", "airflow-logs"]
3130

32-
def _create_azure_queues(self, queue_service: str):
33-
"""
34-
Creates the required Azure Queues.
35-
36-
Args:
37-
queue_service: QueueServiceClient instance.
38-
39-
Returns:
40-
- Creates queue if it doesn't exist
41-
- If the queue exists, it will skip and
42-
returns a message.
43-
"""
44-
try:
45-
for queue_name in self.QUEUES:
46-
queue_client = queue_service.get_queue_client(queue_name)
47-
try:
48-
# Check if the queue exists
49-
queue_client.get_queue_properties()
50-
self.stdout.write(
51-
self.style.WARNING(
52-
f"Queue '{queue_name}' already exists. Skipping creation."
53-
)
54-
)
55-
# If the queue does not exist, create it
56-
except Exception:
57-
queue_client.create_queue()
58-
self.stdout.write(
59-
self.style.SUCCESS(
60-
f"Queue '{queue_name}' created successfully."
61-
)
62-
)
63-
64-
except Exception as e:
65-
raise ValueError(f"Error when creating Azure Queue: {e}")
66-
67-
def _create_blob_containers(self, blob_service: str):
31+
def _create_blob_containers(self, blob_service: BlobServiceClient):
6832
"""
6933
Creates the required Azure Blob Containers.
7034
@@ -96,7 +60,7 @@ def _create_blob_containers(self, blob_service: str):
9660
except Exception as e:
9761
raise ValueError(f"Error when creating Azure Blob Container: {e}")
9862

99-
def _create_minio_buckets(self, minio_client: str):
63+
def _create_minio_buckets(self, minio_client: Minio):
10064
"""
10165
Creates the required MinIO Buckets.
10266
@@ -145,15 +109,11 @@ def _create_azure_resources(self):
145109
return
146110

147111
try:
148-
queue_service = QueueServiceClient.from_connection_string(
149-
self.AZURE_CONN_STRING
150-
)
151112
blob_service = BlobServiceClient.from_connection_string(
152113
self.AZURE_CONN_STRING
153114
)
154115

155-
# Create Queues and Blob Containers
156-
self._create_azure_queues(queue_service)
116+
# Create Blob Containers
157117
self._create_blob_containers(blob_service)
158118

159119
self.stdout.write(self.style.SUCCESS("Azurite Storage setup complete."))

app/api/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "api"
3-
version = "4.2.5"
3+
version = "4.2.8"
44
description = "Web app for Carrot-Mapper"
55

66
authors = [

app/api/uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)