Skip to content

(MOSIP-42018) Updated deploy-lamda.yml#324

Merged
ckm007 merged 2 commits into
developfrom
Ivanmeneges-patch-2
May 21, 2026
Merged

(MOSIP-42018) Updated deploy-lamda.yml#324
ckm007 merged 2 commits into
developfrom
Ivanmeneges-patch-2

Conversation

@Ivanmeneges
Copy link
Copy Markdown
Contributor

@Ivanmeneges Ivanmeneges commented May 18, 2026

Summary by CodeRabbit

  • Chores
    • Enhanced deployment workflow for the Slack notification service with refined trigger conditions, updated dependencies, and added verification checks to improve deployment reliability.

Review Change Stack

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

coderabbitai Bot commented May 18, 2026

Warning

Rate limit exceeded

@Ivanmeneges has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 53 minutes and 21 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 630fc829-4ca7-4ee3-a8a5-33fa1eea4c38

📥 Commits

Reviewing files that changed from the base of the PR and between 2b5d330 and 639c9d1.

📒 Files selected for processing (1)
  • .github/workflows/deploy-lamda.yml

Walkthrough

This PR updates the Slack notifier Lambda deployment workflow to add branch-filtered push triggers with concurrency control, upgrade GitHub Actions to v4, set a default job working directory, and enhance the deployment process with explicit wait and function verification steps.

Changes

Lambda Deployment Workflow

Layer / File(s) Summary
Trigger conditions and concurrency control
.github/workflows/deploy-lamda.yml
Workflow now dispatches on workflow_dispatch and push to selected branches (master, develop, 1.*, MOSIP*, release*) with path filters for develop/notifier-slackbot/** and the workflow file itself, removing the previous release trigger. Concurrency group deploy-slack-notifier-lambda is configured to cancel in-progress runs.
Build environment and GitHub Actions upgrade
.github/workflows/deploy-lamda.yml
Job sets default working-directory to develop/notifier-slackbot. Checkout and Node setup actions are upgraded to @v4 with npm caching configured for the package-lock.json in the working directory.
Packaging and Lambda deployment with verification
.github/workflows/deploy-lamda.yml
Dependencies installed via npm ci. ZIP created from working directory with index.js, package.json, package-lock.json, and node_modules. Lambda update now includes explicit wait (aws lambda wait function-updated) and verification step (aws lambda get-function) instead of previous single update command with extra CLI options.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A workflow hops with concurrency grace,
Branches and paths now define the race,
Lambda awaits and verifies its state,
GitHub Actions updated—no delays to wait! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title references a Jira ticket (MOSIP-42018) but provides minimal detail about the actual changes, which include workflow trigger modifications, job configuration updates, and deployment process changes. Consider revising the title to describe the specific changes, such as 'Add concurrency control and improve Lambda deployment workflow' or 'Update deploy-lambda workflow with manual triggers and deployment verification'.
✅ Passed checks (4 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.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch Ivanmeneges-patch-2

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

🧹 Nitpick comments (2)
.github/workflows/deploy-lamda.yml (2)

21-21: ⚡ Quick win

Workflow filename contains typo: "lamda" instead of "lambda".

The path filter references deploy-lamda.yml which matches the actual filename, but the filename itself is misspelled. Consider renaming the file to deploy-lambda.yml and updating this path reference for consistency.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/deploy-lamda.yml at line 21, The workflow filename is
misspelled as deploy-lamda.yml; rename the file to deploy-lambda.yml and update
any references to the old name (the string '.github/workflows/deploy-lamda.yml'
found in the workflow config) so they point to
'.github/workflows/deploy-lambda.yml', ensuring consistency between the filename
and path filters and any CI triggers that reference deploy-lamda.yml.

71-74: 💤 Low value

Consider adding an explicit timeout for the wait command.

The aws lambda wait function-updated command uses a default timeout, but specifying it explicitly would make the expected wait time clearer and more maintainable.

Details ⏱️ Proposed enhancement with explicit timeout
       - name: Wait for Lambda deployment
         run: |
+          # Wait up to 5 minutes for the function to be updated
           aws lambda wait function-updated \
-            --function-name probot-app
+            --function-name probot-app \
+            --cli-read-timeout 300
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/deploy-lamda.yml around lines 71 - 74, The "Wait for
Lambda deployment" step currently calls `aws lambda wait function-updated` for
`--function-name probot-app` without an explicit timeout; update that step to
enforce a maximum wait by wrapping the wait invocation in a shell-level timeout
(e.g., limit to X seconds) so the job fails quickly if the waiter stalls, and
document the chosen duration in the step name/summary.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/deploy-lamda.yml:
- Around line 76-81: The "Verify Lambda update" step only prints function info
(aws lambda get-function for probot-app) but doesn't fail the job when
deployment failed; update this step to explicitly query and validate the
Lambda's State and LastUpdateStatus (e.g., require State == "Active" and
LastUpdateStatus == "Successful") after calling aws lambda get-function for
function-name probot-app, and exit non‑zero (fail the workflow) if those fields
indicate "Failed" or not "Active"/"Successful". Locate the Verify Lambda update
step and replace or augment the current aws lambda get-function invocation with
a check of the Configuration.State and Configuration.LastUpdateStatus values and
make the step fail when they are not the expected values.

---

Nitpick comments:
In @.github/workflows/deploy-lamda.yml:
- Line 21: The workflow filename is misspelled as deploy-lamda.yml; rename the
file to deploy-lambda.yml and update any references to the old name (the string
'.github/workflows/deploy-lamda.yml' found in the workflow config) so they point
to '.github/workflows/deploy-lambda.yml', ensuring consistency between the
filename and path filters and any CI triggers that reference deploy-lamda.yml.
- Around line 71-74: The "Wait for Lambda deployment" step currently calls `aws
lambda wait function-updated` for `--function-name probot-app` without an
explicit timeout; update that step to enforce a maximum wait by wrapping the
wait invocation in a shell-level timeout (e.g., limit to X seconds) so the job
fails quickly if the waiter stalls, and document the chosen duration in the step
name/summary.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: eeb8024f-83dc-42b5-a61b-2927f4d66936

📥 Commits

Reviewing files that changed from the base of the PR and between 75441bb and 2b5d330.

📒 Files selected for processing (1)
  • .github/workflows/deploy-lamda.yml

Comment thread .github/workflows/deploy-lamda.yml
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: Ivanmeneges <ivan.anil016@gmail.com>
@ckm007 ckm007 merged commit 1f3909a into develop May 21, 2026
5 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.

2 participants