Skip to content
This repository was archived by the owner on Mar 17, 2026. It is now read-only.

rename migrate-existing guide to add-suga#26

Merged
davemooreuws merged 2 commits intomainfrom
rename-migrate-guide
Aug 27, 2025
Merged

rename migrate-existing guide to add-suga#26
davemooreuws merged 2 commits intomainfrom
rename-migrate-guide

Conversation

@raksiv
Copy link
Copy Markdown
Member

@raksiv raksiv commented Aug 25, 2025

Basic rename of guide.

@raksiv raksiv self-assigned this Aug 25, 2025
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Aug 27, 2025

Walkthrough

Updated documentation navigation and guide content. In docs/docs.json, the Guides dropdown’s second group now lists pages as ["guides/add-suga", "guides/database-migration", "guides/migrate-existing"], inserting "guides/add-suga". In docs/guides/add-suga.mdx, front matter fields were revised (title → "Add Suga to Your Application", sidebarTitle → "Add Suga", description wording changed to "applications"); content adjustments include a bucket declaration change in suga.yaml, Dockerfile formatting tweaks, a modified AWS S3 example using the Suga client with added error handling, a directory name update, and other minor formatting edits.


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.
    • 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.
  • 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 the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

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

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

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

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • 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
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.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/guides/add-suga.mdx (1)

237-239: Branding bug: “nitric client” → “Suga client”.

Reader-facing correctness.

-                // Use the nitric client to access cloud resources
+                // Use the Suga client to access cloud resources
🧹 Nitpick comments (7)
docs/guides/add-suga.mdx (6)

51-51: Alt text still references “Migrate”.

Update for consistency with the new guide name.

-    ![Migrate](/images/migrate.png)
+    ![Add Suga](/images/migrate.png)

53-53: “database declaration” is inaccurate (this section defines a bucket).

Fix the wording.

-    This will automatically add a database declaration to your `suga.yaml`.
+    This will automatically add a bucket declaration to your `suga.yaml`.

91-106: Pin a stable Go base image or make it configurable.

Avoid potential breakage if 1.24 isn’t available; consider a stable tag or a build-arg.

-    FROM golang:1.24-alpine as builder
+    ARG GO_VERSION=1.23
+    FROM golang:${GO_VERSION}-alpine as builder

Please verify the currently supported Go versions in CI/docs.


233-242: Handle write errors in the Suga example.

Parity with the AWS sample and better DX.

-                // Use the Suga client to access cloud resources
-                app.Files.Write("example.txt", []byte("Hello, "+name+"!"))
+                // Use the Suga client to access cloud resources
+                if err := app.Files.Write("example.txt", []byte("Hello, "+name+"!")); err != nil {
+                    log.Printf("Failed to write file: %v", err)
+                    w.WriteHeader(http.StatusInternalServerError)
+                    w.Write([]byte("Error writing file"))
+                    return
+                }

244-251: Add a default port to avoid empty address.

Prevents server starting on “:”.

-            port := os.Getenv("PORT")
+            port := os.Getenv("PORT")
+            if port == "" {
+                port = "8080"
+            }
 
             server := &http.Server{
                 Addr:    ":" + port,
                 Handler: router,
             }
 
-            fmt.Printf("Server started on port %s, however use the entrypoint port to connect to the server\n", port)
+            fmt.Printf("Server started on port %s (use the entrypoint port to connect)\n", port)

332-332: Unify stack directory placeholder.

Use one placeholder (“12345”) throughout to reduce confusion.

-    cd .suga/stacks/my-app-aws-xyz
+    cd .suga/stacks/my-app-aws-12345

Also applies to: 296-304

docs/docs.json (1)

40-44: Nav update looks good; confirm de-duplication strategy.

If “migrate-existing” is being replaced, consider removing it from the Guides list or adding a redirect instead of showing both.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 819949d and 71396a0.

📒 Files selected for processing (2)
  • docs/docs.json (1 hunks)
  • docs/guides/add-suga.mdx (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Build (windows-latest, amd64)
🔇 Additional comments (1)
docs/guides/add-suga.mdx (1)

2-4: Front matter rename looks good.

Title/sidebar/description align with the new guide intent.

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.

Actionable comments posted: 1

🧹 Nitpick comments (4)
docs/guides/add-suga.mdx (4)

56-84: YAML example: indentation consistency and permission alignment

  • Indentation under targets is unusually deep; prefer 2 spaces for readability.
  • Prose says grant “Write” and “Delete,” but the YAML also grants “read.” Either add “Read” to the prose or remove it here for consistency.

Suggested tidy-up of the YAML block for clarity:

-targets:
-        - suga/aws@1
+targets:
+  - suga/aws@1
 name: my-app
 description: Your project description
 services:
-        app:
-            container:
-                docker:
-                    dockerfile: Dockerfile
-                    context: .
-            dev:
-                script: go run main.go
+  app:
+    container:
+      docker:
+        dockerfile: Dockerfile
+        context: .
+    dev:
+      script: go run main.go
 buckets:
-        files:
-            access:
-                app:
-                    - read
-                    - write
-                    - delete
+  files:
+    access:
+      app:
+        - read
+        - write
+        - delete
 entrypoints:
-        ingress:
-            routes:
-                /:
-                    name: app
+  ingress:
+    routes:
+      /:
+        name: app

95-110: Dockerfile hardening and reproducibility

  • Pin Alpine to a minor (e.g., 3.20) to avoid surprise updates.
  • Run as non-root in the runtime image.
-FROM golang:1.24-alpine as builder
+FROM golang:1.24-alpine3.20 as builder
@@
-FROM alpine:latest
+FROM alpine:3.20
@@
-COPY --from=builder /app/main .
+COPY --from=builder /app/main /usr/local/bin/main
+RUN adduser -D -u 10001 appuser
+USER 10001
-ENTRYPOINT ["/main"]
+ENTRYPOINT ["/usr/local/bin/main"]

131-133: Go import path placeholder

“example/suga” must match your module path (go.mod module + “/suga”). Consider a short note to replace with the project’s actual module path.


312-316: Path formatting consistency

Use the same prefix form for the stack path everywhere (either “./.suga/…” or “.suga/…”). I suggest consistently using “./.suga/…”.

Also applies to: 344-345

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 71396a0 and 3d665e2.

📒 Files selected for processing (1)
  • docs/guides/add-suga.mdx (12 hunks)
🔇 Additional comments (3)
docs/guides/add-suga.mdx (3)

2-4: Front matter rename/readability — looks good

Clearer title/sidebar and description. Good SEO and intent.


14-16: Installation link: verify target path

Confirm the URL and anchor still reflect the latest docs IA.


242-248: Nice: unified write + basic error handling

Good example showing Suga client usage with straightforward error handling.

Comment thread docs/guides/add-suga.mdx
@davemooreuws davemooreuws merged commit e8d8078 into main Aug 27, 2025
4 checks passed
@davemooreuws davemooreuws deleted the rename-migrate-guide branch August 27, 2025 03:25
@nitric-bot
Copy link
Copy Markdown

🎉 This PR is included in version 0.0.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants