Skip to content

Eliminate dependency to unmaintained repo tedsuo/ifrit #524

@plowin

Description

@plowin

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 sap-contributions@6cf8916#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 add manual test instructions #1 or point to acceptance-tests repo README for instructions to run acceptance tests #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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Inbox

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions