petrbroz / vscode-forge-tools

Visual Studio Code extension for accessing Autodesk Forge services and content.
https://marketplace.visualstudio.com/items?itemName=petrbroz.vscode-forge-tools
MIT License
74 stars 17 forks source link

Add region selection for the derivative service #32

Closed adamenagy closed 3 years ago

adamenagy commented 3 years ago

At the moment you can specify in which region buckets should be created, but cannot specify in which region the translation should take place. Some customers have files in EMEA but did the translation in the US, in which case those derivatives will not show up in the tree component.

It would be nice if I could specify the region for the derivative service that should be used for related operations.

petrbroz commented 3 years ago

Adding a new option to the Translate Object (Custom) command would be easy but I'm afraid that it would actually make the overall experience much less intuitive. Here's why:

Currently, the vscode extension can only be used with one region at a time. If you configure your environment to use the US region, the tree view will only show OSS buckets, objects, and their derivatives from the US region. If you started a translation with a different target region, no derivatives (and probably no progress indication either) would appear in the tree view.

While the derivatives are generally independent from their source designs (i.e., they can live in different regions, and they can be available even after their source design was removed), the vscode extension limits this freedom by "closely tying" the derivatives to their source designs, because the tree view structure lends itself nicely to this kind of relationship.

petrbroz commented 3 years ago

Following up on our offline discussion, here's a potential solution:

petrbroz commented 3 years ago

After giving this some more thought, I've decided not to support cross-region derivatives for now. If there's an increased demand for this capability in the future, we could reconsider it, but as of now - considering the inconsistencies in the Model Derivative service itself - I'm afraid that it would only hinder the user experience.

For now, I have reported this issue as a known limitation in the README, and I've updated the error reporting logic to provide more info and guidance in case of the 406 errors.