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

Bug: Edge case in model selection leads to TypeError #64

Closed
cdboer opened this issue Jul 3, 2022 · 0 comments
Closed

Bug: Edge case in model selection leads to TypeError #64

cdboer opened this issue Jul 3, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@cdboer
Copy link
Collaborator

cdboer commented Jul 3, 2022

The model implemented in gitlab2prov.prov.model.modification assumes that all FileRevisions passed to it have a previous revision value that is not None. This is not always the case. The easiest example would be the first revision of every given file. As it marks the first revision, it can not have a previous one. The first revision of a file is captured by the gitlab2prov.prov.model.addition model, which is why this seemed like a non-issue during implementation.

We have chosen to select the modification model for other File.change_type values in addition to MODIFIED. The modification model is therefore applied to the following change statuses: MODIFIED, RENAMED, COPIED, CHANGED. Some of these evidently do not require a previous revision to exist. Which is why some revisions end up with no predecessor or a None value (compare).

@cdboer cdboer added the bug Something isn't working label Jul 3, 2022
@cdboer cdboer self-assigned this Jul 3, 2022
@cdboer cdboer closed this as completed in 5b69448 Jul 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant