Skip to content

Commit

Permalink
Use serde for RemoteStorageConfig parsing (#8126)
Browse files Browse the repository at this point in the history
Adds a `Deserialize` impl to `RemoteStorageConfig`. We thus achieve the
same as #7743 but with less repetitive code, by deriving `Deserialize`
impls on `S3Config`, `AzureConfig`, and `RemoteStorageConfig`. The
disadvantage is less useful error messages.

The git history of this PR contains a state where we go via an
intermediate representation, leveraging the `serde_json` crate,
without it ever being actual json though.

Also, the PR adds deserialization tests.

Alternative to #7743 .
  • Loading branch information
arpad-m committed Jun 22, 2024
1 parent 8fe3f17 commit 75747cd
Show file tree
Hide file tree
Showing 8 changed files with 144 additions and 168 deletions.
5 changes: 5 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion libs/remote_storage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ aws-config.workspace = true
aws-sdk-s3.workspace = true
aws-credential-types.workspace = true
bytes.workspace = true
camino.workspace = true
camino = { workspace = true, features = ["serde1"] }
humantime.workspace = true
humantime-serde.workspace = true
hyper = { workspace = true, features = ["stream"] }
futures.workspace = true
rand.workspace = true
Expand Down
Loading

1 comment on commit 75747cd

@github-actions
Copy link

Choose a reason for hiding this comment

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

2998 tests run: 2871 passed, 1 failed, 126 skipped (full report)


Failures on Postgres 14

  • test_storage_controller_many_tenants[github-actions-selfhosted]: release
# Run all failed tests locally:
scripts/pytest -vv -n $(nproc) -k "test_storage_controller_many_tenants[release-pg14-github-actions-selfhosted]"
Flaky tests (3)

Postgres 15

  • test_subscriber_restart: release
  • test_wal_restore: debug
  • test_wal_restore_initdb: debug

Code coverage* (full report)

  • functions: 32.4% (6869 of 21175 functions)
  • lines: 49.9% (53436 of 107076 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
75747cd at 2024-06-22T19:25:53.263Z :recycle:

Please sign in to comment.