perf-tests icon indicating copy to clipboard operation
perf-tests copied to clipboard

Migrate perf-tests to Go modules

Open oxddr opened this issue 5 years ago • 11 comments

Yesterday I tried to release new version of perfdash, but failed to build a binary locally due to a missing dependency. I had a look into dependencies and it's a mess. We still use Godeps, which are now deprecated in favor of Go modules. We should migrate to go modules fully, drop support for Godeps and possibly ditch 'vendor/' dirs too (@mm4tt is there any reason we keep them?).

There are couple of reasons for migrating to Go modules fully and dropping support for Godeps.

  1. perfdash can't be built without local changes to Makefile.
  2. Little visibility into dependencies version (Godeps.json is way less readable).
  3. Vast majority of dependencies is old. perfdash code still relies on v1.11.0-alpha.0-2155-g80bd7510df of k/k
  4. godep is required to run perfdash tests. With Go modules we can use bare go.
  5. Tests run via Makefile under perfdash/ are run differently than ones in presubmit.

The only issue with migrating to go modules might be with relying on k/k as a module (https://github.com/kubernetes/kubernetes/issues/79384). There are existing workaround though.

/priority critical-urgent

oxddr avatar Mar 03 '20 14:03 oxddr

In general, I'm in favor of this change. I don't think it's critical-urgent, though. Everything seems to be working (I'm quite sure that building perfdash works if you use proper go version and disable GOMODULES). And it definitely works without any issues for clusterloader2.

Downgrading the priority to important-soon /priority important-soon

IIRC, we still have vendor dirs in some places because of the travis presubmits. But we know what to do to solve that problem (we should migrate our presubmits to prow, @jprzychodzen created one for building stuff that allowed us to get rid of vendor dir for probes/ and access-token util).

Janek, do you want to do it? Alternatively, I think it could be a good first issue (assuming we limit the scope somehow, e.g. to starting with perf-dash). In that case we should lay out a better plan.

mm4tt avatar Mar 03 '20 15:03 mm4tt

/remove-priority critical-urgent With https://github.com/kubernetes/perf-tests/pull/1100 merged, this is indeed not that urgent, as we will be able to again build perfdash at HEAD.

I tried to check if this can be done with a simple PR, but I think there is more work needed to make sure we don't break anything. I could prepare a plan on how to do it, what is exactly in the scope (e.g. migration off Travis to Prow) and then we can discuss timeline. I suspect most of the work from the plan, could be a "good first issue" then.

oxddr avatar Mar 03 '20 15:03 oxddr

Sounds good, thanks!

mm4tt avatar Mar 03 '20 15:03 mm4tt

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale

fejta-bot avatar Jun 01 '20 15:06 fejta-bot

/remove-lifecycle stale

@mm4tt - has this been finished?

wojtek-t avatar Jun 02 '20 07:06 wojtek-t

I know we migrated some things (like ClusterLoader), but the question is whether we upgraded all.

wojtek-t avatar Jun 02 '20 07:06 wojtek-t

We haven't migrated all. There are some that we'll probably never migrate, like benchmark or compare tools. But, we should definitely migrate perf-dash as we're using (building) it a lot.

mm4tt avatar Jun 02 '20 08:06 mm4tt

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale

fejta-bot avatar Aug 31 '20 09:08 fejta-bot

/remove-lifecycle stale /lifecycle frozen

wojtek-t avatar Aug 31 '20 09:08 wojtek-t

@mm4tt @wojtek-t I would like to take stab at it. /assign

kushthedude avatar Sep 01 '20 05:09 kushthedude

Note that it's partially done already - most of dirs are already migrated. There are one or two remaining IIRC.

wojtek-t avatar Sep 01 '20 06:09 wojtek-t

In perf-tests currently I just see go.mods everywhere, although there is a /vendor directory in dns/dnsperfgo.

Is there more to do here still, or can this issue be closed?

mboersma avatar Aug 01 '24 17:08 mboersma

Yeah, I think we can close this.

wojtek-t avatar Aug 01 '24 18:08 wojtek-t