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

Tern does not account for modifications to existing methods #27

Closed
nishakm opened this issue Apr 6, 2018 · 1 comment
Closed

Tern does not account for modifications to existing methods #27

nishakm opened this issue Apr 6, 2018 · 1 comment
Labels
bug Something went wrong
Milestone

Comments

@nishakm
Copy link
Contributor

nishakm commented Apr 6, 2018

Say if tern processes package information and could not get one set of metadata, it will store the package information in the cache with empty data. If next time around, there is an addition to the command library that allows tern to get said metadata, it will not run it because it will read the incomplete information from the cache.

  1. When loading form cache, check for missing metadata. If it finds missing metadata, then run through the retrieval steps again
  2. When saving to the cache, do a deep comparison of all the package metadata rather than the layer. In python one can override the class's inherited eq(self, other) to do the check. If the layers are not equal, save the layer with the packages again
@nishakm nishakm added the bug Something went wrong label Apr 6, 2018
@nishakm nishakm added this to the Release 0.2.0 milestone Apr 26, 2018
@nishakm
Copy link
Contributor Author

nishakm commented Sep 21, 2018

We can just add an option in the command line (--redo, -r) to overwrite the data that is in the cache if it exists.
This would mean writing a function to erase cached data for a particular layer.
This would also mean rewriting the flow to check if the redo flag is not set to then load data from the cache, and if yes then erase data from the cache before loading (load_from_cache function)

laurieroy added a commit to laurieroy/tern that referenced this issue Nov 15, 2018
Add redo=False to load_from_cache so option to re-populate the cache
when layers are changed; default is to not redo the cache.
Resolves: tern-tools#113   See: tern-tools#27

Signed-off-by: Laurie Roy <[email protected]>
nishakm pushed a commit that referenced this issue Nov 15, 2018
Add redo=False to load_from_cache so option to re-populate the cache
when layers are changed; default is to not redo the cache.
Resolves: #113   See: #27

Signed-off-by: Laurie Roy <[email protected]>
nishakm pushed a commit to nishakm/tern that referenced this issue Nov 27, 2018
This enables the --redo option which will rewrite the cache for
layers found in the image if the layers already exist in the cache

- Added new optional argument to analyze_docker_image function
- Passed in argument for redo to analyze_docker_image calls

Resolves tern-tools#27

Signed-off-by: Nisha K <[email protected]>
rnjudge pushed a commit to rnjudge/tern that referenced this issue Jun 5, 2020
Add redo=False to load_from_cache so option to re-populate the cache
when layers are changed; default is to not redo the cache.
Resolves: tern-tools#113   See: tern-tools#27

Signed-off-by: Laurie Roy <[email protected]>
rnjudge pushed a commit to rnjudge/tern that referenced this issue Jun 5, 2020
This enables the --redo option which will rewrite the cache for
layers found in the image if the layers already exist in the cache

- Added new optional argument to analyze_docker_image function
- Passed in argument for redo to analyze_docker_image calls

Resolves tern-tools#27

Signed-off-by: Nisha K <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something went wrong
Projects
None yet
Development

No branches or pull requests

1 participant