-
-
Notifications
You must be signed in to change notification settings - Fork 801
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge the latest develop-postgres to develop for Cloud instance (#3183)
* 20250105213148 Deleted all files in the develop branch in anticipation of merging develop-postgres into develop cleanly * 20250105213246 Merge develop-postgres into develop
- Loading branch information
1 parent
9435090
commit f30baa5
Showing
161 changed files
with
8,046 additions
and
4,338 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
{ | ||
"labelsSynonyms": { | ||
"dependencies": ["dependabot", "dependency", "dependencies"], | ||
"security": ["security"], | ||
"ui/ux": ["layout", "screen", "design", "figma"] | ||
}, | ||
"defaultLabels": ["unapproved"], | ||
{ | ||
"labelsSynonyms": { | ||
"dependencies": ["dependabot", "dependency", "dependencies"], | ||
"security": ["security"], | ||
"ui/ux": ["layout", "screen", "design", "figma"] | ||
}, | ||
"defaultLabels": ["unapproved"], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: Merge Conflict Check Workflow | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- '**' | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
- ready_for_review | ||
|
||
jobs: | ||
Merge-Conflict-Check: | ||
name: Check for Merge Conflicts | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Check Mergeable Status via Github API | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
PR_NUMBER=${{ github.event.pull_request.number }} | ||
max_retries=3 | ||
retry_delay=5 | ||
for ((i=1; i<=max_retries; i++)); do | ||
echo "Attempt $i of $max_retries" | ||
if ! response=$(gh api "repos/${{ github.repository }}/pulls/$PR_NUMBER" --jq '.mergeable'); then | ||
if [[ $response == *"rate limit exceeded"* ]]; then | ||
echo "Rate limit exceeded. Waiting before retry..." | ||
sleep 60 # Wait longer for rate limit | ||
else | ||
echo "Failed to call GitHub API: $response" | ||
if [ $i -eq $max_retries ]; then | ||
echo "Maximum retries reached. Exiting." | ||
exit 1 | ||
fi | ||
sleep $retry_delay | ||
fi | ||
continue | ||
fi | ||
case "$response" in | ||
"true") | ||
echo "No conflicts detected." | ||
exit 0 | ||
;; | ||
"false") | ||
echo "Merge conflicts detected." | ||
exit 1 | ||
;; | ||
*) | ||
echo "Mergeable status unknown: $response" | ||
if [ $i -eq $max_retries ]; then | ||
echo "Maximum retries reached. Exiting." | ||
exit 1 | ||
fi | ||
sleep $retry_delay | ||
;; | ||
esac | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
#!/bin/bash | ||
|
||
# This script performs a health check to ensure an application is running on a specified port. | ||
# The script uses netcat (nc) to check if the port is open, with a configurable timeout. | ||
# It also includes optional logic to fetch Docker container logs if the health check fails during a Docker-based test. | ||
|
||
# Variables: | ||
# port="$1" - The port to check (passed as the first argument to the script). | ||
# timeout="${2:-120}" - The maximum time in seconds to wait for the application to start. Defaults to 120 seconds if not provided. | ||
# is_docker_test="${3:-false}" - A flag to indicate whether the script is being run in a Docker-based test. Defaults to false. | ||
|
||
# Logic: | ||
# 1. Print a message indicating the start of the health check. | ||
# 2. Enter a loop to repeatedly check if the port is open using `nc -z localhost "${port}"`. | ||
# - If the port is not open and the timeout has not expired, sleep for 1 second and decrement the timeout. | ||
# - Print a status message every 10 seconds with the remaining time. | ||
# 3. If the timeout expires, print an error message and, if in Docker test mode, fetch Docker logs for debugging. | ||
# 4. If the port is detected as open, print a success message and exit. | ||
|
||
# Script: | ||
|
||
port="$1" | ||
timeout="${2:-120}" | ||
is_docker_test="${3:-false}" | ||
|
||
|
||
# Validate required port parameter | ||
if [ -z "${port}" ] || ! [[ "${port}" =~ ^[0-9]+$ ]] || [ "${port}" -lt 1 ] || [ "${port}" -gt 65535 ]; then | ||
echo "Error: Invalid or missing port number. Must be between 1-65535" | ||
exit 1 | ||
fi | ||
|
||
# Validate timeout parameter | ||
if ! [[ "${timeout}" =~ ^[0-9]+$ ]] || [ "${timeout}" -lt 1 ]; then | ||
echo "Error: Invalid timeout value. Must be a positive integer" | ||
exit 1 | ||
fi | ||
|
||
# Validate is_docker_test parameter | ||
if [ "${is_docker_test}" != "true" ] && [ "${is_docker_test}" != "false" ]; then | ||
echo "Error: is_docker_test must be either 'true' or 'false'" | ||
exit 1 | ||
fi | ||
|
||
echo "Starting health check with ${timeout}s timeout" | ||
while [ "${timeout}" -gt 0 ]; do | ||
if nc -z localhost "${port}" 2>/dev/null; then | ||
break | ||
elif [ $? -ne 1 ]; then | ||
echo "Error: Failed to check port ${port} (nc command failed)" | ||
exit 1 | ||
fi | ||
sleep 1 | ||
timeout=$((timeout-1)) | ||
if [ $((timeout % 10)) -eq 0 ]; then | ||
echo "Waiting for app to start on port ${port}... ${timeout}s remaining" | ||
# Try to get more information about the port status | ||
netstat -an | grep "${port}" || true | ||
fi | ||
done | ||
|
||
if [ "${timeout}" -eq 0 ]; then | ||
echo "Error: Timeout waiting for application to start on port ${port}" | ||
echo "System port status:" | ||
netstat -an | grep "${port}" || true | ||
if [ "${is_docker_test}" = "true" ]; then | ||
echo "Fetching Docker container logs..." | ||
if ! docker logs talawa-admin-app-container; then | ||
echo "Error: Failed to fetch logs from container talawa-admin-app-container" | ||
fi | ||
fi | ||
exit 1 | ||
fi | ||
echo "App started successfully on port ${port}" | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.