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

make it so serviceData.json detects changes in service metadata #161

Open
kwatters opened this issue May 23, 2018 · 4 comments
Open

make it so serviceData.json detects changes in service metadata #161

kwatters opened this issue May 23, 2018 · 4 comments

Comments

@kwatters
Copy link
Contributor

When changing metadata on a service (dependencies) the serviceData.json file needs to be deleted and re-generated. It would be nice if this was a bit more auto-magic so it's not as confusing for developers.

alternatively, just get rid of the service data all together and compute it dynamically on startup. The only info that we would need to keep around is the status to determine if a service has been installed.

@supertick
Copy link
Contributor

supertick commented May 23, 2018

you can't compute it dynamically on startup - (at least in the jar - unless you explode the whole thing like a war file) ... the rub is the names of the classes in that package.

There is no way to determine the classnames of a package when its in jar form, unless you scan through "all" files of the jar - (shocking isn't it ?). So serviceData.json is maintained by a generator - if it can't find the file it makes it.

MRL looks to see if it can be loaded as a resource, if it cannot load it, the generator will generate serviceData.json ... when it generates it, the generator scans the directory of source files to get the initial list of service names ..

This potentially could be replace by maintaining a package-info.java ... but I haven't crossed over into that system ..

@moz4r
Copy link
Contributor

moz4r commented Jul 13, 2018

more magic ! serviceData.json made me crazy sometime

@kwatters
Copy link
Contributor Author

ok. i've updated the pom to make sure it cleans up the serviceData.json from a previous build. I think this will fix it.. but we will need to test. The next time we change version numbers of something in the getMetaData for a service we'll need to verify it pulls down the correct jars when the build comes from the cookie oven.

@supertick
Copy link
Contributor

moving to test column

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

No branches or pull requests

3 participants