Skip to content

Move off asdf and fully adopt mise

Many projects within the GitLab Infrastructure area use asdf and .tool-versions for managing dependencies.

This project has been used for several years and has helped to standardise tool versions across the department.

Recently, some team members, including myself, have switched to rtx https://github.com/jdxcode/rtx as a faster and easier-to-use alternative.

rtx is backwards compatible with asdf but offers many advantages, particularly for speed. In particular, it continues to use the asdf plugin ecosystem.

The switchover has been seamless in my experience.

It also offers a "shorthand" feature which would be particularly useful for internal asdf plugins (we host several at GitLab).

Using rtx is a relatively straight-forward switchover, but migrating everyone to rtx would offer advantages and better DX.

Fuzzy Ranges

Many infrastructure teams use Renovate, and the struggle with noise from update MRs is real.

rtx allows us to use fuzzy ranges for non-production dependencies (developer tooling, such as shfmt, shellcheck, tflint, etc, possibly golang versions, etc). This would drastically reduce the noise from patch version updates on developer tooling.

Instead of specifying exact versions for these tools, we could specific <major>.<minor> and rtx will follow the latest patch release automatically.

asdf does not support fuzzy version ranges.


Proposal: Deprecate asdf and migrate projects to rtx.

This could be done in a few steps:

  1. Make scripts/install-asdf-plugins.sh compatible with both rtx and asdf
  2. Add a warning the asdf is deprecated
  3. After some time, remove asdf support

rtx would offer much more straightforward operation and starting this migration at some point would improve DX for all SREs.

cc @reprazent @jarv @f_santos @pguinoiseau @cmiskell @sxuereb


Detailed Plan

Taken from !6293 (comment 1554604582)

I'd like to do this in a multi-phase process. Not all engineers using the projects that currently use ASDF are fully committed to switching to rtx and, to avoid disruption, I'd prefer to allow some gradual migration. Some people are still using ASDF and I want to avoid breaking their workflows unnecessarily until all stakeholders are ready.

I had intended to use the following steps:

  1. Step 1: Allow the existing approach of scripts/install-asdf-plugins.sh to continue to be used, but allow rtx to be used instead of asdf (eg !6293 (merged))
    1. Currently, plugin locations are defined in scripts/install-asdf-plugins.sh, not in rtx.toml and I'm trying to maintain compatibility during the migration, while avoiding the possibility of rtx users using a different configuration to asdf users.
  2. Step 2: Update the documentation in https://gitlab.com/gitlab-com/gl-infra/common-ci-tasks/-/blob/main/docs/developer-setup.md to only recommend rtx, switch CI checks to rtx etc. As part of this step.
  3. Announce to all stakeholders (across all relevant projects, not just runbooks) that they need to move over to rtx, and provide them with documentation from step 2 to help them migrate.
  4. Progressively introduce .rtx.toml or other rtx-only features across all projects. At part of this, I would imagine that we would probably completely remove the scripts/install-asdf-plugins.sh script as rtx install would now be sufficient.

Instructions for Migrating your Local Developer Environment from asdf to rtx

Instructions are available here: https://gitlab.com/gitlab-com/gl-infra/common-ci-tasks/-/blob/main/docs/developer-setup.md#step-31-uninstall-asdf-before-installing-rtx


Instructions for Migrating a Project from asdf to rtx

  1. asdf Plugins are compatible from rtx so no need to change.
  2. If the project is using the Infrastructure Copier Template (gitlab.com/gitlab-com/gl-infra/common-template-copier/), run copier update in the project to update to the latest template, and checkin the changes
  3. For other projects, check the scripts and documentation for the project, and fix any direct references to asdf

