Skip to content

Rollup index pattern error: must match one rollup index - #56732

Merged
alexwizp merged 2 commits into
elastic:masterfrom
alexwizp:32765
Feb 5, 2020
Merged

alexwizp merged 2 commits into
elastic:masterfrom
alexwizp:32765

Conversation

@alexwizp

@alexwizp alexwizp commented Feb 4, 2020 •

Copy link
Copy Markdown
Contributor

Closes: #32765

Summary

Steps to reproduce:

  1. Creating a new Rollup Job:
    • Open the Stack Management page and navigate to Elasticsearch -> Rollup Jobs;
    • Create a new Rollup Job (for my example I've created a rollup index pattern with name rollup-game-of-thrones by game-of-thrones index pattern);
    • Wait until data will be indexed (you can use 1m interval/delay to reduce time of indexing).
  2. Creating a new Rollup Index Pattern:
    • Open Kibana -> Index patterns;
      Important: please don't refresh page after step #1 (Creating a new Rollup Job)
    • Create a new index pattern by Rollup Index Pattern:
      image
    • type your Rollup Index in Index Pattern field;
      image

Expected Result:

  1. Next Step button should be enabled
  2. Index Pattern should be valid. No error messages

Root cause analysis:

I found a problem in the RollupIndexPatternCreationConfig class. We are currently creating a new instance of this class only from the add method in IndexPatternCreationManager. This happens only once during a user session, because now we call it from the setup hook of rollup plugin, see src/legacy/core_plugins/management/public/np_ready/plugin.ts.

Now let's return back to /rollup_index_pattern_creation_config.js file and go to constructor function. Here we run the asynchronous method setRollupIndices, which was supposed to fill the internal fields of rollupIndicesCapabilities and rollupIndices. It happens only once and if the user created a new Rollup Index without refreshing the page, it is not available.

@cjcenizal I've moved setRollupIndices into getIndexPatternCreationOption method and looks like now all works fine. But I think instead of using constructor for IndexPatternCreationConfig we should implement 2 additional setup/start methods in future.

Checklist

For maintainers

@alexwizp alexwizp added the bug Fixes for quality problems that affect the customer experience label Feb 4, 2020
@alexwizp alexwizp self-assigned this Feb 4, 2020
@elasticmachine

Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-app-arch (Team:AppArch)

@alexwizp alexwizp added Feature:Rollups release_note:skip Skip the PR/issue when compiling release notes release_note:fix and removed release_note:skip Skip the PR/issue when compiling release notes labels Feb 4, 2020
@alexwizp
alexwizp marked this pull request as ready for review February 4, 2020 13:05
@cjcenizal

Copy link
Copy Markdown
Contributor

@alexwizp Thank you for the ping, but I don't think I'm the best person to review this code. Because this falls under @elastic/kibana-app or @elastic/kibana-app-arch I am going to take myself off the list of reviewers and let someone from one of those teams review.

@cjcenizal
cjcenizal removed their request for review February 4, 2020 20:27
@alexwizp

alexwizp commented Feb 5, 2020

Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@flash1293
flash1293 requested review from alisonelizabeth and removed request for alisonelizabeth February 5, 2020 09:22
@flash1293

Copy link
Copy Markdown
Contributor

@alexwizp Will this also fix #55807 ?

@alexwizp
alexwizp requested a review from flash1293 February 5, 2020 09:32
@kibanamachine

Copy link
Copy Markdown
Contributor

💚 Build Succeeded

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@alexwizp

alexwizp commented Feb 5, 2020

Copy link
Copy Markdown
Contributor Author

@flash1293 Looks like this PR also fixes #55807
Tested locally

@flash1293 flash1293 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tested and works. Thanks for fixing two bugs at once!

alexwizp added a commit to alexwizp/kibana that referenced this pull request Feb 5, 2020
Closes: elastic#32765

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
alexwizp added a commit that referenced this pull request Feb 5, 2020
)

Closes: #32765

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
patrykkopycinski pushed a commit to patrykkopycinski/kibana that referenced this pull request May 6, 2026
Closes: elastic#32765

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Fixes for quality problems that affect the customer experience Feature:Rollups release_note:fix v7.7.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rollup index pattern error: must match one rollup index

6 participants