Skip to content

[MOSIP- 42820] Update Gradle commands in push_trigger.yml#655

Closed
Ivanmeneges wants to merge 1 commit into
mosip:developfrom
Ivanmeneges:patch-2
Closed

[MOSIP- 42820] Update Gradle commands in push_trigger.yml#655
Ivanmeneges wants to merge 1 commit into
mosip:developfrom
Ivanmeneges:patch-2

Conversation

@Ivanmeneges
Copy link
Copy Markdown
Contributor

@Ivanmeneges Ivanmeneges commented Dec 15, 2025

Summary by CodeRabbit

  • Chores
    • Optimized CI/CD build pipeline configuration with updates to build process steps and verification commands for improved efficiency.

✏️ Tip: You can customize this high-level summary in your review settings.

Signed-off-by: Ivanmeneges <ivan.anil016@gmail.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Dec 15, 2025

Walkthrough

This pull request modifies the GitHub Actions push trigger workflow for Android builds. Changes include updating Gradle build commands for CodeQL checks and pre-build verification, adding the -r flag to xargs in the serverBaseURL replacement step, and removing an APK path listing command.

Changes

Cohort / File(s) Summary
CI/CD Workflow Configuration
\.github/workflows/push_trigger\.yml
Modified CodeQL Selenium Android build step to use ./gradlew assembleDebug instead of ./gradlew compileDebugSources || true; changed pre-build Gradle check to ./gradlew tasks --all > /dev/null instead of ./gradlew clean assembleDebug --dry-run; added -r flag to xargs in serverBaseURL sed replacement step (xargs -0 -r sed -i); removed ls app/build/outputs/apk/debug output command from APK build step.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify that ./gradlew assembleDebug is appropriate for CodeQL validation versus the previous compile-only approach
  • Confirm that ./gradlew tasks --all > /dev/null correctly replaces the dry-run functionality for pre-build checks
  • Validate that the -r flag for xargs doesn't introduce edge cases with empty input streams in the serverBaseURL step

Possibly related PRs

Suggested reviewers

  • ase-101

Poem

🐰 Hops through workflows with glee,
Gradle commands dance wild and free,
xargs flags -r now stand tall,
Builds run smoother, one and all!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: updating Gradle commands in the push_trigger.yml workflow file, which matches the file modified and the nature of the changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@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 UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1d364e7 and 007fcb6.

📒 Files selected for processing (1)
  • .github/workflows/push_trigger.yml (3 hunks)
🔇 Additional comments (2)
.github/workflows/push_trigger.yml (2)

47-47: Clarify intent of build command change and error handling.

The change from ./gradlew compileDebugSources || true to ./gradlew assembleDebug removes the error suppression mechanism. Previously, compilation failures would be tolerated (allowing CodeQL to run on partial code); now, any build failure will cause the CodeQL job to fail entirely.

Additionally, assembleDebug performs a full build (including resource processing and dexing), while compileDebugSources only compiles Java sources. This is a more comprehensive check for CodeQL, but it also increases build time and failure surface.

Please confirm:

  • Is the stricter failure behavior intentional?
  • Does the project consistently build successfully, or were there cases where || true was necessary for CI stability?
  • Should assembleDebug be retained, or should compileDebugSources be used with adjusted error handling?

80-80: Good safety improvement with xargs flag.

The addition of the -r flag to xargs is a safe enhancement. It prevents sed from executing if no build.gradle files are found, avoiding edge-case behavior where sed receives no input.

cd client
chmod +x gradlew
./gradlew clean assembleDebug --dry-run
./gradlew tasks --all > /dev/null
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Replace task listing with actual validation.

The step name is "Validate Gradle Build" but the new command ./gradlew tasks --all > /dev/null only enumerates available tasks without performing any validation. The previous command ./gradlew clean assembleDebug --dry-run used --dry-run to validate the task execution graph without a full build.

Simply listing tasks does not catch build configuration errors, missing dependencies, or task graph issues. This undermines the purpose of the pre-build validation step and could allow broken builds to proceed to the APK build stage.

Apply this diff to restore validation semantics:

- ./gradlew tasks --all > /dev/null
+ ./gradlew tasks --all
+ ./gradlew clean assembleDebug --dry-run

Or, if the intent is a lightweight check, clarify the step purpose and rename it accordingly (e.g., "Verify Gradle Installation" or "List Build Tasks").

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
./gradlew tasks --all > /dev/null
./gradlew tasks --all
./gradlew clean assembleDebug --dry-run

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