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

Add "get nearest cache entry for artifact" #1

Open
andreaskurth opened this issue Mar 26, 2021 · 0 comments
Open

Add "get nearest cache entry for artifact" #1

andreaskurth opened this issue Mar 26, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@andreaskurth
Copy link
Owner

To cache partial builds in Memora, the get command needs to be able to optionally get the "nearest" entry instead of the entry for the current commit (which is not cached yet).

This would then enable memora get --nearest in CI scripts such as

if ! memora get compiler; then
  # no up-to-date build found
  if ! memora get --nearest compiler then
    # no nearest found, clean build
    make -C compiler all
  else
    # found nearest, do incremental build
    make -C compiler incremental
  fi
  memora insert compiler
fi

The "nearest commit" has to be defined more precisely (it might be especially tricky after merges?) -- but we might be able to say "the nearest commit is only defined if it is unique". If the nearest commit is not defined, memora get --nearest would fail.

@andreaskurth andreaskurth added the enhancement New feature or request label Mar 26, 2021
@andreaskurth andreaskurth changed the title Get nearest cache entry for artifact Add "get nearest cache entry for artifact" Mar 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant