Skip to content

Commit d1fd875

Browse files
authored
Merge branch 'master' into replace-strings-with-translations
2 parents e2a6976 + 5cda052 commit d1fd875

File tree

35 files changed

+11103
-131
lines changed

35 files changed

+11103
-131
lines changed

.github/workflows/create-new-release.yml

Lines changed: 33 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
uses: actions/checkout@v4
2020
with:
2121
fetch-depth: 0
22+
ref: master
23+
token: ${{ secrets.PERSONAL_TOKEN }}
2224

2325
- name: Validate version format
2426
run: |
@@ -42,20 +44,6 @@ jobs:
4244
git config user.name "github-actions[bot]"
4345
git config user.email "github-actions[bot]@users.noreply.github.com"
4446
45-
- name: Create or checkout release branch
46-
run: |
47-
BRANCH_NAME="release-${{ steps.extract_branch.outputs.branch_version }}"
48-
49-
# Check if branch exists remotely
50-
if git ls-remote --heads origin "$BRANCH_NAME" | grep -q "$BRANCH_NAME"; then
51-
echo "Branch $BRANCH_NAME exists remotely, checking out..."
52-
git fetch origin "$BRANCH_NAME"
53-
git checkout "$BRANCH_NAME"
54-
else
55-
echo "Creating new branch $BRANCH_NAME..."
56-
git checkout -b "$BRANCH_NAME"
57-
fi
58-
5947
- name: Run release manifest script
6048
run: |
6149
chmod +x scripts/create-release-manifests.sh
@@ -102,17 +90,41 @@ jobs:
10290
git status --short mkdocs/docs/$VERSION/
10391
fi
10492
105-
- name: Commit and push changes
93+
- name: Commit and push to master branch
10694
if: steps.check_changes.outputs.has_changes == 'true'
10795
run: |
10896
VERSION="${{ github.event.inputs.version }}"
109-
BRANCH_NAME="release-${{ steps.extract_branch.outputs.branch_version }}"
11097
11198
git add mkdocs/docs/$VERSION/
11299
git commit -m "chore: Add release manifests for version $VERSION"
100+
git push origin master
101+
102+
echo "✅ Successfully pushed manifests for version $VERSION to master branch"
103+
104+
- name: Create or checkout release branch and push
105+
if: steps.check_changes.outputs.has_changes == 'true'
106+
run: |
107+
VERSION="${{ github.event.inputs.version }}"
108+
BRANCH_NAME="release-${{ steps.extract_branch.outputs.branch_version }}"
109+
110+
# Check if branch exists remotely
111+
if git ls-remote --heads origin "$BRANCH_NAME" | grep -q "$BRANCH_NAME"; then
112+
echo "Branch $BRANCH_NAME exists remotely, checking out..."
113+
git fetch origin "$BRANCH_NAME"
114+
git checkout "$BRANCH_NAME"
115+
116+
# Cherry-pick the manifest commit from master
117+
COMMIT_SHA=$(git rev-parse origin/master)
118+
git cherry-pick "$COMMIT_SHA"
119+
else
120+
echo "Creating new branch $BRANCH_NAME from current state..."
121+
git checkout -b "$BRANCH_NAME"
122+
fi
123+
124+
# Push the release branch
113125
git push origin "$BRANCH_NAME"
114126
115-
echo "✅ Successfully created and pushed manifests for version $VERSION to branch $BRANCH_NAME"
127+
echo "✅ Successfully pushed manifests for version $VERSION to branch $BRANCH_NAME"
116128
117129
- name: Create Git Tag
118130
if: steps.check_changes.outputs.has_changes == 'true'
@@ -128,12 +140,13 @@ jobs:
128140
129141
- name: Create GitHub Release
130142
if: steps.check_changes.outputs.has_changes == 'true'
131-
uses: softprops/action-gh-release@v1
143+
uses: softprops/action-gh-release@v2
132144
with:
133145
tag_name: ${{ github.event.inputs.version }}
134146
name: ${{ github.event.inputs.version }}
135147
target_commitish: release-${{ steps.extract_branch.outputs.branch_version }}
136148
generate_release_notes: true
149+
make_latest: true
137150
draft: false
138151
prerelease: false
139152
files: |
@@ -156,7 +169,8 @@ jobs:
156169
echo "" >> $GITHUB_STEP_SUMMARY
157170
158171
if [ "${{ steps.check_changes.outputs.has_changes }}" == "true" ]; then
159-
echo "📝 Changes have been committed and pushed to the release branch." >> $GITHUB_STEP_SUMMARY
172+
echo "📝 Manifests have been committed and pushed to the master branch." >> $GITHUB_STEP_SUMMARY
173+
echo "📝 Manifests have also been pushed to the release branch." >> $GITHUB_STEP_SUMMARY
160174
echo "🏷️ Git tag \`$VERSION\` has been created and pushed." >> $GITHUB_STEP_SUMMARY
161175
echo "🚀 GitHub release has been created with auto-generated release notes." >> $GITHUB_STEP_SUMMARY
162176
echo "" >> $GITHUB_STEP_SUMMARY

