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

Update task guids when publisher or extension tag is overwritten? #34

Closed
jessehouwing opened this issue Jan 14, 2017 · 6 comments
Closed

Comments

@jessehouwing
Copy link
Collaborator

jessehouwing commented Jan 14, 2017

At the moment the Visual Studio Marketplace prevents uploading the same extension with different ID's if the extension:

  • Contains build tasks
  • The GUID of these tasks is unchanged

It may make sense to use Named Guids to generate a unique guid based on: extensionid, publisherid, taskname.

http://stackoverflow.com/a/5657517/736079

Will need to investigate.

@jessehouwing
Copy link
Collaborator Author

jessehouwing commented Jan 15, 2017

At the moment, given how the marketplace rejects duplicate ID's, the whole usage of overriding extension Id, Tag, Publisher is broken in this extension when the extension contains build tasks.

Experimental branch pushed to:
https://github.com/Microsoft/vsts-extension-build-release-tasks/tree/features/uuidv5

@bryanmacfarlane, @trevorsg, @ericsciple, @willsmythe
Does this make sense to you? I'm using uuidv5 to generate a unique id for each task based on:

  • Publisher
  • ExtensionId
  • ExtensionTag (which is appended to the Id)
  • TaskName

Optionally it could use the existing UUID of the task as an input into the generation as well.

        let extensionNs = uuidv5("null", `${ns.Publisher}.${ns.ExtensionId}`, true);
        extensionNs     = uuidv5(extensionNs, manifestJSON.id, true);
        manifestJSON.id = uuidv5(extensionNs, manifestJSON.name, false);

The current implementation is hacked in, only works when building from manifest and only when Publisher and ExtensionId are specified as overrides in the tasks configuration. So it needs refactoring to work. It could also be something that tfx could handle for me instead...

This way if someone wants to fork my repo and wants to publish under their own publisher, it will automatically generate unique id's for that publisher and will prevent collisions.

@DariuszPorowski
Copy link
Member

I'd like to create full DevOps experience for my own extension and I stop on IDs duplication, so, it will be nice to have feature for generate and override tasks ID.

@jessehouwing
Copy link
Collaborator Author

Got this from the marketplace team:

The marketplace changes are deployed now. You should be able to able to now publish private extensions without having to change the task id.

This would suggest we won't need to regenerate UUID's, which is a good thing!

@jgarverick
Copy link

jgarverick commented Feb 15, 2017 via email

@colindembovsky
Copy link
Contributor

There is another case which is hard to handle. When you have multiple build tasks in your extension, you can use the "Update Task version" switch to update the version of the tasks within the extension. But what if you want to update the major number of one of the tasks (for a breaking change)? You could update the major version of the entire extension, but then all the tasks would have their major versions revved.

It would be great if the Create/Publish extension tasks had an option to just update the rev of the build tasks within the extension. That way I could specify 1.0.1 for some tasks and 2.0.1 for other tasks - when the build runs, it will update to 1.0.x and 2.0.x respectively (using the build $rev variable).

@jessehouwing
Copy link
Collaborator Author

Currently not needed. Closing.

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

No branches or pull requests

4 participants