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

Improve config key descriptions #819

Merged
merged 7 commits into from
Sep 15, 2017

Conversation

aledsage
Copy link
Contributor

See individual commits for details.

Note the last two commits make significant changes to config:

  • remove the default for launch.command of VanillaSoftwareProcess.
  • Rename some config keys (deprecating the old names) for latch.* and skip.*.

Also marks some most important config keys as ‘CatalogConfig’.

And fixes some deprecation warnings in ConfigKey declarations.
Previously value was `./start.sh` which was confusing if someone saw
it in an error message, and was pretty much never right.
More consistent naming will help, especially in UIs where config is
listed in alphabetical order - the “latch.*” config will all be 
together.

(Deprecates old values).
@aledsage
Copy link
Contributor Author

retest this please

Copy link
Member

@tbouron tbouron left a comment

Choose a reason for hiding this comment

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

Very minor comments but LGTM, thanks @aledsage !

On a side note, I'm wondering if we should also take care of icons for the various entities/enrichers/policies. I appreciate that it's not in the scope of this PR but worth thinking about it since we are improving catalog items

String.class, "download.url", "URL pattern for downloading the installer (will substitute things like ${version} automatically)");
String.class,
"download.url",
"URL pattern for downloading the installer (will substitute things like ${version} automatically)");
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't it just say uses FreeMarker templating format to be consistent with the other description below?

Map.class, "download.addon.urls", "URL patterns for downloading named add-ons (will substitute things like ${version} automatically)");
Map.class,
"download.addon.urls",
"URL patterns for downloading named add-ons (will substitute things like ${version} automatically)");
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't it just say uses FreeMarker templating format to be consistent with the other description below?


public static final ConfigKey<Duration> START_TIMEOUT = newConfigKey(
"start.timeout", "Time to wait for process and for SERVICE_UP before failing (in seconds, default 2m)", Duration.seconds(120));
"start.timeout",
"Time to wait, after launching, for SERVICE_UP before failing (default to '2m')",
Copy link
Member

Choose a reason for hiding this comment

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

Not sure the default needs to be written in the description. Would be hard to maintain and the CLI / UI have access to this info anyway.

new TypeToken<EntitySpec<?>>() {}, "dynamiccfabric.memberspec", "entity spec for creating new cluster members", null);
new TypeToken<EntitySpec<?>>() {},
"dynamiccfabric.memberspec",
"entity spec for creating new members (one per location)",
Copy link
Member

Choose a reason for hiding this comment

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

s/entity/Entity/

new TypeToken<EntitySpec<?>>() {}, "dynamiccfabric.firstmemberspec", "entity spec for creating new cluster members", null);
new TypeToken<EntitySpec<?>>() {},
"dynamiccfabric.firstmemberspec",
"entity spec for the first member",
Copy link
Member

Choose a reason for hiding this comment

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

s/entity/Entity/

@aledsage
Copy link
Contributor Author

Thanks @tbouron - comments addressed.

@drigodwin I believe you were also looking at this? Ready to merge?

Copy link
Member

@drigodwin drigodwin 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, thanks @aledsage

"'all', 'allAndAtLeastOne', 'atLeastOne', 'atLeastOneUnlessEmpty', 'alwaysHealthy'", "allAndAtLeastOne");

public static final ConfigKey<Integer> QUORUM_TOTAL_SIZE = ConfigKeys.newIntegerConfigKey(
"quorum.total.size", "The total size to consider when determining if quorate", 1);
"quorum.total.size",
"The total size to consider when determining if quorate (used iwth transformation of type 'isQuorate')", 1);
Copy link
Member

Choose a reason for hiding this comment

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

typo iwth -> with

public static final ConfigKey<Boolean> SKIP_ENTITY_START_IF_RUNNING = ConfigKeys.builder(Boolean.class)
.name("skip.start.ifRunning")
.deprecatedNames("entity.running")
.description("Whether to skip the startup process entirely, but only if it already running")
Copy link
Contributor

Choose a reason for hiding this comment

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

Whether to skip the startup process if the entity is detected as already running ?

public static final ConfigKey<Sensor<?>> TARGET_SENSOR = ConfigKeys.newConfigKey(new TypeToken<Sensor<?>>() {},
"enricher.targetSensor");
"enricher.targetSensor",
"The sensor that will be set on the associated entity, with the target value");
Copy link
Contributor

Choose a reason for hiding this comment

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

The sensor to be set on the associated entity with the value computed here ?

@ahgittin
Copy link
Contributor

a couple minor suggestions of wording

LGTM

as per @tbouron - icons v important (more important than config description IMHO!)

@tbouron
Copy link
Member

tbouron commented Sep 14, 2017

@aledsage I just realised that you miss one more bom file in karaf/init/src/main/resources/catalog-classes.bom. This one is the base for the karaf distribution.

(I think we should reuse the same base bom files for the classic and Karaf distributions, but not in the scope of this PR)

@aledsage
Copy link
Contributor Author

@ahgittin @tbouron @drigodwin thanks for comments - incorporated in an additional commit. Is it ok to merge (with icons being separate from this PR)?

@tbouron
Copy link
Member

tbouron commented Sep 15, 2017

@aledsage Ok to me 👍 (build failure looks unrelated)

Copy link
Member

@drigodwin drigodwin left a comment

Choose a reason for hiding this comment

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

Thanks @aledsage

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