Or Elimelech

Site-Reliability Engineering

Support Touch ID for sudo

Just got a new computer again (new job) and realized I need to reconfigure sudo to work with touch-id. I then realized I didn’t have touch-id enabled for sudo in a long time, the reason is that every OS update it resets the config. Today when enabling it, I have realized that there’s a file called /etc/pam.d/sudo_local.template which does exactly that. sudo_local is a filed that will not be overwritten when upgrading between OS versions. ...

January 15, 2025 · 1 min · Or Elimelech

Add Protobuf messages into gRPC errors.

I had encountred a number of times for the need to give a structured message through gRPC errors The default Go err or status.Errorf functions are simple strings by default. func (s *Server) LintFile(ctx context.Context, req *LintRequest) (*LintResponse, error) { lintRes, err := lint(ctx, req.GetFile()) if err != nil { // lintRes is a protbuf message containing detailed error // for each line in the given file. return nil, status.New(codes.FailedPrecondition, "File isn't valid").WithDetails(lintRes) } return &LintResponse{}, nil } The example above illustrates a situation where you need to know what exactly was wrong with the file, The line number of where the error happened, what’s the reason etc. ...

May 8, 2022 · 1 min · Or Elimelech

Build a datalake on top of BigQuery

Google BigQuery is a very powerful, serverless data warehosue that lets you ingest unlimited data on a pay-per-use basis (storage + querying). The primary advantage of data warehouses is the ability to quickly query and analyze immense amounts of structured data. Modern data warehouses support new, unstructured data types such as JSON, Avro, and so on, which makes these data warehouses a great contender for data lakes. BigQuery recently added native JSON column type, which we can leverage for our semi-structured lakehouse. With JSON support we can skip the traditional datalakes that are just blob storage with files, from classic Hadoop + hive through GCS, S3, Athena etc. Maintaining such infrastructure and understanding the low-level components, such as metastore, ORC, and Parquet is an expensive process for most startups, financially and with regard to domain expertise. ...

March 14, 2022 · 4 min · Or Elimelech