Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
95dfbd0
corrected api specs
prkhrkat May 30, 2025
02eacc9
specs enhance
prkhrkat Jul 25, 2025
d5b9a1c
Merge branch 'develop' into api-specs
prkhrkat Jul 25, 2025
a447ff7
Merge pull request #6771 from devtron-labs/fix-cron-job-suspend
iamayushm Jul 31, 2025
15b2a4f
develop-merge
prkhrkat Jul 31, 2025
2df55b7
fix: update default sequence for bulk edit config table and correct R…
Ash-exp Aug 4, 2025
cdd8421
corrected specs
prkhrkat Aug 4, 2025
b35c605
corrected specs
prkhrkat 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
de7ae84
vendor for spec-validator
prkhrkat Aug 4, 2025
8663138
spec-fixes as per cursor when ran on results file
prkhrkat Aug 4, 2025
51a4b66
Merge branch 'api-specs' into feat-api-spec-validator
prkhrkat Aug 4, 2025
c4883f4
spec-fixes manually for /orchestrator path
prkhrkat Aug 4, 2025
4338a20
script fix to run against server
prkhrkat Aug 4, 2025
172e69d
naming changed from devtron-lab
prkhrkat Aug 4, 2025
5cbb17c
removed extra code
prkhrkat Aug 5, 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
d51bf31
framework.go update
prkhrkat Aug 5, 2025
67387e6
api-spec fix
prkhrkat Aug 5, 2025
0f04a1c
spec fix
prkhrkat Aug 5, 2025
2c92037
script fix
prkhrkat 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
413fa68
devops specs included
prkhrkat Aug 7, 2025
e9e0752
script fix
prkhrkat Aug 7, 2025
fa1ded1
script fix
prkhrkat Aug 8, 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
b6be5db
specs fix
prkhrkat Aug 13, 2025
abd5cce
redocly script to generate html
prkhrkat Aug 13, 2025
d759500
refact
prkhrkat Aug 13, 2025
62ee1a8
refact
prkhrkat Aug 13, 2025
d810f04
refact
prkhrkat Aug 13, 2025
52dfab2
doc: api spec merger
SATYAsasini Aug 13, 2025
603927d
chore: test commit
SATYAsasini Aug 13, 2025
790c574
misc: script name rectified in action file
SATYAsasini Aug 13, 2025
e752b44
misc: testing change in /spec
SATYAsasini Aug 13, 2025
a1ee5ca
misc: test commit
SATYAsasini Aug 13, 2025
2edbf16
misc: test commit
SATYAsasini Aug 13, 2025
e7ac045
refact
prkhrkat Aug 13, 2025
88eb2a2
refact
prkhrkat Aug 13, 2025
f578cd2
refact
prkhrkat Aug 13, 2025
436dfd9
refact
prkhrkat Aug 13, 2025
f5169ad
feat: action fix and resource recommender specs
SATYAsasini Aug 13, 2025
0e616bc
Merge branch 'feat-api-spec-validator' of https://github.com/devtron-…
SATYAsasini Aug 13, 2025
017f106
fix: action fixes
SATYAsasini Aug 13, 2025
1a13e85
chore: test trigger commit
SATYAsasini Aug 13, 2025
8a89675
chore: test run commit
SATYAsasini Aug 14, 2025
b6db917
chore: test commit
SATYAsasini Aug 14, 2025
3ae63e5
chore: test commit
SATYAsasini Aug 14, 2025
a6bfb94
feat: git push job in action file
SATYAsasini Aug 14, 2025
fd03bc1
feat: git push job in action file
SATYAsasini Aug 14, 2025
73124a9
chore: test commit
SATYAsasini Aug 14, 2025
4fc825c
chore: test commit
SATYAsasini Aug 14, 2025
041bf25
chore: test commit
SATYAsasini Aug 14, 2025
2da6a86
chore: test commit
SATYAsasini Aug 14, 2025
0829299
fix panic
iamayushm Aug 14, 2025
1e272f6
chore: test commit
SATYAsasini Aug 14, 2025
1145251
chore: test commit
SATYAsasini Aug 14, 2025
347138a
chore: test commit
SATYAsasini Aug 14, 2025
8398148
fix: script misc chore fixes and trigger commit
SATYAsasini Aug 14, 2025
f64222a
fix: script fixes
SATYAsasini Aug 14, 2025
9ad2dca
fix: script fixes
SATYAsasini Aug 14, 2025
b94d5a8
fix: script fixes
SATYAsasini Aug 14, 2025
32a9759
fix: script fixes
SATYAsasini Aug 14, 2025
fdcab1b
Merge pull request #6785 from devtron-labs/fix-panic-env-autocomplete
iamayushm Aug 14, 2025
fb17b6f
fix: script fixes
SATYAsasini Aug 14, 2025
9a66ab0
fix: script fixes
SATYAsasini Aug 14, 2025
6ab5ee2
fix: script fixes
SATYAsasini Aug 14, 2025
9c7d32b
Merge branch 'develop' into feat-api-spec-validator
prkhrkat Aug 17, 2025
92f52b3
create API token validation
prkhrkat Aug 18, 2025
dfc7ee6
Merge remote-tracking branch 'origin/feat-api-spec-validator' into fe…
prkhrkat Aug 18, 2025
08ada30
misc: added support for cronjob annotations and probes (#6787)
badal773 Aug 18, 2025
696d440
refact
prkhrkat Aug 18, 2025
d18e91f
refact
prkhrkat Aug 18, 2025
cf3cdbe
security policy specs fixed
prkhrkat Aug 18, 2025
5401c63
refact
prkhrkat Aug 18, 2025
2bfb2b7
refact
prkhrkat Aug 19, 2025
50125b8
refact
prkhrkat Aug 19, 2025
e271a87
refact
prkhrkat Aug 19, 2025
47267c8
refact
prkhrkat Aug 19, 2025
66a85b1
refact
prkhrkat Aug 19, 2025
8deb394
ent separation
prkhrkat Aug 20, 2025
6ebb767
ent separation
prkhrkat Aug 20, 2025
c00a136
feat: automate API specs workflow and documentation (#6786)
SATYAsasini Aug 20, 2025
6e2d95d
driftSpec.yaml added
prkhrkat Aug 20, 2025
bf09b2a
fix: API token generation api responses refactoring (#6788)
SATYAsasini Aug 20, 2025
f8a42bc
path corrected
prkhrkat Aug 21, 2025
40bb962
cmscs added
prkhrkat Aug 21, 2025
3ca0e87
corrected specs
prkhrkat Aug 21, 2025
0b64f4e
fix: api responses (#6789)
SATYAsasini Aug 25, 2025
01ee93c
main sync
SATYAsasini Aug 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
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: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
.env
/cmd/external-app/devtron-ea
devtron

/tests/api-spec-validation/bin
/tests/api-spec-validation/reports
.qodo
27 changes: 11 additions & 16 deletions api/apiToken/ApiTokenRestHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ package apiToken

import (
"encoding/json"
"net/http"
"strconv"

openapi "github.com/devtron-labs/devtron/api/openapi/openapiClient"
"github.com/devtron-labs/devtron/api/restHandler/common"
"github.com/devtron-labs/devtron/pkg/apiToken"
Expand All @@ -30,6 +27,8 @@ import (
"github.com/juju/errors"
"go.uber.org/zap"
"gopkg.in/go-playground/validator.v9"
"net/http"
"strconv"
)

type ApiTokenRestHandler interface {
Expand Down Expand Up @@ -62,7 +61,7 @@ func NewApiTokenRestHandlerImpl(logger *zap.SugaredLogger, apiTokenService apiTo
func (impl ApiTokenRestHandlerImpl) GetAllApiTokens(w http.ResponseWriter, r *http.Request) {
userId, err := impl.userService.GetLoggedInUser(r)
if userId == 0 || err != nil {
common.WriteJsonResp(w, err, "Unauthorized User", http.StatusUnauthorized)
common.HandleUnauthorized(w, r)
return
}

Expand All @@ -86,7 +85,7 @@ func (impl ApiTokenRestHandlerImpl) GetAllApiTokens(w http.ResponseWriter, r *ht
func (impl ApiTokenRestHandlerImpl) CreateApiToken(w http.ResponseWriter, r *http.Request) {
userId, err := impl.userService.GetLoggedInUser(r)
if userId == 0 || err != nil {
common.WriteJsonResp(w, err, "Unauthorized User", http.StatusUnauthorized)
common.HandleUnauthorized(w, r)
return
}

Expand All @@ -103,19 +102,15 @@ func (impl ApiTokenRestHandlerImpl) CreateApiToken(w http.ResponseWriter, r *htt
err = decoder.Decode(&request)
if err != nil {
impl.logger.Errorw("err in decoding request in CreateApiToken", "err", err)
common.WriteJsonResp(w, err, nil, http.StatusBadRequest)
common.WriteJsonResp(w, errors.New("invalid JSON payload "+err.Error()), nil, http.StatusBadRequest)
return
}

// validate request
// validate request structure
err = impl.validator.Struct(request)
if err != nil {
impl.logger.Errorw("validation err in CreateApiToken", "err", err, "request", request)
common.WriteJsonResp(w, err, nil, http.StatusBadRequest)
return
}
if len(*request.Name) == 0 {
common.WriteJsonResp(w, errors.New("name cannot be blank in the request"), nil, http.StatusBadRequest)
impl.logger.Errorw("validation err in CreateApiToken ", "err", err, "request", request)
common.HandleValidationErrors(w, r, err)
return
}

Expand All @@ -132,7 +127,7 @@ func (impl ApiTokenRestHandlerImpl) CreateApiToken(w http.ResponseWriter, r *htt
func (impl ApiTokenRestHandlerImpl) UpdateApiToken(w http.ResponseWriter, r *http.Request) {
userId, err := impl.userService.GetLoggedInUser(r)
if userId == 0 || err != nil {
common.WriteJsonResp(w, err, "Unauthorized User", http.StatusUnauthorized)
common.HandleUnauthorized(w, r)
return
}

Expand Down Expand Up @@ -182,7 +177,7 @@ func (impl ApiTokenRestHandlerImpl) UpdateApiToken(w http.ResponseWriter, r *htt
func (impl ApiTokenRestHandlerImpl) DeleteApiToken(w http.ResponseWriter, r *http.Request) {
userId, err := impl.userService.GetLoggedInUser(r)
if userId == 0 || err != nil {
common.WriteJsonResp(w, err, "Unauthorized User", http.StatusUnauthorized)
common.HandleUnauthorized(w, r)
return
}

Expand Down Expand Up @@ -221,7 +216,7 @@ func (handler ApiTokenRestHandlerImpl) checkManagerAuth(resource, token, object
func (impl ApiTokenRestHandlerImpl) GetAllApiTokensForWebhook(w http.ResponseWriter, r *http.Request) {
userId, err := impl.userService.GetLoggedInUser(r)
if userId == 0 || err != nil {
common.WriteJsonResp(w, err, "Unauthorized User", http.StatusUnauthorized)
common.HandleUnauthorized(w, r)
return
}

Expand Down
12 changes: 6 additions & 6 deletions api/appStore/InstalledAppRestHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ func (handler *InstalledAppRestHandlerImpl) FetchAppOverview(w http.ResponseWrit
func (handler InstalledAppRestHandlerImpl) GetAllInstalledApp(w http.ResponseWriter, r *http.Request) {
userId, err := handler.userAuthService.GetLoggedInUser(r)
if userId == 0 || err != nil {
common.WriteJsonResp(w, err, "Unauthorized User", http.StatusUnauthorized)
common.HandleUnauthorized(w, r)
return
}
v := r.URL.Query()
Expand Down Expand Up @@ -343,7 +343,7 @@ func (handler InstalledAppRestHandlerImpl) GetAllInstalledApp(w http.ResponseWri
func (handler *InstalledAppRestHandlerImpl) DeployBulk(w http.ResponseWriter, r *http.Request) {
userId, err := handler.userAuthService.GetLoggedInUser(r)
if userId == 0 || err != nil {
common.WriteJsonResp(w, err, "Unauthorized User", http.StatusUnauthorized)
common.HandleUnauthorized(w, r)
return
}
decoder := json.NewDecoder(r.Body)
Expand Down Expand Up @@ -512,7 +512,7 @@ func (handler *InstalledAppRestHandlerImpl) getChartGroupInstallMetadata(req *ch
func (handler *InstalledAppRestHandlerImpl) CheckAppExists(w http.ResponseWriter, r *http.Request) {
userId, err := handler.userAuthService.GetLoggedInUser(r)
if userId == 0 || err != nil {
common.WriteJsonResp(w, err, "Unauthorized User", http.StatusUnauthorized)
common.HandleUnauthorized(w, r)
return
}
decoder := json.NewDecoder(r.Body)
Expand All @@ -538,7 +538,7 @@ func (impl *InstalledAppRestHandlerImpl) DefaultComponentInstallation(w http.Res
userId, err := impl.userAuthService.GetLoggedInUser(r)
if userId == 0 || err != nil {
impl.Logger.Errorw("service err, DefaultComponentInstallation", "error", err, "userId", userId)
common.WriteJsonResp(w, err, "Unauthorized User", http.StatusUnauthorized)
common.HandleUnauthorized(w, r)
return
}
vars := mux.Vars(r)
Expand Down Expand Up @@ -885,7 +885,7 @@ func (handler *InstalledAppRestHandlerImpl) fetchResourceTreeWithHibernateForACD
func (handler *InstalledAppRestHandlerImpl) MigrateDeploymentTypeForChartStore(w http.ResponseWriter, r *http.Request) {
userId, err := handler.userAuthService.GetLoggedInUser(r)
if userId == 0 || err != nil {
common.WriteJsonResp(w, err, "Unauthorized User", http.StatusUnauthorized)
common.HandleUnauthorized(w, r)
return
}

Expand Down Expand Up @@ -929,7 +929,7 @@ func (handler *InstalledAppRestHandlerImpl) MigrateDeploymentTypeForChartStore(w
func (handler *InstalledAppRestHandlerImpl) TriggerChartStoreAppAfterMigration(w http.ResponseWriter, r *http.Request) {
userId, err := handler.userAuthService.GetLoggedInUser(r)
if userId == 0 || err != nil {
common.WriteJsonResp(w, err, "Unauthorized User", http.StatusUnauthorized)
common.HandleUnauthorized(w, r)
return
}

Expand Down
Loading
Loading