-
Notifications
You must be signed in to change notification settings - Fork 14
Force index rebuild when a new repo is pulled #216
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
9148f77
Update repo_action.py to force index rebuild when a new repo is pulled
sujik18 ae44d44
Update AI PR review workflow by adding fetch step for PR head
sujik18 067b815
Update index.py to incrementally add and remove index entries of a repo
sujik18 3e2cf7b
Update repo_action.py to use the index from the Action class
sujik18 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are building the index for all the repos here right? So, if a repo has a dependency we'll rebuild the index twice right? Is it possible to rebuild the index per repo? And we also need to fix the index on unregister_repo right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that would require refactoring of
index.pyand all the places where Index class is being accessed, because currently index gets build wheneverIndexclass is being accessed asbuild_index()is called ininitfunction ofIndexclass.If we intend to continue script execution after
unregister_repothen yes we would need that, but I guess ideally that wont be the case and otherwise whenever the next time a mlc command is run which access Index class, index will be forcefully rebuilded as it will pickup thatrepo.jsonis modifiedThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sujik18 we can have a custom update function in the Index class to selectively update the entries for a given repo right?
The requirement for handling unregister_repo is when we do pull or a MLC repo which has a fork already registered in mlcflow. Then mlcflow automatically unregisters the fork and pull the new one. But here, the Index entries may not be consistent anymore.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@arjunsuresh I have added a
remove_repo_from_indexfunction to remove index entries of a repo when the repo is deleted, currently called only inmlc rmcommand, if it looks good same function can be reused to update index entries while unregistering a repo.