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

Pivotal ID # 181807913: Add MD5 To Pagetab #558

Merged
merged 3 commits into from
May 17, 2022

Conversation

jhoanmanuelms
Copy link
Contributor

https://www.pivotaltracker.com/story/show/181807913

Add calculated MD5 to pagetab files

Add calculated MD5 to pagetab files
@jhoanmanuelms jhoanmanuelms self-assigned this May 10, 2022
@jhoanmanuelms jhoanmanuelms requested a review from Juan-EBI May 10, 2022 15:47
Copy link
Contributor

@Juan-EBI Juan-EBI left a comment

Choose a reason for hiding this comment

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

LGTM please check comments. Also I have the following concern if user is passing md5 as an attribute, are we filtering out? it looks to me that we will end duplicating it.

}

private fun ExtFile.toAttributes() =
Copy link
Contributor

Choose a reason for hiding this comment

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

attributes.map { it.toAttribute() } + Attribute(MD5.value, md5)

}

private fun ExtFile.toAttributes() =
Copy link
Contributor

Choose a reason for hiding this comment

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

I think name toAttributes and function is misleading (is an extension function of file) as we are not transforming a file into attributes, we are transforming file attributes into ext attributes. To make more clear imagine you have a class human that have a born_country attribute and one declarate an extension Human.getPopulation which obtain the population of the country.

Even function implementation can be correct, is not correct to model a human with shuch operation.

@jhoanmanuelms
Copy link
Contributor Author

About your question, yes, we already have logic that filters it out at deserialization but I added an integration test just to be sure

Copy link
Contributor

@Juan-EBI Juan-EBI left a comment

Choose a reason for hiding this comment

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

LGTM

@jhoanmanuelms jhoanmanuelms merged commit 547be9e into master May 17, 2022
@jhoanmanuelms jhoanmanuelms deleted the feature/pivotal-181807913-pagetab-md5 branch May 17, 2022 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants