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

added docker check to workflow #2414

Merged
merged 35 commits into from
Nov 17, 2024

Conversation

VanshikaSabharwal
Copy link

@VanshikaSabharwal VanshikaSabharwal commented Nov 8, 2024

What kind of change does this PR introduce?

bugfix, feature request

Issue Number:

Fixes #2402

Did you add tests for your changes?

No

Snapshots/Videos:

image

If relevant, did you update the documentation?

Not relevent

Summary

Does this PR introduce a breaking change?

No

Other information

Have you read the contributing guide?

Yes

Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced a new job in the GitHub Actions workflow to verify the Talawa Admin application starts correctly in Docker.
    • Added a Dockerfile for streamlined application deployment.
    • Included a new section in the installation guide detailing Docker setup, covering prerequisites, development, and production configurations.
  • Enhancements

    • Updated .dockerignore to optimize Docker image builds by excluding unnecessary files.
    • Modified server configuration to change the default port to 4321 and prevent automatic browser opening.

These changes aim to improve the development and deployment experience for users.

Copy link

coderabbitai bot commented Nov 8, 2024

Walkthrough

This pull request introduces significant updates to the Talawa Admin application, including the addition of a new GitHub Actions job named Docker-Start-Check to verify the application starts correctly in a Docker container. It also expands the .dockerignore file, creates a new Dockerfile for the Node.js application, modifies the vite.config.ts for server settings, and adds a new section in INSTALLATION.md for Docker installation instructions.

Changes

File Change Summary
.github/workflows/pull-request.yml Added a new job Docker-Start-Check to verify the Talawa Admin app starts in Docker.
.dockerignore Expanded with entries for *.log, *.lock, .DS_Store, .idea, .vscode, build, and out.
Dockerfile Created a new Dockerfile for the Node.js application, specifying base image, working directory, and commands.
config/vite.config.ts Modified server settings: set open to false, added host: '0.0.0.0', and changed port to 4321.
INSTALLATION.md Added a new section "Installation using Docker" with subsections for building and running the Docker container.

Assessment against linked issues

Objective Addressed Explanation
Verify that the Talawa Admin app starts in Docker (2402)

Possibly related issues

Possibly related PRs

Suggested reviewers

  • palisadoes
  • varshith257

Poem

In Docker's realm, we spin and weave,
Talawa's app, we now believe.
With checks in place, it starts with glee,
A hop, a jump, for all to see! 🐇
Build and run, let joy abound,
In every line, our dreams are found!


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

github-actions bot commented Nov 8, 2024

Our Pull Request Approval Process

We have these basic policies to make the approval process smoother for our volunteer team.

Testing Your Code

Please make sure your code passes all tests. Our test code coverage system will fail if these conditions occur:

  1. The overall code coverage drops below the target threshold of the repository
  2. Any file in the pull request has code coverage levels below the repository threshold
  3. Merge conflicts

The process helps maintain the overall reliability of the code base and is a prerequisite for getting your PR approved. Assigned reviewers regularly review the PR queue and tend to focus on PRs that are passing.

Reviewers

Do not assign reviewers. Our Queue Monitors will review your PR and assign them.
When your PR has been assigned reviewers contact them to get your code reviewed and approved via:

  1. comments in this PR or
  2. our slack channel

Reviewing Your Code

Your reviewer(s) will have the following roles:

  1. arbitrators of future discussions with other contributors about the validity of your changes
  2. point of contact for evaluating the validity of your work
  3. person who verifies matching issues by others that should be closed.
  4. person who gives general guidance in fixing your tests

CONTRIBUTING.md

Read our CONTRIBUTING.md file. Most importantly:

  1. PRs with issues not assigned to you will be closed by the reviewer
  2. Fix the first comment in the PR so that each issue listed automatically closes

Other

  1. 🎯 Please be considerate of our volunteers' time. Contacting the person who assigned the reviewers is not advised unless they ask for your input. Do not @ the person who did the assignment otherwise.
  2. Read the CONTRIBUTING.md file make

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Outside diff range and nitpick comments (2)
.github/workflows/pull-request.yml (2)

278-283: Improve cleanup step reliability.

The cleanup steps should handle errors gracefully and verify container existence.

Apply this diff to improve cleanup reliability:

      - name: Stop Docker Container 
        if: always()
        run: |
