this post was submitted on 20 Mar 2025
29 points (79.6% liked)

Programming

19203 readers
152 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 2 years ago
MODERATORS
top 28 comments
sorted by: hot top controversial new old
[–] [email protected] 3 points 6 days ago* (last edited 6 days ago) (2 children)

Article topic aside, is anyone else getting annoyed by those AI generated images for articles?

[–] mke 3 points 6 days ago* (last edited 6 days ago)

As a small protest against problems with the AI industry, I don't read posts with them. It costs little to not contribute to the issues at hand, and being unwilling to drop the slop doesn't endear the authors to me.

[–] Kissaki 1 points 6 days ago

Not much more than the stock images we had before. When they're added to articles, most of the time, they added nothing but noise and wasted layout space the same way. It's just that the image is generated, sometimes [even more] silly now.

[–] [email protected] 12 points 1 week ago (4 children)

Do formatting and linting and such autofix issues automatically as part of pre-commit checks. That way they don't end up as part of the CI.

[–] [email protected] 8 points 1 week ago (1 children)

Agreed. The idea of throwing code up at the CI and expecting it to fix my mistakes seems like a bad habit to me.

[–] [email protected] 7 points 1 week ago

Yep, I'd say so too. The moment I read the part about formatting in the CI, I thought to myself: I don't think GitHub Actions are the problem at hand. 😄

[–] FizzyOrange 7 points 1 week ago (1 children)

You need them in CI anyway to check people have actually done that, but yeah you definitely don't need to have CI automatically fix formatting and commit the fixes. That's crazy.

[–] [email protected] -4 points 1 week ago* (last edited 1 week ago) (1 children)

No, you don't.

To check if people have done what - committed? That's the only thing they need to do, and they'll stumble upon a roadblock immediately if the typecheck or lint fails.

Committing itself won't be possible... That's why we have automated pre-commit checks that don't depend on people remembering to do them manually.

[–] FizzyOrange 4 points 1 week ago (1 children)

To check that people ran the pre-commit linters.

Committing itself won’t be possible

That's not how pre-commit hooks work. They're entirely optional and opt-in. You need CI to also run them to ensure people don't forget.

[–] [email protected] -2 points 1 week ago (1 children)

They're optional if you make them optional. I didn't. You do as you please. 😄

[–] FizzyOrange 5 points 1 week ago (1 children)

No, they're inherently optional in Git. There's no way to "check in" a git hook. You have to put in your README

Clone the repo and then please run pre-commit install! Oh and whatever you do don't git commit --no-verify!

You definitely need to actually check the lints in CI. It's very easy though, just add pre-commit run -a to your CI script.

[–] [email protected] 2 points 1 week ago

pre-commit also has a free service for open source GitHub repos too. They’ll even push an autofix commit for you if your tools are configured for it

[–] [email protected] 3 points 1 week ago

This is the way. I do my checks on pre push because my team has a PR driven workflow. I also have an alias to run-tests && git push origin HEAD since my tests are expensive (minutes to run thousands of tests), and I didn't want that in a git hook.

[–] [email protected] 2 points 1 week ago (1 children)

If it's open source I'd still add it, because a lot of people can't follow basic instructions.

[–] [email protected] 0 points 1 week ago (1 children)

They don't have to follow anything except try to commit their changes. Won't be possible even locally if linting or typechecking fail.

[–] [email protected] 1 points 1 week ago

Pre-commit hooks can’t be installed automatically and most people won’t even know they exist.

[–] [email protected] 4 points 1 week ago (2 children)

Just self host an open source runner like woodpecker and you'll never have to move again

hell you can even self host github actions via act

[–] runeko 4 points 1 week ago

This. As someone who migrated an organization's repos from a self hosted Git server to GitHub (begrudgingly) and then back to a self hosted Git server again when it didn't meet the business needs ... emphatically this.

[–] 0xDEADBEEFCAFE 1 points 1 week ago (1 children)

Just self host an open source runner like woodpecker and you’ll never have to move again

How painful is the setup and general maintenance/security?

I'm considering the idea but I just don't want to deal with people abusing exploits in the actions that give them access to my LAN.

[–] [email protected] 1 points 1 week ago (1 children)

If you're working with a team, you can only let certain people trigger checks

[–] 0xDEADBEEFCAFE 1 points 6 days ago

I was more thinking along the lines of having FOSS repos that are primarily used by me but which can accept external pull requests by anybody with a Github account.

I like the idea of running my own machine for CI but I don't like the idea of having to become knowledgeable about avoiding exploits.

[–] dallen 3 points 1 week ago (2 children)

Actions are fine for very simple repos.

Gitlab CI is a dream, definitely my preference at work.

Jenkins can be okay or horrible depending on the setup.

[–] NostraDavid 1 points 6 days ago* (last edited 6 days ago)

Jenkins is neat if you use a shared repo. Yes, the functions are weird (a file is a function, and the function inside is named call.), but having a default list of *Pipeline.Jenksfile (ingestionPipeline, modelPipeline, parserPipeline, dataProductPipeline, etc - data engineer here) is so nice. You can also specify which branch of that repo you are running as well!

It's less neat if you previously had to migrate off of a Jenkins that had everything running as root, to a Jenkins that doesn't.

At least if you fix a bug for a function that's used in multiple pipelines, it's fixed everywhere. Or if you fix a bug in a single pipeline, it's fixed for multiple repos.

edit: the Groovy language isn't great though. Not being able to pass kwargs in my own order, unclear how to define the pipeline (somewhat lacking docs, grabbing working examples from SO). I wish something like Python would've been used instead.

[–] Kissaki 4 points 1 week ago

What makes GitLab CI better than GitHub Actions in your eyes?

I've not extensively used either, and GitLab CI has been a while, but they felt pretty similar. I had put them into the same category.

We use Jenkins at work. I administrate it. For the most part, I find it horrendous.

[–] [email protected] 3 points 1 week ago

Github actions and docker containers. A match made in heck.

[–] onlinepersona 2 points 1 week ago (1 children)

The only good thing about Github Actions is the "marketplace" or that you can publish and find actions. The rest is just... not the way I'd do CI. I'm so glad I don't have to touch that anymore. Only thing worse than Github CI is Jenkins. *Shudder*

Anti Commercial-AI license

[–] Kissaki 3 points 1 week ago (1 children)

You like the marketplace? I dislike it. Or at least its form. I appreciate that there is sharing of actions.

But I dislike having to navigate between repo and marketplace pages. I dislike that I have to assess who publishes them and inspect whether they and the code are trustworthy, and I have to assess risk or whether to copy or extract the relevant code. (And then you have to add and configure via text and magic strings and look up params elsewhere which of course is a consequence of the tech, not a fault of the marketplace itself.)

I feel it adds so much indirection and diffusion it's hard to do good trustworthy actions/code well. Which if course stands against it's usefulness of sharing workflows and actions. I know I'm more concerned and more thorough with that stuff than most people.

[–] onlinepersona 1 points 1 week ago

I like the concept. It helps with not having to rewrite the same stuff over and over again. It's like a package registry. Whether it's implemented well is debatable of course and it's understandable you don't like it.

Anti Commercial-AI license