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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge of python and ruby PostgreSQL drivers #449

Closed
larskanis opened this issue Mar 28, 2022 · 19 comments
Closed

Merge of python and ruby PostgreSQL drivers #449

larskanis opened this issue Mar 28, 2022 · 19 comments

Comments

@larskanis
Copy link
Collaborator

larskanis commented Mar 28, 2022

Never thought about the need to write drivers again and again for every programming language? Why not use one and the same code base for multiple language?

      Because it doesn't work! 馃槍

But it could! Just use pycall!

      We make the switch! In pg-1.4.2022 ! 馃槼

      Be prepared and install python today! 馃槈
larskanis added a commit that referenced this issue Mar 31, 2022
@larskanis larskanis changed the title Placeholder issue - please don't close! Merge of python and ruby PostgreSQL drivers Mar 31, 2022
@ged
Copy link
Owner

ged commented Mar 31, 2022

This will be so much easier. Thanks for doing this!

@ariccio
Copy link

ariccio commented Mar 31, 2022

As someone who knows absolutely nothing about what you're actually doing behind the scenes to make this work, will this cause problems for deployment? I'm thinking about my heroku buildpacks.

I'm generally in favor of the idea of dropping down to only one implementation! I think the CPython interpreter is some of the ugliest C I've ever seen, especially compared to the beautiful-ish C behind the Ruby interpreter, but enough people like python that I will trust that you're making the right decision here :)

@ryanb
Copy link

ryanb commented Mar 31, 2022

@ariccio this is for a message that only shows up on April 1. 馃槈

@ariccio
Copy link

ariccio commented Apr 1, 2022

LMAO
chef's kiss

@doconnor-clintel
Copy link

doconnor-clintel commented Apr 1, 2022

Yes, this has caused problems for deployment pipelines in the wild. While our [very ancient] tools probably shouldn't be so fragile as to break with content like this, the real world impact has been engineering time figuring this out for what is basically a supply chain attack.

I'd discourage you from this sort of thing if possible; considering the scope and adoption of the gem; plus the combination of automated build and dependency tools.
Putting something like this into the changelog itself; rather than code which is executed by tools like bundler would likely have had less of an impact.

@ariccio
Copy link

ariccio commented Apr 1, 2022

Wait, something in your tool chain actually broke? I was worrying that I would actually need to make sure my build pipeline had the python environment setup, not having problems right now... Kinda why I thought it was excellent.

What was your tool doing? Comparing the raw console output? Sounds to me like this gem just did some unintentional QA for you 馃ぃ

@pavels
Copy link

pavels commented Apr 1, 2022

Yes, this has caused problems for deployment pipelines in the wild. While our [very ancient] tools probably shouldn't be so fragile as to break with content like this, the real world impact has been engineering time figuring this out for what is basically a supply chain attack.

I'd discourage you from this sort of thing if possible; considering the scope and adoption of the gem; plus the combination of automated build and dependency tools. Putting something like this into the changelog itself; rather than code which is executed by tools like bundler would likely have had less of an impact.

Disclaimer: i am not affiliated with the author, just saw the message and followed the link:

IMHO

a) it is funny
b) see https://en.wikipedia.org/wiki/Chaos_engineering - in other words, things like this actually help us as and the industry as a whole to be more resilient towards disruption. Your tools should not break under this conditions and so does others. Let's make computing less fragile, one system at a time :)
c) "basically a supply chain attack" - well, it is actually not - but you can take this as a security drill - just keep in mind the real attack will not have giant message with a link in it.

@doconnor-clintel
Copy link

Sounds to me like this gem just did some unintentional QA for you

and

a) it is funny

Yeah. So here's the problem with that - chaos engineering and similar are intentional, opt in choices. Our organisation chose to use what they regarded as a reasonably well trusted public dependency of high enough quality for database connectivity; but did not opt in to this methodology.

While this was caught very early on in the piece (why I'm here pointing out this was a particularly silly thing to do; rather than dealing with spot fires); it incurs a engineering time and effort to banish the deliberately tainted dependency that could be better spent elsewhere.

I say this not from simply a cost perspective, but from a quality, risk and safety perspective.

Total downloads of this gem:
180,716,082

For this version:
18,690 (in 24 hours!)

If you assume 1 in 500 of those encounter a bug, and then 5% of those slip through a code review due to human error, then perhaps 5% more of those slip through CI/CD gates; you end up with:

(18690 * 30 days) / 500 * 0.05 * 0.05 = ~2.8 deployments/installs/etc a month broken by this; or up to ~33 a year.

What is the likelyhood that any of these industries using Ruby + Postgres?

  • Healthcare
  • Law enforcement
  • Defence
  • Finance
  • Security
  • Property

What's the likelyhood of harm occurring to people if systems in those areas experience problems? Small, but not zero. Where if this had simply been done in a changelog or as some another announcement, that risk would be a lot closer to zero.

@larskanis
Copy link
Collaborator Author

Thank you all who participated in this small April Fool, so far! I hope you recognized it as a joke and enjoyed it! Please don't forget the philosophy of ruby:

Matsumoto has said that Ruby is designed for programmer productivity and fun, following the principles of good user interface design.[81] At a Google Tech Talk in 2008 Matsumoto further stated, "I hope to see Ruby help every programmer in the world to be productive, and to enjoy programming, and to be happy. That is the primary purpose of Ruby language."

You can feel certain, that we'll continue the good work to develop and maintain this important database driver. And for sure, pg-1.4.x will bring new improvements, that I don't know today, but it will certainly not require you to install python to run ruby!

@doconnor-clintel Don't panic! Look into the commit and see that the message comes out today only. Just settle back and smile! 馃槂

Repository owner deleted a comment from pavels Apr 1, 2022
@larskanis
Copy link
Collaborator Author

Oh sorry @pavels I deleted you comment by accident!

@simi
Copy link

simi commented Apr 1, 2022

Damn, you got me for a minute @larskanis. 馃コ

@pavels
Copy link

pavels commented Apr 1, 2022

@larskanis whatever 馃槃 so be it

I just really like these small things that happens here and there (like the (in)famous message after installing https://github.com/jnunemaker/httparty ) and wanted to voice support. And i still strongly believe that we should strive to build more resilient systems that don't tend to break with changes like this.

鉂わ笍

@yshmarov
Copy link

yshmarov commented Apr 1, 2022

馃槅

@casi
Copy link

casi commented Apr 1, 2022

That's why I hate the first of April with all my heart. Okay, one of the reasons. ;)

@ChoHag
Copy link

ChoHag commented Apr 1, 2022

Why would you make a production deployment system this fragile? Who in their right mind would then use such a monstrosity in healthcare? Fix your own system don't expect the world to do it for you.

It is, indeed, funny. Finally an April fool doing it right.

@thepeoplesbourgeois
Copy link

I say this not from simply a cost perspective, but from a quality, risk and safety perspective.

I too believe that it is better from a quality, risk, and safety perspective for brittle, unexamined systems to remain that way, up until (& after?) a truly malicious attack or large-scale natural disaster completely levels said systems, resultantly toppling civilization as we know it.

@moapwr
Copy link

moapwr commented Apr 3, 2022

chaos engineering and similar are intentional, opt in choices

pulling code from the interwebs is considered an opt-in to chaos engineering

@jirihradil
Copy link

Ha. Ha.

@rchasman
Copy link

rchasman commented Jul 7, 2022

Great stuff! Thank you for maintaining this Gem and having fun with it!

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

No branches or pull requests