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>
                  sys.exit(receive_main())
                ...
                File "/src/buildstream/buildstream/_artifactcache/pushreceive.py", line 581, in __init__
                  self.repo.open(None)
              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.
      1d694b28
  2. 01 May, 2018 1 commit
  3. 30 Apr, 2018 2 commits
  4. 23 Apr, 2018 1 commit
  5. 20 Apr, 2018 1 commit
  6. 19 Apr, 2018 1 commit
  7. 14 Mar, 2018 6 commits
  8. 16 Jan, 2018 1 commit
  9. 11 Jan, 2018 3 commits
  10. 07 Dec, 2017 1 commit
  11. 23 Nov, 2017 1 commit
  12. 22 Nov, 2017 2 commits
    • Sam Thursfield's avatar
      Remove the push-port config option · 43d38715
      Sam Thursfield authored
      Ports can and should be specified by using proper ssh:// URL forms,
      e.g:
      
          ssh://artifacts@example.com:22200/artifacts
      
      The alternate form of artifacts@example.com:artifacts isn't a valid
      URL, and doesn't let you specify a different port. People are used
      to this form due to Git continuing to use it but we should encourage
      people to use proper URLs.
      43d38715
    • Sam Thursfield's avatar
      Artifact push URLs must redirect to the corresponding pull URL · 5b7d0420
      Sam Thursfield authored
      This change is part of issue #112 ("Artifact configuration is confusing
      and fragile, need canonical push/pull urls.")
      
      It updates the bst-artifact-receive program to send a pull URL to
      clients who access it over SSH.
      
      This requires extra configuration in the artifact cache server, so that
      it knows the correct pull URL. Versions of BuildStream which contain
      this commit will not be able to communicate over SSH with artifact
      caches that have not been updated to the same version.
      
      Currently this is just used to double-check user configuration, but we
      can now simplify the user facing configuration for artifact caches
      completely.
      5b7d0420
  13. 17 Nov, 2017 1 commit
  14. 13 Nov, 2017 1 commit
  15. 28 Jul, 2017 2 commits
  16. 27 Jul, 2017 2 commits
  17. 26 Jul, 2017 2 commits
  18. 21 Jul, 2017 1 commit
    • Sam Thursfield's avatar
      Check for write access to remote artifact cache early on in the pipeline · 14a8b5aa
      Sam Thursfield authored
      Previously, the first time you configured an artifact cache, you would
      get to the end of your first build and then BuildStream would exit
      because of some stupid mistake like you got the address slightly wrong
      or you forgot to add the host keys of the remote artifact cache to
      `~/.ssh/known_hosts`.
      
      To avoid surprises, if there's an artifacts push-url configured we now
      try to connect to it as a preflight check so that issues are raised
      early.
      
      On success, you will see something like this:
      
          [--:--:--][90904fe4][ main:gnu-toolchain/stage2.bst      ] START   Checking connectivity to remote artifact cache
          [00:00:00][90904fe4][ main:gnu-toolchain/stage2.bst      ] SUCCESS Connectivity OK
      
      On failure, it looks like this:
      
          [--:--:--][90904fe4][ main:gnu-toolchain/stage2.bst      ] START   Checking connectivity to remote artifact cache
          [00:00:03][90904fe4][ main:gnu-toolchain/stage2.bst      ] FAILURE BuildStream will be unable to push artifacts to the shared cache: ssh: connect to host ostree.baserock.org port 2220: Connection timed out
      
      As a bonus, for some reason this check causes SSH to ask about unknown
      host keys rather than just failing, so you may now see messages like
      this if the host keys are unknown rather than an error:
      
          The authenticity of host '[ostree.baserock.org]:22200 ([185.43.218.170]:22200)' can't be established.
          ECDSA key fingerprint is SHA256:mB+MNfYREOdRfp2FG6dceOlguE/Skd4QwnS0tvCPcnI.
          ECDSA key fingerprint is MD5:8f:fa:ab:90:19:31:f9:f7:f1:d4:e5:f0:a2:be:56:71.
          Are you sure you want to continue connecting (yes/no)?
      14a8b5aa
  19. 20 Jul, 2017 1 commit
  20. 17 Jul, 2017 1 commit
  21. 14 Jul, 2017 1 commit
  22. 13 Jul, 2017 1 commit
  23. 11 Jul, 2017 2 commits
  24. 10 Jul, 2017 2 commits