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

fetcher: new implementation using unlinked files #1061

Merged
merged 28 commits into from
Oct 12, 2023

Commits on Oct 12, 2023

  1. zreader: transparent compression helper

    This moves some compression detection logic out of libindex's Fetcher
    implementation into a common spot. The plan is to use it there and also
    in Updater Fetch implementations to help with future-proofing.
    
    Signed-off-by: Hank Donnay <hdonnay@redhat.com>
    hdonnay committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    d413174 View commit details
    Browse the repository at this point in the history
  2. claircore: add LayerDescription type and FS method

    This lays the groundwork for having Indexers not reconstruct their own
    `tarfs` instances and instead share one.
    
    Signed-off-by: Hank Donnay <hdonnay@redhat.com>
    hdonnay committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    031ece5 View commit details
    Browse the repository at this point in the history
  3. wart: add package to help with API migrations

    It occurred to me that while API migrations are occurring in the
    codebase, a lot of shims are going to be doing the same thing. This
    package is a landing place for those helpers.
    
    This change creates the package and then adds helpers for the
    Layer/LayerDescription transition.
    
    Signed-off-by: Hank Donnay <hdonnay@redhat.com>
    hdonnay committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    9e3010d View commit details
    Browse the repository at this point in the history
  4. indexer: add DescriptionRealizer interface

    Signed-off-by: Hank Donnay <hdonnay@redhat.com>
    hdonnay committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    c73ac54 View commit details
    Browse the repository at this point in the history
  5. test: implement a test fetcher

    Signed-off-by: Hank Donnay <hdonnay@redhat.com>
    hdonnay committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    7ca5cf4 View commit details
    Browse the repository at this point in the history
  6. controller: add safety copy

    As part of the growing pains of splitting the Layer type, we need to
    check that Layer pointers are getting swapped.
    
    Signed-off-by: Hank Donnay <hdonnay@redhat.com>
    hdonnay committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    910dff5 View commit details
    Browse the repository at this point in the history
  7. libindex: implement new unlinked file fetcher

    This fetcher implementation uses the O_TMPFILE flag to open(2) to open
    files that are not linked into the file system. Doing this means that
    the layer contents are cleaned up even if the process exits uncleanly.
    
    Signed-off-by: Hank Donnay <hdonnay@redhat.com>
    hdonnay committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    a844586 View commit details
    Browse the repository at this point in the history
  8. fetch: add ghcr and optional decompression support

    Signed-off-by: Hank Donnay <hdonnay@redhat.com>
    hdonnay committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    eba5e71 View commit details
    Browse the repository at this point in the history
  9. fetch: documentation, switch from *testing.T to testing.TB

    Signed-off-by: Hank Donnay <hdonnay@redhat.com>
    hdonnay committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    fe97f8e View commit details
    Browse the repository at this point in the history
  10. test: documentation fixes

    Signed-off-by: Hank Donnay <hdonnay@redhat.com>
    hdonnay committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    8fbe967 View commit details
    Browse the repository at this point in the history
  11. test: remove unused http.RoundTripper implementation

    Signed-off-by: Hank Donnay <hdonnay@redhat.com>
    hdonnay committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    957a02b View commit details
    Browse the repository at this point in the history
  12. test: port various other fetcher abstractions to `claircore.LayerDesc…

    …ription`
    
    There's too many of these things.
    
    Signed-off-by: Hank Donnay <hdonnay@redhat.com>
    hdonnay committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    6f27cfc View commit details
    Browse the repository at this point in the history
  13. claircore: update tests for test package changes

    These tests should probably be audited and removed where they don't make
    sense anymore.
    
    Signed-off-by: Hank Donnay <hdonnay@redhat.com>
    hdonnay committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    46c8758 View commit details
    Browse the repository at this point in the history
  14. test: add matcher for LayerDescriptions and Digests

    This makes gomock a bit nicer to use.
    
    Signed-off-by: Hank Donnay <hdonnay@redhat.com>
    hdonnay committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    6375527 View commit details
    Browse the repository at this point in the history
  15. controller: update tests

    Signed-off-by: Hank Donnay <hdonnay@redhat.com>
    hdonnay committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    62508a0 View commit details
    Browse the repository at this point in the history
  16. whiteout: fix logs in Resolver test

    Signed-off-by: Hank Donnay <hdonnay@redhat.com>
    hdonnay committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    199573a View commit details
    Browse the repository at this point in the history
  17. whiteout: update tests

    Signed-off-by: Hank Donnay <hdonnay@redhat.com>
    hdonnay committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    14dca71 View commit details
    Browse the repository at this point in the history
  18. rpm: update tests

    Signed-off-by: Hank Donnay <hdonnay@redhat.com>
    hdonnay committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    26539f2 View commit details
    Browse the repository at this point in the history
  19. rhcc: update tests

    Signed-off-by: Hank Donnay <hdonnay@redhat.com>
    hdonnay committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    f32073c View commit details
    Browse the repository at this point in the history
  20. rhel: update tests

    Signed-off-by: Hank Donnay <hdonnay@redhat.com>
    hdonnay committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    9e537ff View commit details
    Browse the repository at this point in the history
  21. python: update tests

    Signed-off-by: Hank Donnay <hdonnay@redhat.com>
    hdonnay committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    7baf230 View commit details
    Browse the repository at this point in the history
  22. osrelease: update tests

    Signed-off-by: Hank Donnay <hdonnay@redhat.com>
    hdonnay committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    6d1aa81 View commit details
    Browse the repository at this point in the history
  23. gobin: update tests

    Signed-off-by: Hank Donnay <hdonnay@redhat.com>
    hdonnay committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    0c22819 View commit details
    Browse the repository at this point in the history
  24. dpkg: update tests

    Signed-off-by: Hank Donnay <hdonnay@redhat.com>
    hdonnay committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    60bdacd View commit details
    Browse the repository at this point in the history
  25. alpine: update tests

    Signed-off-by: Hank Donnay <hdonnay@redhat.com>
    hdonnay committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    62862b0 View commit details
    Browse the repository at this point in the history
  26. claircore: update tests

    Signed-off-by: Hank Donnay <hdonnay@redhat.com>
    hdonnay committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    19e1375 View commit details
    Browse the repository at this point in the history
  27. ruby: update tests

    Signed-off-by: Hank Donnay <hdonnay@redhat.com>
    hdonnay committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    694fd4b View commit details
    Browse the repository at this point in the history
  28. periodic: update layer handling

    Signed-off-by: Hank Donnay <hdonnay@redhat.com>
    hdonnay committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    58b6b4a View commit details
    Browse the repository at this point in the history