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

Switch deployment branch to main #76

Merged
merged 1 commit into from
Dec 5, 2024
Merged

Conversation

asimfarooq5
Copy link
Collaborator

No description provided.

@asimfarooq5 asimfarooq5 requested a review from Mahad-10 December 5, 2024 14:39
Copy link

coderabbitai bot commented Dec 5, 2024

📝 Walkthrough

Walkthrough

The pull request modifies two workflow configuration files in the GitHub repository. Specifically, the branch references for triggering workflows have been updated from v2 to main in both .github/workflows/main.yaml and .github/workflows/upload.yaml. This change ensures that workflows will now be activated on changes to the main branch instead of the v2 branch, while maintaining the existing job steps and configurations.

Changes

File Path Change Summary
.github/workflows/main.yaml Updated branch references for push and pull_request from v2 to main.
.github/workflows/upload.yaml Updated trigger branch from v2 to main for push.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant GitHub
    participant Workflow

    User->>GitHub: Push to main
    GitHub->>Workflow: Trigger workflow
    Workflow->>User: Execute build/test process
Loading

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

@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

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 98e9f19 and d92a69e.

📒 Files selected for processing (2)
  • .github/workflows/main.yaml (1 hunks)
  • .github/workflows/upload.yaml (1 hunks)
🔇 Additional comments (1)
.github/workflows/main.yaml (1)

6-6: Branch reference changes look good

The update from 'v2' to 'main' is consistent across both push and pull_request triggers.

Let's verify if there are any remaining references to the 'v2' branch in other workflow files:

Also applies to: 9-9

✅ Verification successful

Branch reference changes are verified and safe

The search results confirm that there are no remaining references to the 'v2' branch in any workflow files. The only 'v2' occurrences found are in action versions (subosito/flutter-action@v2), which are unrelated to branch references. The change from 'v2' to 'main' branch is complete and consistent.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any remaining 'v2' branch references in workflow files
rg -g "*.{yml,yaml}" "branches:(\s|\n)+- v2" .github/

Length of output: 247


Script:

#!/bin/bash
# Search for any remaining 'v2' branch references in workflow files, using multiline mode
rg -U -g "*.{yml,yaml}" "branches:(\s|\n)+- v2" .github/

Length of output: 58


Script:

#!/bin/bash
# Alternative approach: Search for 'v2' in workflow files
rg -g "*.{yml,yaml}" "v2" .github/

Length of output: 174


Script:

#!/bin/bash
# List all workflow files to ensure we're not missing any
fd -e yml -e yaml . .github/workflows/

Length of output: 98

@@ -3,7 +3,7 @@ name: Deploy web on S3
on:
push:
branches:
- v2
- main
Copy link

Choose a reason for hiding this comment

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

💡 Codebase verification

Branch transition requires immediate attention

Based on the workflow execution history and branch status:

  • The v2 branch has been removed but the last deployment from it was successful
  • There are multiple recent deployment failures from the main branch
  • No deployments are currently in progress

Action items:

  • Revert the branch change in upload.yaml back to 'v2' until deployment issues from main are resolved
  • Debug and fix the failing deployments on main branch
  • Only switch to main branch triggers after achieving successful deployments
🔗 Analysis chain

Verify deployment transition plan

While the branch change is correct, this is a critical deployment workflow.

Let's verify the deployment history and current state:

Consider the following deployment transition steps:

  1. Ensure the 'main' branch is up-to-date with 'v2'
  2. Coordinate the switch timing to avoid deployment conflicts
  3. Monitor the first few deployments from 'main' closely
  4. Keep 'v2' branch temporarily until successful transition is confirmed
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check recent workflow runs to understand deployment patterns
gh run list --workflow=upload.yaml --limit 5 --json status,headBranch,conclusion

# Check if there are any pending or in-progress deployments
gh run list --workflow=upload.yaml --status in_progress --json status,headBranch

Length of output: 498


Script:

#!/bin/bash
# Check if v2 branch still exists and its last commit
git show-ref --verify --quiet refs/heads/v2 && git log -1 --format="%h %s" v2 || echo "v2 branch not found"

# Check the last successful deployment commit from v2
gh run list --workflow=upload.yaml --branch v2 --status completed --conclusion success --limit 1 --json headSha | jq -r '.[0].headSha'

# Compare main and v2 branches if v2 exists
git show-ref --verify --quiet refs/heads/v2 && git rev-list --left-right --count v2...main || echo "Cannot compare: v2 branch not found"

Length of output: 1242

@asimfarooq5 asimfarooq5 merged commit 1e2ea2c into main Dec 5, 2024
1 check passed
@asimfarooq5 asimfarooq5 deleted the switch-deployement-branch branch December 5, 2024 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants