Skip to content

Fix block device mapping issues pointed out by CodeRabbit. Also fix linting issues in yaml files.#204

Merged
RLIndia merged 3 commits into
mainfrom
ssm-managed-policy-ec2
Sep 10, 2025
Merged

Fix block device mapping issues pointed out by CodeRabbit. Also fix linting issues in yaml files.#204
RLIndia merged 3 commits into
mainfrom
ssm-managed-policy-ec2

Conversation

@RLIndia
Copy link
Copy Markdown
Contributor

@RLIndia RLIndia commented Jul 18, 2025

Fix block device mapping issues pointed out by CodeRabbit. Also fix linting issues in yaml files.


This change is Reviewable

Summary by CodeRabbit

  • Style
    • Enhanced formatting consistency across multiple CloudFormation templates by removing trailing spaces, normalizing indentation, and eliminating extra blank lines.
    • Corrected minor script references and adjusted echo message formatting for clarity.
    • Simplified EC2 instance configurations by removing redundant block device mappings.
    • Maintained all existing logic, resource properties, and functional behavior unchanged.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jul 18, 2025

Walkthrough

This update applies whitespace and formatting cleanups across multiple CloudFormation YAML templates, including the removal of trailing spaces, redundant blank lines, and alignment corrections. In addition, a redundant block device mapping is removed from the EC2 VSCode template, consolidating configuration. No functional, logical, or parameter changes are introduced.

Changes

File(s) Change Summary
cft-templates/Rstudio.yml,
cft-templates/ec2-dcv.yml,
cft-templates/ec2-jupyterLab.yml,
cft-templates/ec2-linux-docker-mysql.yml,
cft-templates/ec2-linux-docker.yml,
cft-templates/ec2-winsecure-desktop.yml,
cft-templates/igv.yml
Whitespace and formatting cleanups: removed trailing spaces, extra blank lines, fixed indentation, minor echo and script name corrections. No logic changes.
cft-templates/ec2-EIP.yml Removed trailing whitespace in parameter defaults and resource tags. No logic changes.
cft-templates/ec2-vscode.yml Removed redundant block device mapping, consolidating to a single parameter-driven mapping.
rg_deploy_bucket.yml Removed trailing whitespace after Resource: key in S3 policy statements. No logic changes.

Poem

A whisk of the paw, a twitch of the nose,
Whitespace cleaned where the YAML flows.
Redundant lines have hopped away,
Leaving tidy clouds for a brighter day.
With templates neat and bunnies proud,
We celebrate this code—fluffy and cloud!
🐇✨


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 52d3397 and 8b1f108.

