changelog.com
dagger
Our great sponsors
changelog.com | dagger | |
---|---|---|
12 | 93 | |
2,669 | 10,228 | |
0.9% | 4.4% | |
9.4 | 9.9 | |
3 days ago | 4 days ago | |
Elixir | Go | |
GNU General Public License v3.0 or later | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
changelog.com
-
Ask HN: How does your CI/CD stack look like today?
Another https://dagger.io fan here. Have been using it since late 2021 to continuously deploy a Phoenix app to Fly.io: https://github.com/thechangelog/changelog.com/pull/395. Every commit goes into production.
This is what the GHA workflow currently looks like: https://github.com/thechangelog/changelog.com/blob/c7b8a57b2...
FWIW, you can see how everything fits together in this architecture diagram: https://github.com/thechangelog/changelog.com/blob/master/IN...
-
Fly.io Postgres cluster went down for 3 days, no word from them about it
I really like the work that you're doing Thomas, this is the right approach. FWIW, https://fly.io/blog/carving-the-scheduler-out-of-our-orchest... is one of my favourite posts on your blog.
For everyone else reading this, we have been running https://changelog.com on Fly.io since April 2022. This is what our architecture currently looks like: https://github.com/thechangelog/changelog.com/blob/master/IN...
After 15 months & more than 100 million requests served by our Phoenix + PostgreSQL app running on Fly.io, I would be hard pressed to find a reason to complain.
- What Phoenix Elixir Tutorial do you want to see?
- Any good and updated open source phoenix project
- Code repositories that help you to become a better Elixir programmer
-
Complete, Production-Ready Phoenix Reference Applications
Changelog.com
- Looking for recommendation of OS phoenix app to look at
-
Metaprogramming in Elixir
I see this criticism a lot but I don't think it has anything to do with macros specifically and more so to do with lack of familiarity with Elixir. I've felt the same way about Django being magic because I had trouble following the class hierarchy. It makes a lot more sense now because I'm more familiar with Python and Django. But even today I'll be looking deeper at something and ask WTF it's doing. In that respect, Elixir codebases are easier to me. The module depth seems "shallower" and I don't have to disambiguate between what behavior is caused by class inheritance or an imported function.
When I first tried to use Elixir several years ago Ecto.Schema [0] seemed complex and magical, but then I came to realize it's just converting module attributes to runtime code. There is not really that much complex macro logic going on.
>This also leads to cryptic errors where you get an error in non existant lines of code.
When was the last time you used Elixir? This isn't a problem I can recall having in the last 4 years or so of using Elixir.
>following the control flow in Phoenix is like a maze because of all the macro substitutions.
Can you clarify what you mean by this? A specific case as to where this happened for you would help. Phoenix's use of macros is actually pretty light [1] except for some very low level stuff. You can even see how frequently a developer will use macros in Phoenix by searching `__using__` in the codebase [2]. It's not used as much as people think. The majority is for views and controllers and only to provide a very thin layer of support on top of your regular use of code. As an example, the "macro magic" in Phoenix.Controller is just handling some basics for giving a layout and view to Plug and handling fallback actions for exceptions. You could do the plug calls manually and I think it would be safe to not use any macros in your controller code.
Another familiarity issue with the language (and any language really) is understanding what is meaningful in a stack trace and what isn't. And the likely cause of the error in the first place. Is it syntax? Is it mistyping a variable? Is a function just used improperly? (wtf is init_p_do_apply and why does it show up in every stacktrace?) You're juggling all these different issues - learning a new paradigm, a new syntax, not knowing how to extend things. It's obviously going to be a little overwhelming and, if not strictly required, we might just pick a different language that we're more familiar with.
[0]: https://github.com/elixir-ecto/ecto/blob/master/lib/ecto/sch...
[1]: https://github.com/thechangelog/changelog.com/blob/master/li... (not mine, I just go here to show the most frequent use of macros in Phoenix)
[2]: https://github.com/phoenixframework/phoenix/search?q=__using...
-
The new changelog.com setup for 2020
changelog.com used to be WordPress, then became a Phoenix app because it needed features that were hacky to implement & then manage in WP. It's more of a podcasting platform these days rather than a CMS.
The code in this repo tells the truth about what it is, and even shows how it works: https://github.com/thechangelog/changelog.com
dagger
- Dagger: Programmable open source CI/CD engine that runs pipelines in containers
-
Nix is a better Docker image builder than Docker's image builder
The fact that I couldn't point to one page on the docs that shows the tl;dr or the what problem is this solving
https://docs.dagger.io/quickstart/562821/hello just emits "Hello, world!" which is fantastic if you're writing a programming language but less helpful if you're trying to replace a CI/CD pipeline. Then, https://docs.dagger.io/quickstart/292472/arguments doubles down on that fallacy by going whole hog into "if you need printf in your pipline, dagger's got your back". The subsequent pages have a lot of english with little concrete examples of what's being shown.
I summarized my complaint in the linked thread as "less cowsay in the examples" but to be honest there are upteen bazillion GitHub Actions out in the world, not the very least of which your GHA pipelines use some https://github.com/dagger/dagger/blob/v0.10.2/.github/workfl... https://github.com/dagger/dagger/blob/v0.10.2/.github/workfl... so demonstrate to a potential user how they'd run any such pipeline in dagger, locally, or in Jenkins, or whatever by leveraging reusable CI functions that setup go or run trivy
Related to that, I was going to say "try incorporating some of the dagger that builds dagger" but while digging up an example, it seems that dagger doesn't make use of the functions yet <https://github.com/dagger/dagger/tree/v0.10.2/ci#readme> which is made worse by the perpetual reference to them as their internal codename of Zenith. So, even if it's not invoked by CI yet, pointing to a WIP PR or branch or something to give folks who have CI/CD problems in their head something concrete to map into how GHA or GitLabCI or Jenkins or something would go a long way
-
Testcontainers
> GHA has "service containers", but unfortunately the feature is too basic to address real-world use cases: it assumes a container image can just β¦ boot! β¦ and only talk to the code via the network. Real world use cases often require serialized steps between the test & the dependencies, e.g., to create or init database dirs, set up certs, etc.)
My biased recommendation is to write a custom Dagger function, and run it in your GHA workflow. https://dagger.io
If you find me on the Dagger discord, I will gladly write a code snippet summarizing what I have in mind, based on what you explained of your CI stack. We use GHA ourselves and use this pattern to great effect.
Disclaimer: I work there :)
-
BuildKit in depth: Docker's build engine explained
Dagger (https://dagger.io) is a great way to use BuildKit through language SDKs. It's such a better paradigm, I cannot imagine going back.
Dagger is by the same folks that brought us Docker. This is their fresh take on solving the problem of container building and much more. BuildKit can more than build images and Dagger unlocks it for you.
-
Cloud, why so difficult? π€·ββοΈ
And suddenly, it's almost painfully obvious where all the pain came from. Cloud applications today are simply a patchwork of disconnected pieces. I have a compiler for my infrastructure, another for my functions, another for my containers, another for my CI/CD pipelines. Each one takes its job super seriously, and keeps me safe and happy inside each of these machines, but my application is not running on a single machine anymore, my application is running on the cloud.
-
Share your DevOps setups
That said I've been moving my CI/CD to https://dagger.io/ which has been FANTASTIC. It's code based so you can define all your pipelines in Go, Python, or Javascript and they all run on containers so I can run actions locally without any special setup. Highly recommended.
-
Whatβs with DevOps engineers using `make` of all things?
You are right make is arcane. But it gets the job done. There are new exciting things happening in this area. Check out https://dagger.io.
-
Shellcheck finds bugs in your shell scripts
> but I'm not convinced it's ready to replace Gitlab CI.
The purpose of Dagger it's not to replace your entire CI (Gitlab in your case). As you can see from our website (https://dagger.io/engine), it works and integrates with all the current CI providers. Where Dagger really shines is to help you and your teams move all the artisanal scripts encoded in YAML into actual code and run them in containers through a fluent SDK which can be written in your language of choice. This unlocks a lot of benefits which are detailed in our docs (https://docs.dagger.io/).
> Dagger has one very big downside IMO: It does not have native integration with Gitlab, so you end up having to use Docker-in-Docker and just running dagger as a job in your pipeline.
This is not correct. Dagger doesn't depend on Docker. We're just conveniently using Docker (and other container runtimes) as it's generally available pretty much everywhere by default as a way to bootstrap the Dagger Engine. You can read more about the Dagger architecture here: https://github.com/dagger/dagger/blob/main/core/docs/d7yxc-o...
As you can see from our docs (https://docs.dagger.io/759201/gitlab-google-cloud/#step-5-cr...), we're leveraging the *default* Gitlab CI `docker` service to bootstrap the engine. There's no `docker-in-docker` happening there.
> It clumps all your previously separated steps into a single step in the Gitlab pipeline.
This is also not the case, we should definitely improve our docs to reflect that. You can organize your dagger pipelines in multiple functions and call them in separate Gitlab jobs as you're currently doing. For example, you can do the following:
```.gitlab-ci.yml
-
Cicada β A FOSS, Cross-Platform Version of GitHub Actions and Gitlab CI
Check out https://dagger.io/. Write declarative pipelines in code, reproducibly run anywhere.
-
Show HN: Togomak β declarative pipeline orchestrator based on HCL and Terraform
Is this similar to Dagger[1] ?
[1] https://dagger.io
What are some alternatives?
phoenix-liveview-counter-tutorial - π€― beginners tutorial building a real time counter in Phoenix 1.7.7 + LiveView 0.19 β‘οΈ Learn the fundamentals from first principals so you can make something amazing! π
earthly - Super simple build framework with fast, repeatable builds and an instantly familiar syntax β like Dockerfile and Makefile had a baby.
phoenix-chat-example - π¬ The Step-by-Step Beginners Tutorial for Building, Testing & Deploying a Chat app in Phoenix 1.7 [Latest] π
pipeline - A cloud-native Pipeline resource.
ex_chain - Simple Markov Chain written in Elixir
gitlab-ci-local - Tired of pushing to test your .gitlab-ci.yml?
hexpm - API server and website for Hex
act - Run your GitHub Actions locally π
feedx - Generic feed adding social features to current applications.
aws-cdk - The AWS Cloud Development Kit is a framework for defining cloud infrastructure in code
stranger - Chat anonymously with a randomly chosen stranger
dagster - An orchestration platform for the development, production, and observation of data assets.