| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
oversized artifacts
This user facing string was redundantly declared in two places, only
the message when catching the error was ever printed.
|
| |
|
| |
|
| |
|
|
|
|
| |
This fixes #136
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
changed encode_message push exception from
'Command must by GLib.Variant'
to
'Command must be PushCommand'
|
| |
|
|
|
|
| |
Fixes #325.
|
|
|
|
|
|
| |
_artifactcache/pushreceive.py: Wrap OSTreeReceiver.do_run in a
profiling domain.
_profile.py: Add 'ARTIFACT_RECEIVE' domain.
|
|
|
|
| |
in constructor
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Before:
[--:--:--] WARNING Failed to fetch remote refs from ssh://ostree@ostree.baserock.org:22000/cache: BuildStream did not connect successfully to the shared cache ssh://ostree@ostree.baserock.org:22000/cache: SSH error: ssh: connect to host ostree.baserock.org port 22000: Connection refused
After:
[--:--:--] WARNING Failed to fetch remote refs from ssh://ostree@ostree.baserock.org:22000/cache. ssh: connect to host ostree.baserock.org port 22000: Connection refused
|
|
|
|
|
| |
This reduces the differences between local and remote artifact
repositories, increasing code coverage of tests.
|
|
|
|
|
| |
Closing stdout will cause an exception when used with multiprocessing as
that calls sys.stdout.flush() as well.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If you have an artifact remote cache in your config using the ssh://
protocol and some SSH issue prevents us from connecting, we now show
the user the stderr output from the `ssh` program, e.g.
[--:--:--] WARNING Failed to fetch remote refs from ssh://artifacts@172.17.0.2:22200/artifacts/: BuildStream did not connect successfully to the shared cache ssh://artifacts@172.17.0.2:22200/artifacts/: Permission denied (publickey,keyboard-interactive).
Previously we would just show the error message raised by the protocol
code, which was less useful, e.g.:
[--:--:--] WARNING Failed to fetch remote refs from ssh://artifacts@172.17.0.2:22200/artifacts/: BuildStream did not connect successfully to the shared cache ssh://artifacts@172.17.0.2:22200/artifacts/: Expected reply, got none
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
When reading element.py, I was surprised that it was importing
'inspect'.
Remove that import and some other unused ones to improve readability.
|
|
|
|
|
| |
The offset difference includes the padded bytes of the last file, i.e.,
up to 511 bytes in addition to the 512 byte block.
|
| |
|
| |
|
|
|
|
|
| |
Ensure all objects have been sent before moving them into the repository
and do not terminate pusher while receiver is still processing.
|
|
|
|
|
|
| |
Unexpected connection termination should not be considered a bug.
Fixes #51
|
|
|
|
|
|
|
|
|
|
| |
The pusher already checks this and the check in the receiver does not
provide any additional guarantees as it is prone to race conditions.
This prevents a push error in case two clients push an artifact with the
same key around the same time.
Fixes #52
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)?
|
|
|
|
|
|
|
| |
The full ref list can easily exceed the maximum message size. Limit list
to refs being pushed.
Fixes #47
|
|
|
|
|
|
| |
exc_info was uninitialized.
Fixes: 2d680719 ("Support pushing multiple refs")
|
| |
|
|
|
|
| |
This was causing tracebacks when pushing.
|
|
|
|
|
|
|
| |
o Allow specifying the push port
o Additional timed messaging at push time
o Return True if artifact was pushed, False if the artifact
already existed remotely, raise ArtifactError only on error
|
|
|
|
| |
Make the repo an argument, so that it bails out if not specified.
|
|
|
|
| |
This will help with man page generation.
|
|
Added entry point for running `bst-artifact-receive`
|