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

Introduce per-module configuration file #114

Closed
bartoszmajsak opened this Issue Aug 21, 2017 · 7 comments

Comments

@bartoszmajsak
Member

bartoszmajsak commented Aug 21, 2017

Add ability to overwrite configuration defined by root smart-testing.yaml file within each project module.

Current assumption: we require to have a file in the root folder as an enabler for our tool.

  • implement precedence logic
  • update documentation (In Progess)
  • add ability for Test Bed to define per-module configuration (and at adjust at least one existing test)
@bartoszmajsak

This comment has been minimized.

Show comment
Hide comment
@bartoszmajsak

bartoszmajsak Aug 21, 2017

Member

Requires #113 to be in place

Member

bartoszmajsak commented Aug 21, 2017

Requires #113 to be in place

@lordofthejars

This comment has been minimized.

Show comment
Hide comment
@lordofthejars

lordofthejars Sep 27, 2017

Member

Not directly related with this issue, but something to have in mind. Here we are talking all the time about having configuration per module, but I see another level and it is been able to create files with suffix in each of the module. For example in case of local development you might want to run with selecting mode meanwhile in ci/cd in ordering mode.

I know that you can change this property using a system property but this affects gloably, so having something like:

smart-testing.yml this is always loaded then you can have smart-testing-commit-stage.yml and if and only if a property called stage is set to commit-stage, data of smart-testing.yml is overriden by the one from smart-testing-commit-stage.yml.

Member

lordofthejars commented Sep 27, 2017

Not directly related with this issue, but something to have in mind. Here we are talking all the time about having configuration per module, but I see another level and it is been able to create files with suffix in each of the module. For example in case of local development you might want to run with selecting mode meanwhile in ci/cd in ordering mode.

I know that you can change this property using a system property but this affects gloably, so having something like:

smart-testing.yml this is always loaded then you can have smart-testing-commit-stage.yml and if and only if a property called stage is set to commit-stage, data of smart-testing.yml is overriden by the one from smart-testing-commit-stage.yml.

@bartoszmajsak

This comment has been minimized.

Show comment
Hide comment
@bartoszmajsak

bartoszmajsak Sep 27, 2017

Member

Maybe we can have a way of defining a sequence of files with the precedence instead (and some reasonable default?). Maybe even activation on a property?

Member

bartoszmajsak commented Sep 27, 2017

Maybe we can have a way of defining a sequence of files with the precedence instead (and some reasonable default?). Maybe even activation on a property?

@lordofthejars

This comment has been minimized.

Show comment
Hide comment
@lordofthejars

lordofthejars Sep 28, 2017

Member

The problem is that maybe someone wants 3 different kind of configurations others 2 others 5, so I think that make it as generic as possible is the best way. So the sequence is smart-testing.yml and if property set smart-testing-xxx.yml. So it is the user who defines the suffix.

Member

lordofthejars commented Sep 28, 2017

The problem is that maybe someone wants 3 different kind of configurations others 2 others 5, so I think that make it as generic as possible is the best way. So the sequence is smart-testing.yml and if property set smart-testing-xxx.yml. So it is the user who defines the suffix.

@bartoszmajsak

This comment has been minimized.

Show comment
Hide comment
@bartoszmajsak

bartoszmajsak Sep 28, 2017

Member

That's exactly what I had in mind.

Member

bartoszmajsak commented Sep 28, 2017

That's exactly what I had in mind.

@lordofthejars

This comment has been minimized.

Show comment
Hide comment
@lordofthejars

lordofthejars Sep 28, 2017

Member

Sorry to not understand you at first 😆

Member

lordofthejars commented Sep 28, 2017

Sorry to not understand you at first 😆

@MatousJobanek

This comment has been minimized.

Show comment
Hide comment
@MatousJobanek

MatousJobanek Nov 10, 2017

Contributor
  • create inherit parameter that will point to either absolute or relative path (working transitively)
    • if there is no inheritance then the file should be valid
    • if there is no file in submodule, look for the project (submodule) parent config file
  • use disable parameter only as a local param - no look-up
parent
 - config
   - smart-testing.yml (1)
   -- api
   -- impl-base
   -- spi
     - smart-testing.yml
 - container
    -- container-api
    -- containerl-impl
 - smart-testing.yml

if I run from parent then it should use the parent/config/smart-testing.yml for both config/api config/impl-base, but for config/spi it will use that one from the spi directory.

(1) inside this file we have inherit: ../smart-testing.yml so it will take all properties undefined in this file from the one in parent/smart-testing.yml.

Contributor

MatousJobanek commented Nov 10, 2017

  • create inherit parameter that will point to either absolute or relative path (working transitively)
    • if there is no inheritance then the file should be valid
    • if there is no file in submodule, look for the project (submodule) parent config file
  • use disable parameter only as a local param - no look-up
parent
 - config
   - smart-testing.yml (1)
   -- api
   -- impl-base
   -- spi
     - smart-testing.yml
 - container
    -- container-api
    -- containerl-impl
 - smart-testing.yml

if I run from parent then it should use the parent/config/smart-testing.yml for both config/api config/impl-base, but for config/spi it will use that one from the spi directory.

(1) inside this file we have inherit: ../smart-testing.yml so it will take all properties undefined in this file from the one in parent/smart-testing.yml.

dipak-pawar added a commit to dipak-pawar/smart-testing that referenced this issue Nov 15, 2017

dipak-pawar added a commit that referenced this issue Dec 13, 2017

feat(#114): implements configuration file per module. (#262)
* feat(#114): Implement configuration file per module.

* Adds changes as per review

* Implemented map level inheritance

* use Deque for implentation

* Rename method def in config file builder

* Adds changes as per review

* * overwrite inner properties
* add configurationchecker & moduleSTInstallationChecker

* * documentation changes
* code refactoring

* Moved all skipChecker to checker package

* Merging into one test

* Update documentation

* Use SkipSTInstallationChecker in SmartTestingMavenConfigure

* update doc

* make mapToObject static

* moved SkipSTInstannationChecker logic to SkipInstallationChecker

@bartoszmajsak bartoszmajsak added this to the 0.0.6 milestone Dec 14, 2017

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