-
Notifications
You must be signed in to change notification settings - Fork 118
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
refactor: Fetching artifacts #1875
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
val regex: List<Regex>, | ||
val blobPath: String, // todo not needed? | ||
val downloadPath: DownloadPath, | ||
val matrixId: String |
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.
Added matrixId
to persists info about matrix from which files are downloaded. It is used to update download
flag once all files are fetched. Let me know if this violates any assumptions.
https://github.com/Flank/flank/pull/1875/files#diff-f91686b92f886f88f9b047c859da24c40bc6ec3ee8686ef5eec4bd5259f91de2R45
@jan-gogo
val downloaded: Boolean = false, | ||
// this is variable intentionally, this is workaround to pass changes while fetching artifacts | ||
// todo think about different solution | ||
var downloaded: Boolean = false, |
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.
Changed to var
. The old implementation had a bug and none of SavedMatrix
had downloaded
updated during artifact fetch. This is a quick fix for this issue. We should think about a different solution but in a separate issue.
Might be fixed within another refactor task (?)
@jan-gogo
2423bf2
to
e595475
Compare
val matrixName = parsed.getName(1).toString() | ||
val fileName = parsed.fileName.toString() | ||
val deviceName = parsed.getName(2).toString().takeUnless { it == fileName }.orEmpty() | ||
val filePathName = if (downloadPath.keepFilePath) parsed.parent.drop(3).joinToString("/") else "" |
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 you think its worth it to make these int variables constants with names for a little more clarity?
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 I could change it to extension functions with self-explanatory names, WDYT?
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.
Those ints are explained by the value names so adding constants for them will be an unneeded redundancy. IMO this implementation looks ok.
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 am fine with it as it is too :)
046204f
to
4e34968
Compare
Timestamp: 2021-05-06 15:31:44 |
405a907
to
a900029
Compare
@flank-it |
Integration tests succeed for all OSes ✅ |
Integration tests succeed for all OSes ✅ |
a900029
to
c132475
Compare
c132475
to
98643f9
Compare
f3b51a9
to
ee67805
Compare
8b5f41a
to
fcddceb
Compare
c775255
to
e31dbf5
Compare
73775e4
to
9ec50d3
Compare
9ec50d3
to
144d052
Compare
Fixes #1758
Test Plan