-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Added Github Action to verify that the devcontainer starts (Fixes #3414) #3454
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 Github Action to verify that the devcontainer starts (Fixes #3414) #3454
Conversation
## Walkthrough
A new job named `Check-App-Startup` has been added to the GitHub Actions workflow configuration. This job is set to run after the completion of the `Run-Tests` job. It automates the process of starting the application's devcontainer, verifies that the container is running, installs necessary dependencies, and checks the availability of the GraphQL endpoint. The job includes logic for waiting and retrying the endpoint check, as well as cleanup steps to stop the Docker Compose environment after execution.
## Changes
| File(s) | Change Summary |
|----------------------------|------------------------------------------------------------------------------------------------------------------|
| .github/workflows/pull-request.yml | Added a new job (`Check-App-Startup`) to the workflow to verify devcontainer startup and GraphQL endpoint health |
## Sequence Diagram(s)
```mermaid
sequenceDiagram
participant GitHub Actions
participant Devcontainer
participant Docker
participant GraphQL Endpoint
GitHub Actions->>GitHub Actions: Run Run-Tests job
GitHub Actions->>GitHub Actions: Start Check-App-Startup job
GitHub Actions->>GitHub Actions: Checkout repository
GitHub Actions->>GitHub Actions: Install Devcontainer CLI
GitHub Actions->>Devcontainer: Copy environment file and bring up devcontainer
GitHub Actions->>Docker: Verify container is running
GitHub Actions->>Devcontainer: Install dependencies
GitHub Actions->>Devcontainer: Start development server (async)
loop Up to 60 attempts
GitHub Actions->>GraphQL Endpoint: Send test query
alt Endpoint available
GitHub Actions->>GitHub Actions: Exit with success
else
GitHub Actions->>GitHub Actions: Wait 2 seconds
end
end
GitHub Actions->>Docker: Stop Docker Compose environment (cleanup) Assessment against linked issues
Suggested labels
Suggested reviewers
|
Our Pull Request Approval ProcessThanks for contributing! Testing Your CodeRemember, your PRs won't be reviewed until these criteria are met:
Our policies make our code better. ReviewersDo not assign reviewers. Our Queue Monitors will review your PR and assign them.
Reviewing Your CodeYour reviewer(s) will have the following roles:
CONTRIBUTING.mdRead our CONTRIBUTING.md file. Most importantly:
Other
|
There was a problem hiding this 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
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/pull-request.yml
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Run tests for talawa api
- GitHub Check: Analyse Code With CodeQL (typescript)
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop-postgres #3454 +/- ##
=================================================
Coverage 59.60% 59.60%
=================================================
Files 523 523
Lines 40782 40782
Branches 1786 1786
=================================================
Hits 24307 24307
Misses 16464 16464
Partials 11 11 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@palisadoes PR is ready for review. |
@coderabbitai full review |
✅ Actions performedFull review triggered. |
There was a problem hiding this 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
♻️ Duplicate comments (1)
.github/workflows/pull-request.yml (1)
372-373
: Parameterize or derive the container name.Hard‑coding
talawa-api-1
makes the workflow brittle if the Compose project or service name changes. As suggested previously, parameterize this name or derive it dynamically, for example:CONTAINER=$(docker ps --format '{{.Names}}' --filter 'ancestor=talawa_api' | head -n1) docker exec $CONTAINER pnpm installAlso applies to: 383-384
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/pull-request.yml
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Run tests for talawa api
🔇 Additional comments (1)
.github/workflows/pull-request.yml (1)
378-398
: Health‐check loop is robust.The retry logic with container existence checks, conditional
curl
installation, and polling up to 60 times provides a solid mechanism to wait for the GraphQL endpoint. Good job including descriptive logs and exit codes.
33d5b7b
into
PalisadoesFoundation:develop-postgres
What kind of change does this PR introduce?
Feature
Issue Number:
Fixes #3414
Summary
Added workflow to verify that the devcontainer starts
Does this PR introduce a breaking change?
Yes
Checklist
CodeRabbit AI Review
Test Coverage
Have you read the contributing guide?
Yes
Summary by CodeRabbit
New Features
Chores