-         docker stop talawa-admin-app-container
-         docker rm talawa-admin-app-container
+         if docker ps -a | grep -q talawa-admin-app-container; then
+           docker stop talawa-admin-app-container || true
+           docker rm talawa-admin-app-container || true
+         fi
🧰 Tools
🪛 yamllint

[error] 278-278: trailing spaces

(trailing-spaces)


[error] 283-283: trailing spaces

(trailing-spaces)


256-284: Consider enhancing the Docker check implementation.

While this implementation addresses the basic requirement of checking if the app starts in Docker, consider these architectural improvements:

  1. Add environment variables for configuration (ports, timeouts, etc.)
  2. Consider using Docker Compose for more complex setups
  3. Add logging of container output for debugging failures
  4. Consider implementing smoke tests beyond basic health checks

Would you like assistance in implementing any of these improvements?

🧰 Tools
🪛 actionlint

259-259: could not parse as YAML: yaml: line 259: did not find expected '-' indicator

(syntax-check)

🪛 yamllint

[warning] 257-257: wrong indentation: expected 4 but found 10

(indentation)


[warning] 260-260: wrong indentation: expected 12 but found 13

(indentation)


[error] 261-261: syntax error: expected , but found '?'

(syntax)


[error] 262-262: trailing spaces

(trailing-spaces)


[warning] 264-264: wrong indentation: expected 15 but found 13

(indentation)


[error] 267-267: trailing spaces

(trailing-spaces)


[warning] 268-268: wrong indentation: expected 15 but found 14

(indentation)


[error] 271-271: trailing spaces

(trailing-spaces)


[warning] 273-273: wrong indentation: expected 16 but found 15

(indentation)


[error] 275-275: trailing spaces

(trailing-spaces)


[error] 277-277: trailing spaces

(trailing-spaces)


[error] 278-278: trailing spaces

(trailing-spaces)


[error] 283-283: trailing spaces

(trailing-spaces)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between cd9dd1a and 1519682.

📒 Files selected for processing (1)
  • .github/workflows/pull-request.yml (1 hunks)
🧰 Additional context used
🪛 actionlint
.github/workflows/pull-request.yml

259-259: could not parse as YAML: yaml: line 259: did not find expected '-' indicator

(syntax-check)

🪛 yamllint
.github/workflows/pull-request.yml

[warning] 257-257: wrong indentation: expected 4 but found 10

(indentation)


[warning] 260-260: wrong indentation: expected 12 but found 13

(indentation)


[error] 261-261: syntax error: expected , but found '?'

(syntax)


[error] 262-262: trailing spaces

(trailing-spaces)


[warning] 264-264: wrong indentation: expected 15 but found 13

(indentation)


[error] 267-267: trailing spaces

(trailing-spaces)


[warning] 268-268: wrong indentation: expected 15 but found 14

(indentation)


[error] 271-271: trailing spaces

(trailing-spaces)


[warning] 273-273: wrong indentation: expected 16 but found 15

(indentation)


[error] 275-275: trailing spaces

(trailing-spaces)


[error] 277-277: trailing spaces

(trailing-spaces)


[error] 278-278: trailing spaces

(trailing-spaces)


[error] 283-283: trailing spaces

(trailing-spaces)

.github/workflows/pull-request.yml Outdated Show resolved Hide resolved
.github/workflows/pull-request.yml Outdated Show resolved Hide resolved
.github/workflows/pull-request.yml Outdated Show resolved Hide resolved
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (1)
.github/workflows/pull-request.yml (1)

275-295: Enhance health check implementation for better debugging.

While the current implementation with timeout and retry logic is good, consider these improvements:

  1. Add more detailed error messages
  2. Include debug logging
  3. Add comprehensive health checks

Apply this diff to enhance the implementation:

             - name: Check if Talawa Admin App is running
               run: |
                timeout=60
                while ! nc -z localhost 8080 && [ $timeout -gt 0 ]; do
+                echo "Waiting for application to start... ($timeout seconds remaining)"
                 sleep 1
                 timeout=$((timeout-1))
                done
                  
                if [ $timeout -eq 0 ]; then
-                echo "Timeout waiting for application to start"
+                echo "Error: Application failed to start within 60 seconds"
+                echo "Docker logs:"
+                docker logs talawa-admin-app-container
                 exit 1
                fi
               
         # Retry curl up to 3 times with 5s delay
         for i in {1..3}; do
+           echo "Attempt $i/3: Checking application health..."
           if curl --fail --silent http://localhost:8080/index.html; then
+             echo "Application is healthy!"
              exit 0
           fi
+           echo "Health check failed, retrying in 5 seconds..."
           sleep 5
         done
+        echo "Error: Application health check failed after 3 attempts"
+        echo "Docker logs:"
+        docker logs talawa-admin-app-container
         exit 1
🧰 Tools
🪛 yamllint

[error] 282-282: trailing spaces

(trailing-spaces)


[error] 287-287: trailing spaces

(trailing-spaces)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 1519682 and 7d04c94.

📒 Files selected for processing (1)
  • .github/workflows/pull-request.yml (1 hunks)
🧰 Additional context used
🪛 actionlint
.github/workflows/pull-request.yml

260-260: could not parse as YAML: yaml: line 260: did not find expected '-' indicator

(syntax-check)

🪛 yamllint
.github/workflows/pull-request.yml

[warning] 257-257: wrong indentation: expected 4 but found 10

(indentation)


[warning] 261-261: wrong indentation: expected 12 but found 13

(indentation)


[error] 262-262: syntax error: expected , but found '?'

(syntax)


[error] 263-263: trailing spaces

(trailing-spaces)


[warning] 265-265: wrong indentation: expected 15 but found 13

(indentation)


[error] 266-266: trailing spaces

(trailing-spaces)


[error] 270-270: trailing spaces

(trailing-spaces)


[warning] 271-271: wrong indentation: expected 10 but found 12

(indentation)


[error] 282-282: trailing spaces

(trailing-spaces)


[error] 287-287: trailing spaces

(trailing-spaces)


[error] 296-296: trailing spaces

(trailing-spaces)


[error] 297-297: trailing spaces

(trailing-spaces)


[error] 302-302: trailing spaces

(trailing-spaces)

🔇 Additional comments (2)
.github/workflows/pull-request.yml (2)

267-273: LGTM! Docker configuration is properly set up.

The Docker build and run configuration is correct with:

  • Proper image tagging
  • Correct port mapping
  • Consistent container naming
🧰 Tools
🪛 yamllint

[error] 270-270: trailing spaces

(trailing-spaces)


[warning] 271-271: wrong indentation: expected 10 but found 12

(indentation)


297-302: LGTM! Cleanup steps are properly configured.

The cleanup configuration ensures proper resource cleanup by:

  • Running regardless of previous step outcomes (if: always())
  • Properly stopping and removing the container
🧰 Tools
🪛 yamllint

[error] 297-297: trailing spaces

(trailing-spaces)


[error] 302-302: trailing spaces

(trailing-spaces)

.github/workflows/pull-request.yml Outdated Show resolved Hide resolved
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Outside diff range and nitpick comments (1)
.github/workflows/pull-request.yml (1)

256-288: Consider enhancing error handling and logging.

While the implementation meets the basic requirements, consider these improvements for better debugging and reliability:

  1. Add error logging for Docker build failures
  2. Log container status before health checks
  3. Preserve logs on failure for debugging

Example enhancement:

      - name: Build Docker image
        run: |
+         # Log Docker version and system info
+         docker version
+         docker info
          docker build -t talawa-admin-app . || {
+           echo "Docker build failed. Check the logs above for details."
+           exit 1
+         }

      - name: Run Docker Container
        run: |
          docker run -d --name talawa-admin-app-container -p 8080:8080 talawa-admin-app
+         # Log container status
+         docker ps
+         docker logs talawa-admin-app-container
🧰 Tools
🪛 actionlint

260-260: could not parse as YAML: yaml: line 260: did not find expected '-' indicator

(syntax-check)

🪛 yamllint

[warning] 257-257: wrong indentation: expected 4 but found 10

(indentation)


[warning] 261-261: wrong indentation: expected 12 but found 13

(indentation)


[error] 262-262: syntax error: expected , but found '?'

(syntax)


[error] 263-263: trailing spaces

(trailing-spaces)


[warning] 265-265: wrong indentation: expected 15 but found 13

(indentation)


[error] 266-266: trailing spaces

(trailing-spaces)


[error] 270-270: trailing spaces

(trailing-spaces)


[warning] 271-271: wrong indentation: expected 10 but found 12

(indentation)


[error] 281-281: trailing spaces

(trailing-spaces)


[error] 282-282: trailing spaces

(trailing-spaces)


[error] 287-287: trailing spaces

(trailing-spaces)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 7d04c94 and f8389f6.

📒 Files selected for processing (1)
  • .github/workflows/pull-request.yml (1 hunks)
🧰 Additional context used
🪛 actionlint
.github/workflows/pull-request.yml

260-260: could not parse as YAML: yaml: line 260: did not find expected '-' indicator

(syntax-check)

🪛 yamllint
.github/workflows/pull-request.yml

[warning] 257-257: wrong indentation: expected 4 but found 10

(indentation)


[warning] 261-261: wrong indentation: expected 12 but found 13

(indentation)


[error] 262-262: syntax error: expected , but found '?'

(syntax)


[error] 263-263: trailing spaces

(trailing-spaces)


[warning] 265-265: wrong indentation: expected 15 but found 13

(indentation)


[error] 266-266: trailing spaces

(trailing-spaces)


[error] 270-270: trailing spaces

(trailing-spaces)


[warning] 271-271: wrong indentation: expected 10 but found 12

(indentation)


[error] 281-281: trailing spaces

(trailing-spaces)


[error] 282-282: trailing spaces

(trailing-spaces)


[error] 287-287: trailing spaces

(trailing-spaces)

.github/workflows/pull-request.yml Outdated Show resolved Hide resolved
.github/workflows/pull-request.yml Outdated Show resolved Hide resolved
.github/workflows/pull-request.yml Outdated Show resolved Hide resolved
.github/workflows/pull-request.yml Outdated Show resolved Hide resolved
coderabbitai[bot]
coderabbitai bot previously approved these changes Nov 8, 2024
Copy link
Member

@varshith257 varshith257 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems workflow added isn't triggered?

Copy link
Member

@pranshugupta54 pranshugupta54 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there's an error in the YAML file—possibly due to formatting or indentation.

Check: https://github.com/PalisadoesFoundation/talawa-admin/actions/runs/11741762559/workflow#L260

@VanshikaSabharwal
Copy link
Author

Looks like there's an error in the YAML file—possibly due to formatting or indentation.

Check: https://github.com/PalisadoesFoundation/talawa-admin/actions/runs/11741762559/workflow#L260

Yes you are right, there is indentation error due to which the workflow is not triggered. I am working on it.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (4)
.github/workflows/pull-request.yml (4)

267-273: Add error handling for Docker build and run steps.

The Docker build and run steps should include error handling to provide clear feedback if they fail.

      - name: Build Docker image
        run: |
+         if ! docker build -t talawa-admin-app .; then
+           echo "Failed to build Docker image"
+           exit 1
+         fi
-         docker build -t talawa-admin-app .

      - name: Run Docker Container
        run: |
+         if ! docker run -d --name talawa-admin-app-container -p 8080:8080 talawa-admin-app; then
+           echo "Failed to start Docker container"
+           exit 1
+         fi
-         docker run -d --name talawa-admin-app-container -p 8080:8080 talawa-admin-app
🧰 Tools
🪛 yamllint

[error] 270-270: trailing spaces

(trailing-spaces)


275-286: Enhance health check with HTTP status code verification.

The current health check only verifies if the index page is accessible. It should also verify the HTTP status code to ensure the application is responding correctly.

      - name: Check if Talawa Admin App is running
        run: |
          timeout=60
          while ! nc -z localhost 8080 && [ $timeout -gt 0 ]; do
            sleep 1
            timeout=$((timeout-1))
          done
          if [ $timeout -eq 0 ]; then
            echo "Timeout waiting for application to start"
            exit 1
          fi
-         curl --fail --silent http://localhost:8080/index.html || exit 1
+         response=$(curl -s -w "%{http_code}" http://localhost:8080/index.html -o /dev/null)
+         if [ "$response" != "200" ]; then
+           echo "Application health check failed with status code: $response"
+           exit 1
+         fi

288-292: Add error handling to cleanup step.

The cleanup step should handle errors gracefully and provide feedback if the container cannot be stopped or removed.

      - name: Stop Docker Container 
        if: always()
        run: |
-         docker stop talawa-admin-app-container
-         docker rm talawa-admin-app-container
+         if ! docker stop talawa-admin-app-container; then
+           echo "Warning: Failed to stop Docker container"
+         fi
+         if ! docker rm talawa-admin-app-container; then
+           echo "Warning: Failed to remove Docker container"
+         fi
🧰 Tools
🪛 yamllint

[error] 288-288: trailing spaces

(trailing-spaces)


263-263: Fix trailing spaces in YAML file.

Remove trailing spaces to maintain consistent formatting and comply with YAML best practices.

-        uses: actions/checkout@v4    
+        uses: actions/checkout@v4
-        uses: docker/setup-buildx-action@v3        
+        uses: docker/setup-buildx-action@v3
-          docker build -t talawa-admin-app .    
+          docker build -t talawa-admin-app .
-          curl --fail --silent http://localhost:8080/index.html || exit 1    
+          curl --fail --silent http://localhost:8080/index.html || exit 1
-      - name: Stop Docker Container     
+      - name: Stop Docker Container
-          docker rm talawa-admin-app-container    
+          docker rm talawa-admin-app-container

Also applies to: 266-266, 270-270, 287-287, 288-288, 293-293

🧰 Tools
🪛 yamllint

[error] 263-263: trailing spaces

(trailing-spaces)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between f8389f6 and b93aed6.

📒 Files selected for processing (1)
  • .github/workflows/pull-request.yml (2 hunks)
🧰 Additional context used
🪛 yamllint
.github/workflows/pull-request.yml

[error] 263-263: trailing spaces

(trailing-spaces)


[error] 266-266: trailing spaces

(trailing-spaces)


[error] 270-270: trailing spaces

(trailing-spaces)


[error] 287-287: trailing spaces

(trailing-spaces)


[error] 288-288: trailing spaces

(trailing-spaces)


[error] 293-293: trailing spaces

(trailing-spaces)


[error] 304-304: no new line character at the end of file

(new-line-at-end-of-file)

.github/workflows/pull-request.yml Outdated Show resolved Hide resolved
Copy link

codecov bot commented Nov 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.26%. Comparing base (d16b95e) to head (97bb5e6).
Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2414   +/-   ##
========================================
  Coverage    98.26%   98.26%           
========================================
  Files          297      297           
  Lines         8638     8638           
  Branches      2486     2486           
========================================
  Hits          8488     8488           
  Misses         139      139           
  Partials        11       11           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@varshith257
Copy link
Member

@palisadoes I am still surprised as we don't have any Dockerfile in talawa-admin and how we can support this workflow though 😄

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (4)
.github/workflows/pull-request.yml (4)

261-266: Consider using Docker layer caching for faster builds.

While the current setup works, you could optimize the Docker build process by enabling layer caching.

      - name: Set up Docker
        uses: docker/setup-buildx-action@v3
+       with:
+         buildkitd-flags: --debug
+         driver-opts: |
+           image=moby/buildkit:latest
+         cache-from: type=gha
+         cache-to: type=gha,mode=max
🧰 Tools
🪛 yamllint

[error] 263-263: trailing spaces

(trailing-spaces)


[error] 266-266: trailing spaces

(trailing-spaces)


267-274: Add Docker build error handling and logging.

The Docker build and run steps could benefit from additional error handling and logging.

      - name: Build Docker image
        run: |
+         set -e
+         echo "Building Docker image..."
          docker build -t talawa-admin-app .
+         echo "Docker image built successfully"

      - name: Run Docker Container
        run: |
+         set -e
+         echo "Starting Docker container..."
          docker run -d --name talawa-admin-app-container -p 8080:8080 talawa-admin-app
+         echo "Docker container started successfully"
🧰 Tools
🪛 yamllint

[error] 270-270: trailing spaces

(trailing-spaces)


Line range hint 256-304: Fix trailing whitespace issues.

There are several trailing whitespace issues in the YAML file that should be cleaned up.

-      - name: Set up Docker
-        uses: docker/setup-buildx-action@v3
-        
+      - name: Set up Docker
+        uses: docker/setup-buildx-action@v3

-      - name: Stop Docker Container 
+      - name: Stop Docker Container
🧰 Tools
🪛 yamllint

[error] 263-263: trailing spaces

(trailing-spaces)


[error] 266-266: trailing spaces

(trailing-spaces)


[error] 270-270: trailing spaces

(trailing-spaces)


[error] 287-287: trailing spaces

(trailing-spaces)


[error] 288-288: trailing spaces

(trailing-spaces)


[error] 293-293: trailing spaces

(trailing-spaces)


304-304: Add newline at end of file.

Add a newline character at the end of the file to comply with POSIX standards.

          exit 1
+
🧰 Tools
🪛 yamllint

[error] 304-304: no new line character at the end of file

(new-line-at-end-of-file)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between b93aed6 and a0ee511.

📒 Files selected for processing (1)
  • .github/workflows/pull-request.yml (2 hunks)
🧰 Additional context used
🪛 yamllint
.github/workflows/pull-request.yml

[error] 263-263: trailing spaces

(trailing-spaces)


[error] 266-266: trailing spaces

(trailing-spaces)


[error] 270-270: trailing spaces

(trailing-spaces)


[error] 287-287: trailing spaces

(trailing-spaces)


[error] 288-288: trailing spaces

(trailing-spaces)


[error] 293-293: trailing spaces

(trailing-spaces)


[error] 304-304: no new line character at the end of file

(new-line-at-end-of-file)

🔇 Additional comments (3)
.github/workflows/pull-request.yml (3)

256-260: LGTM! Job configuration is well structured.

The job configuration is correctly set up with appropriate dependencies on both Code-Quality-Checks and Test-Application jobs, ensuring proper sequencing of checks.


275-287: Health check implementation looks robust.

The health check implementation includes a good timeout mechanism and proper error handling. The 60-second timeout is reasonable for container startup.

🧰 Tools
🪛 yamllint

[error] 287-287: trailing spaces

(trailing-spaces)


288-292: LGTM! Cleanup step is properly configured.

The cleanup step is correctly set up with if: always() to ensure container cleanup regardless of previous step results.

🧰 Tools
🪛 yamllint

[error] 288-288: trailing spaces

(trailing-spaces)

coderabbitai[bot]
coderabbitai bot previously approved these changes Nov 8, 2024
@VanshikaSabharwal
Copy link
Author

VanshikaSabharwal commented Nov 8, 2024

@palisadoes I am still surprised as we don't have any Dockerfile in talawa-admin and how we can support this workflow though 😄

Hey @varshith257, Can i create a DockerFile ?

@varshith257
Copy link
Member

Check #1075

@VanshikaSabharwal
Copy link
Author

VanshikaSabharwal commented Nov 8, 2024

Check #1075

Yes, @varshith257 I checked this and i found out that there is an empty Dockerfile so at this point can i make a docker file with proper code?

@VanshikaSabharwal
Copy link
Author

VanshikaSabharwal commented Nov 17, 2024

This is video demonstrating that everything is working well

talawa-admin-v1.mp4

@VanshikaSabharwal
Copy link
Author

I have video of building docker image as well but video is too long

@palisadoes palisadoes merged commit 15513f5 into PalisadoesFoundation:develop Nov 17, 2024
12 of 13 checks passed
@palisadoes
Copy link
Contributor

@VanshikaSabharwal Please open another PR with the same changes against the develop-postgres branch

@VanshikaSabharwal
Copy link
Author

@VanshikaSabharwal Please open another PR with the same changes against the develop-postgres branch

okay

palisadoes added a commit that referenced this pull request Dec 7, 2024
* advertisement and plugin screen

* added revamped design

* fixes added

* fixed testcases

* chore(deps): bump sass from 1.80.6 to 1.80.7 (#2433)

Bumps [sass](https://github.com/sass/dart-sass) from 1.80.6 to 1.80.7.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](sass/dart-sass@1.80.6...1.80.7)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump eslint-plugin-import from 2.30.0 to 2.31.0 (#2434)

Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.30.0 to 2.31.0.
- [Release notes](https://github.com/import-js/eslint-plugin-import/releases)
- [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md)
- [Commits](import-js/eslint-plugin-import@v2.30.0...v2.31.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-import
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump @mui/x-charts from 7.22.1 to 7.22.2 (#2435)

Bumps [@mui/x-charts](https://github.com/mui/mui-x/tree/HEAD/packages/x-charts) from 7.22.1 to 7.22.2.
- [Release notes](https://github.com/mui/mui-x/releases)
- [Changelog](https://github.com/mui/mui-x/blob/v7.22.2/CHANGELOG.md)
- [Commits](https://github.com/mui/mui-x/commits/v7.22.2/packages/x-charts)

---
updated-dependencies:
- dependency-name: "@mui/x-charts"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump @types/react from 18.3.3 to 18.3.12 (#2436)

Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.3.3 to 18.3.12.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

---
updated-dependencies:
- dependency-name: "@types/react"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update pull-request.yml

* Update dependabot.yaml

* added docker check to workflow (#2414)

* added docker check to workflow

* made recommended changes to docker check in workflow

* added changes to docker check inn workflow as recommended

* added changes

* updated indentation in pull-request.yml file

* updated indentation in pull-request.yml file

* added Dockerfile and Docker-compose.yml file

* added Dockerfile and Docker-compose.yml file

* updated .docker-ignore file

* added recommended changes by code rabbit

* added recommended changes by code rabbit

* added recommended changes by code rabbit

* added recommended changes by code rabbit

* added recommended changes by code rabbit

* added recommended changes by code rabbit

* properly formatted code

* trying to make docker check pass

* trying to make docker check pass

* updated INSTALLATION.md

* updated INSTALLATION.md

* added recommended changes to INSTALLATION.md

* added recommended changes to INSTALLATION.md

* added recommended changes to INSTALLATION.md

* updated docker workflow

* updated INSTALLATION.md

* eslint-rule-no_unused_vars (#2428)

* Updated pr template with checklist (#2454)

* Updated pr template with checklist

* Additional changes for the PR template

* Changed the url for the PR template

* refactored addOnStore

* refactored addOnEntry v1

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Peter Harrison <[email protected]>
Co-authored-by: Vanshika Sabharwal <[email protected]>
Co-authored-by: prayansh_chhablani <[email protected]>
Co-authored-by: Dhiraj Udhani <[email protected]>
devender18 pushed a commit to devender18/talawa-admin that referenced this pull request Dec 7, 2024
* advertisement and plugin screen

* added revamped design

* fixes added

* fixed testcases

* chore(deps): bump sass from 1.80.6 to 1.80.7 (PalisadoesFoundation#2433)

Bumps [sass](https://github.com/sass/dart-sass) from 1.80.6 to 1.80.7.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](sass/dart-sass@1.80.6...1.80.7)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump eslint-plugin-import from 2.30.0 to 2.31.0 (PalisadoesFoundation#2434)

Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.30.0 to 2.31.0.
- [Release notes](https://github.com/import-js/eslint-plugin-import/releases)
- [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md)
- [Commits](import-js/eslint-plugin-import@v2.30.0...v2.31.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-import
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump @mui/x-charts from 7.22.1 to 7.22.2 (PalisadoesFoundation#2435)

Bumps [@mui/x-charts](https://github.com/mui/mui-x/tree/HEAD/packages/x-charts) from 7.22.1 to 7.22.2.
- [Release notes](https://github.com/mui/mui-x/releases)
- [Changelog](https://github.com/mui/mui-x/blob/v7.22.2/CHANGELOG.md)
- [Commits](https://github.com/mui/mui-x/commits/v7.22.2/packages/x-charts)

---
updated-dependencies:
- dependency-name: "@mui/x-charts"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump @types/react from 18.3.3 to 18.3.12 (PalisadoesFoundation#2436)

Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.3.3 to 18.3.12.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

---
updated-dependencies:
- dependency-name: "@types/react"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update pull-request.yml

* Update dependabot.yaml

* added docker check to workflow (PalisadoesFoundation#2414)

* added docker check to workflow

* made recommended changes to docker check in workflow

* added changes to docker check inn workflow as recommended

* added changes

* updated indentation in pull-request.yml file

* updated indentation in pull-request.yml file

* added Dockerfile and Docker-compose.yml file

* added Dockerfile and Docker-compose.yml file

* updated .docker-ignore file

* added recommended changes by code rabbit

* added recommended changes by code rabbit

* added recommended changes by code rabbit

* added recommended changes by code rabbit

* added recommended changes by code rabbit

* added recommended changes by code rabbit

* properly formatted code

* trying to make docker check pass

* trying to make docker check pass

* updated INSTALLATION.md

* updated INSTALLATION.md

* added recommended changes to INSTALLATION.md

* added recommended changes to INSTALLATION.md

* added recommended changes to INSTALLATION.md

* updated docker workflow

* updated INSTALLATION.md

* eslint-rule-no_unused_vars (PalisadoesFoundation#2428)

* Updated pr template with checklist (PalisadoesFoundation#2454)

* Updated pr template with checklist

* Additional changes for the PR template

* Changed the url for the PR template

* refactored addOnStore

* refactored addOnEntry v1

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Peter Harrison <[email protected]>
Co-authored-by: Vanshika Sabharwal <[email protected]>
Co-authored-by: prayansh_chhablani <[email protected]>
Co-authored-by: Dhiraj Udhani <[email protected]>
palisadoes added a commit that referenced this pull request Dec 13, 2024
* refactored OrganizationDashboard css/ closes #2513

* refactor:OrganizationDashboard_css(fixes #2513)

* Plugin and  advertisement screen revamp (#2006)

* advertisement and plugin screen

* added revamped design

* fixes added

* fixed testcases

* chore(deps): bump sass from 1.80.6 to 1.80.7 (#2433)

Bumps [sass](https://github.com/sass/dart-sass) from 1.80.6 to 1.80.7.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](sass/dart-sass@1.80.6...1.80.7)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump eslint-plugin-import from 2.30.0 to 2.31.0 (#2434)

Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.30.0 to 2.31.0.
- [Release notes](https://github.com/import-js/eslint-plugin-import/releases)
- [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md)
- [Commits](import-js/eslint-plugin-import@v2.30.0...v2.31.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-import
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump @mui/x-charts from 7.22.1 to 7.22.2 (#2435)

Bumps [@mui/x-charts](https://github.com/mui/mui-x/tree/HEAD/packages/x-charts) from 7.22.1 to 7.22.2.
- [Release notes](https://github.com/mui/mui-x/releases)
- [Changelog](https://github.com/mui/mui-x/blob/v7.22.2/CHANGELOG.md)
- [Commits](https://github.com/mui/mui-x/commits/v7.22.2/packages/x-charts)

---
updated-dependencies:
- dependency-name: "@mui/x-charts"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump @types/react from 18.3.3 to 18.3.12 (#2436)

Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.3.3 to 18.3.12.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

---
updated-dependencies:
- dependency-name: "@types/react"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update pull-request.yml

* Update dependabot.yaml

* added docker check to workflow (#2414)

* added docker check to workflow

* made recommended changes to docker check in workflow

* added changes to docker check inn workflow as recommended

* added changes

* updated indentation in pull-request.yml file

* updated indentation in pull-request.yml file

* added Dockerfile and Docker-compose.yml file

* added Dockerfile and Docker-compose.yml file

* updated .docker-ignore file

* added recommended changes by code rabbit

* added recommended changes by code rabbit

* added recommended changes by code rabbit

* added recommended changes by code rabbit

* added recommended changes by code rabbit

* added recommended changes by code rabbit

* properly formatted code

* trying to make docker check pass

* trying to make docker check pass

* updated INSTALLATION.md

* updated INSTALLATION.md

* added recommended changes to INSTALLATION.md

* added recommended changes to INSTALLATION.md

* added recommended changes to INSTALLATION.md

* updated docker workflow

* updated INSTALLATION.md

* eslint-rule-no_unused_vars (#2428)

* Updated pr template with checklist (#2454)

* Updated pr template with checklist

* Additional changes for the PR template

* Changed the url for the PR template

* refactored addOnStore

* refactored addOnEntry v1

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Peter Harrison <[email protected]>
Co-authored-by: Vanshika Sabharwal <[email protected]>
Co-authored-by: prayansh_chhablani <[email protected]>
Co-authored-by: Dhiraj Udhani <[email protected]>

* refactored: CSS files in src/screens/OrgSettings(fixes: #2523) (#2610)

* refactored: CSS files in src/screens/OrgSettings(fixes: #2523)

* refactored: CSS files in src/screens/OrgSettings(fixes: #2523)

* refactored: CSS files in src/screens/OrgSettings(fixes: #2523)

* refactored: CSS files in src/screens/OrgSettings(fixes: #2523)

* Update pull-request.yml

* refactored: CSS files in src/screens/OrganizationDashboard(fixes: #2513)

* refactored: CSS files in src/screens/OrganizationDashboard(fixes: #2513)

* improve import for global css

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Shekhar Patel <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Peter Harrison <[email protected]>
Co-authored-by: Vanshika Sabharwal <[email protected]>
Co-authored-by: prayansh_chhablani <[email protected]>
Co-authored-by: Dhiraj Udhani <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ignore-sensitive-files-pr The contributor has a legitimate reason for editiing protected files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants