Skip to content

Commit 9d2a49b

Browse files
committed
fix: develop sync
2 parents 934a7bc + d9c6787 commit 9d2a49b

29 files changed

+419
-162
lines changed

.github/workflows/api-linter.yaml

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

.github/workflows/api-spec-merger.yaml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@ name: API Specs Merger
22

33
on:
44
push:
5+
branches:
6+
- main
57
paths:
68
- 'specs/**'
7-
89
permissions:
910
contents: write
1011

1112
jobs:
12-
lint-and-bundle:
13+
lint-bundle-host:
1314
runs-on: ubuntu-latest
1415
steps:
1516
- name: Checkout repository
@@ -27,28 +28,30 @@ jobs:
2728
./scripts/generate-api-docs.sh
2829
2930
- name: Commit and push documentation
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GH_SYSTEMSDT_TOKEN }}
3033
run: |
3134
git config --local user.email "[email protected]"
3235
git config --local user.name "GitHub Action"
3336
34-
# Fetch the gh-pages-test branch
35-
git fetch origin gh-pages-test
37+
# Fetch the gh-pages branch
38+
git fetch origin gh-pages
3639
3740
# Create a separate worktree for the branch
38-
git worktree add /tmp/gh-pages-test gh-pages-test
41+
git worktree add /tmp/gh-pages gh-pages
3942
4043
# Copy generated docs into the worktree
41-
mkdir -p /tmp/gh-pages-test/docs/api-docs
42-
cp -r docs/api-docs/* /tmp/gh-pages-test/docs/api-docs/ || true
44+
mkdir -p /tmp/gh-pages/docs/api-docs
45+
cp -r docs/api-docs/* /tmp/gh-pages/docs/api-docs/ || true
4346
44-
cd /tmp/gh-pages-test
47+
cd /tmp/gh-pages
4548
4649
git add .
4750
if git diff --staged --quiet; then
4851
echo "✅ No changes to commit"
4952
else
5053
git commit -m "📄 Update API documentation"
51-
git push origin gh-pages-test
52-
echo "🚀 Documentation pushed to gh-pages-test branch!"
54+
git push origin gh-pages
55+
echo "🚀 Documentation pushed to gh-pages branch!"
5356
fi
5457

.github/workflows/build-docs.yaml

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

api/cluster/ClusterRestHandler.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ func (impl ClusterRestHandlerImpl) FindAll(w http.ResponseWriter, r *http.Reques
290290
var result []*bean2.ClusterBean
291291
for _, item := range clusterList {
292292
if ok := impl.enforcer.Enforce(token, casbin.ResourceCluster, casbin.ActionGet, item.ClusterName); ok {
293+
item.SetClusterStatus()
293294
result = append(result, item)
294295
}
295296
}
@@ -343,8 +344,10 @@ func (impl ClusterRestHandlerImpl) FindByIds(w http.ResponseWriter, r *http.Requ
343344
var result []*bean2.ClusterBean
344345
for _, item := range clusterList {
345346
if ok := impl.enforcer.Enforce(token, casbin.ResourceCluster, casbin.ActionGet, item.ClusterName); ok {
347+
item.SetClusterStatus()
346348
result = append(result, item)
347349
}
350+
348351
}
349352
//RBAC enforcer Ends
350353

cmd/external-app/wire_gen.go

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

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ require (
335335
replace (
336336
github.com/argoproj/argo-workflows/v3 v3.5.13 => github.com/devtron-labs/argo-workflows/v3 v3.5.13
337337
github.com/cyphar/filepath-securejoin v0.4.1 => github.com/cyphar/filepath-securejoin v0.3.6 // indirect
338-
github.com/devtron-labs/authenticator => github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250718122027-cb75c2add53e
339-
github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250718122027-cb75c2add53e
338+
github.com/devtron-labs/authenticator => github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250806142853-d5a47198188d
339+
github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250806142853-d5a47198188d
340340
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 => go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1
341341
)

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,10 +237,10 @@ github.com/denisenkom/go-mssqldb v0.0.0-20200428022330-06a60b6afbbc h1:VRRKCwnzq
237237
github.com/denisenkom/go-mssqldb v0.0.0-20200428022330-06a60b6afbbc/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
238238
github.com/devtron-labs/argo-workflows/v3 v3.5.13 h1:3pINq0gXOSeTw2z/vYe+j80lRpSN5Rp/8mfQORh8SmU=
239239
github.com/devtron-labs/argo-workflows/v3 v3.5.13/go.mod h1:/vqxcovDPT4zqr4DjR5v7CF8ggpY1l3TSa2CIG3jmjA=
240-
github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250718122027-cb75c2add53e h1:uhVKRc6CyQngloaUUfYz9y8fZ2My0x1Jrkt/YbZdRAI=
241-
github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250718122027-cb75c2add53e/go.mod h1:9LCkYfiWaEKIBkmxw9jX1GujvEMyHwmDtVsatffAkeU=
242-
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250718122027-cb75c2add53e h1:bprDKDpzZ/UVFxnA3xP3GiqRFHjmmTXXg2IDkN5EdUg=
243-
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250718122027-cb75c2add53e/go.mod h1:/Ciy9tD9OxZOWBDPIasM448H7uvSo4+ZJiExpfwBZpA=
240+
github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250806142853-d5a47198188d h1:+g3SnMSqHWPpKkU2fdp1dTkcPvedXuZ6kVR7S4U4IvU=
241+
github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250806142853-d5a47198188d/go.mod h1:9LCkYfiWaEKIBkmxw9jX1GujvEMyHwmDtVsatffAkeU=
242+
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250806142853-d5a47198188d h1:PcwklqogA1ppPtC0M2jn2QiFAkoKKeOY2tbNOCjedeI=
243+
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250806142853-d5a47198188d/go.mod h1:/Ciy9tD9OxZOWBDPIasM448H7uvSo4+ZJiExpfwBZpA=
244244
github.com/devtron-labs/go-bitbucket v0.9.60-beta h1:VEx1jvDgdtDPS6A1uUFoaEi0l1/oLhbr+90xOwr6sDU=
245245
github.com/devtron-labs/go-bitbucket v0.9.60-beta/go.mod h1:GnuiCesvh8xyHeMCb+twm8lBR/kQzJYSKL28ZfObp1Y=
246246
github.com/devtron-labs/protos v0.0.3-0.20250323220609-ecf8a0f7305e h1:U6UdYbW8a7xn5IzFPd8cywjVVPfutGJCudjePAfL/Hs=

pkg/cluster/ClusterService.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@ func (impl *ClusterServiceImpl) FindAll() ([]*bean.ClusterBean, error) {
293293
var beans []*bean.ClusterBean
294294
for _, model := range models {
295295
bean := adapter.GetClusterBean(model)
296+
bean.SetClusterStatus()
296297
beans = append(beans, &bean)
297298
}
298299
return beans, nil

pkg/cluster/bean/bean.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,18 @@ type ClusterBean struct {
3838
IsVirtualCluster bool `json:"isVirtualCluster"`
3939
ClusterUpdated bool `json:"clusterUpdated"`
4040
IsProd bool `json:"isProd"`
41+
ClusterStatus ClusterStatus `json:"clusterStatus,omitempty"`
42+
}
43+
44+
// TODO: fix duplicate
45+
func (bean *ClusterBean) SetClusterStatus() {
46+
if len(bean.ErrorInConnecting) > 0 {
47+
// if there's an error in connecting, cluster status is connection failed
48+
bean.ClusterStatus = ClusterStatusConnectionFailed
49+
} else {
50+
// if no connection error, cluster status is healthy
51+
bean.ClusterStatus = ClusterStatusHealthy
52+
}
4153
}
4254

4355
func (bean ClusterBean) GetClusterConfig() *k8s.ClusterConfig {
@@ -90,3 +102,12 @@ const (
90102
DefaultNamespace = "default"
91103
CmFieldUpdatedOn = "updated_on"
92104
)
105+
106+
type ClusterStatus string
107+
108+
// TODO: fix duplicate
109+
const (
110+
ClusterStatusHealthy ClusterStatus = "healthy"
111+
ClusterStatusUnHealthy ClusterStatus = "unhealthy"
112+
ClusterStatusConnectionFailed ClusterStatus = "connection failed"
113+
)

pkg/deployment/trigger/devtronApps/bean/bean.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ type VulnerabilityCheckRequest struct {
9494
}
9595

9696
const (
97-
CronJobChartRegexExpression = "cronjob-chart_1-(2|3|4|5)-0"
97+
CronJobChartRegexExpression = "cronjob-chart_1-(2|3|4|5|6)-0"
9898
)
9999

100100
const (

0 commit comments

Comments
 (0)