Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

skill & skillsProvider removal#126

Open
Sande3p wants to merge5 commits intotopcoder-archive:feature/removing_skill_model
base:feature/removing_skill_model
Choose a base branch
Loading
fromSande3p:feature/removing_skill_model

Conversation

@Sande3p
Copy link

No description provided.

@vikasrohit
Copy link

@Sande3p I don't see any unit test updated in change files in response to the code updated? Do the unit tests not exist for the various files we modified e.g. userSkillService etc.
Another thing is that how did the reviewers verified this submission? I mean did they ran all endpoints to verify how it was working before and after the changes?

Also adding@maxceem and@nkumar-topcoder for more thorough reviews.

@vikasrohit
Copy link

@SathyaJayabal@drasticdpk@lakshmiathreya this PR might cause some disruption in taas application as taas-apis are using ubahn-apis. So, it would be great if we can identify the possible areas which could be impacted after this merge. My major expectation is the skill search whereorganizationId is provided as filter. Do we have any real world use case where we are usingorganizationId as filter for skills?

Copy link

@maxceemmaxceem left a comment

Choose a reason for hiding this comment

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

It looks for me that the way migrations are changed would not work for DEV/PRODimage. When we run migrations during local setup, the DB is created from scratch and then migrations are applied to the empty DB.

But in real DEV/PRDO environment we already have DB with data and these migrations has been already applied. So when we would runnpm run migrations up nothing would happen.

Instead of editing existent migration files, a new migration file suppose to be created and that migration file should make all the changes in the DB, so when we runnpm run migrations up on DEV / PROD it would adjust existent DB according to new changes while keeping the existent data.

@vikasrohit
Copy link

vikasrohit commentedOct 7, 2021
edited
Loading

It looks for me that the way migrations are changed would not work for DEV/PROD

Totally agreed with@maxceem.@Sande3p please get it fixed as@maxceem outlined.

@Sande3p
Copy link
Author

It looks for me that the way migrations are changed would not work for DEV/PROD

Totally agreed with@maxceem.@Sande3p please get it fixed as@maxceem outlined.

sure

vikasrohit reacted with thumbs up emoji

@Sande3p
Copy link
Author

at how did the reviewers verified this submissio

Yes, that's what I mentioned the challenge spec.

vikasrohit reacted with thumbs up emoji

@Sande3p
Copy link
Author

Two things are in progress

  1. Updating the migration script.
  2. Updating the unit tests

@vikasrohit
Copy link

@Sande3p are review changes implemented?

return results.hits.hits.map(hit => hit._source)
}

async function setUserSearchClausesToEsQuery (boolClause, keyword) {

Choose a reason for hiding this comment

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

@Sande3p I don't see any update in the code wheresetUserSearchClausesToEsQuery is used. I mean if we have removed searching skills in this method's implementation, we must be doing that where this function is being called, right? Am I missing something here?

Copy link
Collaborator

Choose a reason for hiding this comment

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

No, I don't think we need to do anything insearchUsers, the keyword be used to match user records. since we remove skill model, we just remove the matching skill name and reserve other matchings.

Choose a reason for hiding this comment

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

What I meant issearchUsers method would not support searching by skills name now, if we don't add some other way to provide filtering for user based on skills names. I want to be sure that we are not removing any feature from the calling code. We need to remove skills model but we should not remove any feature from the calling code.

Copy link
Collaborator

Choose a reason for hiding this comment

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

fixed


module.exports = {
up: async (query) => {
await query.removeColumn('UsersSkills', 'skillId')

Choose a reason for hiding this comment

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

@Sande3p this would cause all the existing data to be lost, I guess. How can we handle that?

Choose a reason for hiding this comment

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

@maxceem do you have idea how can handle this without loosing data?

Copy link

@maxceemmaxceemOct 12, 2021
edited
Loading

Choose a reason for hiding this comment

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

Good catch@vikasrohit. I don't think these columns should be removed as we this script adds them back after removing which looks like doesn't make sense. I guess these columns should be left as it is without any changes. The only thing which has to be changed - references from other tables to these columns have to be removed and that's it.

image

vikasrohit reacted with thumbs up emoji
Copy link
Collaborator

Choose a reason for hiding this comment

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

fixed

vikasrohit reacted with thumbs up emoji

Choose a reason for hiding this comment

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

@xxcxy@Sande3p any of you verified the migration script for preventing data loss on your local? I want to make sure before I run it on dev.

Copy link
Collaborator

Choose a reason for hiding this comment

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

it will drop tableSkills andSkillsProviders.
If you mean preventing other table's data loss, then yes, i tried.

Choose a reason for hiding this comment

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

If you mean preventing other table's data loss, then yes, i tried.

Yes, that is what I was worried about. If the data is not lost in any tables excepts the two we want to get rid of.

Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@nkumar-topcodernkumar-topcoderAwaiting requested review from nkumar-topcoder

3 more reviewers

@maxceemmaxceemmaxceem left review comments

@vikasrohitvikasrohitvikasrohit requested changes

@xxcxyxxcxyxxcxy left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@Sande3p@vikasrohit@maxceem@xxcxy

[8]ページ先頭

©2009-2025 Movatter.jp