📒 Files selected for processing (4)
  • cft-templates/Rstudio.yml (9 hunks)
  • cft-templates/ec2-dcv.yml (14 hunks)
  • cft-templates/ec2-linux-docker-mysql.yml (1 hunks)
  • cft-templates/igv.yml (15 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • cft-templates/ec2-linux-docker-mysql.yml
  • cft-templates/igv.yml
  • cft-templates/Rstudio.yml
  • cft-templates/ec2-dcv.yml

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
🪧 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @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
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: 2

🔭 Outside diff range comments (2)
cft-templates/ec2-linux-docker-mysql.yml (1)

66-88: Minor: incorrect intrinsic-function syntax in RoleName/PolicyName

!Join ['-', [Ref: Namespace, 'ec2-role']] should be !Join ['-', [!Ref Namespace, 'ec2-role']]
(the same applies to PolicyName, InstanceProfileName, etc.).
Without the !Ref the template will be rendered literally and CFN will
receive an invalid name.

-RoleName: !Join ['-', [Ref: Namespace, 'ec2-role']]
+RoleName: !Join ['-', [!Ref Namespace, 'ec2-role']]
cft-templates/ec2-dcv.yml (1)

130-140: Case mismatch: desktop entry points to jupyter.sh but the file created is Jupyter.sh
Linux is case-sensitive; the autostart desktop entry will fail to launch JupyterLab. Rename one side to match.

-Exec="/home/ec2-user/jupyter.sh"
+Exec="/home/ec2-user/Jupyter.sh"

or rename the script to lower-case – just keep them identical.

🧹 Nitpick comments (6)
cft-templates/igv.yml (1)

318-321: Reduce consecutive blank lines

YAML-lint flags four consecutive blank lines (too many blank lines (4 > 2)).
Delete the extras to comply:

-    
-
-
-
+
+
cft-templates/ec2-dcv.yml (1)

229-231: Undefined variable in echo statement
Same pattern as in RStudio: ${region} is not declared – should be ${instance_region}.

-echo "Retrieved region ${region} from metadata service"
+echo "Retrieved region ${instance_region} from metadata service"
cft-templates/ec2-jupyterLab.yml (2)

28-30: Trailing whitespace violates YAML-lint

-      - t3.large 
+      - t3.large

172-174: Incorrect variable in region log

-echo "Retrieved region ${region} from metadata service"
+echo "Retrieved region ${instance_region} from metadata service"
cft-templates/ec2-vscode.yml (2)

174-177: Same variable typo as other templates

-echo "Retrieved region ${region} from metadata service"
+echo "Retrieved region ${instance_region} from metadata service"

201-202: Strip trailing spaces to silence YAML-lint

-      AvailabilityZone: !Ref AvailabilityZone     
+      AvailabilityZone: !Ref AvailabilityZone
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 94044f0 and 52d3397.

📒 Files selected for processing (10)
  • cft-templates/Rstudio.yml (9 hunks)
  • cft-templates/ec2-EIP.yml (3 hunks)
  • cft-templates/ec2-dcv.yml (13 hunks)
  • cft-templates/ec2-jupyterLab.yml (7 hunks)
  • cft-templates/ec2-linux-docker-mysql.yml (5 hunks)
  • cft-templates/ec2-linux-docker.yml (5 hunks)
  • cft-templates/ec2-vscode.yml (1 hunks)
  • cft-templates/ec2-winsecure-desktop.yml (12 hunks)
  • cft-templates/igv.yml (16 hunks)
  • rg_deploy_bucket.yml (2 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
cft-templates/ec2-linux-docker-mysql.yml

[error] 1-1: wrong new line character: expected \n

(new-lines)

cft-templates/igv.yml

[warning] 320-320: too many blank lines (4 > 2)

(empty-lines)

cft-templates/ec2-vscode.yml

[error] 201-201: trailing spaces

(trailing-spaces)

cft-templates/ec2-jupyterLab.yml

[error] 29-29: trailing spaces

(trailing-spaces)

🔇 Additional comments (5)
rg_deploy_bucket.yml (1)

114-116: Whitespace cleanup looks good

Trailing-space removal keeps the template YAML-lint-clean without touching policy semantics.
No further action required.

Also applies to: 124-126

cft-templates/ec2-linux-docker.yml (1)

26-27: LGTM – default volume size clarified

Keeping the default EBS volume size on its own line (no trailing space) is clean and
doesn’t affect semantics.

cft-templates/ec2-EIP.yml (1)

32-32: Whitespace tidy-up acknowledged

Trailing-space removal and type-line alignment improve readability; no logic change.

Also applies to: 50-50, 120-120

cft-templates/Rstudio.yml (1)

20-24: Default root volume shrunk to 8 GB – double-check capacity needs
The default EBSVolumeSize has been reduced from the usual 30–32 GB down to 8 GB. RStudio-based AMIs quickly fill the root disk once users start installing R / Python packages or storing notebooks. Before this lands, confirm that 8 GB is really acceptable for your target workloads and patch/upgrade patterns.

cft-templates/ec2-winsecure-desktop.yml (1)

60-124: Nothing but whitespace – looks good
Only spacing / indentation changed; no functional impact detected.

Comment thread cft-templates/ec2-linux-docker-mysql.yml Outdated
Comment thread cft-templates/Rstudio.yml
@RLIndia RLIndia merged commit 8f2e31f into main Sep 10, 2025
4 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