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

should add extension path variables dynamically #35

Closed
hoatle opened this issue Oct 10, 2018 · 8 comments
Closed

should add extension path variables dynamically #35

hoatle opened this issue Oct 10, 2018 · 8 comments

Comments

@hoatle
Copy link
Member

hoatle commented Oct 10, 2018

so that extension configs should have the right path, for example, chef cookbooks_path for https://github.com/teracyhq-incubator/teracy-dev-v05-compat/pull/2/files

We should have <extension-name>-path variable so that, only enabled extensions will have the associated <extension-name>-path, the path should not include slash character (/) at the end.

      cookbooks_path:
        - teracy-dev-v05-compat/vendor-cookbooks
        - teracy-dev-v05-compat/main-cookbooks

should become:

      cookbooks_path:
        - "%{teracy-dev-v05-compat-path}/vendor-cookbooks"
        - "%{teracy-dev-v05-compat-path}/main-cookbooks"

By supporting this, teracyhq-incubator/teracy-dev-v05-compat#2 will not have to create a new configurator but using yaml config only.

@hoatle
Copy link
Member Author

hoatle commented Oct 10, 2018

assigned to @phuonglm to handle this for the related PR.

@hoatle
Copy link
Member Author

hoatle commented Oct 10, 2018

you can create: processors/extension_path.rb to work on this and register this processor before the variables.rb processor then it should work.

@hoatle
Copy link
Member Author

hoatle commented Oct 10, 2018

settings['variables'] should be updated to include these dynamic vars

@hoatle
Copy link
Member Author

hoatle commented Oct 10, 2018

related: teracyhq/dev#497

If the above improvement is done, we can implement the feature of this issue on any extensions instead of waiting for teracy-dev-core.

@hoatle
Copy link
Member Author

hoatle commented Oct 10, 2018

this should be done quickly, I guess it should not take more than 2 hours.

@hoatle
Copy link
Member Author

hoatle commented Oct 10, 2018

extension_path = File.join(extension['path']['lookup'] || TeracyDev::DEFAULT_EXTENSION_LOOKUP_PATH,  extension['path']['extension'])

You can use Util.extension_lookup_path if suitable for the lookup_path

@hoatle
Copy link
Member Author

hoatle commented Oct 10, 2018

this can be postponed, we don't have to rush for this, so assigned to @hieptranquoc for the next sprint instead.

@hoatle
Copy link
Member Author

hoatle commented Oct 11, 2018

this cannot be postponed, required for teracyhq-incubator/teracy-dev-v05-compat#1

phuonglm added a commit to phuonglm/teracy-dev-core that referenced this issue Oct 11, 2018
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

3 participants