Projects

  1. https://gitlab.com/gitlab-com/gl-infra/ansible-migrations
  2. https://gitlab.com/gitlab-com/gl-infra/archiver
  3. https://gitlab.com/gitlab-com/gl-infra/balancer
  4. https://gitlab.com/gitlab-com/gl-infra/bigquery-import-jobs
  5. https://gitlab.com/gitlab-com/gl-infra/bigquery-loader
  6. https://gitlab.com/gitlab-com/gl-infra/capacity-planning
  7. https://gitlab.com/gitlab-com/gl-infra/chef-repo
  8. https://gitlab.com/gitlab-com/gl-infra/cicd-and-enablement/gitlab
  9. https://gitlab.com/gitlab-com/gl-infra/config-mgmt
  10. https://gitlab.com/gitlab-com/gl-infra/database-peak-load-analyzer
  11. https://gitlab.com/gitlab-com/gl-infra/database_administration_task_runner
  12. https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/community.aws
  13. https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/sandbox/switchboard_base
  14. https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/sandbox/switchboard_la
  15. https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/sandbox/switchboard_mock
  16. https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/sandbox/switchboard_uat
  17. https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/switchboard
  18. https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/team
  19. https://gitlab.com/gitlab-com/gl-infra/k8s-workloads/gitlab-helmfiles
  20. https://gitlab.com/gitlab-com/gl-infra/k8s-workloads/tanka-deployments
  21. https://gitlab.com/gitlab-com/gl-infra/mover
  22. https://gitlab.com/gitlab-com/gl-infra/mtail_deprecated
  23. https://gitlab.com/gitlab-com/gl-infra/platform/runway/ci-tasks
  24. https://gitlab.com/gitlab-com/gl-infra/platform/runway/provisioner
  25. https://gitlab.com/gitlab-com/gl-infra/platform/runway/runwayctl
  26. https://gitlab.com/gitlab-com/gl-infra/redis-chart-sandbox
  27. https://gitlab.com/gitlab-com/gl-infra/redis-cluster-sandbox
  28. https://gitlab.com/gitlab-com/gl-infra/redis-load-test
  29. https://gitlab.com/gitlab-com/gl-infra/release-environments
  30. https://gitlab.com/gitlab-com/gl-infra/renovate/renovate-ci
  31. https://gitlab.com/gitlab-com/gl-infra/third-party-container-images
  32. https://gitlab.com/gitlab-com/gl-infra/us-public-sector/compliance-config-test
  33. https://gitlab.com/gitlab-com/gl-infra/us-public-sector/switchboard_pubsec
  34. https://gitlab.com/gitlab-com/gl-infra/woodhouse
  35. https://gitlab.com/gitlab-com/gl-infra/asdf-gl-infra - gitlab-com/gl-infra/asdf-gl-infra!41 (merged)
  36. https://gitlab.com/gitlab-com/gl-infra/asdf-promtool - gitlab-com/gl-infra/asdf-promtool!49 (merged)
  37. https://gitlab.com/gitlab-com/gl-infra/cmbr - gitlab-com/gl-infra/cmbr!210 (merged)
  38. https://gitlab.com/gitlab-com/gl-infra/common-ci-tasks - gitlab-com/gl-infra/common-ci-tasks!406 (merged) gitlab-com/gl-infra/common-ci-tasks!429 (merged) gitlab-com/gl-infra/common-ci-tasks!430 (merged)
  39. https://gitlab.com/gitlab-com/gl-infra/common-ci-tasks-images - gitlab-com/gl-infra/common-ci-tasks-images!173 (merged) gitlab-com/gl-infra/common-ci-tasks-images!174 (closed)
  40. https://gitlab.com/gitlab-com/gl-infra/common-template-copier - gitlab-com/gl-infra/common-template-copier!95 (merged) gitlab-com/gl-infra/common-template-copier!112 (merged)
  41. https://gitlab.com/gitlab-com/gl-infra/gcp-quota-exporter - gitlab-com/gl-infra/gcp-quota-exporter!42 (merged)
  42. https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/amp - https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/amp/-/merge_requests/740
  43. https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/aws-instance-health-exporter - https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/aws-instance-health-exporter/-/merge_requests/147
  44. https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/backups_exporter - https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/backups_exporter/-/merge_requests/284
  45. https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/dedicated-container-image - https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/dedicated-container-image/-/merge_requests/489
  46. https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/dedicated-organization-aws - https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/dedicated-organization-aws/-/merge_requests/209
  47. https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/instrumentor - https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/instrumentor/-/merge_requests/1979 https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/instrumentor/-/merge_requests/2094
  48. https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/library/byok-status-exporter - gitlab-com/gl-infra/gitlab-dedicated/library/byok-status-exporter!95 (merged)
  49. https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/library/terraform/cloudwatch_log_export - gitlab-com/gl-infra/gitlab-dedicated/library/terraform/cloudwatch_log_export!73 (merged)
  50. https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/sandbox/gitlab-dedicated-toolbox - https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/sandbox/gitlab-dedicated-toolbox/-/merge_requests/18
  51. https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/sandbox/review-report - https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/sandbox/review-report/-/merge_requests/44
  52. https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/tenant-model-schema - https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/tenant-model-schema/-/merge_requests/120
  53. https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/tenctl - https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/tenctl/-/merge_requests/492 https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/tenctl/-/merge_requests/507
  54. https://gitlab.com/gitlab-com/gl-infra/helicopter - gitlab-com/gl-infra/helicopter!17 (merged)
  55. https://gitlab.com/gitlab-com/gl-infra/infradev-report - gitlab-com/gl-infra/infradev-report!81 (merged)
  56. https://gitlab.com/gitlab-com/gl-infra/jsonnet-tool - gitlab-com/gl-infra/jsonnet-tool!88 (merged)
  57. https://gitlab.com/gitlab-com/gl-infra/platform/gitlab-issue-report-kit - gitlab-com/gl-infra/platform/gitlab-issue-report-kit!42 (merged)
  58. https://gitlab.com/gitlab-com/gl-infra/pmv - gitlab-com/gl-infra/pmv!326 (merged)
  59. https://gitlab.com/gitlab-com/gl-infra/slackline - gitlab-com/gl-infra/slackline!196 (merged)
  60. https://gitlab.com/gitlab-com/gl-infra/tamland - https://gitlab.com/gitlab-com/gl-infra/tamland/-/merge_requests/532
  61. https://gitlab.com/gitlab-com/gl-infra/terra-transformer - gitlab-com/gl-infra/terra-transformer!310 (merged)
Generate Project List glab api --paginate 'groups/1112072/search?scope=blobs&search=asdf -GL_ASDF'|jq -r '.[]|.project_id'|sort -u > projects.txt glab api --paginate 'projects/gitlab-com%2frunbooks/issues/134/related_merge_requests' > mrs.json for i in $(cat projects.txt); do mrs=$(cat mrs.json|jq -r --argjson project $i '[.[]|select(.project_id == $project)|.web_url]|join(" ")'); glab api "projects/$i"|jq -r --arg mrs "$mrs" 'if .archived ==false then if $mrs == "" then "1. [ ] \(.web_url)" else "1. [x] \(.web_url) - \($mrs)" end else empty end'; done
Edited by Andrew Newdigate