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

Possibility of Regression Bug #1244

Closed
Tejas2805 opened this issue Apr 19, 2020 · 13 comments · Fixed by #1246 or #1247
Closed

Possibility of Regression Bug #1244

Tejas2805 opened this issue Apr 19, 2020 · 13 comments · Fixed by #1246 or #1247

Comments

@Tejas2805
Copy link
Contributor

Tejas2805 commented Apr 19, 2020

The Travis build which hadn't been failing upto 3 days ago, has started failing. This is when we started merging all the PRs again. We might have a regression bug. Let's look into this and find out the reason.

Can check the travis build here.

This is related to individual project dashboard for CS2103T

@Tejas2805
Copy link
Contributor Author

Tejas2805 commented Apr 19, 2020

Could have been due to #1050 or #1192 . Other PRs seem unlikely as build fails while analyzing commits.

@Tejas2805
Copy link
Contributor Author

@ang-zeyu @jamessspanggg Could you guys take a look into this.

@jamessspanggg
Copy link
Contributor

On first glance, it is due to the student having a file name called ..\data\duke.txt, which leads to the file not being matched in the isFileGlobMatching method. Don't think it's due to any of our recent PRs merged as we did not touch the functionality of the file matching. Student's repo
Screen Shot 2020-04-19 at 3 58 38 PM

Will investigate further.

@jamessspanggg
Copy link
Contributor

@Tejas2805 can you inform the prof to temporarily fix the issue by adding ..\data\duke.txt in the Ignore Glob List column of https://github.com/EdmondOng/duke.git in author-config.csv?

@damithc
Copy link
Collaborator

damithc commented Apr 19, 2020

@Tejas2805 can you inform the prof to temporarily fix the issue by adding ..\data\duke.txt in the Ignore Glob List column of https://github.com/EdmondOng/duke.git in author-config.csv?

Which repo? Can do a PR?

@jamessspanggg
Copy link
Contributor

Which repo? Can do a PR?

Created a PR here: nus-cs2103-AY1920S2/ip-dashboard#1

@damithc
Copy link
Collaborator

damithc commented Apr 19, 2020

Actually, that will update that semester's dashboard which is supposed to frozen in time at the end of that semester. At lease we should also add an end-date the CLI parameters to prevent it analyzing repos until today. Also, the PR fails the build.

@Tejas2805
Copy link
Contributor Author

I thought it could be due to the same file too, but the thing is the file has been there from before. Therefore, that shouldn't have been the cause of the build to fail.

@Tejas2805
Copy link
Contributor Author

Also, the PR fails the build.

The build hasn't failed due to the initial reason. But the same error at a different repo.

@jamessspanggg
Copy link
Contributor

The problem is due to git specifically prints out filename surrounded by double quotes, if the filename contains any special characters (in this bug's case, it is due to the special character ""). I have tested the behaviour, and an example is shown below:

Screen Shot 2020-04-19 at 7 27 58 PM

Will issue a fix soon.

@Tejas2805
Copy link
Contributor Author

Ah I see. Is it some new update though? As initially it wasn't failing.

@jamessspanggg
Copy link
Contributor

Ah I see. Is it some new update though? As initially it wasn't failing.

I'm not so sure, I tried checking out to the version of the last successful Travis build (commit 0f57aab) and ran the same build, and there were still errors.

The problem is due to git specifically prints out filename surrounded by double quotes

Still need some time to figure out the bugs, as the one described above is not the only issue. Would appreciate it if we can investigate together.

@jamessspanggg
Copy link
Contributor

Update: the bug is due to #1192 not handling files with names that are automatically escaped and double quoted by GitHub. For e.g. file name ..\data\duke.txt -> "..\\data\\duke.txt".

Upon investigating further, the code in FileInfoExtractor#getEditedFileInfos also made the same mistake of not handling this case, but not reflected in the bug as they simply skip the processing of these files when not matched with their regex.

jamessspanggg added a commit that referenced this issue Apr 20, 2020
* Add handling of filenames that are surrounded by double quotes

* trigger CI

* Add debugging

* Add debugging

* Remove debugging
jamessspanggg added a commit that referenced this issue May 8, 2020
When a filename contains special characters such as double quotes
or the backslash character \, git log will escape those characters and
surround the entire file name with double quotes.

CommitInfoAnalyzer is not handling these cases, which will lead to an
assertion error that fails the entire analysis.

Let's add the handling of such cases, removing the surrounded quotes
from the filenames, if available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants