Skip to content

Add support for GCS.#1550

Open
lesaux wants to merge 10 commits intoaptly-dev:masterfrom
linuxdataflow:feat/pls/gcs-support
Open

Add support for GCS.#1550
lesaux wants to merge 10 commits intoaptly-dev:masterfrom
linuxdataflow:feat/pls/gcs-support

Conversation

@lesaux
Copy link
Copy Markdown
Contributor

@lesaux lesaux commented Mar 28, 2026

Description of the Change

Adding support for GCS buckets.

Implementation trying to follow how it was done for s3.

Checklist

  • allow Maintainers to edit PR (rebase, run coverage, help with tests, ...)
  • unit-test added (if change is algorithm)
  • functional test added/updated (if change is functional)
  • man page updated (if applicable)
  • bash completion updated (if applicable)
  • documentation updated
  • [] author name in AUTHORS

@neolynx neolynx self-assigned this Mar 28, 2026
@neolynx neolynx requested a review from a team March 28, 2026 12:59
@neolynx neolynx added the needs rebase The PR needs to be rebased on master label Mar 28, 2026
@neolynx
Copy link
Copy Markdown
Member

neolynx commented Mar 28, 2026

Hi !

great work :-)

I tried to fix the pipeline issue on master, but was not able to rebase the branch on your repo. could you give maintainer access to your PR ?

@lesaux
Copy link
Copy Markdown
Contributor Author

lesaux commented Mar 28, 2026

Hi !

great work :-)

I tried to fix the pipeline issue on master, but was not able to rebase the branch on your repo. could you give maintainer access to your PR ?

Thank you!

I added you as a maintainer on my fork.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 9, 2026

Codecov Report

❌ Patch coverage is 79.38596% with 47 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.98%. Comparing base (809ab47) to head (f42e5f1).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
gcs/public.go 82.93% 20 Missing and 16 partials ⚠️
context/context.go 0.00% 10 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1550      +/-   ##
==========================================
- Coverage   77.22%   76.98%   -0.25%     
==========================================
  Files         161      163       +2     
  Lines       15080    15308     +228     
==========================================
+ Hits        11646    11785     +139     
- Misses       2291     2367      +76     
- Partials     1143     1156      +13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@neolynx
Copy link
Copy Markdown
Member

neolynx commented Apr 12, 2026

I tried to rebase and push:

$ git push linuxdataflow -f feat/pls/gcs-support
ERROR: Permission to linuxdataflow/aptly.git denied to neolynx.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

I think you need to click a ckechbox in the PR itself, "Allow maintainers to acess and edit" or similar...

@lesaux
Copy link
Copy Markdown
Contributor Author

lesaux commented Apr 12, 2026

This is an org so I think I have to invite you to the repo.
I had invited you last week but I see the invitation expired.
I just invited you again. Let me know!

@neolynx
Copy link
Copy Markdown
Member

neolynx commented Apr 12, 2026

oh, I missed that... accepted now, thanks !

@neolynx neolynx force-pushed the feat/pls/gcs-support branch from ae6bfc6 to 67a203d Compare April 12, 2026 22:26
@neolynx neolynx added needs review Ready for review & merge and removed needs rebase The PR needs to be rebased on master labels Apr 12, 2026
@neolynx
Copy link
Copy Markdown
Member

neolynx commented Apr 12, 2026

rebased on master

@neolynx neolynx force-pushed the feat/pls/gcs-support branch from 67a203d to 5bdb3f9 Compare April 26, 2026 17:15
@neolynx neolynx added increase coverage The PR lacks test coverage and removed needs review Ready for review & merge labels Apr 26, 2026
@neolynx
Copy link
Copy Markdown
Member

neolynx commented Apr 26, 2026

@lesaux I wonder how we can get the coverage up... is there a GCS simulation we could run in CI ?

@lesaux
Copy link
Copy Markdown
Contributor Author

lesaux commented Apr 26, 2026

@lesaux I wonder how we can get the coverage up... is there a GCS simulation we could run in CI ?

I will try to implement with fsouza/fake-gcs-server.

@lesaux
Copy link
Copy Markdown
Contributor Author

lesaux commented Apr 27, 2026

To be able to use the fake-gcs-server I needed to change two things:

  • NewPublishedStorage gains an endpoint parameter (mirrors S3PublishRoot.
    Endpoint), exposed via GCSPublishRoot.Endpoint. Real production knob for
    pointing at non-default GCS endpoints in dev/staging.

  • When an emulator endpoint is in play (explicit endpoint or the GCS-Go-
    client-native STORAGE_EMULATOR_HOST), force storage.WithJSONReads(). The
    default XML download API uses virtual-host-style URLs that emulators
    can't serve under a single listener.

This allowed me to get the coverage much higher.

Let me know what you think!

@neolynx neolynx added needs review Ready for review & merge and removed increase coverage The PR lacks test coverage labels Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs review Ready for review & merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants