Comments (1)
I think a good way to implement this is as an enum of possible failure reasons:
enum CacheMissReason {
BinaryMismatch,
EnvVarMimsmatch,
OutputFileChanged(PathBuf)
}
Notice you can even add the reason why it failed as "metadata" to the enum variant as data. Like in the OutputFileChanged
example. We can give it the path of the offending file.
Then as you do your checks you can have a miss_reasons: Vec<CacheMissReasons>
of why things fail thatt you append to:
miss_reasons.push_back(Foo)
And print them at the bottom by printing the Vec
.
I know Joe didn't think it was super necessary, but I think it is clean, and later it if/when we add testing we can check the reasons why things fail
match the expected reasons why things fail
! The logic for checking for hash hits in nontrivial. So it would be nice to have tests for it. Specially since it will only get more complicated later.
from processcache.
Related Issues (20)
- Panic when caching "top level" exec HOT 1
- Eventually, directories have to be handled...
- Ensure all system calls called by each bioinformatics workflow are handled HOT 3
- Threads as part of parent execution
- Handle chdir
- Handle statfs
- Handle special close(1) [tar]
- Handle pipe, socket, connect [tar]
- Treat tar as one big execution
- Handle mkdir
- Record initial umask as a precondition HOT 3
- Fix get_full_path(), handle newfstatat
- Handle RW case for open HOT 1
- Separate file events and dir events
- Handle utimensat
- Handle uname
- record signal mask
- Implement no stdout flag
- Replace OFlag in FileEvent::Create with custom enum
- Update tests
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from processcache.