GithubHelp home page GithubHelp logo

science-computing / butido Goto Github PK

View Code? Open in Web Editor NEW
22.0 22.0 8.0 2.21 MB

Build Linux packages using Docker containers

License: Eclipse Public License 2.0

Shell 0.12% PLpgSQL 0.20% Nix 0.10% Rust 99.59%
docker eviden hacktoberfest linux packaging

butido's People

Contributors

ammernico avatar bjoerneisenkrammer avatar bors[bot] avatar christophprokop avatar dependabot[bot] avatar dtolnay avatar lschuermann avatar matthiasbeyer avatar mersinvald avatar primeos-work avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

butido's Issues

"test" phase handling

We might introduce "test" phases that need special handling from butido, for testing a successfully built and packaged software.

Discussion required.

Specifying dependencies as KV-pairs?

Right now, dependencies are specified as a list of strings, where the strings are then parsed.

It might be beneficial, though, to specify them as key-value pairs, so they can be easily overwritten.

Make build meta-information available in build

This might hurt reusability if meta-information is interpolated into the packaging script (e.g. date), but maybe it is worth considering making such metadata available.

For example:

  • Date
  • "root" package of the build

more?

"download source" should not fail "silently"

$ butido source download libxyz =1.2.3
[00:00:01] (100%): █████ | Repository loading finished
[00:00:00] (100%): █████ | Succeeded 0/0 downloads
$ echo $?
0

" Succeeded 0/0 downloads" should be an error and/or fail and tell the user about it

Prepend "$app-$version-$distroshortname-" to logfile names

butido build --help
[...]
-L, --write-log
With this flag set, butido does not only write the build logs to database, but also to
the configured
log directory.

        The log of a build is written to `<log_dir>/<build id>.log`.
      [...]

logs are currently named $UUID.log
would be helpful to name them $UUID-$app-$version-$distroshortname.log

butido release rm only respects version number but not release_number (second, third build of the same upstream version)

$ butido release rm --from opensoftware tree "1.8.0-2"
Error: release command failed

Caused by:
    NotFound
prokop@dunwich packages $ butido release rm --from opensoftware tree "1.8.0-1"
Error: release command failed

Caused by:
    NotFound
$ butido release rm --from opensoftware tree 1.8.0
Going to delete: /scr/dunwich/prokop/butido/releases/opensoftware/opensoftware_tree_1.8.0-1.8.0-2.el7.x86_64.rpm
Going to remove from database: Release with ID 117 from 2023-01-18 23:50:51.018218
Continue? yes
prokop@dunwich packages $ butido release rm --from opensoftware tree 1.8.0
Going to delete: /scr/dunwich/prokop/butido/releases/opensoftware/opensoftware_tree_1.8.0-1.8.0-1.el7.x86_64.rpm
Going to remove from database: Release with ID 114 from 2023-01-18 15:16:34.816460
Continue? yes
$ butido release rm --from opensoftware tree 1.8.0
Error: release command failed

Caused by:
    NotFound

"build" subcommand flag: --dry-run

A --dry-run flag could be added to the "build" subcommand to do everything except executing the build, so that one can investigate what would happen.

a way to get the commit id of a butido binary

butido is version 0.3.0 atm, but with a lot of tests going on it could help to be able to output the commit id a butido binary was built on
maybe this is already possible and i just could not figure out how to get the commit id?

More template helpers

Issue to start discussion about more template helpers provided by butido.

Not sure whether we need any, but here's the place to discuss if.

butido-server

This is more of a perspectival issue.

So, right now the issue is that running butido from three different workstations from three different users results in a lot of builds on the build infrastructure. The individual instances of butido don't know from eachother and thus submit jobs to the builders as they see fit.

Having a central instance "butido-server" that schedules builds would enable better handling of load, but also some neat optimizations of build ordering.

Also, splitting a "server" part from the current CLI approach would reduce complexity in the CLI implementation, as the CLI would only be a thin-client (in the long run).

There are, of course, some subjects to think about:

The first step would be to make the server as slim as possible, and let the CLI compute everything. The server would only be responsibe for scheduling the individual jobs to the builder nodes.

Later on, though, one could think of a more advanced setup, where the server computes the scripts, the DAG and the optimal execution path. This is not trivial though.

Having a server component in the setup would also introduce other issues: build artifacts must then be stored on the server and synced to the client (the maintainer) on-demand. Definitively do-able.

The database would be another instance.
Caching of some form could be introduced (memcached, redis) to ease the load on the DB (build logs, etc are rather constant and do not change that often, so in-memory caching would be easy)

And while thinking about that, it might even be possible to split the server instance into some form of micro-services. One central scheduler instance and then "agents" which handle the build-orchestration of individual jobs on the builder instances. The builder instances could run (rather small) agents themselves, so that the communication between the orchestrating-parts and the executing-parts would be in our ecosystem.

After that, the executing-parts could implement different backends, not only docker. Building on non-x86_64 (think ARM!!!) could be rather easy to add!

Tracking build metrics

The database does not yet contain build metrics, but tracking such metrics could improve the usability quite a bit.

E.G:

  • Tracking the time a specific package build took could be used to forecast future build times (e.g. of package updates even)
  • Success of builds is not yet tracked in the DB, but could significantly reduce load when searching for builds

CI improvements

  • Drop the checklist from the PR template and check if the commits are signed off: #110
  • Fix caching: #131
  • Make the cargo-deny warnings more visible / fatal
  • Avoid warnings (etc.)
  • Stop ignoring cargo clippy warnings Lint with the beta toolchain as well (but only make the results with the MSRV binding): #111
  • Analyze the security
  • CLI/integration testing: #43
  • Nix build (sandboxed and reproducible)
  • CD? (upload binary / build artifact)
  • Enforce consistent formatting (rustfmt) via CI: #263
  • Other improvements (TODO)

"error on other task" on many builds - which one?

error on other task stops all jobs, but which job triggered it?
with some patience and scrolling you can find out yourself, but explicitly name the package which had the error in the last line (small summary) would be nice

or just print it in red, so scrolling and finding it is no hassle

CLI option to force a specific build endpoint

What

  • Bug
  • Feature Request
  • Question
  • Other

This would be necessary to test new build endpoints in a large environment where one would need to build possibly several times to get butido to consider the new one.

revert load balancer feature

load balancer does not balance within one submit
e.g. submit target with 300 dependencies -> almost all jobs run on the same endpoint / build host
next submit -> almost all jobs run on the next endpoint / build host

simple improvement of the current situation:
round-robin the jobs:
e.g. current job number modulo number of endpoints

configure shortnames of docker images in top level pkg.toml (to be used in output of "db jobs")

related to #48

old:

[docker]
# Images which can be used to build
# images not listed here are automatically rejected
images = [
    "local:rh8-default",
    "local:rh8-rust-1.56-default",
    "local:sles15-go1.16.3-default",
]

new:

images = [
 { name = "local:rh8-default", shortname = "rh8" },
 { name = "local:rh8-rust-1.56-default", shortname = "rh8rust" },
 { name = "local:sles15-go1.16.3-default", shortname = "s15go" },
] 

discussion result:
this is a breaking change of the config format, so we bump butido version (to 0.4.0)

option to manually override "reusing artifact" mechanism

goal:
quicker iterations while putting together a new build script

current situation:
if the top level pkg.toml was modified no reuse is possible for the next submit
this can be pretty annoying and time consuming if one or more dependencies take a long time to build

feature request:
if you know what you are doing (TM) you should be able to manually force a reuse of artifacts in a certain staging directory

Database optimizations

The database can be slimmed a bit:

  • ENV can be fetched from the git history of the package repository
  • The script can be recomputed from the git history of the package repository
  • The package can be fetched from the git history of the package repository

This information is stored in the DB right now, but does not have to be.

Backwards compatibility might be an issue, though.

automate downloading missing source files

[00:00:00] (100%): █████ | Source verification failed
Error: Source missing: /scr/prokop/butido/sources/mpfr-4.1.1/src.source

Why not download the source on the fly then go on with the build?

new column "distro" in butido db jobs output

$ butido db jobs -L 1
│ Submit │ Job │ Time │ Endpoint │ Success │ Package │ Version │
│ 40c0be74-0b77-457c-86a0-a1cd4f4cd1a9 │ ed855e87-0537-4b34-a45e-a7725e8b8e26 │ 2022-11-14 10:34:46 │ host1 │ yes │ demo-app │ 1.2.3│

butido db jobs does not list linux distro short name (e.g. "rh8", "sles15", ...)
location for the new column: far right (after "package" and "version")

CLI broken

After merging #41

$ butido build tree -I local:rh8-default -L 1.8.0
error: Invalid value 'false' for '--env': Error during validation: 'Incomplete' is not a key-value pair

Originally posted by @christophprokop in #41 (comment)

Replace "log" with "tracing"

This would be a really good idea, because right now butido uses log, but in general the tracing ecosystem should be used for async code.

That change is rather simple IMO (but one learns to navigate the codebase rather well, as potentially every async function and every await should be annotated). May be perfect for someone learning the project codebase.

remove arrow prefix before list of built artifacts

[00:00:40] (100%): █████ | [bonnie/14e6cba e9fd99d2-fdf0-4cfa-9c8a-8cd6cd86dd05 libgl2ps 1.4.2]: finished successfully                                                                                           Packages created:
-> /scr/stage/b5e9e6f6-1e55-427e-8ea6-d503c7c99f7f/opensoftware_libgl2ps_1.4.2-1.4.2-1.el7.x86_64.rpm

remove "->" at the beginning of the line, so copying is more convenient :)

Packages without sources

We might think about whether a package without any sources can exist.

E.G. meta-packages, that only pull in other packages.

butido build output: show main target at the bottom (instead of the top line)

When building a target with a lot of dependencies (so not all lines are visible on a single screen any more), it would be helpful to have the progress line of the main target at the bottom (at not on top):

[00:06:30] ( 0%): ░░░░░ | [51357591-4a9e-4596-9cd8-d2ad592aea52 example 1.2.3]: Waiting (7/285)...

this is not critical but rather nice to have :)

shorten header fields "Success" and "Endpoint" in butido db jobs output

$ butido db jobs -L 1
│ Submit │ Job │ Time │ Endpoint │ Success │ Package │ Version │
│ 40c0be74-0b77-457c-86a0-a1cd4f4cd1a9 │ ed855e87-0537-4b34-a45e-a7725e8b8e26 │ 2022-11-14 10:34:46 │ host1 │ yes │ demo-app │ 1.2.3│

shorten header fields:
s/Success/OK?/
and
s/Endpoint/Host/

misleading error (real problem: unbound variable)

Error: build command failed

[...]

       butido db log-of 038255b5-ac92-4f73-8880-44a7f0870abf | less -SR +G

1: Finalizing container
2: Copying the TAR stream to the staging store
3: Concatenating the output bytestream
4: Copying item from container 30a7db8788fc1946503cc736b3a627a1fe80682c04dc75f6b5b3c67ccd521c84 to host
5: Docker Error: 404 Not Found

----------------------------

this error is a bit misleading
the logfile shows the real problem:

/script: line 730: CONFIGURE_FLAGS[@]: unbound variable

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.