Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

Prefer reusable build snippets #141

Open
ignasi35 opened this issue Sep 23, 2020 · 8 comments
Open

Prefer reusable build snippets #141

ignasi35 opened this issue Sep 23, 2020 · 8 comments

Comments

@ignasi35
Copy link

ignasi35 commented Sep 23, 2020

Short description

Adopt TravisCI's import feature like the scala org (usage) to reduce maintenance burden.

Details

We have multiple smaller decision:

  1. don't reinvent the wheel and use scala's template VS use an akka-org specific
  2. location (I think the akka-meta repo could be a good place)
  3. migrate to sdkman (given the scala-org's adoption and current issues with Jabba)
  4. ...?
@jrudolph
Copy link
Member

jrudolph commented Sep 23, 2020

We should at least specify a specific revision if we do this. Otherwise, that sounds like a common build plugin (rf. play) but even more likely to break your builds without you even doing anything.

@ignasi35
Copy link
Author

ignasi35 commented Sep 25, 2020

We should at least specify a specific revision if we do this. Otherwise, that sounds like a common build plugin (rf. play) but even more likely to break your builds without you even doing anything.

Sure we must be careful not relying open-range upstream dependencies. I think even the minimal approach that installs sdkman and manages caches (like in the scala example) would be an improvement.

@ignasi35
Copy link
Author

ignasi35 commented Oct 8, 2020

Another +1 in favor of sdkman (over jabba) is that it spans beyond installing JDK's (see for example https://github.com/akka/akka-platform-guide/pull/213#pullrequestreview-504852391 where we needed maven)

@softinio
Copy link

Should migrating to GitHub Actions be considered?

@patriknw
Copy link
Member

Should migrating to GitHub Actions be considered?

That is what we will try, but it will not be a big bang migration.

@ignasi35
Copy link
Author

Unrelated to the CI engine (TravisCI, GitHub Actions, Circle CI, etc...), the spirit of this issue is to try to reuse work.

@ignasi35 ignasi35 changed the title Improve travis builds to reusable(import) builds Prefer reusable build snippets Oct 26, 2020
@patriknw
Copy link
Member

the spirit of this issue is to try to reuse work.

@ennru mentioned that it might be easier to define things for reuse at the org level with GitHub Actions

@jrudolph
Copy link
Member

In general, I'm against reusing snippets in builds or providing "super-builds" or just anonymous defaults that fix the structure of builds for existing or new builds.

I'm all for unifying builds through guidelines, best practices, well-thought-out abstractions where useful and possible but simple code reuse or ad-hoc abstractions (snippets, third-party scripts like jabba) are the wrong way to go.

Good abstractions are:

  • not internal but can or could be public because of their general usability (e.g. sbt plugins)
  • referenced by a fixed id (checksum, version, etc)
    • in particular don't use internal or external scripts loaded from links that can be pulled out and replaced

In all other cases, I'd prefer copy and paste to anything else. That ensures

  • that every build is self-contained and can be debugged on the spot
  • every build can be fixed without needing access to other parts of internal infrastructure
  • builds (especially half-dormant ones) continue to work and are not disrupted by more general changes in the infrastructure

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants