Descriptor versions

I’m not sure if I’m missing a trick here, but in situation where I’m uploading bundles, or for that matter pipeline configs, and then using descriptors to define the bundles, it seems like there’s no way to assign a semver version name in the descriptor as the “version” field is required to define the attachment_id.

I’m thinking the “version” field of a shotgun descriptor should be simply to define the semver of whatever it is you’re releasing. Then, your app would have a valid app.version value that actually reflects the version that you’ve uploaded to SG (eg to reflect he git branch or tag) rather than the rather non-descriptive attachment_id that it’s actually required to be.

I guess this suggestion is a bit of a moot point as there’s no way that this nomenclature can change now without breaking everyone’s setups.

I was using the descriptor version field to hold semver version definitions when I was defining “dev” descritors and found that to be quite useful, but now I’m moving to uploading bundles, I see I can no longer use this field in this way. I’m sure I can get around this with adding new fields to either my toolkit_bundle entities or attachment entities, but using these in any logic will require additional api calls which I’d prefer to keep to a minimum.

Perhaps if descriptors could receive arbitrary key-value pairs in their definitions that could be quite useful; eg
sgtk:descriptor:shotgun?entity_type=CustomNonProjectEntity02&name=tk-blah&field=sg_uploaded_app&version=196990&semver=v1.2.3
and then in an app, for example, you could get the attachment_id with self.version and the actual version with self.semver.

I’m just thinking out aloud here… and curious to hear your thoughts.

2 Likes

Hi Patrick – I hear what you’re saying, and it makes a lot of sense. There’ve been a lot of “philosophical” conversations about maintaining a small, well-defined set of descriptors and adding new ones only as needed, but I believe there’s space for that conversation to evolve.

I’ve shared this post with our product team, so we can track the request. I’ll let you know if there’s any news.

2 Likes

Thanks Tannaz,
I’m not suggesting a new descriptor here btw, I’m asking for the ability to provide arbitrary key-value pairs to overcome the ‘dual-purpose’ of the version descriptor field.
p

2 Likes

Right, gotcha. Different request (and maybe one that’s easier to fulfill), but part of the same general conversation.

1 Like