Skip to content

Remove Cloud API#324

Open
danielschlegel wants to merge 2 commits intomainfrom
feature/221-remove-cloud-api
Open

Remove Cloud API#324
danielschlegel wants to merge 2 commits intomainfrom
feature/221-remove-cloud-api

Conversation

@danielschlegel
Copy link
Collaborator

I've successfully fixed GitHub issue #221 by removing the unused github.com/earthly/cloud-api dependency from the EarthBuild project. Here's what was done:

  1. Created local logstream package (in earthbuild/logstream/):

    • Copied and adapted proto files: manifest.proto and delta.proto
    • Downloaded pre-generated Go files: manifest.pb.go and delta.pb.go
    • Added a comprehensive README.md explaining the package
  2. Updated all imports across the codebase (22 Go files):

    • Changed github.com/earthly/cloud-api/logstreamgithub.com/EarthBuild/earthbuild/logstream
    • Affected files in:
      • cmd/earthly/app/
      • earthfile2llb/ - logbus/ and subdirectories - util/deltautil/ - util/stringutil/
  3. Removed the dependency:

    • Removed from go.mod
    • Cleaned go.sum via go mod tidy
    • Verified no remaining references exist
  4. Updated build configuration:

    • Removed CLOUD_API argument and related build logic from Earthfile
    • Added logstream directory to build COPY commands
    • Updated comments to remove cloud-api references

✅ All existing tests pass successfully
✅ Project builds without errors (go build ./...) ✅ No remaining references to github.com/earthly/cloud-api ✅ The logstream functionality is preserved with identical types and behavior

The dependency has been completely removed while maintaining full backward compatibility of the logstream functionality!

@danielschlegel danielschlegel self-assigned this Feb 6, 2026
@github-actions
Copy link

github-actions bot commented Feb 6, 2026

🎉 Are we earthbuild yet?

Great progress! You've reduced "earthly" occurrences by 22 (0.39%)

📈 Overall Progress

Branch Total Count
main 5659
This PR 5637
Difference -22 (0.39%)

📁 Changes by file type:

File Type Change
Go files (.go) ✅ -18
Documentation (.md) ❌ +1
Earthfiles ✅ -3

Keep up the great work migrating from Earthly to Earthbuild! 🚀

💡 Tips for finding more occurrences

Run locally to see detailed breakdown:

./.github/scripts/count-earthly.sh

Note that the goal is not to reach 0.
There is anticipated to be at least some occurences of earthly in the source code due to backwards compatibility with config files and language constructs.

@danielschlegel danielschlegel changed the title Summary Remove Cloud API Feb 6, 2026
@gemini-code-assist
Copy link

Summary of Changes

Hello @danielschlegel, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request internalizes the logstream functionality, previously sourced from an external cloud-api dependency. This strategic move aims to reduce external dependencies, streamline the project's architecture, and ensure greater control over the logstream components. The change maintains full backward compatibility for logstream types and behavior, with all existing tests passing and the project building without errors.

Highlights

  • Dependency Removal: The external github.com/earthly/cloud-api dependency has been completely removed from the project, addressing GitHub issue Remove github.com/earthly/cloud-api #221.
  • Internal logstream Package: A new local logstream package has been created within earthbuild/logstream/, containing adapted proto files (manifest.proto, delta.proto) and their generated Go counterparts.
  • Import Path Updates: All references to github.com/earthly/cloud-api/logstream across 22 Go files have been updated to github.com/EarthBuild/earthbuild/logstream.
  • Build Configuration Adjustment: The Earthfile has been modified to remove CLOUD_API arguments and related build logic, and to include the new logstream directory in COPY commands.
Changelog
  • Earthfile
    • Removed CLOUD_API argument and associated build logic.
    • Added the new logstream directory to the COPY commands.
  • cmd/earthly/app/run.go
    • Updated the import path for the logstream package.
  • earthfile2llb/converter.go
    • Updated the import path for the logstream package.
  • earthfile2llb/with_docker_run_local_reg.go
    • Updated the import path for the logstream package.
  • earthfile2llb/with_docker_run_reg.go
    • Updated the import path for the logstream package.
  • go.mod
    • The github.com/earthly/cloud-api dependency entry was removed.
  • go.sum
    • Entries related to github.com/earthly/cloud-api were cleaned up.
  • logbus/bus.go
    • Updated the import path for the logstream package.
  • logbus/command.go
    • Updated the import path for the logstream package.
  • logbus/formattedwriter.go
    • Updated the import path for the logstream package.
  • logbus/formatter/formatter.go
    • Updated the import path for the logstream package.
  • logbus/generic.go
    • Updated the import path for the logstream package.
  • logbus/run.go
    • Updated the import path for the logstream package.
  • logbus/setup/setup.go
    • Updated the import path for the logstream package.
  • logbus/solvermon/solvermon.go
    • Updated the import path for the logstream package.
  • logbus/solvermon/vertexmon.go
    • Updated the import path for the logstream package.
  • logbus/solvermon/vertexmon_test.go
    • Updated the import path for the logstream package.
  • logbus/target.go
    • Updated the import path for the logstream package.
  • logbus/writersub/raw.go
    • Updated the import path for the logstream package.
  • logbus/writersub/writersub.go
    • Updated the import path for the logstream package.
  • logstream/README.md
    • A new README file was added, detailing the purpose, history, files, regeneration instructions, and usage of the internalized logstream package.
  • logstream/delta.pb.go
    • New file added, containing the generated Go code for the delta.proto Protocol Buffer definitions.
  • logstream/delta.proto
    • New file added, defining the Protocol Buffer structures for Delta, DeltaLog, DeltaFormattedLog, and DeltaManifest.
  • logstream/manifest.pb.go
    • New file added, containing the generated Go code for the manifest.proto Protocol Buffer definitions.
  • logstream/manifest.proto
    • New file added, defining the Protocol Buffer structures for RunStatus, RunManifest, FailureType, Failure, TargetManifest, CommandTarget, and CommandManifest.
  • util/deltautil/apply.go
    • Updated the import path for the logstream package.
  • util/stringutil/proto_enum_test.go
    • Updated the import path for the logstream package.
Activity
  • The pull request successfully addresses and fixes GitHub issue Remove github.com/earthly/cloud-api #221.
  • All existing tests within the project continue to pass, ensuring no regressions.
  • The project builds successfully without any errors, confirming the integrity of the changes.
  • A thorough verification confirmed that no remaining references to the old github.com/earthly/cloud-api dependency exist.
  • The core logstream functionality has been fully preserved, maintaining identical types and behavior as before the dependency removal.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request effectively removes the github.com/earthly/cloud-api dependency by internalizing the logstream package. The changes are well-structured and executed cleanly. The import paths have been updated across the codebase, and the build configuration in the Earthfile has been adjusted accordingly. The addition of a README.md in the new logstream package with instructions for regenerating the protobuf files is a great touch for maintainability. Overall, this is a solid improvement that reduces external dependencies. The changes look correct and ready to be merged.

This commit removes the cloud-api dependency by internalizing the logstream
package that was the only component being used from that dependency.

Changes:
- Created local logstream package with proto definitions
- Updated all imports from github.com/earthly/cloud-api/logstream
  to github.com/EarthBuild/earthbuild/logstream
- Removed cloud-api from go.mod and go.sum
- Updated Earthfile to remove CLOUD_API build logic
- Applied gofumpt formatting to all modified files

The logstream package provides the same Protocol Buffer types for build
manifests, logging, and delta updates as the original cloud-api version.

Fixes #221
@danielschlegel danielschlegel force-pushed the feature/221-remove-cloud-api branch from 23f3975 to 1b4fcf8 Compare February 6, 2026 15:23
@danielschlegel danielschlegel marked this pull request as ready for review February 6, 2026 16:33
@danielschlegel danielschlegel requested a review from a team as a code owner February 6, 2026 16:33
@danielschlegel danielschlegel requested review from janishorsts and removed request for a team February 6, 2026 16:33
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