Skip to main content

DevEx Initiative: Transforming the Development Experience at PagoPA

· 13 min read

Imagine being able to release the first API for a new digital service into production in minutes instead of weeks, having fewer decisions to make, less code to interpret and maintain, onboarding new team members with zero downtime: this is the goal we set for ourselves with the Developer Experience (DevEx) initiative.

At the heart of the Engineering Area, a group of Senior, Cloud, and Staff Engineers has decided to tackle the daily challenges that slow down our work. We're here to break down barriers, simplify processes, and make software development smoother and more rewarding for everyone.

Without DX
With DX

Why DevEx

How much time is lost before even writing a line of code? How many decisions need to be made? And how long does it take for a new engineer to become truly productive?

With DevEx, we want to answer these questions and solve the problems that hinder our daily work:

  • Reduce downtime: Every second spent configuring an environment or interpreting old code is a second lost to innovation.
  • Lower cognitive load: Less complexity means more room to create value, reducing errors, and speeding up time-to-market
  • Speed up onboarding: Every new developer should be able to contribute from day one.

What We Do

As DevEx team we doesn't just identify problems and suggest solutions: we tackle them head-on, getting our hands dirty.

  • Common patterns and golden paths: We provide golden paths so you don't have to reinvent the wheel every time.
  • Ready-to-use abstractions and tools: We reduce boilerplate code so you can focus on the code that matters.
  • Optimized development environments: We share pre-configured and ready to use templates because infrastructure should never be an obstacle but a resource.
  • Centralized documentation: You'll no longer have to search for an answer; it will always be at your fingertips.

How We're Organized

Currently, the DevEx initiative is driven by engineers working asynchronously, contributing alongside their primary responsibilities within their main projects. It may not always be this way, but for now, it seems to be working!

Every two weeks, we hold a review & demo session on Google Meet. This is a key moment to review our goals (OKRs) and share our progress. Each member autonomously selects a task from the Jira DevEx Board and carries it forward, collaborating with the rest of the team through Code Reviews and RFCs.

Staff Engineers, in particular, are expected to independently select priority tasks beyond the scope of the project (domain) they are already engaged in. This approach requires collaboration from Product Managers to ensure that activities are aligned with strategic business objectives.

Innovation doesn't stop at theory: we bring solutions directly into projects, proactively supporting stream-aligned teams, and promoting the adoption of DX tools.

Where We Stand

We started with an idea and a brainstorming session, then we got to work.

Between April and July 2024, we have...

While it may seem like a lot of material, we recognize that without proper documentation and effective communication, our efforts might be overlooked. That's why we've launched a dedicated website to be populated with content and continuously updated as a reference for all engineers in the organization.

And that's not all! We're also working to provide tools (scaffolding) that can automate repetitive and redundant tasks.

info

We want to reach a point where documentation becomes unnecessary!

Pilot Projects

Although still in its early stages, much of the tooling we’ve developed has already been successfully used in several real projects.

Here are some examples!

Trial System

The team that implemented the Trial System used DevEx tooling to create a platform that allows any digital service to segment users and test new features on a selected group (feature flags):

https://github.com/pagopa/trial-system

IO FIMS

IO FIMS is a project that manages Single Sign-On for IO users. The team used DevEx tooling to create a new service:

https://github.com/pagopa/io-fims

IO communication

The team that implemented the messaging service for IO used DevEx tooling to create a new Typescript monorepo and manage the deployment of Azure Functions:

https://github.com/pagopa/io-messages

IO authentication

The team that implemented the user authentication service for IO used DevEx tooling to create a new Typescript monorepo and manage the deployment of Azure Functions:

https://github.com/pagopa/io-auth-n-identity-domain

IO services

The team that implemented the backoffice for organizations in IO used DevEx tooling to manage the deployment of infrastructure and Azure Functions:

https://github.com/search?q=repo%3Apagopa%2Fio-services-cms+pagopa%2Fdx&type=code

Current Benefits of DevEx

Let's share some brief code snippets to show how DevEx tooling can make engineers' work easier and faster.

Setting Up GitHub Repository Permissions on Azure

> cd io-messages/infra/identity
> find . -type f
./prod/outputs.tf
./prod/locals.tf
./prod/main.tf
./prod/README.md
./prod/.terraform.lock.hcl
> find . -type f | xargs wc -l | tail -n 1 | awk '{print $1}'
160 # LoC

Setting Up Autoscaling for an App Service or Function App

module "function_app_user_autoscaler" {
source = "github.com/pagopa/dx//infra/modules/azure_app_service_plan_autoscaler?ref=main"

resource_group_name = var.resource_group_name

target_service = {
function_app_name = module.function_app_user.function_app.function_app.name
}

scheduler = {
maximum = 30
normal_load = {
default = 5
minimum = 3
}
}

scale_metrics = {
cpu = {
upper_threshold = 50
increase_by = 2
}
}
}

Deploying an Azure Function App

name: Deploy (op-func)

on:
workflow_dispatch:

jobs:
op_func_deploy:
uses: pagopa/dx/.github/workflows/web_app_deploy.yaml@add-web-app-deploy-workflow
name: Deploy
secrets: inherit
with:
workspace_name: op-func
environment: app-prod
resource_group_name: io-p-weu-fims-rg-01
web_app_name: io-p-weu-fims-op-func-01
use_staging_slot: false
use_private_agent: true

Assigning Permissions to Azure Services

module "rp_func_roles" {
source = "github.com/pagopa/dx//infra/modules/azure_role_assignments?ref=main"
principal_id = module.relying_party_func.system_identity_principal

cosmos = [{
account_name = data.azurerm_cosmosdb_account.fims.name
resource_group_name = data.azurerm_cosmosdb_account.fims.resource_group_name
role = "writer"
}]

key_vault = [{
name = var.key_vault.name
resource_group_name = var.key_vault.resource_group_name
roles = { secrets = "reader" }
}]
}

I'm sold! How Can I Get Involved?

If you want to adopt our tooling, contribute to the project, or simply learn more, don't hesitate to contact us on Slack in the #team_devex channel.

We want to make your work simpler and more rewarding, and we want to support you as best as we can in these early stages of the initiative.

info

Our ultimate goal is to become unnecessary!

Looking Ahead

In the medium term (by 2025), we aim to achieve the highest score on the maturity score for our tooling and to have 100% adoption by stream-aligned teams. Follow our progress and activities on our Jira Board.

In the long term we plan to support more languages (JAVA), frameworks, and cloud providers (AWS), and to create a community of developers who share our vision and values.

Today, we are just at the beginning. With DevEx, we are redefining how we develop, collaborate, and innovate at PagoPA. Are you ready to join us on this journey?