Skip to content
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

ZEA-4639: Remove serverless code from zbpack #439

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

pan93412
Copy link
Member

@pan93412 pan93412 commented Feb 23, 2025

Description (required)

  • refactor(planner/dart): Remove serverless support
  • refactor(planner/gleam): Remove serverless support
  • refactor(planner/golang): Remove serverless support
  • refactor(planner/nodejs): Remove serverless support
  • refactor(transformer): Remove Next.js transformer
  • refactor(transformer): Remove all transformers
  • refactor(planner/python): Remove serverless support
  • refactor(planner/rust): Remove serverless support
  • refactor(planner/static): Remove serverless support
  • refactor(zbpack): Remove serverless code
  • refactor(utils): Remove GetExplicitServerlessConfig
  • test(planner/nodejs): Update snapshot
  • test: Update snapshot

Tested projects

  • Node.js: Next.js
  • Node.js: Nuxt.js
  • Python: Flask
  • Python: Django
  • Python: FastAPI
  • Golang
  • Gleam ⚠️ (與本 PR 無關)
  • Dart 🤔 (Flutter 有 breaking changes, 待修)
  • Rust
  • Static

Related issues & labels (optional)

  • Closes ZEA-4639
  • Suggested label: refactor

@pan93412 pan93412 self-assigned this Feb 23, 2025
@pan93412 pan93412 force-pushed the pan93412/zea-4639-remove-serverless-code-from-zbpack branch from 1e03c64 to e64adff Compare February 23, 2025 16:24
@pan93412 pan93412 requested a review from Copilot February 23, 2025 16:39

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 109 out of 109 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (11)

internal/dart/dart_test.go:12

  • The test case for the flutter serverless scenario was removed. Please ensure that the remaining test covers all expected Dockerfile outputs now that the serverless parameter is no longer used.
-	t.Run("flutter, serverless", func(t *testing.T) {

internal/nodejs/template_test.go:75

  • Several test cases that relied on the Serverless flag were removed. Please verify that the new tests (e.g. TestTemplate_WithOutputDir) fully cover the behavior previously handled via the serverless branch.
-		Serverless: true,

internal/gleam/gleam_test.go:10

  • The removal of the serverless branch test in Gleam may reduce coverage of conditional Dockerfile generation. Make sure that the expected static configuration is still validated.
-	t.Run("serverless", func(t *testing.T) {

internal/golang/plan.go:128

  • The removal of the serverless field from the Go plan context and its usage in metadata generation is intentional. Ensure that metadata consumers are updated and that tests cover the new behavior.
-	Serverless optional.Option[bool]

internal/golang/golang.go:37

  • The serverless-specific build stage has been removed from the Golang build file. Please verify that the resulting build stages produce the correct artifact for production.
-	if meta["serverless"] == "true" {

internal/nodejs/plan_test.go:518

  • Multiple test cases related to serverless functionality were removed. Ensure that the current tests for start command generation comprehensively cover all non-serverless scenarios.
-	t.Run("serverless nitro", func(t *testing.T) {

internal/gleam/identify.go:11

  • The serverless option was removed from the Gleam identifier context. Confirm that PlanMeta still includes all necessary configuration keys and that tests cover this behavior.
-	type gleamPlanContext struct {

internal/dart/identify.go:112

  • The addition of a serverless flag in the Dart identifier has been removed. Please ensure that downstream consumers of the PlanMeta do not expect this key.
-		meta["serverless"] = strconv.FormatBool(

internal/python/plan.go:29

  • The serverless field was removed from the Python plan context and related logic. Verify that the removal does not inadvertently affect the generation of install or start commands for WSGI apps.
-		Serverless     optional.Option[bool]

internal/nodejs/plan.go:54

  • The Serverless option has been removed from the nodePlanContext and associated functions. Please ensure that the resulting build and start command logic remains complete and is fully covered by tests.
-		Serverless      optional.Option[bool]

internal/nodejs/nextjs/launcher.go:1

  • The entire Next.js launcher file has been removed as part of the serverless removal. Please confirm that any references to Next.js serverless support in documentation or configuration are updated accordingly.
-// Package nextjs is used to transform build output of Next.js app to the serverless build output format of Zeabur
@pan93412 pan93412 force-pushed the pan93412/zea-4639-remove-serverless-code-from-zbpack branch from e64adff to c3c037c Compare February 27, 2025 05:50
@pan93412 pan93412 marked this pull request as ready for review February 27, 2025 09:34
@pan93412 pan93412 requested a review from yuaanlin February 27, 2025 09:34
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