Skip to content

[MOSIP-44751]fix :helmsman workflows always deploy java11 profile regardless of selected profile#189

Merged
bhumi46 merged 3 commits intomosip:developfrom
bhumi46:develop
Mar 27, 2026
Merged

[MOSIP-44751]fix :helmsman workflows always deploy java11 profile regardless of selected profile#189
bhumi46 merged 3 commits intomosip:developfrom
bhumi46:develop

Conversation

@bhumi46
Copy link
Copy Markdown
Member

@bhumi46 bhumi46 commented Mar 27, 2026

Summary by CodeRabbit

Release Notes

  • Chores
    • Improved CI/CD workflow reliability with enhanced profile detection logic and fallback mechanisms across multiple deployment pipelines to handle edge cases in build triggering
    • Strengthened error handling by providing explicit error messages instead of silent defaults when profile configuration cannot be detected
    • Better visibility into deployment issues with clearer error reporting for faster troubleshooting

bhumi46 and others added 3 commits March 26, 2026 15:47
Merge pull request mosip#173 from bhumi46/develop
…ss of selected profile

Signed-off-by: bhumi46 <thisisbn46@gmail.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 27, 2026

Walkthrough

Updated GitHub Actions workflow profiles with enhanced auto-detection logic: added fallback git diff operations when initial profile detection fails, replaced silent defaults with explicit error handling that aborts on missing profiles, extended job outputs in external workflow, and updated dependencies to use matrix-generated profile values.

Changes

Cohort / File(s) Summary
Profile Auto-Detection Fallback
.github/workflows/helmsman_esignet.yml, .github/workflows/helmsman_mosip.yml, .github/workflows/helmsman_testrigs.yml
Added fallback logic to attempt git diff HEAD~1..HEAD when primary diff using github.event.before fails; replaced default profile assignments with hard failures (exit 1) when PROFILE extraction yields empty results.
Workflow Matrix and Dependencies
.github/workflows/helmsman_external.yml
Extended set-matrix job outputs to expose profile; reworked profile determination to use github.event.inputs.profile for dispatch events or DSF directory detection for other triggers; added fallback git diff logic; updated workflow-caller dependencies and MOSIP trigger conditions to consume needs.set-matrix.outputs.profile.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰✨ Through tunnels of git and branches so deep,
When diffs take a nap or in shallows do sleep,
We hop back to HEAD, one step, then we leap,
With fallbacks so clever, no errors to keep!
No silent defaults—just honest, clear say,
The profile detection gets better today! 🌟

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The PR title directly addresses the main issue: removing the default fallback to java11 profile in Helmsman workflows and implementing proper profile detection with error handling when no profile can be detected.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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
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.

🧹 Nitpick comments (1)
.github/workflows/helmsman_external.yml (1)

68-74: Consider edge case: multiple profiles changed simultaneously.

If changes span multiple profile directories (e.g., both mosip-platform-java11/ and mosip-platform-java21/), the matrix correctly includes DSF files from all profiles, but PROFILE output (line 70) only captures the first one. This first profile is then passed to the downstream MOSIP workflow (line 281).

For typical use cases this should be fine since changes usually target a single profile, but worth noting.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/helmsman_external.yml around lines 68 - 74, The current
logic sets PROFILE=$(echo "$changed_profiles" | head -1) which only picks the
first profile when multiple profiles are changed; update the logic that derives
PROFILE from changed_profiles to handle multiple profiles (either by exporting a
comma/newline-separated list or by erroring out if multi-profile changes are
unsupported) and ensure the downstream MOSIP workflow invocation consumes that
full list (not just the first element). Specifically, replace the head -1 usage
on changed_profiles and set PROFILE to the entire set (e.g., CSV or array) or
add a guard that fails with a clear message when multiple profiles are detected,
and update the downstream dispatch/inputs to accept the list instead of a single
PROFILE.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.github/workflows/helmsman_external.yml:
- Around line 68-74: The current logic sets PROFILE=$(echo "$changed_profiles" |
head -1) which only picks the first profile when multiple profiles are changed;
update the logic that derives PROFILE from changed_profiles to handle multiple
profiles (either by exporting a comma/newline-separated list or by erroring out
if multi-profile changes are unsupported) and ensure the downstream MOSIP
workflow invocation consumes that full list (not just the first element).
Specifically, replace the head -1 usage on changed_profiles and set PROFILE to
the entire set (e.g., CSV or array) or add a guard that fails with a clear
message when multiple profiles are detected, and update the downstream
dispatch/inputs to accept the list instead of a single PROFILE.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 6aa30467-87e1-495c-86d9-8a05c0ab1de3

📥 Commits

Reviewing files that changed from the base of the PR and between 573ec15 and 621ee2f.

📒 Files selected for processing (4)
  • .github/workflows/helmsman_esignet.yml
  • .github/workflows/helmsman_external.yml
  • .github/workflows/helmsman_mosip.yml
  • .github/workflows/helmsman_testrigs.yml

@bhumi46 bhumi46 changed the title [MOSIP-44751]helmsman workflows always deploy java11 profile regardless of selected profile [MOSIP-44751]fix :helmsman workflows always deploy java11 profile regardless of selected profile Mar 27, 2026
@bhumi46 bhumi46 merged commit 1acf543 into mosip:develop Mar 27, 2026
2 checks passed
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