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

[FLINK-15683][docs] Restructure Configuration page #10982

Closed
wants to merge 7 commits into from

Conversation

StephanEwen
Copy link
Contributor

What is the purpose of the change

This restructures the documentation page to make it less confusing and more easily digestible for users. This also removes some outdated/confusing/misleading background sections.

The improvements are twofold:

  • Group the parameters by "use case" and "user-facing behavior", rather than by the class in which they are defined.
  • Distinguish between parameters that are required or typically use to set up some functionality, and parameters you should not worry about in most cases (only you really need to do advanced trouble-shooting).

Annotation 2020-01-31 103900

Follow-up

This PR does not yet update and descriptions or resolve the issue that (none) as the default value does not tell the user if this is a required parameter (for a certain feature), it has an internal default behavior or fallback, or it is purely optional.

Brief change log

Main changes:

Additional changes:

  • Removes outdated section on HDFS config variables
  • Removes outdated background section and places extra links to other parts of the docs in the relevant sections.

@flinkbot
Copy link
Collaborator

Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
to review your pull request. We will use this comment to track the progress of the review.

Automated Checks

Last check on commit f691121 (Fri Jan 31 09:47:23 UTC 2020)

Warnings:

  • This pull request references an unassigned Jira ticket. According to the code contribution guide, tickets need to be assigned before starting with the implementation work.

Mention the bot in a comment to re-run the automated checks.

Review Progress

  • ❓ 1. The [description] looks good.
  • ❓ 2. There is [consensus] that the contribution should go into to Flink.
  • ❓ 3. Needs [attention] from.
  • ❓ 4. The change fits into the overall [architecture].
  • ❓ 5. Overall code [quality] is good.

Please see the Pull Request Review Guide for a full explanation of the review process.


The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commands
The @flinkbot bot supports the following commands:

  • @flinkbot approve description to approve one or more aspects (aspects: description, consensus, architecture and quality)
  • @flinkbot approve all to approve all aspects
  • @flinkbot approve-until architecture to approve everything until architecture
  • @flinkbot attention @username1 [@username2 ..] to require somebody's attention
  • @flinkbot disapprove architecture to remove an approval you gave earlier

@flinkbot
Copy link
Collaborator

flinkbot commented Jan 31, 2020

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run travis re-run the last Travis build
  • @flinkbot run azure re-run the last Azure build

Copy link
Contributor

