Skip to content

Commit

Permalink
change HTTP method to comply with spec (#9100)
Browse files Browse the repository at this point in the history
There is discrepancy with the spec, it has PUT
  • Loading branch information
nikitakalyanov authored Sep 23, 2024
1 parent 4d5add9 commit f446e08
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pageserver/client/src/mgmt_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ impl Client {
self.mgmt_api_endpoint
);

self.request(Method::POST, &uri, req)
self.request(Method::PUT, &uri, req)
.await?
.json()
.await
Expand Down
2 changes: 1 addition & 1 deletion pageserver/src/http/routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2955,7 +2955,7 @@ pub fn make_router(
"/v1/tenant/:tenant_shard_id/timeline/:timeline_id/preserve_initdb_archive",
|r| api_handler(r, timeline_preserve_initdb_handler),
)
.post(
.put(
"/v1/tenant/:tenant_shard_id/timeline/:timeline_id/archival_config",
|r| api_handler(r, timeline_archival_config_handler),
)
Expand Down
2 changes: 1 addition & 1 deletion storage_controller/src/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1849,7 +1849,7 @@ pub fn make_router(
RequestName("v1_tenant_timeline"),
)
})
.post(
.put(
"/v1/tenant/:tenant_id/timeline/:timeline_id/archival_config",
|r| {
tenant_service_handler(
Expand Down
2 changes: 1 addition & 1 deletion storage_controller/src/pageserver_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ impl PageserverClient {
) -> Result<()> {
measured_request!(
"timeline_archival_config",
crate::metrics::Method::Post,
crate::metrics::Method::Put,
&self.node_id_label,
self.inner
.timeline_archival_config(tenant_shard_id, timeline_id, req)
Expand Down
2 changes: 1 addition & 1 deletion test_runner/fixtures/pageserver/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ def timeline_archival_config(
log.info(
f"requesting timeline archival config {config} for tenant {tenant_id} and timeline {timeline_id}"
)
res = self.post(
res = self.put(
f"http://localhost:{self.port}/v1/tenant/{tenant_id}/timeline/{timeline_id}/archival_config",
json=config,
)
Expand Down

1 comment on commit f446e08

@github-actions
Copy link

@github-actions github-actions bot commented on f446e08 Sep 23, 2024

Choose a reason for hiding this comment

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

5117 tests run: 4942 passed, 1 failed, 174 skipped (full report)


Failures on Postgres 16

# Run all failed tests locally:
scripts/pytest -vv -n $(nproc) -k "test_sharding_split_failures[release-pg16-failure14]"
Flaky tests (3)

Postgres 16

Postgres 14

Code coverage* (full report)

  • functions: 32.1% (7445 of 23213 functions)
  • lines: 49.9% (59958 of 120174 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
f446e08 at 2024-09-23T17:51:12.118Z :recycle:

Please sign in to comment.