Skip to content

Test batch release#460

Open
HarishV14 wants to merge 8 commits intomasterfrom
test-batch-release
Open

Test batch release#460
HarishV14 wants to merge 8 commits intomasterfrom
test-batch-release

Conversation

@HarishV14
Copy link
Contributor

Changes done

Reason for the changes

Fixes # . Remove this line if there aren't any corresponding issues created

Stats

  • Number of Test Cases -

Guidelines

  • Have you self reviewed this PR in context to the previous PR feedbacks?

@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the Fastlane automation capabilities by introducing a robust batch release mechanism for multiple application configurations. It streamlines the deployment process for various subdomains, ensuring that even if one release fails, the others can proceed. Additionally, it improves the diagnostic capabilities of several core Fastlane actions by providing more detailed error messages for network-related issues.

Highlights

  • Batch Release Automation: Introduced a new Fastlane lane, release_update_batch, to automate the release process for a comma-separated list of subdomains. This lane iterates through each subdomain, performing configuration, version updates, file generation, artifact collection, and deployment, while continuing on errors for individual subdomains.
  • Improved Error Handling in Fastlane Actions: Enhanced error reporting in fetch_subdomains, get_app_config, and update_app_version Fastlane actions. These actions now explicitly check for successful HTTP responses and raise user-friendly errors with HTTP status codes and body content if a request fails.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • fastlane/Fastfile
    • Added a new release_update_batch lane for processing multiple subdomain releases sequentially.
    • Implemented logic to parse a comma-separated list of subdomains and handle special branch requirements.
    • Included steps for fetching app configuration, updating app versions, generating customized files, collecting build artifacts, and deploying the app for each subdomain.
    • Added comprehensive error handling within the batch process, allowing it to continue even if individual subdomain releases fail.
    • Generated a JSON summary file (release_update_batch_summary.json) detailing the outcome of the batch release (succeeded, failed, skipped).
  • fastlane/actions/fetch_subdomains.rb
    • Added an explicit check for successful HTTP responses and raised a UI.user_error! with details if the request fails.
  • fastlane/actions/get_app_config.rb
    • Added an explicit check for successful HTTP responses and raised a UI.user_error! with details if the request fails.
  • fastlane/actions/update_app_version.rb
    • Added an explicit check for successful HTTP responses and raised a UI.user_error! with details if the request fails.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/release_update.yml
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new release_update_batch lane to the Fastfile, enabling releases for multiple subdomains in a single run. The implementation is robust, handling individual failures gracefully and generating a summary report. Additionally, error handling for API calls has been improved across several actions. I have a couple of suggestions to enhance the efficiency and clarity of the new batch release process.

Comment on lines +51 to +54
config = get_app_config(subdomain: subdomain)
unless config.is_a?(Hash) && config["package_name"].to_s.strip != ""
raise "Invalid app-config response (missing package_name)"
end

Choose a reason for hiding this comment

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

high

This get_app_config call and its validation are redundant. The app_config variable from update_app_version (line 57) is what's used in the rest of the script. This initial call results in an unnecessary API request for every subdomain in the batch, impacting performance. To improve efficiency, please remove this block and perform the validation on the app_config object after it's fetched on line 57.

expected_artifacts = [
{ "src" => File.join("app", "build", "outputs", "bundle", "release", "app-release.aab"), "dst" => "app-release.aab" },
{ "src" => File.join("app", "build", "outputs", "apk", "release", "app-release.apk"), "dst" => "app-release.apk" },
{ "src" => File.join("app", "build", "outputs", "apk", "debug", "app-debug.apk"), "dst" => "app-debug.apk" }

Choose a reason for hiding this comment

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

medium

Collecting app-debug.apk as part of the release artifacts is unusual and potentially risky. Release processes should only handle release-signed artifacts to prevent accidental distribution of debug builds, which may contain sensitive information or behave differently from production builds. This also adds unnecessary build time. It's recommended to remove this from the expected_artifacts list.

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.

1 participant