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

#480 Basic search for versioned menas entities #481

Merged
merged 6 commits into from
Jun 19, 2019

Conversation

lokm01
Copy link
Collaborator

@lokm01 lokm01 commented Jun 16, 2019

No description provided.

@lokm01 lokm01 added refactoring Improving code quality, paying off tech debt, aligning API, cleanup of unused code feature New feature Menas Menas component affected labels Jun 16, 2019
@lokm01 lokm01 self-assigned this Jun 16, 2019
@Zejnilovic
Copy link
Contributor

1 cannot read property type

Getting new console error when searching and no data is found

image

@Zejnilovic
Copy link
Contributor

Zejnilovic commented Jun 17, 2019

2 Suggestions don't auto refresh

If I create a new schema/dataset/mapping table and I don't do a full refresh I don't see the newly created item in the suggestions.

3 Suggestion suggest disabled items

Suggestions suggest something that was already deleted/disabled

Copy link
Collaborator

@GeorgiChochov GeorgiChochov left a comment

Choose a reason for hiding this comment

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

Doesn't seem to work as expected. Some partial matches hit, some don't, and I can't see suggestions.
Would be great if we had some tests as well.

@lokm01
Copy link
Collaborator Author

lokm01 commented Jun 17, 2019

1 cannot read property type

Getting new console error when searching and no data is found

image

Any chance this is related to lastpass/lastpass-cli#428 ??

lokm01 added 2 commits June 17, 2019 18:43
Signed-off-by: Jan Scherbaum <kmoj02@gmail.com>
Signed-off-by: Jan Scherbaum <kmoj02@gmail.com>
@Zejnilovic
Copy link
Contributor

4 Errors on start-up in private mode

I open a private mode. Go to Menas's login page and this is what shows.
image

1 Cannot read property type

In private mode, I see no such error. You were probably correct.

5 Suggestions don't show at all

Currently. No suggestions show up for me. But partial names work fine.

Copy link
Collaborator

@GeorgiChochov GeorgiChochov left a comment

Choose a reason for hiding this comment

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

Tests look good, but each case does a little too much. Test cases should have a tightly limited scope of what they verify.

}
}
"return seq of versioned summaries matching the search query" when {
"datasets exist and search query is provided" in {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we break this down into separate cases? A test case should really only test one case (very limited asserts).

  1. test case for searching a disabled entity, should be in the "return an empty Seq" cases
  2. full match (given several datasets with similar names, i.e. search("dataset1"), returns "dataset1" of "dataset1,dataset2,dataset,somethingelse")
  3. partial match (given several datasets with similar names, i.e search("dataset") returns "dataset1,dataset2,dataset" of "dataset1,dataset2,dataset,somethingelse")
  4. empty search (search("") returns all enabled datasets)

}
"return distinct list of enabled names" when {
"datasets exist" in {
val dataset1 = DatasetFactory.getDummyDataset(name = "dataset1", version = 1,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same as for DatasetMongoRepository::getLatestVersions

- This should fix the undefined error on load
- This should also fix the updated suggestions on edits etc
@lokm01
Copy link
Collaborator Author

lokm01 commented Jun 18, 2019

Ok this last commit should fix 2) 4) 5)

lokm01 added 2 commits June 18, 2019 18:42
Signed-off-by: Jan Scherbaum <kmoj02@gmail.com>
feature/480-basic-search-for-versioned-entities

Conflicts:
	menas/src/main/scala/za/co/absa/enceladus/menas/repositories/VersionedMongoRepository.scala
	menas/src/test/scala/za/co/absa/enceladus/menas/integration/repositories/DatasetRepositoryIntegrationSuite.scala
@lokm01 lokm01 requested a review from GeorgiChochov June 18, 2019 17:36
@lokm01 lokm01 merged commit 44dd108 into develop Jun 19, 2019
@lokm01 lokm01 deleted the feature/480-basic-search-for-versioned-entities branch June 19, 2019 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature Menas Menas component affected refactoring Improving code quality, paying off tech debt, aligning API, cleanup of unused code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants