1. 05 Jun, 2018 1 commit
    • Chandan Singh's avatar
      _artifactcache/pushreceive.py: Add Click type for CLI argument 'repo' · 1d694b28
      Chandan Singh authored
      The CLI for `bst-artifact-receive` expects a `repo` argument, which is
      supposed to be a directory, but Click currently expects it to be just
      any string. This results in stack traces like the one below when the
      argument provided is not a directory:
              $ ~/.local/bin/bst-artifact-receive --pull-url http://foo foobaz
              Traceback (most recent call last):
                File "/root/.local/bin/bst-artifact-receive", line 8, in <module>
                File "/src/buildstream/buildstream/_artifactcache/pushreceive.py", line 581, in __init__
              GLib.Error: g-io-error-quark: /src/buildstream/43fref: opendir(/src/buildstream/foobaz): No such file or directory (1)
      Add types for this argument such that it throws better error messages
      when it receives bad arguments. With the Click types added, it will
      instead fail with messages like these:
              $ ~/.local/bin/bst-artifact-receive --pull-url http://foo foobaz
              Usage: bst-artifact-receive [OPTIONS] REPO
              Error: Invalid value for "repo": Directory "foobaz" does not exist.
              $ ~/.local/bin/bst-artifact-receive --pull-url http://foo setup.py
              Usage: bst-artifact-receive [OPTIONS] REPO
              Error: Invalid value for "repo": Directory "setup.py" is a file.
      Fixes #409.
  2. 31 May, 2018 1 commit
  3. 11 May, 2018 5 commits
  4. 07 May, 2018 1 commit
  5. 01 May, 2018 1 commit
  6. 30 Apr, 2018 2 commits
  7. 23 Apr, 2018 1 commit
  8. 20 Apr, 2018 1 commit
  9. 19 Apr, 2018 1 commit
  10. 14 Apr, 2018 2 commits
  11. 04 Apr, 2018 1 commit
    • Tristan Van Berkom's avatar
      _artifactcache modules: Adhere to policy on private symbols · 355b2263
      Tristan Van Berkom authored
        o This shares more code by creating ArtifactCache.get_artifact_fullname(),
          which is used for the extract directory relative path in both backends,
          and for the ostree "ref" in the ostree backend.
        o Further, this removes some redundant documentation in derived abstract
          methods, and clarifies in both backends which methods are abstract methods,
          we should only be documenting abstract method semantics in one place, where
          they are defined.
      This is a part of issue #285
  12. 03 Apr, 2018 1 commit
  13. 27 Mar, 2018 1 commit
  14. 22 Mar, 2018 1 commit
  15. 14 Mar, 2018 8 commits
  16. 27 Feb, 2018 11 commits
  17. 26 Feb, 2018 1 commit
    • Sam Thursfield's avatar
      Don't push artifacts to remote caches that already contain them · eae43fa4
      Sam Thursfield authored
      This adds two separate checks to avoid pushing artifacts unnecessarily.
      First, in the OSTreeCache.push() method we now first obtain the list of
      remotes that contain the refs that we are about to push. We then avoid
      pushing to any remote that already contains that ref.
      Note that the internal ref map is read once on process startup, so
      if multiple `bst` processes are pushing to a cache they might still both
      push the same artifact. There is an existing issue for this:
      Secondly the Element._skip_push() method now checks if all remote
      caches configured for pushing already have a given artifact, and will
      skip the push job altogether if they do. The first check would already
      mean that no pushes would actually happen, but without the second check
      the user would still see Push jobs being created for every artifact
      which would be quite misleading.