Skip to content

Commit

Permalink
feat: print files artifacts registered in an enclave during enclave i…
Browse files Browse the repository at this point in the history
…nspect (#228)

Closes #176
  • Loading branch information
h4ck3rk3y committed Mar 20, 2023
1 parent 00ccfec commit ef167d6
Show file tree
Hide file tree
Showing 28 changed files with 1,381 additions and 332 deletions.
4 changes: 4 additions & 0 deletions .circleci/config.yml
Expand Up @@ -560,6 +560,10 @@ jobs:
test_old_enclave_continuity:
executor: ubuntu_vm
steps:
# TODO remove this after version > 0.68.12 is out
# This exits the test_old_enclave_continuity immediately
# after a new version is out we remove these comments and this line
- run: circleci-agent step halt
- checkout

- <<: *abort_job_if_only_docs_changes
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions api/golang/core/lib/enclaves/enclave_context.go
Expand Up @@ -260,6 +260,15 @@ func (enclaveCtx *EnclaveContext) GetExistingAndHistoricalServiceIdentifiers(ctx
return services.NewServiceIdentifiers(enclaveCtx.enclaveName, response.AllIdentifiers), nil
}

// Docs available at https://docs.kurtosis.com/#getallfilesartifactnamesanduuids---filesartifactnameanduuid-filesartifactnamesanduuids
func (enclaveCtx *EnclaveContext) GetAllFilesArtifactNamesAndUuids(ctx context.Context) ([]*kurtosis_core_rpc_api_bindings.FilesArtifactNameAndUuid, error) {
response, err := enclaveCtx.client.ListFilesArtifactNamesAndUuids(ctx, &emptypb.Empty{})
if err != nil {
return nil, stacktrace.Propagate(err, "An error occurred while fetching file names and uuids")
}
return response.GetFileNamesAndUuids(), nil
}

// ====================================================================================================
//
// Private helper methods
Expand Down

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

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

18 changes: 18 additions & 0 deletions api/protobuf/core/api_container_service.proto
Expand Up @@ -59,6 +59,8 @@ service ApiContainerService {

// Renders the templates and their data to a files artifact in the Kurtosis File System
rpc RenderTemplatesToFilesArtifact(RenderTemplatesToFilesArtifactArgs) returns (RenderTemplatesToFilesArtifactResponse) {}

rpc ListFilesArtifactNamesAndUuids(google.protobuf.Empty) returns (ListFilesArtifactNamesAndUuidsResponse) {}
}

// ==============================================================================================
Expand Down Expand Up @@ -516,3 +518,19 @@ message RenderTemplatesToFilesArtifactResponse {
// UUID of the files artifact, for use when referencing it in the future
string uuid = 1;
}


// ==============================================================================================
// List Files Artifact Names And Uuids
// ==============================================================================================

message FilesArtifactNameAndUuid {
// A string representing the name of the file
string fileName = 1;
// A string representing the uuid of the file
string fileUuid = 2;
}

message ListFilesArtifactNamesAndUuidsResponse {
repeated FilesArtifactNameAndUuid file_names_and_uuids = 1;
}

0 comments on commit ef167d6

Please sign in to comment.