Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling Sample-data import for Docker #2683

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
b411d90
chore(deps): bump graphql-markdown from 7.0.0 to 7.1.0 (#2513)
dependabot[bot] Sep 9, 2024
92fd725
chore(deps): bump @types/node from 22.5.2 to 22.5.4 (#2514)
dependabot[bot] Sep 9, 2024
29a4afc
chore(deps): bump @types/yargs from 17.0.32 to 17.0.33 (#2516)
dependabot[bot] Sep 9, 2024
9f4d540
chore(deps): bump concurrently from 8.2.2 to 9.0.0 (#2517)
dependabot[bot] Sep 9, 2024
69f027c
Added the field Identifier (#2509)
ARYANSHAH1567 Sep 9, 2024
6093752
Fixed setup script (#2512)
ARYANSHAH1567 Sep 9, 2024
df7a52d
Fixed the eslint_disable_check.py script (#2521)
ARYANSHAH1567 Sep 15, 2024
7a9acec
chore(deps): bump typedoc-plugin-markdown from 4.2.3 to 4.2.7 (#2536)
dependabot[bot] Sep 17, 2024
c952c7a
chore(deps): bump tsx from 4.19.0 to 4.19.1 (#2537)
dependabot[bot] Sep 17, 2024
2683bbf
Feature: Added MinIO Setup and Configuration for Local and Docker Env…
chandel-aman Sep 23, 2024
bbdb374
chore(deps): bump @types/jsonwebtoken from 9.0.6 to 9.0.7 (#2543)
dependabot[bot] Sep 28, 2024
3e1689c
chore(deps): bump @faker-js/faker from 8.4.1 to 9.0.1 (#2544)
dependabot[bot] Sep 28, 2024
efa063f
chore(deps): bump @vitest/coverage-v8 from 2.0.5 to 2.1.1 (#2545)
dependabot[bot] Sep 28, 2024
54d44cf
upgraded the nodemailer package to 6.9.15 (#2549)
syedali237 Sep 28, 2024
fb5076f
Query returns null for the image field of the likedBy object of the p…
prayanshchh Sep 28, 2024
d77e6b9
chore(deps): bump axios from 1.7.4 to 1.7.7 (#2557)
dependabot[bot] Oct 1, 2024
c1e47ae
chore(deps): bump helmet from 7.1.0 to 8.0.0 (#2558)
dependabot[bot] Oct 1, 2024
eba6bb5
chore(deps): bump eslint-plugin-import from 2.29.1 to 2.30.0 (#2559)
dependabot[bot] Oct 1, 2024
fb23e01
chore(deps): bump concurrently from 9.0.0 to 9.0.1 (#2560)
dependabot[bot] Oct 5, 2024
5e38dbf
chore(deps): bump @types/validator from 13.12.0 to 13.12.2 (#2546)
dependabot[bot] Oct 5, 2024
628dcf2
chore(deps): bump winston from 3.14.2 to 3.15.0 (#2566)
dependabot[bot] Oct 9, 2024
d9b4cf8
chore(deps): bump @vitest/coverage-v8 from 2.1.1 to 2.1.2 (#2567)
dependabot[bot] Oct 9, 2024
0e11238
chore(deps): bump eslint-plugin-import from 2.30.0 to 2.31.0 (#2568)
dependabot[bot] Oct 9, 2024
82726ff
chore(deps): bump @typescript-eslint/parser from 8.0.1 to 8.8.0 (#2569)
dependabot[bot] Oct 9, 2024
b677650
chore(deps): bump express-rate-limit from 7.4.0 to 7.4.1 (#2570)
dependabot[bot] Oct 9, 2024
cc00489
Implemented Reply functionality for DirectChat and GroupChat (#2420)
disha1202 Oct 12, 2024
f63e383
Revert "Implemented Reply functionality for DirectChat and GroupChat …
palisadoes Oct 12, 2024
c03e2fb
Migrating to eslint.config.js (#2522)
Suyash878 Oct 12, 2024
7dd375d
Update push.yml
palisadoes Oct 12, 2024
1628ba4
Update pull-request.yml
palisadoes Oct 12, 2024
790ab29
Update pull-request.yml
palisadoes Oct 12, 2024
e9391fa
session management feature for merge (#2556)
JordanCampbell1 Oct 13, 2024
2bbde4b
mdx file name changed (#2586)
gautam-divyanshu Oct 13, 2024
d262c65
Update codeql-codescan.yml
palisadoes Oct 14, 2024
f9e8275
Update codeql-codescan.yml
palisadoes Oct 14, 2024
63f9965
chore(deps): bump husky from 9.1.5 to 9.1.6 (#2588)
dependabot[bot] Oct 14, 2024
68ef5ec
chore(deps): bump @types/lodash from 4.17.7 to 4.17.10 (#2589)
dependabot[bot] Oct 14, 2024
dac0b6d
chore(deps): bump @types/node from 22.5.4 to 22.7.5 (#2590)
dependabot[bot] Oct 14, 2024
61f89fd
chore(deps): bump @graphql-codegen/typescript from 4.0.9 to 4.1.0 (#2…
dependabot[bot] Oct 14, 2024
01a2814
chore(deps): bump graphql-voyager from 2.0.0 to 2.1.0 (#2592)
dependabot[bot] Oct 14, 2024
c1dc667
Configurable Session Timeout for Community (#2464)
JordanCampbell1 Oct 15, 2024
755c14a
Handle creatorId (#2564)
ARYANSHAH1567 Oct 17, 2024
c35f0f3
updated vitest and @vitest/coverage-v8 version (#2595)
Aryan4884 Oct 17, 2024
f1c816b
updated eslint version (#2594)
Aryan4884 Oct 17, 2024
9600b6c
feat: implemented Reply functionality for chat (#2584)
disha1202 Oct 21, 2024
2f605f9
Updated chat schema (#2466)
disha1202 Oct 21, 2024
cb0e624
chore(deps): bump @types/lodash from 4.17.10 to 4.17.12 (#2603)
dependabot[bot] Oct 22, 2024
4e2e045
chore(deps): bump date-fns from 3.6.0 to 4.1.0 (#2605)
dependabot[bot] Oct 22, 2024
be55d7f
chore(deps): bump @graphql-tools/resolvers-composition (#2607)
dependabot[bot] Oct 22, 2024
4a88fe6
chore(deps): bump @types/node from 22.7.5 to 22.7.8 (#2609)
dependabot[bot] Oct 22, 2024
7e5ec1c
feat: Add functionality for adding people to a tag (GSoC) (#2612)
meetulr Oct 27, 2024
2f8be16
updated google recaptcha image in installation.md (#2608)
sethdivyansh Oct 27, 2024
f526143
Update pull-request.yml
palisadoes Oct 27, 2024
5392ea0
Update pull-request.yml
palisadoes Oct 27, 2024
2c372d9
feat: Add support for bulk tag operations (GSoC) (#2616)
meetulr Oct 28, 2024
2ab7dd8
Update dependabot.yaml
palisadoes Oct 29, 2024
9bf7afd
chore(deps): bump graphql-upload from 16.0.2 to 17.0.0 (#2622)
dependabot[bot] Oct 29, 2024
6c588a0
chore(deps): bump @types/express-rate-limit from 6.0.0 to 6.0.2 (#2620)
dependabot[bot] Oct 29, 2024
adb4c7c
chore(deps): bump graphql-markdown from 7.1.0 to 7.3.0 (#2618)
dependabot[bot] Oct 29, 2024
848f31a
chore(deps): bump @typescript-eslint/parser from 8.8.1 to 8.11.0 (#2619)
dependabot[bot] Oct 29, 2024
42024f6
chore(deps): bump uuid from 10.0.0 to 11.0.1 (#2621)
dependabot[bot] Oct 29, 2024
e59b02f
update pull-request.yml to ignore github actions when label "ignore-p…
govindsingh3477 Oct 29, 2024
9f3b05f
Onboard renovate (#2634)
tasneemkoushar Nov 1, 2024
f1f5f3b
fix: removed all references to direct chat and group chat (#2629)
disha1202 Nov 1, 2024
3f83e44
feat: Add filter and sort for userTags (GSoC) (#2635)
meetulr Nov 2, 2024
f4877b9
Add support for Volunteer Leaderboard, linking Volunteer/Groups/Membe…
GlenDsza Nov 2, 2024
e22122f
Events attended support added with fetching recurring event query (#2…
duplixx Nov 3, 2024
7631f17
Enhance File Storage and API Capabilities with Minio Integration and …
chandel-aman Nov 4, 2024
c2e98d0
chore(deps): bump nodemailer and @types/nodemailer (#2640)
dependabot[bot] Nov 4, 2024
3bae7c4
chore(deps): bump @types/cls-hooked from 4.3.8 to 4.3.9 (#2641)
dependabot[bot] Nov 4, 2024
3521837
chore(deps): bump @graphql-codegen/cli from 5.0.2 to 5.0.3 (#2642)
dependabot[bot] Nov 4, 2024
bba5d82
chore(deps): bump @apollo/server from 4.11.0 to 4.11.2 (#2643)
dependabot[bot] Nov 4, 2024
a1fce83
Updating the setup script to handle docker data import
Suyash878 Nov 17, 2024
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
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
node_modules
videos
images
data
.env
.git
.gitignore
Expand Down
18 changes: 18 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,24 @@ REDIS_HOST=
REDIS_PORT=
REDIS_PASSWORD=

# These environment variables are used to provide MinIo credentials

# The endpoint URL for MinIO server, specifying where the MinIO service is hosted
MINIO_ENDPOINT=

# The username with root-level access for MinIO administration
MINIO_ROOT_USER=

# The password corresponding to the MINIO_ROOT_USER for authentication
MINIO_ROOT_PASSWORD=

# The default bucket name to use with MinIO for storing data
MINIO_BUCKET=

# The local directory where MinIO stores its data files
MINIO_DATA_DIR=


# this environment variable is for setting the environment variable for Image Upload size

IMAGE_SIZE_LIMIT_KB=3000
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"plugins": ["@graphql-eslint"]
},
{
"files": ["tests/**/*"],
"files": ["tests/**/*", "setup.ts"],
"rules": {
"no-restricted-imports": "off"
}
Expand Down
2 changes: 1 addition & 1 deletion .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ updates:
directory: "/"
# Schedule automated updates to run weekly
schedule:
interval: "weekly"
interval: "monthly"
# Labels to apply to Dependabot PRs
labels:
- "dependencies"
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/codeql-codescan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ on:

jobs:
CodeQL:
name: CodeQL
if: ${{ github.actor != 'dependabot[bot]' }}
name: Analyse Code With CodeQL
runs-on: ubuntu-latest
permissions:
actions: read
Expand Down
123 changes: 123 additions & 0 deletions .github/workflows/eslint_disable_check.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
"""ESLint Checker Script.

Methodology:

Recursively analyzes TypeScript files in the 'src' directory and its subdirectories
as well as 'setup.ts' files to ensure they do not contain eslint-disable statements.

This script enforces code quality practices in the project.

NOTE:

This script complies with our python3 coding and documentation standards.
It complies with:

1) Pylint
2) Pydocstyle
3) Pycodestyle
4) Flake8

"""

import os
import re
import argparse
import sys

def has_eslint_disable(file_path):
"""
Check if a TypeScript file contains eslint-disable statements.

Args:
file_path (str): Path to the TypeScript file.

Returns:
bool: True if eslint-disable statement is found, False otherwise.
"""
eslint_disable_pattern = re.compile(r'//\s*eslint-disable(?:-next-line|-line)?', re.IGNORECASE)

try:
with open(file_path, 'r', encoding='utf-8') as file:
content = file.read()
return bool(eslint_disable_pattern.search(content))
except Exception as e:
print(f"Error reading file {file_path}: {e}")
return False

def check_eslint(directory):
"""
Recursively check TypeScript files for eslint-disable statements in the 'src' directory.

Args:
directory (str): Path to the directory.

Returns:
list: List of files containing eslint-disable statements.
"""
eslint_issues = []

src_dir = os.path.join(directory, 'src')

if not os.path.exists(src_dir):
print(f"Source directory '{src_dir}' does not exist.")
return eslint_issues

for root, dirs, files in os.walk(src_dir):
for file_name in files:
if file_name.endswith('.tsx') and not file_name.endswith('.test.tsx'):
file_path = os.path.join(root, file_name)
if has_eslint_disable(file_path):
eslint_issues.append(f'File {file_path} contains eslint-disable statement.')

setup_path = os.path.join(directory, 'setup.ts')
if os.path.exists(setup_path) and has_eslint_disable(setup_path):
eslint_issues.append(f'Setup file {setup_path} contains eslint-disable statement.')

return eslint_issues

def arg_parser_resolver():
"""Resolve the CLI arguments provided by the user."""
parser = argparse.ArgumentParser()
parser.add_argument(
"--directory",
type=str,
default=os.getcwd(),
help="Path to the directory to check (default: current directory)"
)
return parser.parse_args()

def main():
"""
Execute the script's main functionality.

This function serves as the entry point for the script. It performs
the following tasks:
1. Validates and retrieves the directory to check from
command line arguments.
2. Recursively checks TypeScript files for eslint-disable statements.
3. Provides informative messages based on the analysis.
4. Exits with an error if eslint-disable statements are found.

Raises:
SystemExit: If an error occurs during execution.
"""
args = arg_parser_resolver()
if not os.path.exists(args.directory):
print(f"Error: The specified directory '{args.directory}' does not exist.")
sys.exit(1)

eslint_issues = check_eslint(args.directory)

if eslint_issues:
for issue in eslint_issues:
print(issue)
print("ESLint-disable check failed. Exiting with error.")
sys.exit(1)

print("ESLint-disable check completed successfully.")
sys.exit(0)

if __name__ == "__main__":
main()
19 changes: 15 additions & 4 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Count number of lines
run: |
chmod +x ./.github/workflows/countline.py
./.github/workflows/countline.py --lines 600 --exclude_files src/types/generatedGraphQLTypes.ts tests src/typeDefs/types.ts src/constants.ts
./.github/workflows/countline.py --lines 600 --exclude_files src/types/generatedGraphQLTypes.ts tests src/typeDefs/types.ts src/constants.ts src/typeDefs/inputs.ts

- name: Check for TSDoc comments
run: npm run check-tsdoc # Run the TSDoc check script
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
if: steps.changed_files.outputs.any_changed == 'true'
env:
CHANGED_FILES: ${{ steps.changed_files.outputs.all_changed_files }}
run: npx eslint ${CHANGED_FILES}
run: npx eslint ${CHANGED_FILES} --max-warnings=1500 && python .github/workflows/eslint_disable_check.py

- name: Check for formatting errors
run: npm run format:check
Expand All @@ -90,8 +90,9 @@ jobs:
echo "Error: Source and Target Branches are the same. Please ensure they are different."
exit 1

Check-Unauthorized-Changes:
name: Checks if no unauthorized files are changed
Check-Sensitive-Files:
if: ${{ github.actor != 'dependabot[bot]' && !contains(github.event.pull_request.labels.*.name, 'ignore-sensitive-files-pr') }}
name: Checks if sensitive files have been changed without authorization
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand Down Expand Up @@ -126,6 +127,13 @@ jobs:
setup.ts
schema.graphql
.coderabbit.yaml
CODE_OF_CONDUCT.md
CONTRIBUTING.md
DOCUMENTATION.md
INSTALLATION.md
ISSUE_GUIDELINES.md
PR_GUIDELINES.md
README.md

- name: List all changed unauthorized files
if: steps.changed-unauth-files.outputs.any_changed == 'true' || steps.changed-unauth-files.outputs.any_deleted == 'true'
Expand All @@ -138,6 +146,7 @@ jobs:
exit 1

File-count-check:
if: ${{ github.actor != 'dependabot[bot]' }}
name: Checks if number of files changed is acceptable
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -288,6 +297,7 @@ jobs:
min_coverage: 95.0

JSDocs:
if: ${{ github.actor != 'dependabot[bot]' }}
name: 'JSDocs comments and pipeline'
runs-on: ubuntu-latest
needs: Test-Application
Expand All @@ -303,6 +313,7 @@ jobs:
run: echo "Run JSdocs :${{ env.RUN_JSDOCS }}"

Branch-check:
if: ${{ github.actor != 'dependabot[bot]' }}
name: "Base branch check"
runs-on: ubuntu-latest
steps:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
##############################################################################

Push-Workflow:
if: ${{ github.actor != 'dependabot[bot]' }}
name: Testing Application
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -54,8 +55,6 @@ jobs:
MONGO_DB_URL: mongodb://localhost:27017/talawa-test-db
REDIS_HOST: localhost
REDIS_PORT: 6379
# ACCESS_TOKEN_SECRET: ${{ secrets.ACCESS_TOKEN_SECRET }}
# REFRESH_TOKEN_SECRET: ${{ secrets.REFRESH_TOKEN_SECRET }}

# We checkout the content of the Talawa-API repository in a directory called `api`
steps:
Expand Down Expand Up @@ -95,6 +94,7 @@ jobs:

# You can find the deployment instructions in the scripts/cloud-api-demo/README.md file
Deploy-Workflow:
if: ${{ github.actor != 'dependabot[bot]' }}
name: Deploying Application to Cloud VPS
needs: Push-Workflow
runs-on: ubuntu-latest
Expand Down Expand Up @@ -130,6 +130,7 @@ jobs:
python3 /usr/local/bin/scripts/deploy.py --path ~/develop --branch develop

Check-Schema:
if: ${{ github.actor != 'dependabot[bot]' }}
name: Check Schema
runs-on: ubuntu-latest

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ pnpm-lock.yaml
coverage
build

# Ignore the folder for file uploads meta data in minio
data/**

serviceAccountKey.json
cert.pem
key.pem
Expand Down
Loading