@aljoscha aljoscha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I had some remarks about typos, though. This showed me, however, that our naming of cluster components is a bit difficult, because most of the documentation/config options refer to the "Flink Master" as JobManager, which is at odds with the glossary (https://ci.apache.org/projects/flink/flink-docs-master/concepts/glossary.html)


## Common Options
If you use Flink with [Yarn]({{site.baseurl}}/ops/deployment/yarn_setup.html), [Mesos]({{site.baseurl}}/ops/deployment/mesos.html), or the [*active* Kubernetes integration]({{site.baseurl}}/ops/deployment/native_kubernetes.html), the hostnames and ports get automatically configured are automatically discovered.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If you use Flink with [Yarn]({{site.baseurl}}/ops/deployment/yarn_setup.html), [Mesos]({{site.baseurl}}/ops/deployment/mesos.html), or the [*active* Kubernetes integration]({{site.baseurl}}/ops/deployment/native_kubernetes.html), the hostnames and ports get automatically configured are automatically discovered.
If you use Flink with [Yarn]({{site.baseurl}}/ops/deployment/yarn_setup.html), [Mesos]({{site.baseurl}}/ops/deployment/mesos.html), or the [*active* Kubernetes integration]({{site.baseurl}}/ops/deployment/native_kubernetes.html), the hostnames and ports are automatically discovered.


* This will be replaced by the TOC
{:toc}
These options are only necessary for a *standalone* application- or session deployments ([simple standalone]({{site.baseurl}}/ops/deployment/cluster_setup.html) or [Kubernetes]({{site.baseurl}}/ops/deployment/kubernetes.html)).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
These options are only necessary for a *standalone* application- or session deployments ([simple standalone]({{site.baseurl}}/ops/deployment/cluster_setup.html) or [Kubernetes]({{site.baseurl}}/ops/deployment/kubernetes.html)).
These options are only necessary for *standalone* application- or session deployments ([simple standalone]({{site.baseurl}}/ops/deployment/cluster_setup.html) or [Kubernetes]({{site.baseurl}}/ops/deployment/kubernetes.html)).


This data is NOT relied upon for persistence/recovery, but if this data gets deleted, it typically causes a heavyweight recovery operation. It is hence recommended to set this to a directory that is not automatically periodically purged.

Yarn, Mesos, and Kubernets setups automatically configure this value to the local working directories by default.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Yarn, Mesos, and Kubernets setups automatically configure this value to the local working directories by default.
Yarn, Mesos, and Kubernetes setups automatically configure this value to the local working directories by default.

@zentol zentol self-assigned this Jan 31, 2020
Copy link
Contributor

@zentol zentol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

expert_security_ssl_section.html isn't used anywhere, is this intentional?


## Common Options
If you use Flink with [Yarn]({{site.baseurl}}/ops/deployment/yarn_setup.html), [Mesos]({{site.baseurl}}/ops/deployment/mesos.html), or the [*active* Kubernetes integration]({{site.baseurl}}/ops/deployment/native_kubernetes.html), the hostnames and ports get automatically configured are automatically discovered.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If you use Flink with [Yarn]({{site.baseurl}}/ops/deployment/yarn_setup.html), [Mesos]({{site.baseurl}}/ops/deployment/mesos.html), or the [*active* Kubernetes integration]({{site.baseurl}}/ops/deployment/native_kubernetes.html), the hostnames and ports get automatically configured are automatically discovered.
If you use Flink with [Yarn]({{site.baseurl}}/ops/deployment/yarn_setup.html), [Mesos]({{site.baseurl}}/ops/deployment/mesos.html), or the [*active* Kubernetes integration]({{site.baseurl}}/ops/deployment/native_kubernetes.html), the hostnames and ports get automatically configured.

?


{% include generated/core_configuration.html %}
The default memory sizes support simple streaming/batch applications, but are too low to yield good performance on more complex applications.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The default memory sizes support simple streaming/batch applications, but are too low to yield good performance on more complex applications.
The default memory sizes support simple streaming/batch applications, but are too low to yield good performance for more complex applications.


String SECTION_COMMON = "common";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

common_section.html isn't used anymore, but it seems like some classes are still grouped into a generic common section.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually not, no, this variable is unused. Can remove it.

@@ -33,34 +30,33 @@
/**
* The set of configuration options relating to security.
*/
@PublicEvolving
@ConfigGroups(groups = {
@ConfigGroup(name = "Kerberos", keyPrefix = "security.kerberos"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you opt for replacing the ConfigGroups here, but kept them for env in CoreOptions?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No specific reason. It is rework step by step. Not everything is migrated in the first step.
At the moment there are still parts that are generated by Class / ConfigGroup, while others are generated by Section option.

In the long run, I would suggest to do everything by section option, that is simpler. But I didn't want just do this without doing a this first rework and see how this model serves us.

Copy link
Contributor

@zentol zentol Jan 31, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

section option [are] simpler

This is debatable. The ConfigGroups were written on purpose the way they are so that devs can add new options without having to worry or even know how the docs are generated. You could just add a new kerberos option and it would just work.

Meanwhile, if a dev now adds an option they have to decide whether the option is common/expert, and if they forget to add any of the annotations are at risk of the option not being documented at all.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The core issue I have here is that we introduce an inconsistency in how options are translated into include files, which make it impossible to implement any safeguards to prevent dev errors. In my example above, the generator won't complain about a new ssl option being added without a common/expert annotation, because it will still be added to the file we generate for each config class by default, and the generator assumes that all include files are used in the documentation.

If on the other hand we would completely remove config groups, and the default include file per config class, then we could mandate that every new option must have a section annotation. This we could easily enforce.

@zentol
Copy link
Contributor

zentol commented Jan 31, 2020

Please provide a reason for every option that is excluded from the documentation.

@zentol
Copy link
Contributor

zentol commented Jan 31, 2020

While the separate into common/expert options makes sense, it seems quite inconvenient to not have them in unified form somewhere. Having to scoll up/down to get a full overview over related options can be rather tiresome :)

@StephanEwen
Copy link
Contributor Author

StephanEwen commented Jan 31, 2020

About the layout / splitting. Would be happy if someone would make another pass after that and further improve this. The stat here is the best that came to my mind and it should already be much better than what we have at the moment, the benefits outweigh the problems by far, so would like to not hold it back for now.

About excluded options: I think I excluded only options that were previously also deprecated / not recommended any more.

  • web.* options subsumed by rest.*
  • ssl.* options that should rather be ssl.internal.* and ssl.rest.*
  • miscellaneous previous oversights.

Do you see some that I accidentally excluded?

@StephanEwen
Copy link
Contributor Author

The "expert_security_ssl_section.htm" was overlooked. Trying to adjust the coverage tests (they currently fail) to make sure these things are called automatically now.

bdine and others added 5 commits January 31, 2020 18:38
…ionOption

  - Rename '@SectionOption' to '@section' for brevity

  - Rename '@Section.sections()' to '@Section.value()'
    That way, the method name can be skipped when only sections (no positions) are specified,
    which should is the common case after config documentation rework is complete.

  - Adjust test for @section annotation
@StephanEwen StephanEwen force-pushed the restructure_docs branch 2 times, most recently from 8e5e3de to 87b1124 Compare January 31, 2020 17:44
@StephanEwen
Copy link
Contributor Author

Pushed a some fixes

  • including the previously missing generated section expert_security_ssl_section.html
  • Fixing the tests

@@ -95,6 +94,7 @@
* @deprecated Use {@link #SSL_INTERNAL_ENABLED} and {@link #SSL_REST_ENABLED} instead.
*/
@Deprecated
@Documentation.ExcludeFromDocumentation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, deprecated options are already excluded from the documentation.

@zentol
Copy link
Contributor

zentol commented Jan 31, 2020

About excluded options: I think I excluded only options that were previously [ ... ] not recommended any more.

Looking at the affected options (ssl.*, local.number-resourcemanager) there was, and still is, no indication that they aren't recommended anymore. Anyone looking at the option now just sees a random exclude that may have been added for a myriad of reasons.
Hence my question; all I saw was a perfectly fine looking option being excluded from the docs.

If the ssl.* options aren't supposed to be used anymore they should properly deprecated, likely with deprecated keys on the new options, as should the web option, as should local.number-resourcemanager since (apparently) it isn't even used anymore.

@StephanEwen
Copy link
Contributor Author

I can add a notice why these are excluded.

Side note: the local.number-resourcemanager options (and similar local.*) should never have been a documented option in the first place. These were only used to be passed to the mini cluster, never had any effect in the flink-conf.yaml.

@StephanEwen
Copy link
Contributor Author

Pushed a fix addressing the latest comments.

If the ssl.* options aren't supposed to be used anymore they should properly deprecated, likely with deprecated keys on the new options, as should the web option, as should local.number-resourcemanager since (apparently) it isn't even used anymore.

  • I think the SSL options are slightly more complex to resolve than just with deprecated keys. That's why I went with only removing them from the config section for now.
  • The local.number-resourcemanager is indeed not used any more, added a @Deprecated instead.
  • The web.address option should have been deprecated before (probably overlooked back then). As far as I can tell they are also unused (only referenced as fallback keys).

  - Grouping options by semantics and functionality, rather than by defined class.
  - Splitting between "normal/common options" and options that should only be necessary
    for trouble-shooting.
@StephanEwen
Copy link
Contributor Author

Merged in

@StephanEwen StephanEwen closed this Feb 4, 2020
@StephanEwen StephanEwen deleted the restructure_docs branch February 19, 2020 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants