Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Deploy modules not honoring modules root #371

Closed
paxtonhare opened this issue Feb 10, 2015 · 8 comments
Closed

Deploy modules not honoring modules root #371

paxtonhare opened this issue Feb 10, 2015 · 8 comments

Comments

@paxtonhare
Copy link
Contributor

server_config.rb line 1155ish:

total_count = load_data xquery_dir,
                              :add_prefix => "/",
                              :remove_prefix => xquery_dir,

should be:

total_count = load_data xquery_dir,
                              :add_prefix => @properties["ml.modules-root"],
                              :remove_prefix => xquery_dir,
@grtjn
Copy link
Contributor

grtjn commented Feb 10, 2015

Sure that is a bug? I'd expect src/ paths to load as is..

@paxtonhare
Copy link
Contributor Author

Let's say I have my modules root set in my http server to /app/version2/.

That means that my http server treats /app/version2/ as / when service up xquery files.

Now if my src/ dir on my drive looks like:

src/some.xqy

and it gets loaded on the server to /some.xqy then it will be invisible to my appserver.

But if we make the change I proposed above, the file will be loaded to /app/version2/some.xqy and will appear to the http server as /some.xqy.

@grtjn do you still think it's not a bug?

@grtjn
Copy link
Contributor

grtjn commented Feb 10, 2015

I think it depends on what you would expect the deployer to do. :)

How I used it:

  • src/app1/some.xqy
  • src/app2/some2.xqy
  • app1 with root /app1/
  • app2 with root /app2/

So, if you have an app with /app/version2/ as root, I'd expect some.xqy on the path src/app/version2/some.xqy

I do see where you want to go, but that is new functionality I think. I would propose introducing a new property for that, something like modules-root-prefix=/app/version2

@grtjn
Copy link
Contributor

grtjn commented Feb 10, 2015

Or better: modules-prefix=/app/version2

@paxtonhare
Copy link
Contributor Author

Ok, Geert. I agree that it is an enhancement rather than a bug. And I like modules-prefix.

I'll add a modules-prefix=/ to the default.properties and then in server_config.rb I'll do:

total_count = load_data xquery_dir,
                              :add_prefix => @properties["ml.modules-prefix"],
                              :remove_prefix => xquery_dir,

Sound good to you?

@grtjn
Copy link
Contributor

grtjn commented Feb 10, 2015

Sounds excellent! :)

@grtjn grtjn modified the milestone: 1.7.2 Feb 20, 2015
@grtjn
Copy link
Contributor

grtjn commented Feb 20, 2015

@paxtonhare were you working on a PR for this?

@paxtonhare
Copy link
Contributor Author

I had planned to work on it but got distracted. No current plans to do this right now.

grtjn added a commit to grtjn/roxy that referenced this issue Feb 24, 2015
paxtonhare added a commit that referenced this issue Mar 10, 2015
Fixed #371: added modules-prefix support
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants