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
Facade repo path changes #2186
Facade repo path changes #2186
Conversation
…l replaces these fields with slugs (ex: augur becomes augur-1) if they already are cloned and they are attemped to be initialized again. This shouldn't happen however Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
…m it if it exists Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
…m it if it exists Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
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.
If I am understanding these changes correctly, it looks like Facade is still setting the repo_name and repo_path, it just doesn't depend on those fields to be in a certain state anymore. I think that we should be filling the repo_path and repo_name whenever a repo is added, so that we can be certain it existing since any repo that is added will have them set. The method to put this in is in called insert
and is on the Repo
class in the augur_data.py
file.
Sounds good. I didn't know it was that simple with our orm setup. |
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Signed-off-by: Andrew Brain <61482022+ABrain7710@users.noreply.github.com>
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.
Do we still need the UPDATE query on line 96 of facade05repofetch.py
that sets the repo_name
and repo_path
? Since we are inserting the repo_name
and repo_path
with every new repo. Also I think there should be a revision script that inserts the repo_name
and repo_path
for any repos that don't have the repo_path
or repo_name
I was reluctant to remove those updates since if we remove them we are trusting our regex to always match the way that we parse the repo name and path for every possible git url to the way that facade gets it from the git log. It should work without the update statements as long as we are mindful of these fields corresponding to facade's repo directory. I agree about the revision script I can add that. |
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
@IsaacMilarky Okay, so does this mean Facade still relies on the |
Facade still needs to keep track of the file that it has cloned a repo from previously for how we are doing collection. We can't really do it the same way that facade does it when they are inserted since that relies on the git repo being cloned onto disk. It does python indexing and some regex to get the path and name once the repo has been cloned. |
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Description
Signed commits