Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Artifacts Store (without Metadata) #185

Draft
wants to merge 38 commits into
base: develop
Choose a base branch
from

Conversation

blake-regalia
Copy link
Contributor

Replaces #175 .

This PR implements the following two endpoints for storing and retrieving arbitrary resources under a given repo:

  • /orgs/{orgId}/repos/{repoId}/artifacts/store
  • /orgs/{orgId}/repos/{repoId}/artifacts/store/{artifactId}

This change also introduces a new set of object-centric permissions for CRUD'ing Artifacts. Therefore, the m-graph:AccessControl.Definitions graph needs to be updated with the new permissions, and the m-graph:Schema graph should also be updated with the new triples (though this graph currently has no effect on functionality).

TODO:

  • Finish adding tests for storing/retrieving artifacts
  • Decide what POST should return (or is empty 201 response acceptable?)

inspect()
}

processAndSubmitUserQuery(requestContext, prefixes["mor-artifact"]!!, ARTIFACT_QUERY_CONDITIONS.append {
Copy link
Contributor

Choose a reason for hiding this comment

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

processAndSubmitUserQuery function will need to support prefixes["mor-artifact"], suggest fix after merging

Copy link
Contributor

Choose a reason for hiding this comment

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

remove this

Copy link

sonarqubecloud bot commented Jan 7, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
48.7% Coverage on New Code (required ≥ 70%)

See analysis details on SonarQube Cloud

@@ -23,6 +23,60 @@ suspend fun GspLayer1Context<GspReadResponse>.readModel(refType: RefType) {
}
}

val authorizedIri = "<${MMS_URNS.SUBJECT.auth}:${transactionId}>"
Copy link
Contributor

Choose a reason for hiding this comment

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

The added things here are from a borked merge from develop, can just take them out

*/
fun Route.storeArtifacts() {
// all artifacts
storageAbstractionResource("$ARTIFACTS_PATH/store") {
Copy link
Contributor

Choose a reason for hiding this comment

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

remove store

Copy link
Contributor

Choose a reason for hiding this comment

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

discussion on getting metadata vs store:
remove /store
add query param for download for get, default is to enumerate with content-type turtle with content negotiation in future

Copy link
Contributor

Choose a reason for hiding this comment

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

would extend to get in single artifact


// state of an artifact
head {
// headArtifact()
Copy link
Contributor

Choose a reason for hiding this comment

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

just do condition checks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants