Skip to content

Commit

Permalink
fix(archives): cannot delete archived recording
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewazores committed Nov 21, 2023
1 parent 20e0304 commit 6331935
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/main/java/io/cryostat/recordings/Recordings.java
Original file line number Diff line number Diff line change
Expand Up @@ -659,11 +659,10 @@ public void deleteRecording(@RestPath long targetId, @RestPath long remoteId) th

@DELETE
@Blocking
@Path("/api/beta/fs/recordings/{encodedJvmId}/{filename}")
@Path("/api/beta/fs/recordings/{jvmId}/{filename}")
@RolesAllowed("write")
public void deleteArchivedRecording(@RestPath String encodedJvmId, @RestPath String filename)
public void deleteArchivedRecording(@RestPath String jvmId, @RestPath String filename)
throws Exception {
var jvmId = decodeBase32(encodedJvmId);
logger.infov("Handling archived recording deletion: {0} / {1}", jvmId, filename);
var metadata =
recordingHelper
Expand Down Expand Up @@ -859,10 +858,6 @@ private Tagging createMetadataTagging(Metadata metadata) {
.build();
}

private String decodeBase32(String encoded) {
return new String(base32.decode(encoded), StandardCharsets.UTF_8);
}

private static Map<String, Object> getRecordingOptions(
IFlightRecorderService service, RecordingOptionsBuilder builder) throws Exception {
IConstrainedMap<String> recordingOptions = builder.build();
Expand Down

0 comments on commit 6331935

Please sign in to comment.