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

doc: clarify Cirrus self-hosted workers setup #30314

Merged
merged 1 commit into from
Jun 21, 2024

Conversation

Sjors
Copy link
Member

@Sjors Sjors commented Jun 20, 2024

Taken from #29274 (except for two paragraphs that require the other commits in that PR).

@DrahtBot
Copy link
Contributor

DrahtBot commented Jun 20, 2024

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage

For detailed information about the code coverage, see the test coverage report.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK maflcko, tdb3

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #29432 (Stratum v2 Template Provider (take 3) by Sjors)
  • #29274 (Support self-hosted Cirrus workers on forks by Sjors)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@DrahtBot DrahtBot added the Tests label Jun 20, 2024
@Sjors Sjors changed the title ci: clarify Cirrus self-hosted workers setup doc: clarify Cirrus self-hosted workers setup Jun 20, 2024
Copy link
Member

@maflcko maflcko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 9f4255a 🌂

Show signature

Signature:

untrusted comment: signature from minisign secret key on empty file; verify via: minisign -Vm "${path_to_any_empty_file}" -P RWTRmVTMeKV5noAMqVlsMugDDCyyTSbA3Re5AkUrhvLVln0tSaFWglOw -x "${path_to_this_whole_four_line_signature_blob}"
RUTRmVTMeKV5npGrKx1nqXCw5zeVHdtdYURB/KlyA/LMFgpNCs+SkW9a8N95d+U4AP1RJMi+krxU1A3Yux4bpwZNLvVBKy0wLgM=
trusted comment: ACK 9f4255ac57929de985425f26ad904a12176a0e85 🌂
UUSQcgPjO07LFUTZUP8JVqqHdsEpkqLnB5MQjPPzt6EDDztzLcIRrJIR/pQPe6hCTTzAK6Yz/mVfi1zCB2FsAA==

.cirrus.yml Outdated Show resolved Hide resolved
.cirrus.yml Show resolved Hide resolved
.cirrus.yml Outdated
#
# CI jobs for the latter configuration can be run on x86_64 hardware
# by installing qemu-user-static, which may work out of the box with
# podman or docker.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which may work out of the box with podman or docker.

Please don't add vaugeries like this to docs. If you have a specific issue that you're running into, please open an issue, otherwise things should be assumed to be working (otherwise they should be fixed, rather than adding docs claiming they might not work).

Copy link
Member Author

@Sjors Sjors Jun 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if it works out of the box for every distro out there. It does for Ubuntu 24.04 when used with podman, at least after a reboot. I haven't tested with docker nor on any other distro. The documentation for https://github.com/multiarch/qemu-user-static says you need to run sudo podman run --rm --privileged multiarch/qemu-user-static --reset -p yes first, but this is not (no longer?) true.

What I'm trying to convey with "may work" is: it might work with just sudo apt install qemu-user-static, even though the projects own README says it doesn't. I can change it to "works", but that might be wrong - hard to know without trying every permutation out there.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This uncertainty is also part of the reason #29274 adds NO_ARM as an option.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if it works out of the box for every distro out there

That's fine. Just assume it does until we know otherwise.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, changed to "works" and added a link that explains what this does.

@Sjors
Copy link
Member Author

Sjors commented Jun 20, 2024

Fixed @maflcko's nits.

Copy link
Contributor

@tdb3 tdb3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approach ACK.
This adds more clarity to CI config, much appreciated.
Left a comment and thought.

# https://cirrus-ci.org/guide/persistent-workers/
#
# It is possible to select a specific persistent worker by label. Refer to the
# Generally, a persistent worker must run Ubuntu 23.04+ or Debian 12+.
Copy link
Contributor

@tdb3 tdb3 Jun 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These specs will become outdated over time (e.g. Ubuntu 23.04 which is already obsolete). Maybe instead it would be better to point the reader to doc/dependencies.md (or doc/build-unix.md, etc.)? dependencies.md doesn't currently specify distro versions, but would it be the case that dependency versions are really what matters, and distro version is a downstream consequence of that?

Perhaps this is a little less easy for the reader but helps prevent this file from becoming stale. Something like:

- # Generally, a persistent worker must run Ubuntu 23.04+ or Debian 12+.
+ # Generally, a persistent worker must run a distribution that supports the minimum dependencies in `doc/dependencies.md`

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just a moved sentence and still correct. 23.04+ is required, and should work, if someone manages to install it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, your suggestion is incorrect. doc/dependencies.md has nothing to do with a CI system runner. In fact, you can probably use any distro, as long as you can install podman4.1+ or docker on it.

Copy link
Contributor

@tdb3 tdb3 Jun 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point about the +. The thought was "Is there a way to describe what the needs are while minimizing the future changes needed to this file?" If we think pointing elsewhere (e.g. to a place that describes the needs, but is being updated for additional reasons beyond this file) is overkill, then we don't need to change this line.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we think pointing elsewhere (e.g. to a place that describes the needs, but is being updated for additional reasons beyond this file) is overkill, then we don't need to change this line.

The file is self-contained regarding this line and there is no need to point elsewhere. "podman4.1+" is equivalent to "vanilla Ubuntu 23.04+" (forever), so there is no need to update it in the future.

Comment on lines +18 to +21
# The following specific types should exist, with the following requirements:
# - small: For an x86_64 machine, recommended to have 2 CPUs and 8 GB of memory.
# - medium: For an x86_64 machine, recommended to have 4 CPUs and 16 GB of memory.
# - arm64: For an aarch64 machine, recommended to have 2 CPUs and 8 GB of memory.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one I'm a little torn about. Ideally, these machine specs would change less frequently than Linux distro versions (a side effect of keeping node requirements modest/reasonable), so maybe it makes sense to leave these specifics in this file.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what you mean. This is just a moved section to explain the three possible and required labels.

Copy link
Contributor

@tdb3 tdb3 Jun 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initially, the thought was similar to above, if specs change, do we want to come back to this file and adjust them here, or would it be better to have a place that we can point to for minimum/recommended specs more generally or globally (since building and running tests happen for development in general rather than solely in CI)?
If these specs won't change very frequently, then it's not a big risk to keep them here and update this file over time.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file .cirrus.yml is self-contained and only concerns Cirrus CI. It has no meaning for the outside CI system. The labels are used in this config file only, they are only required here, and they are explained here.

@maflcko
Copy link
Member

maflcko commented Jun 21, 2024

ACK 66b9740

@DrahtBot DrahtBot requested a review from tdb3 June 21, 2024 06:02
@maflcko
Copy link
Member

maflcko commented Jun 21, 2024

ACK c67f215

Copy link
Contributor

@tdb3 tdb3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK c67f215

@fanquake fanquake merged commit 5383637 into bitcoin:master Jun 21, 2024
16 checks passed
@Sjors Sjors deleted the 2024/06/cirrus-docs branch June 21, 2024 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants