Skip to content

Commit 783b900

Browse files
committed
Build AZURE_STORAGE_CONNECTION_STRING from bricks
1 parent b41d8cd commit 783b900

File tree

2 files changed

+135
-2
lines changed

2 files changed

+135
-2
lines changed

CHANGELOG.md

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,129 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

77
## Unreleased
8+
- Use country_plan document_url if possible – or the downloaded file
9+
- Fix truncated appealdoc URL-s
10+
- Use 3 api keys for ingest_ns_initiatives
11+
- Forbid p-wrapping for TinyMCE (for iframes also)
12+
- Replace poetry with uv
13+
- ESF, NSIA, CBF URL change
14+
- Add missing pytz
15+
- Revert back azure blob dependencies
16+
- Pin poetry version in Dockerfile
17+
- Default to AZURE_STORAGE in helm chart config
18+
- Add missing static template tag
19+
- Add documentation for playwright exports
20+
- Remove title generation for emergency
21+
- NS-requests-assistance sign/filter to Admin listing page
22+
- Add country name on search for emergency
23+
- Fix start-date on emergency and add name on readonly fields
24+
- Fix Snapshot test cases
25+
- Use static template tags for go-logo in admin panel
26+
- Set ERP_API_MAX_REQ_TIMEOUT to 1 min
27+
- Replace custom redis with bitnami redis with persistence storage
28+
- Playwright task updates
29+
- Azure blob storage additional config
30+
- Add support for S3 storage backend
31+
- Add helm dependencies step in CI
32+
- Add char c in docker/helm TAG
33+
- Add bitnami postgresql as helm dependency
34+
- Change GO_API_FQDN/BASE_URL to GO_API_URL
35+
- add request timeout for erp api endpoint
36+
- Add GO_WEB_URL to replace FRONTEND_URL internally
37+
- Add GO_WEB_INTERNAL_URL for local development
38+
- Use English dtype name for ERP sending
39+
- Log ERP payload
40+
- Temporary send_notification disabling on LU-s
41+
- Fix Translation for disaster on fieldreport and event
42+
- FieldReports visibility in reviewed countries
43+
- Add filter for appeal_type in EventFilter.
44+
- Use docker build from CI for helm publish
45+
- Remove json wrapped content from openAI completions response
46+
- Change GH worflow job names to better visibility in PR
47+
- Regenerating fr num for field report
48+
- Filter option for country_to in PersonnelFilter
49+
- Set fr_num to None if event changed
50+
- Search option for role in PersonnelFilter
51+
- Fix prompt generation and add instruction to sector and component
52+
- Some more ordering fields. Pinned sitreps first.
53+
- Type column to appealdocs listing
54+
- Add validation for budget and update test cases
55+
- Refactor appeal type in search
56+
- fix sources stats on ops learning
57+
- Add test cases for dref imminent and purposed_action
58+
- Add validation check for the surge deployment
59+
- Option to temporary disabling email sending
60+
- Fix error message on email notification Replace error on exception to warning
61+
- Change activities to activity
62+
- Change sync_molnix schedule
63+
- Add styles from IFRC GO base styles and UI components
64+
- Molnix data structure change
65+
- Add docs for using SSO (local development)
66+
- Add config to disable OIDC
67+
- Add cleartokens cronjob to clear expired tokens
68+
- Add login form page and logout page
69+
- Add logic to remove subcomponent of component14
70+
- Add logic to migrate fieldreport number
71+
- Bump django from 4.2.17 to 4.2.18
72+
- Fix status code and message
73+
- Add start_date field in MicroAppealSerializer
74+
- Handle is_pga to pdf-export url
75+
- Remove unused fields from dreffinal and operational serializer
76+
- Add changes on purposed action and fix test cases
77+
- Add new fields and supporting files in dref application
78+
- Reduce cpu request for api deployment
79+
- Change created_at auto_now to auto_now_add
80+
- tool.poetry.group.dev.dependencies instead of tool.poetry.dev-dependencies
81+
- Fix links in email notifications
82+
- Add fields for hazard-related questions and guidance
83+
- Separate api calls for secondary summaries
84+
- fix grouping issue on secondary summary generation
85+
- Change excerpt priotization logic
86+
- Add proposed action fields and validation
87+
- Add local unit local branch name in email context
88+
- Fix synx_molnix position_id issue
89+
- Add additionalenv in configmap
90+
- Allow field report fields to be blank on admin
91+
- Generate title api for field report
92+
- Email Implementation on local units
93+
- Install django-oauth-toolkit
94+
- Fix logging issue
95+
- Add Oauth openid configurations
96+
- Set readonly fields on LocalUnit Admin panel
97+
- Fix issue on deprecare reason overview
98+
- Validate the local unit on revert
99+
- Remove filter on latest change request api
100+
- Operational learning stats API
101+
- Change field name in option api and add exclude deprecated local unit
102+
- Fix typing issue on previous_data (JsonField)
103+
- Add Validators level check in permission
104+
- Add location_json field for location coordinate
105+
- Add API to deprecate local unit
106+
- Add admin panel for localunit snapshot and restrict mutation
107+
- Add permission for the region level validator and change location_json field
108+
- LocalUnit: Create, Update, Revert, Latest changes Apis
109+
- Bump django from 4.2.16 to 4.2.17
110+
- Add new fields and Snapshot model for localunit
111+
- Add 5 columns to districts
112+
- Fix icrc scraping for country group Add list of mismatch name countries
113+
- Add organization type api and enum for learning type
114+
- Add dummydata for project csv api snapshot test
115+
- Use dtype, country and region to filter notifications. Tests.
116+
- Fix snapshot tests
117+
- Add post processing to check excerpts in summary
118+
- Add filters for operational learning and refine summary content
119+
- Add fieldreport number logic and suffic for covid
120+
- Add regenerate summary action in admin
121+
- Fix icrc ingestion operation scraping logic
122+
- Admin dark-mode issue fix
123+
- fix translation issue on primary summary Add Lazytranslation flag for translation
124+
- Fix log noise + translation limit error beyond 50000 chars
125+
- Fix fts-hpc-issue and sentry issue
126+
- Add Admin panel for ops learning summary and SectorTag translation
127+
- Change label in per excel export
128+
- Add validation check for the validated extracts and fix sentry issue
129+
- Fix usages for self in classmethod
130+
- Add missing translation trigger for Ops learning
8131

