-
-
Notifications
You must be signed in to change notification settings - Fork 724
v3: self-hosting support for latest packages #1319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: be90406 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Caution Review failedThe pull request is closed. WalkthroughThis update introduces multiple enhancements to the deployment system, including a new network flag for self-hosted deployments, improved error logging, and adjustments to the handling of the checksum flag for Docker compatibility. Documentation has been updated to reflect the transition from beta to the latest CLI version, and several command-line options have been modified or removed to streamline the deployment process. Overall, these changes aim to improve usability and flexibility in deployment configurations. Changes
Possibly related PRs
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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
Outside diff range and nitpick comments (2)
.changeset/metal-geckos-pretend.md (1)
1-8
: Changes look good!The changeset file accurately captures the key improvements made in this PR, which include:
- Improved index error logging for better diagnostics.
- Addition of a network flag for self-hosted deploys to provide more flexibility.
- Fix for the checksum flag issue on certain Docker versions to ensure compatibility.
- Addition of debug logs to the Containerfile for deeper insights.
These changes collectively enhance the robustness and usability of the deployment system.
A few additional suggestions:
- Consider adding more details to the changeset file on how to use the new network flag and in what scenarios it would be useful.
- If possible, provide more specifics on which Docker versions were affected by the checksum flag issue and how it was fixed.
- Ensure that the improved logging and added debug logs do not log any sensitive information.
docs/open-source-self-hosting.mdx (1)
296-296
: Add a period after "etc".In American English, abbreviations like "etc." require a period.
Apply this diff to fix the punctuation:
-etc +etc.Tools
LanguageTool
[style] ~296-~296: In American English, abbreviations like “etc.” require a period.
Context: ...pulling updated compose files, scripts, etc from our docker repo: ```bash git pull...(ETC_PERIOD)
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (10)
- .changeset/metal-geckos-pretend.md (1 hunks)
- docs/github-actions.mdx (1 hunks)
- docs/open-source-self-hosting.mdx (6 hunks)
- docs/snippets/cli-commands-deploy.mdx (1 hunks)
- docs/upgrading-beta.mdx (0 hunks)
- packages/cli-v3/src/build/buildWorker.ts (1 hunks)
- packages/cli-v3/src/commands/deploy.ts (3 hunks)
- packages/cli-v3/src/commands/init.ts (1 hunks)
- packages/cli-v3/src/deploy/buildImage.ts (6 hunks)
- packages/cli-v3/src/entryPoints/deploy-index-controller.ts (1 hunks)
Files not reviewed due to no reviewable changes (1)
- docs/upgrading-beta.mdx
Additional context used
LanguageTool
docs/open-source-self-hosting.mdx
[style] ~296-~296: In American English, abbreviations like “etc.” require a period.
Context: ...pulling updated compose files, scripts, etc from our docker repo: ```bash git pull...(ETC_PERIOD)
[grammar] ~390-~390: The word “opt-out” is a noun. The verb is spelled with a space.
Context: ...ith third parties. If you would like to opt-out of this, you can set the `TRIGGER_TELEM...(NOUN_VERB_CONFUSION)
Additional comments not posted (23)
packages/cli-v3/src/entryPoints/deploy-index-controller.ts (1)
107-108
: Improved error logging for better visibility and debugging.The addition of the console error log statement in the
catch
block enhances the visibility of error occurrences during the indexing process. By logging a message indicating the failure to index a deployment, along with the serialized error details, it provides immediate feedback in the console when an error is caught.This change improves debugging capabilities by making it clearer when and why the indexing fails, while still maintaining the existing functionality of failing the deployment and exiting the process.
docs/snippets/cli-commands-deploy.mdx (3)
90-92
: LGTM!The repositioning of the
--skip-deploy
parameter and the updated description improve the clarity and discoverability of this option.
99-103
: LGTM!The expanded description for the
--registry
parameter and the updated description for the--push
parameter improve clarity and consistency in the documentation.
111-113
: LGTM!The addition of the
--network
parameter enhances the flexibility and customization options for users who are self-hosting their deployments. This is a valuable addition to the CLI commands.docs/github-actions.mdx (1)
184-184
: Approve version update with a reminder to review the changelog.Updating the
trigger.dev
package version frombeta
tolatest
aligns with the best practice of using stable versions for deployments.However, please review the changelog or release notes for any breaking changes between the
beta
andlatest
versions that could potentially impact your deployment or task functionality.packages/cli-v3/src/build/buildWorker.ts (1)
226-231
: LGTM!The added debug log statements in the
writeContainerfile
function provide better visibility into the file writing process without altering the core functionality. Logging thecontainerfilePath
and thecontainerfile
content can aid in debugging by showing the exact path and content being processed.These changes improve the observability and debuggability of the code with negligible performance impact.
docs/open-source-self-hosting.mdx (7)
95-95
: LGTM!The heading provides clear context for the manual setup steps that follow.
177-177
: LGTM!The deploy command correctly uses the latest CLI version and includes the necessary flags for self-hosted deployments.
287-304
: LGTM!The new "Updating" section provides clear and concise instructions for keeping the self-hosted deployment up-to-date. The commands are correct, and the callout about potentially needing to update the
.env
file is helpful.Tools
LanguageTool
[style] ~296-~296: In American English, abbreviations like “etc.” require a period.
Context: ...pulling updated compose files, scripts, etc from our docker repo: ```bash git pull...(ETC_PERIOD)
305-314
: LGTM!The new "From beta" subsection provides clear instructions for users updating from the beta CLI package images. Pulling changes from the docker repo and restarting services is the correct approach.
315-324
: LGTM!The new "Version locking" section provides clear explanations for why users might want to lock the version of their Docker images. The reasons mentioned are valid and important, and the example of how to specify a different image tag in the
.env
file is helpful.
Line range hint
336-369
: LGTM!The updated CLI usage examples correctly use the latest CLI version and cover important use cases for self-hosted deployments. The examples are clear and easy to follow.
377-377
: LGTM!The updated deploy command example correctly uses the latest CLI version and includes the necessary flags for self-hosted deployments.
packages/cli-v3/src/deploy/buildImage.ts (6)
17-17
: LGTM!The addition of the optional
network
property to theBuildImageOptions
interface is a valid change. It allows users to specify a Docker network when building images, providing more flexibility in the image-building process.
282-282
: LGTM!The addition of the optional
network
property to theSelfHostedBuildImageOptions
interface is a valid change. It allows users to specify a Docker network when building images in a self-hosted environment, providing more flexibility in the image-building process.
88-88
: LGTM!The
network
property from theBuildImageOptions
interface is correctly passed to theselfHostedBuildImage
function. This ensures that thenetwork
option is propagated to the self-hosted image-building process.
301-301
: LGTM!The
network
property from theSelfHostedBuildImageOptions
interface is correctly included in the Docker build command using the ternary operator. If thenetwork
option is provided, the--network
argument is added to the Docker build command, allowing users to specify a Docker network when building images in a self-hosted environment.
465-465
: LGTM!The addition of the Dockerfile syntax declaration
# syntax=docker/dockerfile:1
at the beginning of the Dockerfile improves clarity and compatibility with Docker's syntax requirements.
570-570
: LGTM!The addition of the Dockerfile syntax declaration
# syntax=docker/dockerfile:1
at the beginning of the Dockerfile improves clarity and compatibility with Docker's syntax requirements.packages/cli-v3/src/commands/init.ts (1)
197-197
: LGTM!The change modifies the command prompt displayed to users when instructed to start developing. It now checks for the presence of a
profile
option and appends a--profile
argument if it exists, instead of checking theapiUrl
against a constant.This change affects the user experience by providing a different command prompt based on whether a
profile
option is present or not. Users with aprofile
option will see the--profile
argument included in the command prompt.The change appears to be intentional and does not introduce any apparent bugs or issues.
packages/cli-v3/src/commands/deploy.ts (3)
58-58
: LGTM!The new optional
network
parameter in theDeployCommandOptions
schema enhances the flexibility of the deployment command by allowing users to specify the networking mode for RUN instructions when using the--self-hosted
option. The enum values cover the common networking modes used in containerized environments.
148-148
: Looks good!The new
--network <mode>
option in the command-line interface provides users with a clear way to set the networking mode for RUN instructions when using the--self-hosted
option. The description is clear and concise, explaining the purpose of the option. The naming and style of the option are consistent with other options in the command.
354-354
: Looks good to me!Passing the
network
value from theoptions
object to thebuildImage
function integrates the new networking mode parameter into the deployment process. This ensures that the specified networking mode is applied when building the deployment image. The code change is consistent with the addition of thenetwork
parameter to theDeployCommandOptions
schema and the--network
option in the command-line interface.
commit: |
fbd89f4
to
be90406
Compare
Package changes:
Docs changes:
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Chores