Skip to content

Commit 8ab100e

Browse files
authored
Merge pull request #2558 from bcgov/release
Release v1.0.5
2 parents b723f13 + eb0a271 commit 8ab100e

File tree

249 files changed

+11700
-5404
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

249 files changed

+11700
-5404
lines changed

.github/workflows/prod-ci.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -259,21 +259,21 @@ jobs:
259259
PRE_RELEASE: ${{ needs.set-pre-release.outputs.PRE_RELEASE }}
260260

261261
steps:
262-
- name: Checkout Manifest repository
263-
uses: actions/checkout@v3
264-
with:
265-
repository: bcgov-c/tenant-gitops-d2bd59
266-
ref: main
267-
ssh-key: ${{ secrets.MANIFEST_REPO_DEPLOY_KEY }}
268-
269262
- name: Ask for approval for LCFS ${{env.IMAGE_TAG }} Prod deployment
270263
uses: trstringer/manual-approval@v1.6.0
271264
with:
272265
secret: ${{ github.TOKEN }}
273-
approvers: AlexZorkin,kuanfandevops,hamed-valiollahi,airinggov,areyeslo,dhaselhan,Grulin
266+
approvers: AlexZorkin,kuanfandevops,hamed-valiollahi,airinggov,prv-proton,Grulin
274267
minimum-approvals: 2
275268
issue-title: "LCFS ${{env.VERSION }}-${{env.PRE_RELEASE }} Prod Deployment."
276269

270+
- name: Checkout Manifest repository
271+
uses: actions/checkout@v3
272+
with:
273+
repository: bcgov-c/tenant-gitops-d2bd59
274+
ref: main
275+
ssh-key: ${{ secrets.MANIFEST_REPO_DEPLOY_KEY }}
276+
277277
- name: Restore oc command from Cache
278278
uses: actions/cache@v4.2.0
279279
with:

.github/workflows/test-ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ jobs:
267267
uses: trstringer/manual-approval@v1.6.0
268268
with:
269269
secret: ${{ github.TOKEN }}
270-
approvers: AlexZorkin,kuanfandevops,hamed-valiollahi,airinggov,areyeslo,dhaselhan,Grulin,kevin-hashimoto
270+
approvers: AlexZorkin,kuanfandevops,hamed-valiollahi,airinggov,prv-proton,Grulin,kevin-hashimoto
271271
minimum-approvals: 1
272272
issue-title: "LCFS ${{ env.VERSION }}-${{ env.PRE_RELEASE }} Test Deployment at ${{ steps.get-current-time.outputs.CURRENT_TIME }}"
273273

backend/Dockerfile.openshift

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,12 @@ RUN chmod +x /app/wait-for-it.sh /app/lcfs/prestart.sh /app/lcfs/start.sh
4545
# Set the APP_ENVIRONMENT variable to 'production'
4646
ENV APP_ENVIRONMENT=prod
4747

48-
CMD ["/app/lcfs/start.sh"]
48+
# CMD ["/app/lcfs/start.sh"] replaced with the following to allow for config file to be sourced
49+
CMD ["/bin/sh", "-c", "\
50+
for cfg in database redis objectstorage email rabbitmq; do \
51+
if [ -f /vault/secrets/$cfg ]; then \
52+
. /vault/secrets/$cfg; \
53+
fi; \
54+
done; \
55+
/app/lcfs/start.sh\
56+
"]

backend/lcfs/db/dependencies.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@
88

99
from lcfs.db.base import current_user_var, get_current_user
1010
from lcfs.settings import settings
11+
from lcfs.utils.query_analyzer import register_query_analyzer
1112

1213
if settings.environment == "dev":
1314
pass
1415

1516
db_url = make_url(str(settings.db_url.with_path(f"/{settings.db_base}")))
1617
async_engine = create_async_engine(db_url, future=True)
1718
logger = structlog.get_logger("sqlalchemy.engine")
19+
register_query_analyzer(async_engine.sync_engine)
1820

1921

2022
async def set_user_context(session: AsyncSession, username: str):
@@ -26,7 +28,8 @@ async def set_user_context(session: AsyncSession, username: str):
2628

2729
except Exception as e:
2830
structlog.get_logger().error(
29-
f"Failed to execute SET LOCAL app.user_id = '{username}': {e}")
31+
f"Failed to execute SET LOCAL app.user_id = '{username}': {e}"
32+
)
3033
raise e
3134

3235

backend/lcfs/db/migrations/versions/2025-03-05-22-42_fd8ee994668c.py

Lines changed: 0 additions & 102 deletions
This file was deleted.

backend/lcfs/db/migrations/versions/2025-03-11-19-53_6c427c10a63d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
# revision identifiers, used by Alembic.
1515
revision = "6c427c10a63d"
16-
down_revision = "fd8ee994668c"
16+
down_revision = "937c793bf7b8"
1717
branch_labels = None
1818
depends_on = None
1919

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
"""Add Quarterly Fuel Supply Columns
2+
3+
Revision ID: ddc2db9c2def
4+
Revises: 0d5836cb1bf8
5+
Create Date: 2025-04-07 21:48:48.520665
6+
7+
"""
8+
9+
import sqlalchemy as sa
10+
from alembic import op
11+
from alembic_postgresql_enum import TableReference
12+
from sqlalchemy.dialects import postgresql
13+
14+
# revision identifiers, used by Alembic.
15+
revision = "ddc2db9c2def"
16+
down_revision = "0d5836cb1bf8"
17+
branch_labels = None
18+
depends_on = None
19+
20+
21+
def upgrade() -> None:
22+
# ### commands auto generated by Alembic - please adjust! ###
23+
op.add_column(
24+
"fuel_supply",
25+
sa.Column(
26+
"q1_quantity",
27+
sa.Integer(),
28+
nullable=True,
29+
comment="Quantity of fuel supplied in Q1 (early issuance only)",
30+
),
31+
)
32+
op.add_column(
33+
"fuel_supply",
34+
sa.Column(
35+
"q2_quantity",
36+
sa.Integer(),
37+
nullable=True,
38+
comment="Quantity of fuel supplied in Q2 (early issuance only)",
39+
),
40+
)
41+
op.add_column(
42+
"fuel_supply",
43+
sa.Column(
44+
"q3_quantity",
45+
sa.Integer(),
46+
nullable=True,
47+
comment="Quantity of fuel supplied in Q3 (early issuance only)",
48+
),
49+
)
50+
op.add_column(
51+
"fuel_supply",
52+
sa.Column(
53+
"q4_quantity",
54+
sa.Integer(),
55+
nullable=True,
56+
comment="Quantity of fuel supplied in Q4 (early issuance only)",
57+
),
58+
)
59+
op.alter_column(
60+
"fuel_supply",
61+
"quantity",
62+
existing_type=sa.INTEGER(),
63+
nullable=True,
64+
comment="Quantity of fuel supplied (no early issuance)",
65+
existing_comment="Quantity of fuel supplied",
66+
)
67+
# ### end Alembic commands ###
68+
69+
70+
def downgrade() -> None:
71+
# ### commands auto generated by Alembic - please adjust! ###
72+
op.alter_column(
73+
"fuel_supply",
74+
"quantity",
75+
existing_type=sa.INTEGER(),
76+
nullable=False,
77+
comment="Quantity of fuel supplied",
78+
existing_comment="Quantity of fuel supplied (no early issuance)",
79+
)
80+
op.drop_column("fuel_supply", "q4_quantity")
81+
op.drop_column("fuel_supply", "q3_quantity")
82+
op.drop_column("fuel_supply", "q2_quantity")
83+
op.drop_column("fuel_supply", "q1_quantity")
84+
# ### end Alembic commands ###
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
"""Add early issuance summary columns
2+
3+
Revision ID: aa79bc6d6152
4+
Revises: ddc2db9c2def
5+
Create Date: 2025-04-14 19:55:34.930877
6+
7+
"""
8+
9+
import sqlalchemy as sa
10+
from alembic import op
11+
from alembic_postgresql_enum import TableReference
12+
from sqlalchemy.dialects import postgresql
13+
14+
# revision identifiers, used by Alembic.
15+
revision = "aa79bc6d6152"
16+
down_revision = "ddc2db9c2def"
17+
branch_labels = None
18+
depends_on = None
19+
20+
21+
def upgrade() -> None:
22+
op.add_column(
23+
"compliance_report_summary",
24+
sa.Column("early_issuance_credits_q1", sa.Integer(), nullable=True),
25+
)
26+
op.add_column(
27+
"compliance_report_summary",
28+
sa.Column("early_issuance_credits_q2", sa.Integer(), nullable=True),
29+
)
30+
op.add_column(
31+
"compliance_report_summary",
32+
sa.Column("early_issuance_credits_q3", sa.Integer(), nullable=True),
33+
)
34+
op.add_column(
35+
"compliance_report_summary",
36+
sa.Column("early_issuance_credits_q4", sa.Integer(), nullable=True),
37+
)
38+
39+
40+
def downgrade() -> None:
41+
op.drop_column("compliance_report_summary", "early_issuance_credits_q4")
42+
op.drop_column("compliance_report_summary", "early_issuance_credits_q3")
43+
op.drop_column("compliance_report_summary", "early_issuance_credits_q2")
44+
op.drop_column("compliance_report_summary", "early_issuance_credits_q1")

0 commit comments

Comments
 (0)