9132
## 1.1.503
10133

main/settings.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,14 +470,24 @@ def parse_domain(*env_keys: str) -> str:
470470
AZURE_STORAGE_KEY = env("AZURE_STORAGE_KEY")
471471

472472
if env("AZURE_STORAGE_ENABLED"):
473+
if AZURE_STORAGE_ACCOUNT and AZURE_STORAGE_KEY:
474+
AZURE_STORAGE_CONNECTION_STRING = (
475+
"DefaultEndpointsProtocol=https;AccountName="
476+
+ AZURE_STORAGE_ACCOUNT
477+
+ ";AccountKey="
478+
+ AZURE_STORAGE_KEY
479+
+ ";EndpointSuffix=core.windows.net"
480+
)
481+
else:
482+
AZURE_STORAGE_CONNECTION_STRING = env("AZURE_STORAGE_CONNECTION_STRING")
473483

474484
STATIC_ROOT = env("DJANGO_STATIC_ROOT")
475485
AZURE_STORAGE_CONFIG_OPTIONS = {
476-
"connection_string": env("AZURE_STORAGE_CONNECTION_STRING"),
486+
"connection_string": AZURE_STORAGE_CONNECTION_STRING,
477487
"overwrite_files": False,
478488
}
479489

480-
if not env("AZURE_STORAGE_CONNECTION_STRING"):
490+
if not AZURE_STORAGE_CONNECTION_STRING:
481491
AZURE_STORAGE_CONFIG_OPTIONS.update(
482492
{
483493
"account_name": env("AZURE_STORAGE_ACCOUNT"),

0 commit comments

Comments
 (0)