.github/workflows/push.yml

Lines changed: 33 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -6,50 +6,42 @@ on:
66
- ^v[0-9]*.[0-9]*.x$
77
tags:
88
- "*"
9+
workflow_dispatch:
10+
inputs:
11+
tag:
12+
description: 'Tag to build (e.g., 3.25.0)'
13+
required: true
14+
type: string
915

1016
defaults:
1117
run:
1218
working-directory: chaoscenter
1319
shell: bash
1420

1521
jobs:
16-
backend-checks:
17-
runs-on: ubuntu-latest
18-
steps:
19-
- name: Checkout repository
20-
uses: actions/checkout@v4
21-
- uses: actions/setup-go@v5
22-
with:
23-
go-version: "1.22" # By default, the go version is v1.15 in runner.
24-
- run: |
25-
make backend-services-checks
26-
27-
frontend-checks:
28-
runs-on: ubuntu-latest
29-
steps:
30-
- name: Checkout repository
31-
uses: actions/checkout@v4
32-
- uses: actions/setup-node@v4
33-
with:
34-
node-version: 16
35-
- run: |
36-
make frontend-services-checks
37-
3822
get-envs:
3923
runs-on: ubuntu-latest
4024
steps:
4125
- name: Checkout repository
4226
uses: actions/checkout@v4
27+
with:
28+
ref: ${{ github.event.inputs.tag || github.ref }}
4329
- run: |
4430
img_tag=""
45-
array=(`echo ${GITHUB_REF} | sed 's/\//\n/g'`)
46-
if [ ${array[1]} == "tags" ]
47-
then
48-
echo "tag build"
49-
img_tag=${GITHUB_REF#refs/*/}
31+
# Check if manually triggered with tag input
32+
if [ -n "${{ github.event.inputs.tag }}" ]; then
33+
echo "manual trigger with tag input"
34+
img_tag="${{ github.event.inputs.tag }}"
5035
else
51-
echo "non tag build"
52-
img_tag="ci"
36+
array=(`echo ${GITHUB_REF} | sed 's/\//\n/g'`)
37+
if [ ${array[1]} == "tags" ]
38+
then
39+
echo "tag build"
40+
img_tag=${GITHUB_REF#refs/*/}
41+
else
42+
echo "non tag build"
43+
img_tag="ci"
44+
fi
5345
fi
5446
# This is a condition where image tag looks like "pull/<pullrequest-name>" during pull request build
5547
NEW_IMG_TAG=`echo $img_tag | sed "s/\//-/g"`
@@ -72,10 +64,11 @@ jobs:
7264
runs-on: ubuntu-latest
7365
needs:
7466
- get-envs
75-
- backend-checks
7667
steps:
7768
- name: Checkout code
7869
uses: actions/checkout@v4
70+
with:
71+
ref: ${{ github.event.inputs.tag || github.ref }}
7972

8073
- name: Downloading image artficate
8174
uses: actions/download-artifact@v4
@@ -110,10 +103,11 @@ jobs:
110103
runs-on: ubuntu-latest
111104
needs:
112105
- get-envs
113-
- backend-checks
114106
steps:
115107
- name: Checkout code
116108
uses: actions/checkout@v4
109+
with:
110+
ref: ${{ github.event.inputs.tag || github.ref }}
117111

118112
- name: Downloading image artficate
119113
uses: actions/download-artifact@v4
@@ -148,10 +142,11 @@ jobs:
148142
runs-on: ubuntu-latest
149143
needs:
150144
- get-envs
151-
- backend-checks
152145
steps:
153146
- name: Checkout code
154147
uses: actions/checkout@v4
148+
with:
149+
ref: ${{ github.event.inputs.tag || github.ref }}
155150

156151
- name: Downloading image artficate
157152
uses: actions/download-artifact@v4
@@ -186,10 +181,11 @@ jobs:
186181
runs-on: ubuntu-latest
187182
needs:
188183
- get-envs
189-
- backend-checks
190184
steps:
191185
- name: Checkout code
192186
uses: actions/checkout@v4
187+
with:
188+
ref: ${{ github.event.inputs.tag || github.ref }}
193189

194190
- name: Downloading image artficate
195191
uses: actions/download-artifact@v4
@@ -237,10 +233,11 @@ jobs:
237233
]
238234
needs:
239235
- get-envs
240-
- frontend-checks
241236
steps:
242237
- name: Checkout code
243238
uses: actions/checkout@v4
239+
with:
240+
ref: ${{ github.event.inputs.tag || github.ref }}
244241

245242
- name: Downloading image artficate
246243
uses: actions/download-artifact@v4
@@ -286,10 +283,11 @@ jobs:
286283
runs-on: ubuntu-latest
287284
needs:
288285
- get-envs
289-
- backend-checks
290286
steps:
291287
- name: Checkout code
292288
uses: actions/checkout@v4
289+
with:
290+
ref: ${{ github.event.inputs.tag || github.ref }}
293291

294292
- name: Downloading image artficate
295293
uses: actions/download-artifact@v4

CONTRIBUTING.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,18 @@ You can choose from a list of sub-dependent repos to contribute to, a few highli
120120

121121
## Community & Meetings
122122

123-
The litmus community will have a weekly contributor sync-up on Tuesdays 16.00-16.30 IST / 12.30-13.00 CEST
123+
1. Community Meetings
124+
- These will be hosted every 3rd Wednesday of every month at 5:30 PM GMT /6:30 PM CEST /10 PM IST
125+
- These meetings cover community updates, new feature or release announcements, and user/adopter stories. Everyone in the community is welcome to join and participate in discussions.
126+
127+
128+
2. Contributor Meetings
129+
- These will be hosted every second & last Thursday of every month at 2:30 PM GMT /3:30 PM CEST /7 PM IST
130+
- These meetings focus on both technical and non-technical contributions to LitmusChaos. Maintainers, current contributors, and aspiring contributors are encouraged to join to discuss issues, fixes, enhancements, and future contributions.
131+
132+
Fill out the [LitmusChaos Meetings invite form](https://forms.gle/qawjtFUeL431jmpv7) to get your Calendar invite!
124133

125-
- The sync up meeting is held online on [Google Hangouts](https://meet.google.com/uvt-ozaw-bvp)
126134
- The release items are tracked in the [release sheet](https://github.com/litmuschaos/litmus/releases).
135+
- [Sync Up Agenda & Meeting Notes](https://hackmd.io/a4Zu_sH4TZGeih-xCimi3Q)
127136

128137
If you cannot attend, participate asynchronously via Slack or GitHub discussions.

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/3202/badge)](https://www.bestpractices.dev/projects/3202)
1313
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Flitmuschaos%2Flitmus.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Flitmuschaos%2Flitmus?ref=badge_shield)
1414
[![YouTube Channel](https://img.shields.io/badge/YouTube-Subscribe-red)](https://www.youtube.com/channel/UCa57PMqmz_j0wnteRa9nCaw)
15-
[![Gurubase](https://img.shields.io/badge/Gurubase-Ask%20LitmusChaos%20Guru-006BFF)](https://gurubase.io/g/litmuschaos)
1615
<br><br><br><br>
1716

1817
#### *Read this in [other languages](translations/TRANSLATIONS.md).*

chaoscenter/graphql/server/manifests/cluster/2a_litmus_crds.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ spec:
4747
properties:
4848
appkind:
4949
type: string
50-
pattern: ^(^$|deployment|statefulset|daemonset|deploymentconfig|rollout)$
50+
pattern: ^(^$|deployment|statefulset|daemonset|deploymentconfig|rollout|job)$
5151
applabel:
5252
type: string
5353
appns:
@@ -72,7 +72,7 @@ spec:
7272
properties:
7373
kind:
7474
type: string
75-
pattern: ^(^$|deployment|statefulset|daemonset|deploymentconfig|rollout)$
75+
pattern: ^(^$|deployment|statefulset|daemonset|deploymentconfig|rollout|job)$
7676
labels:
7777
type: string
7878
names:

chaoscenter/graphql/server/manifests/cluster/3a_agents_rbac.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ rules:
5454

5555
- apiGroups: [ "batch" ]
5656
resources: [ "jobs" ]
57-
verbs: [ "get", "create", "patch", "update" ]
57+
verbs: [ "get", "list", "create", "patch", "update" ]
5858

5959
- apiGroups: [ "" ]
6060
resources: [ "pods/log" ]
@@ -142,6 +142,10 @@ rules:
142142
- apiGroups: [ "apps" ]
143143
resources: [ "deployments", "daemonsets", "replicasets", "statefulsets" ]
144144
verbs: [ "get","list","watch" ]
145+
146+
- apiGroups: [ "batch" ]
147+
resources: [ "jobs" ]
148+
verbs: [ "get", "list", "watch" ]
145149
---
146150
apiVersion: rbac.authorization.k8s.io/v1
147151
kind: ClusterRoleBinding

chaoscenter/graphql/server/manifests/namespace/3a_agents_rbac.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ rules:
7272
- apiGroups: [ "apps" ]
7373
resources: [ "deployments", "daemonsets", "replicasets", "statefulsets" ]
7474
verbs: [ "get", "list" ]
75+
7576
- apiGroups: [ "argoproj.io" ]
7677
resources:
7778
[

chaoscenter/graphql/server/pkg/chaos_experiment/handler/handler_test.go

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,25 @@ import (
66
"reflect"
77
"testing"
88

9-
dbProbeMocks "github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/probe/model/mocks"
10-
119
"github.com/golang-jwt/jwt/v4"
1210
"github.com/google/uuid"
11+
"github.com/stretchr/testify/mock"
12+
"go.mongodb.org/mongo-driver/bson"
13+
"go.mongodb.org/mongo-driver/mongo"
14+
1315
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/graph/model"
1416
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/authorization"
1517
chaosExperimentMocks "github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/chaos_experiment/model/mocks"
1618
chaosExperimentRunMocks "github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/chaos_experiment_run/model/mocks"
1719
chaosInfraMocks "github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/chaos_infrastructure/model/mocks"
1820
store "github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/data-store"
1921
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/database/mongodb"
20-
dbChoasInfra "github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/database/mongodb/chaos_infrastructure"
21-
"github.com/stretchr/testify/mock"
22-
2322
dbChaosExperiment "github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/database/mongodb/chaos_experiment"
2423
dbChaosExperimentRun "github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/database/mongodb/chaos_experiment_run"
24+
dbChoasInfra "github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/database/mongodb/chaos_infrastructure"
2525
dbMocks "github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/database/mongodb/mocks"
2626
dbGitOpsMocks "github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/gitops/model/mocks"
27-
"go.mongodb.org/mongo-driver/bson"
28-
"go.mongodb.org/mongo-driver/mongo"
27+
dbProbeMocks "github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/probe/model/mocks"
2928
)
3029

3130
type MockServices struct {
@@ -606,7 +605,7 @@ func TestChaosExperimentHandler_UpdateChaosExperiment(t *testing.T) {
606605
mockServices.GitOpsService.On("UpsertExperimentToGit", mock.Anything, mock.Anything, request).Return(nil).Once()
607606
},
608607
wantErr: false,
609-
},{
608+
}, {
610609
name: "success: verifies query filters out removed experiments",
611610
args: args{
612611
projectID: projectId,
@@ -618,7 +617,7 @@ func TestChaosExperimentHandler_UpdateChaosExperiment(t *testing.T) {
618617
},
619618
},
620619
given: func(request *model.ChaosExperimentRequest, mockServices *MockServices) {
621-
620+
622621
filterCheck := func(filter interface{}) bool {
623622
bsonFilter, ok := filter.(bson.D)
624623
if !ok {

0 commit comments

Comments
 (0)