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.
asdf
and migrate projects to rtx
.
Proposal: Deprecate This could be done in a few steps:
- Make
scripts/install-asdf-plugins.sh
compatible with bothrtx
andasdf
- Add a warning the
asdf
is deprecated - 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:
- 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))
- Currently, plugin locations are defined in
scripts/install-asdf-plugins.sh
, not inrtx.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.- 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.- 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.- Progressively introduce
.rtx.toml
or otherrtx
-only features across all projects. At part of this, I would imagine that we would probably completely remove thescripts/install-asdf-plugins.sh
script asrtx install
would now be sufficient.
asdf
to rtx
Instructions for Migrating your Local Developer Environment from 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
asdf
to rtx
Instructions for Migrating a Project from -
asdf
Plugins are compatible fromrtx
so no need to change. - 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 - For other projects, check the scripts and documentation for the project, and fix any direct references to
asdf
Projects
-
https://gitlab.com/gitlab-com/gl-infra/ansible-migrations -
https://gitlab.com/gitlab-com/gl-infra/archiver -
https://gitlab.com/gitlab-com/gl-infra/balancer -
https://gitlab.com/gitlab-com/gl-infra/bigquery-import-jobs -
https://gitlab.com/gitlab-com/gl-infra/bigquery-loader -
https://gitlab.com/gitlab-com/gl-infra/capacity-planning -
https://gitlab.com/gitlab-com/gl-infra/chef-repo -
https://gitlab.com/gitlab-com/gl-infra/cicd-and-enablement/gitlab -
https://gitlab.com/gitlab-com/gl-infra/config-mgmt -
https://gitlab.com/gitlab-com/gl-infra/database-peak-load-analyzer -
https://gitlab.com/gitlab-com/gl-infra/database_administration_task_runner -
https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/community.aws -
https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/sandbox/switchboard_base -
https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/sandbox/switchboard_la -
https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/sandbox/switchboard_mock -
https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/sandbox/switchboard_uat -
https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/switchboard -
https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/team -
https://gitlab.com/gitlab-com/gl-infra/k8s-workloads/gitlab-helmfiles -
https://gitlab.com/gitlab-com/gl-infra/k8s-workloads/tanka-deployments -
https://gitlab.com/gitlab-com/gl-infra/mover -
https://gitlab.com/gitlab-com/gl-infra/mtail_deprecated -
https://gitlab.com/gitlab-com/gl-infra/platform/runway/ci-tasks -
https://gitlab.com/gitlab-com/gl-infra/platform/runway/provisioner -
https://gitlab.com/gitlab-com/gl-infra/platform/runway/runwayctl -
https://gitlab.com/gitlab-com/gl-infra/redis-chart-sandbox -
https://gitlab.com/gitlab-com/gl-infra/redis-cluster-sandbox -
https://gitlab.com/gitlab-com/gl-infra/redis-load-test -
https://gitlab.com/gitlab-com/gl-infra/release-environments -
https://gitlab.com/gitlab-com/gl-infra/renovate/renovate-ci -
https://gitlab.com/gitlab-com/gl-infra/third-party-container-images -
https://gitlab.com/gitlab-com/gl-infra/us-public-sector/compliance-config-test -
https://gitlab.com/gitlab-com/gl-infra/us-public-sector/switchboard_pubsec -
https://gitlab.com/gitlab-com/gl-infra/woodhouse -
https://gitlab.com/gitlab-com/gl-infra/asdf-gl-infra - gitlab-com/gl-infra/asdf-gl-infra!41 (merged) -
https://gitlab.com/gitlab-com/gl-infra/asdf-promtool - gitlab-com/gl-infra/asdf-promtool!49 (merged) -
https://gitlab.com/gitlab-com/gl-infra/cmbr - gitlab-com/gl-infra/cmbr!210 (merged) -
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) -
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) -
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) -
https://gitlab.com/gitlab-com/gl-infra/gcp-quota-exporter - gitlab-com/gl-infra/gcp-quota-exporter!42 (merged) -
https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/amp - https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/amp/-/merge_requests/740 -
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 -
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 -
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 -
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 -
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 -
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) -
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) -
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 -
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 -
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 -
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 -
https://gitlab.com/gitlab-com/gl-infra/helicopter - gitlab-com/gl-infra/helicopter!17 (merged) -
https://gitlab.com/gitlab-com/gl-infra/infradev-report - gitlab-com/gl-infra/infradev-report!81 (merged) -
https://gitlab.com/gitlab-com/gl-infra/jsonnet-tool - gitlab-com/gl-infra/jsonnet-tool!88 (merged) -
https://gitlab.com/gitlab-com/gl-infra/platform/gitlab-issue-report-kit - gitlab-com/gl-infra/platform/gitlab-issue-report-kit!42 (merged) -
https://gitlab.com/gitlab-com/gl-infra/pmv - gitlab-com/gl-infra/pmv!326 (merged) -
https://gitlab.com/gitlab-com/gl-infra/slackline - gitlab-com/gl-infra/slackline!196 (merged) -
https://gitlab.com/gitlab-com/gl-infra/tamland - https://gitlab.com/gitlab-com/gl-infra/tamland/-/merge_requests/532 -
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