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

removing schema references from vis types #20489

Merged
merged 4 commits into from
Jul 12, 2018

Conversation

ppisljar
Copy link
Member

@ppisljar ppisljar commented Jul 5, 2018

Part of #19813 effort

removes agg.schema references from agg_types (and some other places)

note: aggConfig.schema.group === aggConfig.type.type

@ppisljar ppisljar added WIP Work in progress Feature:Visualizations Generic visualization features (in case no more specific feature label is available) labels Jul 5, 2018
@elasticmachine
Copy link
Contributor

💔 Build Failed

@ppisljar ppisljar force-pushed the fix/removeSchemaFromAggTypes branch from d5b245f to dc5df37 Compare July 5, 2018 16:11
@elasticmachine
Copy link
Contributor

💔 Build Failed

@ppisljar ppisljar force-pushed the fix/removeSchemaFromAggTypes branch from dc5df37 to 954b9c2 Compare July 9, 2018 12:17
@elasticmachine
Copy link
Contributor

💔 Build Failed

@ppisljar ppisljar force-pushed the fix/removeSchemaFromAggTypes branch from 954b9c2 to 1de5a16 Compare July 9, 2018 14:04
@elasticmachine
Copy link
Contributor

💔 Build Failed

@ppisljar
Copy link
Member Author

ppisljar commented Jul 9, 2018

x-pack failiure

jenkins, test this

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@ppisljar ppisljar added review v6.4.0 and removed WIP Work in progress labels Jul 9, 2018
@ppisljar ppisljar requested review from markov00, nreese and timroes July 9, 2018 20:36
Copy link
Member

@markov00 markov00 left a comment

Choose a reason for hiding this comment

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

I've left few comments on the naming of the agg type type

@@ -105,7 +105,7 @@ export class MetricVisComponent extends Component {
table.columns.forEach((column, columnIndex) => {
const aggConfig = column.aggConfig;

if (aggConfig && aggConfig.schema.group === 'buckets') {
if (aggConfig && aggConfig.type.type === 'buckets') {
Copy link
Member

Choose a reason for hiding this comment

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

😞type.type I'm not a fan of repetitions. I've just had a conversation with @timroes about headaches created by the namings of AggConfig, AggConfigs, AggParam, AggParams, aggs, agg, AggType etc.

I'm writing aloud here:
so the reason about having buckets and metrics is clear: metrics agg types are used as dependant variable (the usual y value of an expression) and the buckets are use as independent variable (usually the x variable in the expression).
We have many possible aggtypes for each dependant and independant variable. So the initial way of call it group could be a better or at least more readable name for this , and you will call it like: aggConfig.type.group. Can me also some more specific like groupId since buckets and metrics are identifiers of the group and not general variables.
What do you think?

Copy link
Member Author

Choose a reason for hiding this comment

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

i agree, however i would not put that in this PR

Copy link
Contributor

Choose a reason for hiding this comment

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

So the initial way of call it group could be a better or at least more readable name

i agree, however i would not put that in this PR

I am not sure I follow why changing type.type to type.group would not be part of this PR yet this is the PR that is changing aggConfig.schema.group to aggConfig.type.type.

Copy link
Member Author

@ppisljar ppisljar Jul 11, 2018

Choose a reason for hiding this comment

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

as the changes from aggConfig.schema.group to aggConfig.type.type do not include all the references to type.type it would increase the size of already big pr ...

i will open one to do this rename as soon as i get back from vacation i promise :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for clarifying. Makes sense

@@ -1,132 +0,0 @@
/*
Copy link
Member

Choose a reason for hiding this comment

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

Are these obsolete tests? Do we need to substitute them with new tests?

Copy link
Member Author

Choose a reason for hiding this comment

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

these are tests for the agg_param_writer class which has not been in use for a while.

i removed it and also its tests.

Copy link
Contributor

Choose a reason for hiding this comment

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

I am confused, I think that was actually just a helper class for testing if parameter writing works properly? At least those tests imho still had a use-case. I actually added a couple of new tests in #20519 which seemed to work fine to test, if the parameter write functions do what they should do.

If we remove that version of those test, I think we should build some replacement, for checking if parameter writing will actually return in the correct results.

@ppisljar ppisljar force-pushed the fix/removeSchemaFromAggTypes branch from 1de5a16 to a3145fc Compare July 11, 2018 11:07
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@@ -69,7 +69,7 @@ export class VisualizeDataLoader {
return this._visData;
}
catch (e) {
this.props.searchSource.cancelQueued();
Copy link
Contributor

Choose a reason for hiding this comment

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

props actually has a searchSource reference. Shouldn't we rather use that one, to not make more references to Vis?

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@ppisljar ppisljar merged commit 240b94f into elastic:master Jul 12, 2018
@elasticmachine
Copy link
Contributor

💔 Build Failed

@ppisljar ppisljar restored the fix/removeSchemaFromAggTypes branch September 26, 2018 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Visualizations Generic visualization features (in case no more specific feature label is available) review v6.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants