Skip to content

Conversation

@maxceem
Copy link
Contributor

@maxceem maxceem commented Dec 13, 2019

Overview

It happens that mapping of details.taasDefinition.team.skills in the ES index is defined as string, while in real form it's an array with objects. So when we try to add new projects to the index, ES throws an error:

[mapper_parsing_exception] failed to parse [details.taasDefinition.team.skills]
{\"type\":\"illegal_argument_exception\",\"reason\":\"unknown property [id]\"}

Proper solution (long)

The only proper solution would need to make a long downtime of the service:

  • find all existent projects with skills as string and update them to have an array instead
  • remove index with the wrong mapping and recreate it from scratch, reindex all the projects now with fixed data, so mapping for skills would be set as array, and all new taas projects would be indexed successful

Temporary solution (fast) - implemented in this PR

As a temporary workaround we would set details.taasDefinition.team.skills to an empty string if it's defined before indexing it to ES. As in the current version on the details page we show data from DB, so if we don’t have skills in ES, the project details should be still displayed good.

@maxceem maxceem requested a review from RishiRajSahu December 13, 2019 05:02
@maxceem maxceem changed the base branch from dev to master December 13, 2019 05:03
@maxceem maxceem changed the title [Hotfix] [DEV] es skills [Hotfix] [PROD] es skills Dec 13, 2019
@RishiRajSahu
Copy link
Contributor

@maxceem thanks for the quick changes, yep will need the proper solution by creating new index and reindexing. Also we can avoid downtime as the index name is configurable via env variables.

Copy link
Contributor

@RishiRajSahu RishiRajSahu left a comment

Choose a reason for hiding this comment

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

@maxceem changes LGTM but let's push them to feature brach first and deploy to test in DEV env.

@RishiRajSahu
Copy link
Contributor

@maxceem working fine on dev after the feature branch deployed, pushing changes to prod.

@RishiRajSahu RishiRajSahu merged commit e215e9c into master Dec 13, 2019
@maxceem maxceem mentioned this pull request Dec 16, 2019
@eisbilir eisbilir deleted the hotfix/es-skills branch November 9, 2023 20:02
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 this pull request may close these issues.

3 participants