cloudfoundry / cloudfoundry/routing-release

Eliminate dependency to unmaintained repo tedsuo/ifrit

Open
#524 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
176
Forks
114
Avg merge
2d 19h
Merged PRs (30d)
6

Description

Proposed Change

User Story

As a CF ARP WG
I want to only use maintained dependencies
So that I am not exposed to the need of huge refactoring under time-pressure.

Problem

The repo https://github.com/tedsuo/ifrit is not maintained for several years. It offers an abstraction layer for native go channel- and process-handling. It is heavily used throughout routing-release, but also in many other CF repositories.

To reduce the risk of ad-hoc activities if it ever needs changes (e.g. due to CVEs or adjustments in golang) and to trigger a discussion if go-primitives are preferred over the abstraction by the majority of developers, this issue is created.

Options:

  1. Replace ifrit with idiomatic go.
    An untested example for the gorouter was drafted in https://github.com/sap-contributions/routing-release/commit/6cf89165bfd9015063f8cfe6d23c1bb0846e61c2#diff-636ef16853458537432de96b291a12d4d1218e1425fe959ac712884948f02376. For routing-release, more usages need to be adjusted, see direct imports of ifrit below.
    Pro: Less dependencies, style preferred by some devs
    Con: Efforts for all WGs and risk to introduce untested side-effects
  2. Take over ifrit in some working group of cloudfoundry and maintain it
    Pro: Solution for all WGs with minimal effort
    Con: One WG has to take ownership, abstraction remains
  3. Accept the current situation and go with #1 or #2 in case of an issue

References

  • Direct usages of ifrit in routing-release:
➜  routing-release git:(develop)  rg -l --type go --glob '!**/vendor/**' github.com/tedsuo/ifrit
src/code.cloudfoundry.org/cf-tcp-router/metrics_reporter/metrics_reporter_test.go
src/code.cloudfoundry.org/route-registrar/main.go
src/code.cloudfoundry.org/cf-tcp-router/syncer/syncer_test.go
src/code.cloudfoundry.org/gorouter/router/router_drain_test.go
src/code.cloudfoundry.org/cf-tcp-router/watcher/watcher.go
src/code.cloudfoundry.org/routing-acceptance-tests/assets/tcp-sample-receiver/testrunner/sample-receiver-runner.go
src/code.cloudfoundry.org/route-registrar/registrar/registrar.go
src/code.cloudfoundry.org/cf-tcp-router/watcher/watcher_test.go
src/code.cloudfoundry.org/route-registrar/registrar/routes_config_watcher_test.go
src/code.cloudfoundry.org/cf-tcp-router/monitor/monitor_test.go
src/code.cloudfoundry.org/gorouter/router/router_test.go
src/code.cloudfoundry.org/cf-tcp-router/cmd/cf-tcp-router/main_test.go
src/code.cloudfoundry.org/cf-tcp-router/cmd/cf-tcp-router/main.go
src/code.cloudfoundry.org/routing-api/helpers/helpers_test.go
src/code.cloudfoundry.org/gorouter/route_fetcher/route_fetcher_test.go
src/code.cloudfoundry.org/cf-tcp-router/cmd/cf-tcp-router/main_suite_test.go
src/code.cloudfoundry.org/gorouter/cmd/gorouter/main.go
src/code.cloudfoundry.org/cf-tcp-router/cmd/cf-tcp-router/testrunner/runner.go
src/code.cloudfoundry.org/gorouter/metrics/monitor/nats_monitor_test.go
src/code.cloudfoundry.org/gorouter/metrics/monitor/fd_monitor_test.go
src/code.cloudfoundry.org/gorouter/mbus/subscriber_test.go
src/code.cloudfoundry.org/routing-api/admin/server_test.go
src/code.cloudfoundry.org/routing-api/admin/server.go
src/code.cloudfoundry.org/routing-api/cmd/routing-api/main_test.go
src/code.cloudfoundry.org/routing-api/cmd/routing-api/routing_api_suite_test.go
src/code.cloudfoundry.org/routing-api/cmd/routing-api/locket_test.go
src/code.cloudfoundry.org/routing-api/cmd/routing-api/stats_test.go
src/code.cloudfoundry.org/routing-api/cmd/routing-api/api_test.go
src/code.cloudfoundry.org/routing-api/cmd/routing-api/main.go
src/code.cloudfoundry.org/routing-api/cmd/routing-api/testrunner/locket.go
src/code.cloudfoundry.org/routing-api/cmd/routing-api/testrunner/runner.go
gh api -H 'Accept: application/vnd.github+json' \
  --paginate \
  'search/code?q=org:cloudfoundry+"github.com/tedsuo/ifrit"&per_page=100' \
  --jq '.items[].repository.full_name' \
  | sort -u
cloudfoundry/app-autoscaler
cloudfoundry/app-autoscaler-release
cloudfoundry/bbs
cloudfoundry/blackbox
cloudfoundry/bosh-openstack-cpi-release
cloudfoundry/bosh-utils
cloudfoundry/cc-uploader
cloudfoundry/cf-networking-helpers
cloudfoundry/cf-networking-release
cloudfoundry/clock
cloudfoundry/cloud_controller_ng
cloudfoundry/debugserver
cloudfoundry/diego-release
cloudfoundry/dockerdriver
cloudfoundry/executor
cloudfoundry/existingvolumebroker
cloudfoundry/go-fetcher
cloudfoundry/grace
cloudfoundry/guardian
cloudfoundry/locket
cloudfoundry/mapfs-release
cloudfoundry/nats-release
cloudfoundry/nfs-volume-release
cloudfoundry/pxc-release
cloudfoundry/rep
cloudfoundry/routing-api
cloudfoundry/routing-release
cloudfoundry/runtimeschema
cloudfoundry/silk-release
cloudfoundry/smb-volume-release
cloudfoundry/sync-integration-tests
cloudfoundry/tps
Acceptance criteria
  • Options are discussed within the CF community and decision is taken
  • Relevant part for routing-release is adjusted/implemented
Related links

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the listed direct ifrit imports under src/code.cloudfoundry.org and the referenced routing-release example commit. Use the provided ripgrep command to confirm current usages, then follow the CF community discussion to determine whether to replace ifrit or maintain it. Done means a decision is recorded and the relevant routing-release usages are adjusted or implemented.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.