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

Create feature toggle for analytics, stream, and task endpoints #640

Closed
markpollack opened this issue Jun 1, 2016 · 3 comments
Closed
Assignees
Milestone

Comments

@markpollack
Copy link
Contributor

markpollack commented Jun 1, 2016

As a developer, I would like to individually enable/disable the analytics, stream, and job controller features. This will enable users to

  • Avoid dependency on Redis if there is no need to use analytics functionality (common for batch centric use-case deployments)
  • Not expose additional endpoints if they are not to be used, e.g. current spring-batch-admin users that would like to use SCDF's UI/endpoints and not be exposed to any stream API/concepts. Similar case for stream only users.

The features would be defined by the config

spring:
  cloud:
    dataflow:
      features:
        analyticsEnabled: true
        streamsEnabled:  true
        tasksEnabled: true

by default. Tasks support includes job support.

A features/ endpoint will need to be created to will indicate which features are enabled/disabled so the UI/Shell can take the appropriate actions. There is similar information for security already exposed under /security/info - we should consolidate the security information to be serves up under the features endpoint as well even though security is not configured under the features yaml section.

There will be related issues to handle this on a per-server basis and for the UI/Shell and also for PCF and Mesos servers so that task support is overridden to be false.

Only when enabling tasks or streams would corresponding schemas be created in the database, otherwise no schemas would be created.

@markfisher
Copy link
Contributor

Would it make sense to consider using profiles? In any case, perhaps the UI could just consult the existing /env endpoint to find the properties.

@markpollack
Copy link
Contributor Author

markpollack commented Jun 1, 2016

The /env endpoint isn't something that is normally exposed (''sensitive' = true by default) and it probably would expose more than we want such as database usernames/password. Though profiles could work in as much as we just have boolean values.

I was thinking that we might want this to be a bit more first class in the naming as I was reading through http://www.togglz.org/ They do have a bit of a strange binding there - see the end of http://www.togglz.org/documentation/spring-boot-starter.html for some yaml.

@ghillert
Copy link
Contributor

ghillert commented Jun 1, 2016

Profiles are certainly possible also. but we also need to serialize the features via the rest endpoint. Thus, maybe having a Boot compatible Features configuration classes would make sense here in regards to usability. So you have 1 class that encapsulates the features. With profiles it seems like we will have different data representations to deal with.

@sabbyanandan sabbyanandan added this to the 1.0.0.RC1 milestone Jun 6, 2016
@ilayaperumalg ilayaperumalg self-assigned this Jun 7, 2016
@ilayaperumalg ilayaperumalg removed their assignment Jun 7, 2016
ilayaperumalg added a commit to ilayaperumalg/spring-cloud-dataflow that referenced this issue Jun 9, 2016
 - Refactor DataflowServerConfiguration and split specific configuration classes that can be conditionally loaded based on the features
 - Add FeaturesProperties that provides flags for streams, tasks and analytics
 - When disabled, the appropriate repositories, controllers and database schema are disabled as well
 - Add separate rdbms schema which get loaded conditionally based on what is enabled
 - Rename dataflow rdbms initializer property from `spring.cloud.dataflow.server.initialize.enable` to `spring.cloud.dataflow.rdbms.initialize.enable`
 - Add `/features/info` endpoint to display features properties
 - Add tests
 - Intiailize the REST endpoints conditionally based on the features properties
 - Fix Shell to conditionally initialize the required dataflow shell operations

This resolves spring-cloud#640
@ericbottard ericbottard removed the in pr label Jun 10, 2016
corneil pushed a commit that referenced this issue Mar 23, 2023
- Upgrade to gradle 4.7 to bring in native support
  for junit5.
- Add tests for 1.0.3 to 1.1.0.
- Start using junit tags so that we can split
  tests and run those it sets.
- Fix from versions in spring-cloud-skipper-acceptance-image-legacy104
- Fixes #640
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

Successfully merging a pull request may close this issue.

6 participants