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

Fix beta deployments #2637

Merged
merged 1 commit into from
Jan 28, 2025
Merged

Fix beta deployments #2637

merged 1 commit into from
Jan 28, 2025

Conversation

nguyentvan7
Copy link
Collaborator

@nguyentvan7 nguyentvan7 commented Jan 27, 2025

Describe your changes

Issue or discord link

Testing/validation

Checklist before requesting a review (leave this PR as draft if any part of this list is not done.)

  • I have commented my code in hard-to understand areas.
  • I have made corresponding changes to README or wiki.
  • For front-end changes, I have updated the corresponding English translations.
  • I have run yarn run mini-ci locally to validate format and lint.
  • If I have added a new library or app, I have updated the deployment scripts to ignore changes as needed

Summary by CodeRabbit

  • Workflow Configuration
    • Updated GitHub Actions workflow files for beta releases (Go, SRO, ZO)
    • Modified repository variable parameter naming in build frontend jobs
    • Changed from dynamic variable reference to static string representation

@nguyentvan7 nguyentvan7 requested a review from frzyc January 27, 2025 23:55
Copy link
Contributor

coderabbitai bot commented Jan 27, 2025

Walkthrough

The pull request modifies three GitHub Actions workflow files (beta-go-release.yml, beta-sro-release.yml, and beta-zo-release.yml) by changing the parameter name from repo_name to repo_var_name in the call-build-frontend job. This change involves updating how the repository variable is referenced, shifting from a direct variable reference to a string representation of the variable name.

Changes

File Change Summary
.github/workflows/beta-go-release.yml Changed repo_name: ${{ vars.PR_REPO }} to repo_var_name: 'PR_REPO'
.github/workflows/beta-sro-release.yml Changed repo_name: ${{ vars.PR_REPO }} to repo_var_name: 'PR_REPO'
.github/workflows/beta-zo-release.yml Changed repo_name: ${{ vars.PR_REPO }} to repo_var_name: 'PR_REPO'

Possibly related PRs

Suggested reviewers

  • frzyc

Poem

🐰 Workflows dancing, parameters slight,
Renaming with precision, workflows so bright
From repo_name to repo_var_name we go
A rabbit's refactor, making pipelines flow!
GitHub Actions magic, clean and neat 🚀


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 generate docstrings to generate docstrings for this PR. (Beta)
  • @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.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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
Contributor

github-actions bot commented Jan 27, 2025

[sr-frontend] [Mon Jan 27 23:58:07 UTC 2025] - Deployed ee1a1cb to https://genshin-optimizer-prs.github.io/pr/2637/sr-frontend (Takes 3-5 minutes after this completes to be available)

[zzz-frontend] [Mon Jan 27 23:58:26 UTC 2025] - Deployed ee1a1cb to https://genshin-optimizer-prs.github.io/pr/2637/zzz-frontend (Takes 3-5 minutes after this completes to be available)

[frontend] [Mon Jan 27 23:58:44 UTC 2025] - Deployed ee1a1cb to https://genshin-optimizer-prs.github.io/pr/2637/frontend (Takes 3-5 minutes after this completes to be available)

[Tue Jan 28 00:09:40 UTC 2025] - Deleted deployment

Copy link
Contributor

@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

🧹 Nitpick comments (1)
.github/workflows/beta-sro-release.yml (1)

19-19: Architecture Note: Systematic improvement in variable handling.

The consistent rename from repo_name to repo_var_name across all beta release workflows represents an architectural improvement in how repository variables are handled. Instead of passing the variable value directly, the workflows now pass the variable name, allowing the reusable workflow to handle variable resolution internally. This approach:

  1. Centralizes variable resolution logic in the reusable workflow
  2. Makes the variable handling more consistent across different deployments
  3. Potentially fixes issues with variable resolution timing in beta deployments
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bc408c9 and 1d1382c.

📒 Files selected for processing (3)
  • .github/workflows/beta-go-release.yml (1 hunks)
  • .github/workflows/beta-sro-release.yml (1 hunks)
  • .github/workflows/beta-zo-release.yml (1 hunks)
🔇 Additional comments (2)
.github/workflows/beta-go-release.yml (1)

19-19: Verify the parameter change in build-frontend.yml workflow.

The change from passing the variable value to passing the variable name suggests that the reusable workflow build-frontend.yml has been updated to handle variable resolution internally. Let's verify this change:

✅ Verification successful

Parameter change is correctly implemented and consistent

The change to use repo_var_name is properly implemented in build-frontend.yml and all dependent workflows are using the new parameter style consistently.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check the reusable workflow for corresponding changes

# Check how the repo_var_name parameter is defined and used in build-frontend.yml
echo "Checking build-frontend.yml for parameter definition and usage:"
rg -A 5 'repo_var_name|repo_name' .github/workflows/build-frontend.yml

# Look for any related changes in other workflow files
echo -e "\nChecking for any other workflows that might need similar updates:"
rg -l 'repo_name:\s*\${{.*}}' .github/workflows/

Length of output: 1163


Script:

#!/bin/bash
# Check for any other workflows that might need similar updates with fixed regex
echo "Checking other workflows using repo_name parameter:"
rg -l 'repo_name:.*\$\{\{' .github/workflows/

echo -e "\nChecking other workflows using repo_var_name parameter:"
rg -l 'repo_var_name:' .github/workflows/

Length of output: 663

.github/workflows/beta-zo-release.yml (1)

19-19: LGTM! Consistent with other workflow changes.

The parameter rename from repo_name to repo_var_name is consistent with the changes in other beta release workflows.

@@ -16,6 +16,6 @@ jobs:
with:
frontend_name: 'sr-frontend'
deployment_name: 'beta'
repo_name: ${{ vars.PR_REPO }}
repo_var_name: 'PR_REPO'
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

⚠️ Beta deployment failures unrelated to parameter rename - found syntax error in workflow

The parameter rename is correctly implemented, but all beta deployments are failing due to a syntax error in the shared build-frontend.yml workflow. The 'Build frontend' step has an incomplete command where environment variables are set but no actual command is specified:

      - name: Build frontend
        run: |
          NX_URL_GITHUB_GO_CURRENT_VERSION="https://github.com/${{ github.repository }}/commit/$(git rev-parse HEAD)" \
          NX_DAEMON="false" \
          NX_SHOW_DEV_COMPONENTS="${{inputs.show_dev_components}}" \
🔗 Analysis chain

LGTM! Completes the systematic update across all beta workflows.

The parameter rename from repo_name to repo_var_name has been consistently applied across all beta release workflows. This systematic update suggests a fix for how repository variables are handled during beta deployments.

To ensure this change actually fixes beta deployments, let's check the deployment history:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check recent deployment history and any related issues

# Check recent workflow runs for these files
gh run list --workflow beta-go-release.yml --limit 5
gh run list --workflow beta-zo-release.yml --limit 5
gh run list --workflow beta-sro-release.yml --limit 5

# Look for related issues about beta deployments
gh issue list --search "beta deploy" --state all --limit 5

Length of output: 2256


Script:

#!/bin/bash
# Get detailed logs for the most recent failed runs
gh run view 13000596375 --log  # GO
gh run view 13000596379 --log  # ZO
gh run view 13000596350 --log  # SRO

Length of output: 206


Script:

#!/bin/bash
# Check the workflow file content and any reusable workflows it references
cat .github/workflows/beta-sro-release.yml
fd -e yml -e yaml "reusable.*beta.*workflow" .github/workflows/

Length of output: 604


Script:

#!/bin/bash
# Check the reusable workflow content
cat .github/workflows/build-frontend.yml

Length of output: 3735

@nguyentvan7 nguyentvan7 merged commit 7654897 into master Jan 28, 2025
11 checks passed
@nguyentvan7 nguyentvan7 deleted the van/fixBeta branch January 28, 2025 00:08
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