Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
a447ff7
Merge pull request #6771 from devtron-labs/fix-cron-job-suspend
iamayushm Jul 31, 2025
2df55b7
fix: update default sequence for bulk edit config table and correct R…
Ash-exp Aug 4, 2025
ad9efc0
Merge pull request #6772 from devtron-labs/fix/bulk-edit-v2-readme
Ash-exp Aug 4, 2025
52c6f07
Improve CI status fetching logic in `CiHandlerImpl` to handle linked …
prakash100198 Aug 4, 2025
4f06b1c
Refactor `CiHandlerImpl` to modularize and streamline CI pipeline sta…
prakash100198 Aug 4, 2025
21c6630
Remove redundant comments in `CiHandler.go` to enhance code clarity a…
prakash100198 Aug 4, 2025
686115b
Clean up redundant comments in `preparePipelineStatusLookup` to enhan…
prakash100198 Aug 4, 2025
41e69f0
Remove unused `mapWorkflowsToLinkedPipelines` function from `CiHandle…
prakash100198 Aug 4, 2025
db04165
Extract `RemoveDuplicateInts` utility to `CiCdUtil.go` for reusabilit…
prakash100198 Aug 4, 2025
47e03c4
wip: adding cluster status
iamayushm Aug 5, 2025
fb68e0f
Merge pull request #6774 from devtron-labs/fix-cluster-status-pkt
iamayushm Aug 5, 2025
111638f
fix cluster status
iamayushm Aug 5, 2025
fb27890
Enhance CI status fetching in `CiHandlerImpl` to handle linked pipeli…
prakash100198 Aug 5, 2025
f5745c0
Merge pull request #6775 from devtron-labs/fix-cl-status
iamayushm Aug 5, 2025
6ce4281
Merge branch 'release-candidate-v0.41.0' into linked-ci-pipeline-stat…
prakash100198 Aug 5, 2025
21da420
Merge pull request #6773 from devtron-labs/linked-ci-pipeline-status-fix
prakash100198 Aug 5, 2025
65091cc
Merge branch 'main' into main-sync-6-aug
prakash100198 Aug 6, 2025
316a30b
Merge pull request #6776 from devtron-labs/main-sync-6-aug
prakash100198 Aug 6, 2025
6f5918b
Update workflow status table scripts to latest version.
prakash100198 Aug 6, 2025
b7855b4
Merge pull request #6778 from devtron-labs/script-migration-number-fix
prakash100198 Aug 6, 2025
9b21172
Merge pull request #6777 from devtron-labs/release-candidate-v0.41.0
vikramdevtron Aug 6, 2025
ca472ee
Update `authenticator` and `common-lib` dependencies to latest versions.
prakash100198 Aug 7, 2025
9e10395
Merge pull request #6779 from devtron-labs/vend-upg
prakash100198 Aug 7, 2025
f46a19a
added sql ent files (#6780)
Shivam-nagar23 Aug 7, 2025
cfc1d0e
migration number chnage (#6783)
Shivam-nagar23 Aug 11, 2025
756b3ec
feat: add resource recommendation APIs and update openapi.yaml
Ash-exp Aug 12, 2025
42be62b
feat: add Resource Recommendation to openapi.yaml
Ash-exp Aug 12, 2025
327694b
Merge pull request #6784 from devtron-labs/chore/resource-recommendat…
Ash-exp Aug 12, 2025
0829299
fix panic
iamayushm Aug 14, 2025
fdcab1b
Merge pull request #6785 from devtron-labs/fix-panic-env-autocomplete
iamayushm Aug 14, 2025
08ada30
misc: added support for cronjob annotations and probes (#6787)
badal773 Aug 18, 2025
c00a136
feat: automate API specs workflow and documentation (#6786)
SATYAsasini Aug 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions .github/workflows/api-linter.yaml

This file was deleted.

57 changes: 57 additions & 0 deletions .github/workflows/api-spec-merger.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: API Specs Merger

on:
push:
branches:
- main
paths:
- 'specs/**'
permissions:
contents: write

jobs:
lint-bundle-host:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}

- name: Set up Redocly CLI
run: npm install -g @redocly/cli

- name: Run specs bundling script
working-directory: ${{ github.workspace }}
run: |
chmod +x scripts/generate-api-docs.sh
./scripts/generate-api-docs.sh

- name: Commit and push documentation
env:
GITHUB_TOKEN: ${{ secrets.GH_SYSTEMSDT_TOKEN }}
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"

# Fetch the gh-pages branch
git fetch origin gh-pages

# Create a separate worktree for the branch
git worktree add /tmp/gh-pages gh-pages

# Copy generated docs into the worktree
mkdir -p /tmp/gh-pages/docs/api-docs
cp -r docs/api-docs/* /tmp/gh-pages/docs/api-docs/ || true

cd /tmp/gh-pages

git add .
if git diff --staged --quiet; then
echo "✅ No changes to commit"
else
git commit -m "📄 Update API documentation"
git push origin gh-pages
echo "🚀 Documentation pushed to gh-pages branch!"
fi

63 changes: 0 additions & 63 deletions .github/workflows/build-docs.yaml

This file was deleted.

3 changes: 3 additions & 0 deletions api/cluster/ClusterRestHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ func (impl ClusterRestHandlerImpl) FindAll(w http.ResponseWriter, r *http.Reques
var result []*bean2.ClusterBean
for _, item := range clusterList {
if ok := impl.enforcer.Enforce(token, casbin.ResourceCluster, casbin.ActionGet, item.ClusterName); ok {
item.SetClusterStatus()
result = append(result, item)
}
}
Expand Down Expand Up @@ -343,8 +344,10 @@ func (impl ClusterRestHandlerImpl) FindByIds(w http.ResponseWriter, r *http.Requ
var result []*bean2.ClusterBean
for _, item := range clusterList {
if ok := impl.enforcer.Enforce(token, casbin.ResourceCluster, casbin.ActionGet, item.ClusterName); ok {
item.SetClusterStatus()
result = append(result, item)
}

}
//RBAC enforcer Ends

Expand Down
2 changes: 1 addition & 1 deletion cmd/external-app/wire_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ require (
replace (
github.com/argoproj/argo-workflows/v3 v3.5.13 => github.com/devtron-labs/argo-workflows/v3 v3.5.13
github.com/cyphar/filepath-securejoin v0.4.1 => github.com/cyphar/filepath-securejoin v0.3.6 // indirect
github.com/devtron-labs/authenticator => github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250718122027-cb75c2add53e
github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250718122027-cb75c2add53e
github.com/devtron-labs/authenticator => github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250806142853-d5a47198188d
github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250806142853-d5a47198188d
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
)
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,10 @@ github.com/denisenkom/go-mssqldb v0.0.0-20200428022330-06a60b6afbbc h1:VRRKCwnzq
github.com/denisenkom/go-mssqldb v0.0.0-20200428022330-06a60b6afbbc/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
github.com/devtron-labs/argo-workflows/v3 v3.5.13 h1:3pINq0gXOSeTw2z/vYe+j80lRpSN5Rp/8mfQORh8SmU=
github.com/devtron-labs/argo-workflows/v3 v3.5.13/go.mod h1:/vqxcovDPT4zqr4DjR5v7CF8ggpY1l3TSa2CIG3jmjA=
github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250718122027-cb75c2add53e h1:uhVKRc6CyQngloaUUfYz9y8fZ2My0x1Jrkt/YbZdRAI=
github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250718122027-cb75c2add53e/go.mod h1:9LCkYfiWaEKIBkmxw9jX1GujvEMyHwmDtVsatffAkeU=
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250718122027-cb75c2add53e h1:bprDKDpzZ/UVFxnA3xP3GiqRFHjmmTXXg2IDkN5EdUg=
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250718122027-cb75c2add53e/go.mod h1:/Ciy9tD9OxZOWBDPIasM448H7uvSo4+ZJiExpfwBZpA=
github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250806142853-d5a47198188d h1:+g3SnMSqHWPpKkU2fdp1dTkcPvedXuZ6kVR7S4U4IvU=
github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250806142853-d5a47198188d/go.mod h1:9LCkYfiWaEKIBkmxw9jX1GujvEMyHwmDtVsatffAkeU=
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250806142853-d5a47198188d h1:PcwklqogA1ppPtC0M2jn2QiFAkoKKeOY2tbNOCjedeI=
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250806142853-d5a47198188d/go.mod h1:/Ciy9tD9OxZOWBDPIasM448H7uvSo4+ZJiExpfwBZpA=
github.com/devtron-labs/go-bitbucket v0.9.60-beta h1:VEx1jvDgdtDPS6A1uUFoaEi0l1/oLhbr+90xOwr6sDU=
github.com/devtron-labs/go-bitbucket v0.9.60-beta/go.mod h1:GnuiCesvh8xyHeMCb+twm8lBR/kQzJYSKL28ZfObp1Y=
github.com/devtron-labs/protos v0.0.3-0.20250323220609-ecf8a0f7305e h1:U6UdYbW8a7xn5IzFPd8cywjVVPfutGJCudjePAfL/Hs=
Expand Down
1 change: 1 addition & 0 deletions pkg/cluster/ClusterService.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ func (impl *ClusterServiceImpl) FindAll() ([]*bean.ClusterBean, error) {
var beans []*bean.ClusterBean
for _, model := range models {
bean := adapter.GetClusterBean(model)
bean.SetClusterStatus()
beans = append(beans, &bean)
}
return beans, nil
Expand Down
21 changes: 21 additions & 0 deletions pkg/cluster/bean/bean.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,18 @@ type ClusterBean struct {
IsVirtualCluster bool `json:"isVirtualCluster"`
ClusterUpdated bool `json:"clusterUpdated"`
IsProd bool `json:"isProd"`
ClusterStatus ClusterStatus `json:"clusterStatus,omitempty"`
}

// TODO: fix duplicate
func (bean *ClusterBean) SetClusterStatus() {
if len(bean.ErrorInConnecting) > 0 {
// if there's an error in connecting, cluster status is connection failed
bean.ClusterStatus = ClusterStatusConnectionFailed
} else {
// if no connection error, cluster status is healthy
bean.ClusterStatus = ClusterStatusHealthy
}
}

func (bean ClusterBean) GetClusterConfig() *k8s.ClusterConfig {
Expand Down Expand Up @@ -90,3 +102,12 @@ const (
DefaultNamespace = "default"
CmFieldUpdatedOn = "updated_on"
)

type ClusterStatus string

// TODO: fix duplicate
const (
ClusterStatusHealthy ClusterStatus = "healthy"
ClusterStatusUnHealthy ClusterStatus = "unhealthy"
ClusterStatusConnectionFailed ClusterStatus = "connection failed"
)
2 changes: 1 addition & 1 deletion pkg/deployment/trigger/devtronApps/bean/bean.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ type VulnerabilityCheckRequest struct {
}

const (
CronJobChartRegexExpression = "cronjob-chart_1-(2|3|4|5)-0"
CronJobChartRegexExpression = "cronjob-chart_1-(2|3|4|5|6)-0"
)

const (
Expand Down
19 changes: 19 additions & 0 deletions pkg/k8s/capacity/bean/bean.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,29 @@ type ClusterCapacityDetail struct {
ServerVersion string `json:"serverVersion,omitempty"`
Cpu *ResourceDetailObject `json:"cpu"`
Memory *ResourceDetailObject `json:"memory"`
Status ClusterStatus `json:"status,omitempty"`
IsVirtualCluster bool `json:"isVirtualCluster"`
IsProd bool `json:"isProd"`
}

func (details *ClusterCapacityDetail) SetStatus(nodeErrors map[corev1.NodeConditionType][]string) {
if len(nodeErrors) > 0 {
// if any node has error then cluster status is unhealthy
details.Status = ClusterStatusUnHealthy
} else {
details.Status = ClusterStatusHealthy
}

}

type ClusterStatus string

const (
ClusterStatusHealthy ClusterStatus = "healthy"
ClusterStatusUnHealthy ClusterStatus = "unhealthy"
ClusterStatusConnectionFailed ClusterStatus = "connection failed"
)

type NodeCapacityDetail struct {
Name string `json:"name"`
Version string `json:"version,omitempty"`
Expand Down
3 changes: 3 additions & 0 deletions pkg/k8s/capacity/k8sCapacityService.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,14 @@ func (impl *K8sCapacityServiceImpl) GetClusterCapacityDetailList(ctx context.Con
var err error
if len(cluster.ErrorInConnecting) > 0 {
clusterCapacityDetail.ErrorInConnection = cluster.ErrorInConnecting
clusterCapacityDetail.Status = bean.ClusterStatusConnectionFailed
} else {
clusterCapacityDetail, err = impl.GetClusterCapacityDetail(ctx, cluster, true)
if err != nil {
impl.logger.Errorw("error in getting cluster capacity details by id", "clusterID", cluster.Id, "err", err)
clusterCapacityDetail = &bean.ClusterCapacityDetail{
ErrorInConnection: err.Error(),
Status: bean.ClusterStatusConnectionFailed,
}
}
}
Expand Down Expand Up @@ -189,6 +191,7 @@ func (impl *K8sCapacityServiceImpl) setBasicClusterDetails(nodeList *corev1.Node
clusterDetail.NodeErrors = nodeErrors
clusterDetail.NodeK8sVersions = nodesK8sVersion
clusterDetail.NodeDetails = clusterNodeDetails
clusterDetail.SetStatus(nodeErrors)
clusterDetail.Cpu = &bean.ResourceDetailObject{
Capacity: getResourceString(clusterCpuCapacity, corev1.ResourceCPU),
}
Expand Down
Loading
Loading