Indexes 4: Adds Indexes for SPK repositories#1339
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
00757f2 to
8530adc
Compare
|
I can't replicate the test failures locally at the moment. I'll dig into them further tomororw. |
47ea722 to
af8dcc2
Compare
68bb519 to
1e28bf4
Compare
1e28bf4 to
854446a
Compare
The issue was related to deprecated packages and the migration-to-components feature. I've put in a temporary fix so the tests pass for now. But it should not get merged as is. A direction needs to be decided with regard to deprecated packages, solves, and what to index in order to replace the temp fix with a better solution. See #1339 (comment) comment above. |
af8dcc2 to
53f24d1
Compare
a58142a to
b32582c
Compare
53f24d1 to
cb733cd
Compare
b32582c to
1a43f64
Compare
34d1bbd to
e5ee8b6
Compare
d47df82 to
fbca963
Compare
e5ee8b6 to
07eb6a8
Compare
| match tokio::fs::set_permissions(&temp_file, Permissions::from_mode(0o666)).await { | ||
| Err(err) => { | ||
| // Clean up the temp file after the error | ||
| remove_index_file(&temp_file).await?; |
There was a problem hiding this comment.
Okay but if removing the temp file fails the ? usage here will mask the original error. Any errors in cleanup could be logged but the caller should get the first error as the return value.
There was a problem hiding this comment.
I've update all the places like this to log and return the first error.
fbca963 to
24c6eed
Compare
07eb6a8 to
a3c15eb
Compare
24c6eed to
f65e21e
Compare
… flabuffers index and configuration Signed-off-by: David Gilligan-Cook <dcook@imageworks.com>
…file name. Also renames IndexPackage after rebasing earlier changes Signed-off-by: David Gilligan-Cook <dcook@imageworks.com>
verification, and moving temp file to correct location once all that is complete. Refactors loading index from file to create a read_from_file method that is used when loading an index and verifying one during the save process. Adds log output of the number of tables in a newly generated index that is about to be saved to a file. Signed-off-by: David Gilligan-Cook <dcook@imageworks.com>
Signed-off-by: David Gilligan-Cook <dcook@imageworks.com>
Signed-off-by: David Gilligan-Cook <dcook@imageworks.com>
Signed-off-by: David Gilligan-Cook <dcook@imageworks.com>
Signed-off-by: David Gilligan-Cook <dcook@imageworks.com>
so it is more general. Signed-off-by: David Gilligan-Cook <dcook@imageworks.com>
Signed-off-by: David Gilligan-Cook <dcook@imageworks.com>
…ory configs Signed-off-by: David Gilligan-Cook <dcook@imageworks.com>
Signed-off-by: David Gilligan-Cook <dcook@imageworks.com>
a3c15eb to
1d3f393
Compare
Note: for info on benefits of indexing for spk solves see #1340 (5 of 5). Maybe start there and work back down to this PR if you prefer to review PRs top down.
This adds a new
Indexedrepository type,RepositoryIndextraits, aRepoIndexenum, and a flatbuffer index implementation inFlatBufferRepoIndex, along with some configuration. The indexing is designed to help the solvers. An index only contains information useful for solving. It does not contain enough information to do other things, such as build or test the packages.The hierarchy of new types is roughly:
This also updates the solver and repo based tests to include the new Indexed repo. This does not add command line tools or solver interaction for indexes. Those are in the last PR in this chain.
This is the change that adds indexes and index based packages to Spk repositories.
This is 4 of 5 chained PRs for adding indexes to spk solves:
new_unchecked()constructors to spk schema objects #1337spk repo indexsubcommand for index generation and updates #1340version_filterfield in index schema #1344