Unable to update plugins using miactl #589
Replies: 3 comments
-
Hi @dallas-fletchall and thank you for reaching out. Your expectation seems reasonable, but a few validations happen under the hood when updating a versioned marketplace resource. To better understand the situation here: |
Beta Was this translation helpful? Give feedback.
-
We worked through some of the issues that we were having. The conclusion that we came to is that multiple properties retrieved from Having Deleting from the Additionally, some items are just disregarded without warning (e.g. Finally, images uploaded with We worked around these issues by implementing steps in the pipeline to validate known issues for our use case based on the schema below. Is there a better schema that we can modify to meet our use case? {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": true,
"required": [
"image",
"supportedByImage",
"supportedBy",
"visibility"
],
"properties": {
"_id": {
"not": {}
},
"releaseDate": {
"not": {}
},
"isLatest": {
"not": {}
},
"imageUrl": {
"not": {}
},
"supportedByImageUrl": {
"not": {}
},
"visibility": {
"type": "object",
"properties": {
"allTenants": {
"type": "boolean"
},
"public": {
"not": {}
}
},
"required": [
"allTenants"
]
},
"supportedBy": {
"type": "string"
},
"supportedByImage": {
"type": "object",
"properties": {
"localPath": {
"type": "string"
}
},
"required": [
"localPath"
]
},
"image": {
"type": "object",
"properties": {
"localPath": {
"type": "string"
}
},
"required": [
"localPath"
]
}
}
} Ultimately, my original expectation still holds. If a property is supplied that cannot be accepted, a non-zero response should be returned (erroring on unknown and unexpected properties would make sense as well). |
Beta Was this translation helpful? Give feedback.
-
Hi @dallas-fletchall ! Thank you for your feedback, we will work to improve the API responses to better communicate errors in the creation process. In the meantime, try the following schema to validate your manifests: {
"$id": "catalog-item-manifest.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"categoryId": {
"description": "Identifier of the item's category",
"type": "string"
},
"comingSoon": {
"description": "Flag that will prevent the use of the item",
"nullable": true,
"type": "boolean"
},
"description": {
"description": "Brief description of the item",
"type": "string"
},
"documentation": {
"description": "Documentation of the item",
"nullable": true,
"properties": {
"type": {
"enum": [
"externalLink",
"markdown"
],
"type": "string"
},
"url": {
"format": "uri-reference",
"type": "string"
}
},
"required": [
"type",
"url"
],
"type": "object"
},
"itemId": {
"description": "RFC-1035 compliant identifier of the item. It forms a composite PK with tenantId and, if present, version.name",
"minLength": 1,
"pattern": "^[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$",
"type": "string"
},
"name": {
"description": "Human-readable name of the item",
"minLength": 1,
"type": "string"
},
"providerId": {
"description": "Identifier of the provider used to retrieve markdown documentation content and external resources, if supported by the item type",
"type": "string"
},
"publishOnMiaDocumentation": {
"description": "Flag stating if the resource documentation should be published on Mia-Platform public documentation",
"nullable": true,
"type": "boolean"
},
"releaseStage": {
"description": "Release stage of the item",
"enum": [
"beta",
"deprecated",
"",
"preview",
"stable"
],
"type": "string"
},
"repositoryUrl": {
"description": "URL of the repository containing the source code of the resource created by the item",
"format": "uri-reference",
"nullable": true,
"type": "string"
},
"resources": {
"additionalProperties": true,
"type": "object"
},
"supportedBy": {
"description": "Identifier of the company that has produced the item",
"type": "string"
},
"tenantId": {
"description": "Identifier of the tenant to which the item belongs. It forms a composite PK with itemId and, if present, version.name",
"type": "string"
},
"type": {
"type": "string"
},
"version": {
"description": "Version of the item following semver",
"properties": {
"name": {
"description": "Semantic version",
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
"type": "string"
},
"releaseNote": {
"description": "Markdown release note",
"type": "string"
}
},
"required": [
"name",
"releaseNote"
],
"type": "object"
},
"visibility": {
"description": "Visibility of the item",
"properties": {
"allTenants": {
"default": false,
"description": "If true, the item will be accessible to all companies",
"type": "boolean"
},
"public": {
"default": false,
"description": "If true, the item will be accessible from any user that access the Console, even if not authenticated",
"type": "boolean"
}
},
"type": "object"
},
"image": {
"type": "object",
"properties": {
"localPath": { "type": "string" }
},
"additionalProperties": false,
"required": ["localPath"]
},
"supportedByImage": {
"type": "object",
"properties": {
"localPath": { "type": "string" }
},
"additionalProperties": false,
"required": ["localPath"]
}
},
"required": [
"name",
"itemId",
"tenantId",
"type",
"resources"
],
"type": "object"
} Mind that you can switch up |
Beta Was this translation helpful? Give feedback.
-
What product are you having troubles with?
Marketplace
What Console version are you using?
1.112.1
Description
Based on declarative-approach docs, specifically this section, I should be able to update an item's description (at the very least).
We have a working set of github actions, but it refuses to update items. Using a service account with clientId and clientSecret, we are can upload a new item, but are unable to modify an existing item. Below are the relevant sections of the action.
Actual Outcome
Taking a previous item that was created using the above github action, we update the
.description
, and were provided with the output below as the result ofmiactl marketplace apply --file-path /some/path
:Each instance of the plugin with the same objectId is a version of the plugin.
Expected Outcome
I would expect 1 of 2 possible outcomes.
/some/path
/some/path
, including the updated descriptionBeta Was this translation helpful? Give feedback.
All reactions