Skip to content

Commit dd3d4ed

Browse files
authored
Release/v1.44.1
1 parent 76a5e93 commit dd3d4ed

File tree

53 files changed

+504
-132
lines changed

Some content is hidden

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

53 files changed

+504
-132
lines changed

.github/workflows/go.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
services:
3838
# Kafka service
3939
kafka:
40-
image: bitnami/kafka:3.4
40+
image: bitnami/kafka:3.4.1
4141
ports:
4242
- "9092:9092"
4343
env:

.github/workflows/website.yml renamed to .github/workflows/website-prod.yml

Lines changed: 3 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ on:
66
push:
77
tags:
88
- "v*.*.*"
9-
branches:
10-
- main
11-
- development
9+
1210
env:
1311
APP_NAME: gofr-website
1412
WEBSITE_REGISTRY: ghcr.io
@@ -39,7 +37,7 @@ jobs:
3937
with:
4038
registry: us-central1-docker.pkg.dev
4139
username: _json_key
42-
password: ${{ secrets.deploy_key }}
40+
password: ${{ secrets.GOFR_WEBSITE_GOFR_DEV_DEPLOYMENT_KEY }}
4341

4442
- name: Log in to the GitHub Container registry
4543
uses: docker/login-action@v3
@@ -74,35 +72,7 @@ jobs:
7472
- id: output-image
7573
run: echo "image=`echo us-central1-docker.pkg.dev/${{ env.GAR_PROJECT }}/${{ env.GAR_REGISTRY }}/${{ env.APP_NAME }}:${{ env.TAG }}`" >> "$GITHUB_OUTPUT"
7674

77-
deployment_stage:
78-
runs-on: ubuntu-latest
79-
if: ${{ github.ref == 'refs/heads/development' }}
80-
name: 🚀 Deploy-Stage
81-
needs: dockerize
82-
container:
83-
image: ghcr.io/zopsmart/gha-images:deployments-0.1.3
84-
options: --rm
85-
env:
86-
image: ${{needs.dockerize.outputs.image}}
87-
88-
steps:
89-
- name: Checkout Code
90-
uses: actions/checkout@v5
91-
92-
- name: Authorize to GCP service account
93-
uses: google-github-actions/auth@v2
94-
with:
95-
credentials_json: ${{ secrets.deploy_key }}
96-
97-
- name: Set GCloud Project and Fetch Cluster Credentials
98-
run: gcloud container clusters get-credentials ${{ env.CLUSTER_NAME }} --region=us-central1 --project=${{ env.CLUSTER_PROJECT }}
99-
100-
- name: Update Deployment Image
101-
run: kubectl set image deployment/${{ env.APP_NAME }} ${{ env.APP_NAME }}=${{ env.image }} --namespace ${{ env.NAMESPACE_STAGE }}
102-
103-
10475
deployment:
105-
if: ${{ startsWith(github.ref, 'refs/tags/v')}}
10676
runs-on: ubuntu-latest
10777
name: 🚀 Deploy-Prod
10878
needs: dockerize
@@ -119,7 +89,7 @@ jobs:
11989
- name: Authorize to GCP service account
12090
uses: google-github-actions/auth@v2
12191
with:
122-
credentials_json: ${{ secrets.deploy_key }}
92+
credentials_json: ${{ secrets.GOFR_WEBSITE_GOFR_DEV_DEPLOYMENT_KEY }}
12393

12494
- name: Set GCloud Project and Fetch Cluster Credentials
12595
run: gcloud container clusters get-credentials ${{ env.CLUSTER_NAME }} --region=us-central1 --project=${{ env.CLUSTER_PROJECT }}

