Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
6eca032
Merge pull request #6048 from devtron-labs/develop
vikramdevtron Nov 4, 2024
f626dc2
fix: rollback and manifest output (#6051)
iamayushm Nov 6, 2024
0746fdc
release: PR for v0.7.4 (#5898)
systemsdt Nov 6, 2024
16ea544
main sync rc22
vikramdevtron Nov 6, 2024
c3c7c65
code owner modified
vikramdevtron Nov 6, 2024
006c8a1
Merge pull request #6054 from devtron-labs/main-sync-rc22-nov6
vikramdevtron Nov 6, 2024
b6ba56e
Merge pull request #6055 from devtron-labs/codeowners-modifications
vikramdevtron Nov 7, 2024
44a6611
main sync rc22
vikramdevtron Nov 7, 2024
aa975d4
Merge pull request #6059 from devtron-labs/main-sync-rc22-nov7
vikramdevtron Nov 7, 2024
127203b
Merge pull request #6052 from devtron-labs/release-candidate-v0.22.0
vikramdevtron Nov 7, 2024
8ab82be
misc: remove environment null check while getting chart via repo url …
ayu-devtron Nov 11, 2024
6afcca4
release: PR for v1.0.0 (#6065)
systemsdt Nov 11, 2024
36636c0
doc: Updated Readme for K8s Dashboard & Devtron platform (#6074)
siddhant-khisty Nov 11, 2024
c54b93c
release: PR for v1.0.1 (#6088)
systemsdt Nov 13, 2024
cf1f6e6
misc: handler error while while helm deployment (#6082)
ayu-devtron Nov 14, 2024
5dfc388
misc: Sql query fixes (#6097)
ayu-devtron Nov 14, 2024
eeaa468
misc: Update pr-issue-validator.yaml (#6086)
kirandevtn Nov 15, 2024
c11ae89
code owner modified
vikramdevtron Nov 15, 2024
47d58a5
update codeowner
vikramdevtron Nov 15, 2024
49581fe
Merge pull request #6099 from devtron-labs/update-codeowner
vikramdevtron Nov 18, 2024
78fdf98
Merge branch 'main' into main-sync-develop-nov18
RajeevRanjan27 Nov 18, 2024
b4bf74a
executed make after main merge
RajeevRanjan27 Nov 18, 2024
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
14 changes: 7 additions & 7 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#ALL
* @vikramdevtron @kripanshdevtron @nishant-d @prakarsh-dt
* @vikramdevtron @nishant-d @prakarsh-dt @vivek-devtron

#Helm Charts
charts/devtron/ @prakarsh-dt @pawan-mehta-dt @nishant-d
scripts/devtron-reference-helm-charts @prakarsh-dt @pawan-mehta-dt @nishant-d
CHANGELOG/ @prakarsh-dt @pawan-mehta-dt @nishant-d
charts/devtron/ @prakarsh-dt @pawan-mehta-dt @nishant-d @vikramdevtron
scripts/devtron-reference-helm-charts @prakarsh-dt @pawan-mehta-dt @nishant-d @vikramdevtron
CHANGELOG/ @prakarsh-dt @pawan-mehta-dt @nishant-d @vikramdevtron

#Migration scripts
scripts/sql @prakarsh-dt @vikramdevtron @kripanshdevtron @nishant-d
scripts/utilities @prakarsh-dt @nishant-d @pawan-mehta-dt
scripts/sql @prakarsh-dt @vikramdevtron @nishant-d @vivek-devtron
scripts/utilities @prakarsh-dt @nishant-d @pawan-mehta-dt @vivek-devtron

#Github Specific
.github/ @prakarsh-dt @nishant-d @pawan-mehta-dt
.github/ @prakarsh-dt @nishant-d @pawan-mehta-dt @vikramdevtron
153 changes: 90 additions & 63 deletions .github/workflows/pr-issue-validator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
branches:
- 'main'
- 'release-**'
- 'develop'
# paths-ignore:
# - 'docs/**'
# - '.github/'
Expand Down Expand Up @@ -42,7 +43,6 @@ jobs:
PRNUM: ${{ github.event.pull_request.number }}
TITLE: ${{ github.event.pull_request.title }}
run: |
set -x
echo "base or target repo : ${{ github.event.pull_request.base.repo.full_name }}"
echo "head or source repo : ${{ github.event.pull_request.head.repo.full_name }}"
if [[ ${{ github.event.pull_request.head.repo.full_name }} == ${{ github.event.pull_request.base.repo.full_name }} ]]; then
Expand Down Expand Up @@ -169,78 +169,105 @@ jobs:
pr_no: ${{ github.event.pull_request.number }}
GH_TOKEN: ${{ github.token }}
run: |

# Fetch the latest changes from the main branch
git fetch origin main

# Get the list of changed files
git diff origin/main...HEAD --name-only > diff


# Specify the directory containing migration files
MIGRATION_DIR="scripts/sql"
ls
pwd

# Print changed files
echo "Changed files:"
cat diff

echo "Changed SQL files-:"
# Filter SQL files from the list of changed files
awk '/scripts\/sql\//' diff

# Count the number of changed SQL files in the 'scripts/sql' directory
count=$(awk '/scripts\/sql\//' diff | wc -l)

# Check if no SQL files were changed
if [[ $count == "0" ]]; then
echo "No SQL files were added, Exiting from this action."
exit 0
fi

# Iterate through each changed SQL file
for filename in $(awk '/scripts\/sql\//' diff); do
echo "Checking File: $filename"

changed_files=""
while IFS= read -r file; do
if [[ $file == $MIGRATION_DIR/* && $file == *.up.sql ]]; then
changed_files+="$file\n"
fi
done < diff

# Print the filtered .up.sql files
echo "Filtered .up.sql files:"
echo -e "$changed_files"

# Check if there are any .up.sql migration files in the changed files list
if [ -z "$changed_files" ]; then
echo "No .up.sql migration files found in the changes."
else
# Extract unique migration numbers from the directory (considering only .up.sql files)
existing_migrations=$(ls $MIGRATION_DIR | grep -E "\.up\.sql$" | grep -oE "[0-9]{3}[0-9]{3}[0-9]{2}" | sort | uniq)

# Check if the SQL file name is in the correct format (i.e., it ends with either '.up.sql' or '.down.sql')
if [[ "$filename" =~ \.(up|down)\.sql$ ]]; then

# Print a message that the file name is in the correct format
echo "File name: $filename is in the correct format"
else
# Print an error message
echo "Error: The SQL file name is not in the correct format: $filename."

# Post a comment on a GitHub pull request with the error message
gh pr comment $pr_no --body "The SQL file name: $filename is not in the correct format."

# Exit the script with a non-zero status code
exit 1
fi

# Navigate to the SQL files directory
sql_dir="scripts/sql"
echo "Current directory: $(pwd)"
cd "$sql_dir"
echo "SQL files directory: $(pwd)"
# Exclude migration numbers from changed files in existing_migrations
while read -r file; do
migration_number=$(basename "$file" | grep -oE "[0-9]{3}[0-9]{3}[0-9]{2}")
existing_migrations=$(echo "$existing_migrations" | grep -v "$migration_number")
done <<< "$changed_files"

# Extract the migration number from the SQL file name
migration_no=$(echo "$filename" | cut -d "/" -f 3 | cut -d "_" -f 1)
echo "Migration Number: $migration_no"
# Validate each changed .up.sql migration file
is_valid=true
processed_migrations=()
while read -r file; do
# Extract migration number from the filename
migration_number=$(basename "$file" | grep -oE "[0-9]{3}[0-9]{3}[0-9]{2}")

# Count the number of files with the same migration number
migration_files_present_of_this_no=$(ls | cut -d "_" -f 1 | grep -w -c "$migration_no")

# Navigate back to the original directory
cd ../..
# Check if the filename has the full XXXPPPNN format
if [[ ! $(basename "$file") =~ ^[0-9]{3}[0-9]{3}[0-9]{2}_ ]]; then
echo "Error: Migration file $file does not have the complete XXXPPPNN format."
is_valid=false
continue
fi

# Check the conditions based on the number of files with the same migration number
if [[ $migration_files_present_of_this_no == "2" ]]; then
echo "All looks good for this migration number."
elif [[ $migration_files_present_of_this_no == "1" ]]; then
# Only one file is present for this migration number
echo "Only single migration file was present for migration no.: $migration_no. either up or down migration is missing! EXITING"
gh pr comment $pr_no --body "Error: Only a single migration file was present for this number: $migration_no."
exit 1
else
# Migration number is repeated
echo "Error: Migration number is repeated."
gh pr comment $pr_no --body "Error: The SQL file number: $migration_no is duplicated"
if [ -z "$migration_number" ]; then
echo "Warning: Could not extract migration number from $file."
continue
fi

# Check if this migration number has already been processed
if [[ " ${processed_migrations[@]} " =~ " $migration_number " ]]; then
continue
fi
processed_migrations+=("$migration_number")

# Check if the migration number is unique
if echo "$existing_migrations" | grep -q "$migration_number"; then
echo "Error: Migration number $migration_number already exists."
is_valid=false
fi

# Check if the migration number is greater than previous ones
last_migration=$(echo "$existing_migrations" | tail -n 1)
if [ "$migration_number" -le "$last_migration" ]; then
echo "Error: Migration number $migration_number is not greater than the latest ($last_migration)."
is_valid=false
fi

# Check for sequential hotfix requirement (if NN > 01, check for NN-1)
hotfix_number=$(echo "$migration_number" | grep -oE "[0-9]{2}$")
if [ "$hotfix_number" -gt "01" ]; then
previous_hotfix=$(printf "%02d" $((10#$hotfix_number - 1)))
expected_previous_number="${migration_number:0:6}$previous_hotfix"
if ! echo "$existing_migrations" | grep -q "$expected_previous_number"; then
echo "Error: Previous hotfix migration $expected_previous_number not found for $migration_number."
is_valid=false
fi
fi

done <<< "$changed_files"

if [ "$is_valid" = false ]; then
echo "Validation failed. Please fix the errors before merging."
gh pr comment $pr_no --body "The Migration files providede inside of the PR does not pass the criteria!!"
exit 1
fi
done

echo "All .up.sql migration file validations passed."
gh pr comment $pr_no --body "The migration files have successfully passed the criteria!!"
fi



41 changes: 41 additions & 0 deletions CHANGELOG/release-notes-v0.7.4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
## v0.7.4

## Bugs
- fix: Helm rollback in case of no gitops (#6005)
- fix: App detail deployed by (#6032)
- fix: Removed not null constraint for releaseOverride (#6044)
- fix: Showing inaccurate data in template/list api while fetching previous deployments list in template/list api, output shown was cartesian product of deployment_template_history and wfr (#6034)
- fix: Plugin getByName method error handling (#6016)
- fix: Config deployment history fix (#6003)
- fix: Force abort fix (#5990)
- fix: Custom tag (#5999)
- fix: Helm deployment status (#5996)
- fix: Deployment window FIXED type (#5986)
- fix: Migration seq fix (#5962)
- fix: Modified the query for User listing with filters (#5957)
- fix: Bulk deploy panic and docker tag handling (#5949)
- fix: stage artifact logic (#5913)
## Enhancements
- feat: Config diff enhancement (#5837)
- feat: Terminal role casbin policy (#5991)
- feat: Refactoring argo application service and common-lib constants (#5944)
- feat: Feature release v9 sql scripts (#5950)
## Others
- misc: Main sync develop (#6047)
- misc: Permission access getting clubbed (#6045)
- fix : Multiple param of filter in helm app list (#6013)
- chore: Adding refchart migration (#6007)
- chore: Cluster terminal images migration (#6006)
- chore: Trigger clean (#6004)
- misc: Removed deployment group validation when deleting CD pipelines (#5989)
- misc: Replaced != with <> for PostgreSQL compatibility (#5987)
- misc: Main sync 14 oct 2024 (#5985)
- misc: isLatest field in plugin_metadata tag changed to not_null (#5984)
- chore: Main sync develop (#5983)
- misc: error handling while creating github repo in case of concurrent reqs (#5978)
- misc: Release candidate v0.20.0 (#5980)
- misc: Release candidate v0.19.0 (#5930)
- misc: updated migration number (#5948)
- misc: err handling for configmap access (#5938)


31 changes: 31 additions & 0 deletions CHANGELOG/release-notes-v1.0.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
## v1.0.0

## Bugs
- fix: Helm rollback in case of no gitops (#6005)
- fix: App detail deployed by (#6032)
- fix: Removed not null constraint for releaseOverride (#6044)
- fix: Showing inaccurate data in template/list api while fetching previous deployments list in template/list api, output shown was cartesian product of deployment_template_history and wfr (#6034)
- fix: Plugin getByName method error handling (#6016)
- fix: Config deployment history fix (#6003)
- fix: Force abort fix (#5990)
- fix: Helm deployment status (#5996)
- fix: Deployment window FIXED type (#5986)
- fix: Migration seq fix (#5962)
- fix: Modified the query for User listing with filters (#5957)
- fix: Bulk deploy panic and docker tag handling (#5949)
- fix: Stage artifact logic (#5913)
- fix: Permission access getting clubbed (#6045)
## Enhancements
- feat: Config diff enhancement (#5837)
- feat: Terminal role casbin policy (#5991)
- feat: Refactoring argo application service and common-lib constants (#5944)
## Others
- fix : Multiple param of filter in helm app list (#6013)
- chore: Adding refchart migration (#6007)
- chore: Cluster terminal images migration (#6006)
- misc: Removed deployment group validation when deleting CD pipelines (#5989)
- misc: Replaced != with <> for PostgreSQL compatibility (#5987)
- misc: isLatest field in plugin metadata tag changed to not_null (#5984)
- misc: Error handling while creating github repo in case of concurrent reqs (#5978)
- misc: Updated migration number (#5948)
- misc: Err handling for configmap access (#5938)
10 changes: 10 additions & 0 deletions CHANGELOG/release-notes-v1.0.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## v1.0.1

## Bugs
- fix: server version on updating fix (#6079)
- fix: all module installation fix (#6083)
- fix: cluster namespace list informer (#6069)
## Documentation
- doc: Updated Readme for K8s Dashboard & Devtron platform (#6074)


3 changes: 2 additions & 1 deletion COMMUNITY_CONTRIBUTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* https://www.financialexpress.com/industry/sme/devtron-a-business-opportunity-in-developers-needs/2274094/ - By Srinath Srinivasan


## Videos
## :video_camera: Videos

* https://www.youtube.com/watch?v=ZKcfZC-zSMM - By Victor Farcic

Expand All @@ -33,3 +33,4 @@
* https://www.youtube.com/watch?v=W4-UorfDQxI - Carbon_Capital Consulting

* https://www.youtube.com/watch?v=FB5BI3Ef7uw&t=363s - Let's learn Devtron

Loading
Loading