.github/workflows/website-stage.yml

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
name: Build and Deploy Website To Stage
2+
permissions:
3+
contents: read
4+
5+
on:
6+
push:
7+
branches:
8+
- development
9+
10+
env:
11+
APP_NAME: gofr-website
12+
WEBSITE_REGISTRY: ghcr.io
13+
GAR_PROJECT: raramuri-tech
14+
GAR_REGISTRY: kops-dev
15+
CLUSTER_NAME: raramuri-tech
16+
CLUSTER_PROJECT: raramuri-tech
17+
NAMESPACE: gofr-dev
18+
NAMESPACE_STAGE: gofr-dev-stg
19+
20+
jobs:
21+
dockerize:
22+
permissions:
23+
contents: read
24+
packages: write
25+
runs-on: ubuntu-latest
26+
outputs:
27+
image: ${{ steps.output-image.outputs.image }}
28+
name: 🐳 Dockerize
29+
steps:
30+
- name: Checkout Code
31+
uses: actions/checkout@v5
32+
33+
- name: Set up Docker Buildx
34+
uses: docker/setup-buildx-action@v3
35+
36+
- name: Login to GAR
37+
uses: docker/login-action@v3
38+
with:
39+
registry: us-central1-docker.pkg.dev
40+
username: _json_key
41+
password: ${{ secrets.GOFR_WEBSITE_GOFR_DEV_STG_DEPLOYMENT_KEY }}
42+
43+
- name: Log in to the GitHub Container registry
44+
uses: docker/login-action@v3
45+
with:
46+
registry: ${{ env.WEBSITE_REGISTRY }}
47+
username: ${{ github.actor }}
48+
password: ${{ secrets.GITHUB_TOKEN }}
49+
50+
- name: Download UI Image
51+
run: |
52+
docker pull ${{ env.WEBSITE_REGISTRY }}/gofr-dev/website:latest
53+
54+
- name: Determine Image Tag
55+
id: determine-tag
56+
run: |
57+
if [[ "${{ github.ref }}" == refs/tags/* ]]; then
58+
TAG=${GITHUB_REF#refs/tags/}
59+
else
60+
TAG=${{ github.sha }}
61+
fi
62+
echo "TAG=$TAG" >> $GITHUB_ENV
63+
64+
65+
- name: Build and Push Image
66+
uses: docker/build-push-action@v6
67+
with:
68+
push: true
69+
context: ./
70+
file: ./docs/Dockerfile
71+
tags: us-central1-docker.pkg.dev/${{ env.GAR_PROJECT }}/${{ env.GAR_REGISTRY }}/${{ env.APP_NAME }}:${{ env.TAG }}
72+
73+
- id: output-image
74+
run: echo "image=`echo us-central1-docker.pkg.dev/${{ env.GAR_PROJECT }}/${{ env.GAR_REGISTRY }}/${{ env.APP_NAME }}:${{ env.TAG }}`" >> "$GITHUB_OUTPUT"
75+
76+
deployment_stage:
77+
runs-on: ubuntu-latest
78+
name: 🚀 Deploy-Stage
79+
needs: dockerize
80+
container:
81+
image: ghcr.io/zopsmart/gha-images:deployments-0.1.3
82+
options: --rm
83+
env:
84+
image: ${{needs.dockerize.outputs.image}}
85+
86+
steps:
87+
- name: Checkout Code
88+
uses: actions/checkout@v5
89+
90+
- name: Authorize to GCP service account
91+
uses: google-github-actions/auth@v2
92+
with:
93+
credentials_json: ${{ secrets.GOFR_WEBSITE_GOFR_DEV_STG_DEPLOYMENT_KEY }}
94+
95+
- name: Set GCloud Project and Fetch Cluster Credentials
96+
run: gcloud container clusters get-credentials ${{ env.CLUSTER_NAME }} --region=us-central1 --project=${{ env.CLUSTER_PROJECT }}
97+
98+
- name: Update Deployment Image
99+
run: kubectl set image deployment/${{ env.APP_NAME }} ${{ env.APP_NAME }}=${{ env.image }} --namespace ${{ env.NAMESPACE_STAGE }}

.qlty/qlty.toml

Lines changed: 61 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ exclude_patterns = [
3939
"**/target/**",
4040
"**/templates/**",
4141
"**/testdata/**",
42-
"**/vendor/**", "**/mock_*", "**/*_test.go",
42+
"**/vendor/**",
43+
"**/mock_*",
44+
"**/*_test.go",
4345
]
4446

4547
test_patterns = [
@@ -61,11 +63,11 @@ threshold = 10
6163
enabled = true
6264

6365
[smells.file_complexity]
64-
threshold = 66
66+
threshold = 85 # Increased from 66 to match your codeclimate complex-logic: 10 scaled appropriately
6567
enabled = true
6668

6769
[smells.return_statements]
68-
threshold = 8
70+
threshold = 25 # Significantly increased from 8 to match your codeclimate threshold
6971
enabled = true
7072

7173
[smells.nested_control_flow]
@@ -80,9 +82,65 @@ enabled = true
8082
threshold = 13
8183
enabled = true
8284

85+
# CRITICAL: Completely disable duplication detection like in Code Climate
8386
[smells.duplication]
8487
enabled = false
8588

8689
[[source]]
8790
name = "default"
8891
default = true
92+
93+
# CRITICAL TRIAGE RULES: These will suppress the specific issues shown in your screenshot
94+
95+
# Completely ignore similar-code issues (22 occurrences in your screenshot)
96+
[[triage]]
97+
match.rules = ["qlty:similar-code"]
98+
match.file_patterns = ["**/*.go"]
99+
set.ignored = true
100+
101+
# Completely ignore identical-code issues (4 occurrences in your screenshot)
102+
[[triage]]
103+
match.rules = ["qlty:identical-code"]
104+
match.file_patterns = ["**/*.go"]
105+
set.ignored = true
106+
107+
# Set function-parameters issues to low priority instead of medium (10 occurrences)
108+
[[triage]]
109+
match.rules = ["qlty:function-parameters"]
110+
match.file_patterns = ["**/*.go"]
111+
set.level = "low"
112+
set.mode = "monitor"
113+
114+
# Set return-statements issues to low priority (6 occurrences)
115+
[[triage]]
116+
match.rules = ["qlty:return-statements"]
117+
match.file_patterns = ["**/*.go"]
118+
set.level = "low"
119+
set.mode = "monitor"
120+
121+
# Set file-complexity issues to low priority (1 occurrence)
122+
[[triage]]
123+
match.rules = ["qlty:file-complexity"]
124+
match.file_patterns = ["**/*.go"]
125+
set.level = "low"
126+
set.mode = "monitor"
127+
128+
# Set nested-control-flow issues to low priority (1 occurrence)
129+
[[triage]]
130+
match.rules = ["qlty:nested-control-flow"]
131+
match.file_patterns = ["**/*.go"]
132+
set.level = "low"
133+
set.mode = "monitor"
134+
135+
# Additional safeguard: Set all medium-level structure issues to monitor mode
136+
[[triage]]
137+
match.plugins = ["qlty"]
138+
match.levels = ["medium"]
139+
match.file_patterns = ["**/*.go"]
140+
set.mode = "monitor"
141+
142+
# Set all duplication category issues to be ignored
143+
[[triage]]
144+
match.plugins = ["qlty"]
145+
match.category = ["duplication"]
146+
set.ignored = true

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
</p>
1010
<a href="https://pkg.go.dev/gofr.dev"><img src="https://img.shields.io/badge/GoDoc-Read%20Documentation-blue?style=for-the-badge" alt="godoc"></a>
1111
<a href="https://gofr.dev/docs"><img src="https://img.shields.io/badge/GoFr-Docs-orange?style=for-the-badge" alt="gofr-docs"></a>
12-
<a href="https://qlty.sh/gh/gofr-dev/projects/gofr"><img src="https://qlty.sh/gh/gofr-dev/projects/gofr/maintainability.svg" alt="Maintainability" /></a>
13-
<a href="https://qlty.sh/gh/gofr-dev/projects/gofr"><img src="https://qlty.sh/gh/gofr-dev/projects/gofr/coverage.svg" alt="Code Coverage" /></a>
12+
<a href="https://qlty.sh/gh/gofr-dev/projects/gofr"><img src="https://qlty.sh/gh/gofr-dev/projects/gofr/maintainability.svg" alt="Maintainability" height="27.99" /></a>
13+
<a href="https://qlty.sh/gh/gofr-dev/projects/gofr"><img src="https://qlty.sh/gh/gofr-dev/projects/gofr/coverage.svg" alt="Code Coverage" height="27.99" /></a>
1414
<a href="https://goreportcard.com/report/gofr.dev"><img src="https://goreportcard.com/badge/gofr.dev?style=for-the-badge" alt="Go Report Card"></a>
1515
<a href="https://opensource.org/licenses/Apache-2.0"><img src="https://img.shields.io/badge/License-Apache_2.0-blue?style=for-the-badge" alt="Apache 2.0 License"></a>
1616
<a href="https://discord.gg/wsaSkQTdgq"><img src="https://img.shields.io/badge/discord-join-us?style=for-the-badge&logo=discord&color=7289DA" alt="discord" /></a>

examples/using-add-filestore/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.24
55
toolchain go1.24.1
66

77
require (
8-
github.com/stretchr/testify v1.10.0
8+
github.com/stretchr/testify v1.11.0
99
go.uber.org/mock v0.6.0
1010
gofr.dev v1.43.0
1111
gofr.dev/pkg/gofr/datasource/file/ftp v0.2.1

examples/using-add-filestore/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
196196
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
197197
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
198198
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
199-
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
200-
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
199+
github.com/stretchr/testify v1.11.0 h1:ib4sjIrwZKxE5u/Japgo/7SJV3PvgjGiRNAvTVGqQl8=
200+
github.com/stretchr/testify v1.11.0/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
201201
github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c=
202202
github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI=
203203
github.com/xdg-go/scram v1.1.2 h1:FHX5I5B4i4hKRVRBCFRxq1iQRej7WO3hhBuJf+UUySY=

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ require (
2323
github.com/prometheus/client_golang v1.23.0
2424
github.com/redis/go-redis/extra/redisotel/v9 v9.12.1
2525
github.com/redis/go-redis/v9 v9.12.1
26-
github.com/segmentio/kafka-go v0.4.48
27-
github.com/stretchr/testify v1.10.0
26+
github.com/segmentio/kafka-go v0.4.49
27+
github.com/stretchr/testify v1.11.1
2828
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.62.0
2929
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.62.0
3030
go.opentelemetry.io/otel v1.37.0

0 commit comments

Comments
 (0)