Closed Bug 1615256 Opened 5 years ago Closed 5 years ago

Don't download miniconda on "./gradlew clean", if already downloaded

Categories

(Data Platform and Tools :: Glean: SDK, enhancement, P1)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Dexter, Assigned: mdroettboom)

References

Details

(Whiteboard: [telemetry:glean-rs:m11])

Attachments

(1 file)

Original Fenix issue

Steps to reproduce

  1. Build Fenix with ./gradlew clean app:assembleGeckoNightlyDebug.
  2. Rebuild with the same command.

Actual behavior

The build output shows:

> Task :app:Bootstrap_CONDA_'Miniconda3'
Downloading Miniconda3-4.5.11-Linux-x86_64.sh

on every incremental rebuild, and this step takes a while (~1 minute), adding significant latency to incremental rebuilds.

Expected behavior

Only download it the first time, not for incremental rebuilds.

Device information

  • Android device: Moto G5
  • Fenix version: recent master branch
Depends on: 1592947
Priority: -- → P3
Whiteboard: [telemetry:glean-rs:m?]

The "clean" step in there will clear out everything, including the miniconda install bundled in the build directory, won't it?

(In reply to Jan-Erik Rediger [:janerik] from comment #1)

The "clean" step in there will clear out everything, including the miniconda install bundled in the build directory, won't it?

Exactly (I pointed that out in the Fenix issue). However, Gradle is...well, gradle. There's still the Gradle cache that doesn't get invalidated unless you explicitly request to do that.

Maybe there's a way to catch the "invalidate cache" from the gradle script, so that we can simply skip downloaded unless invalidating. But that's well within the Gradle-hell land. And definitely post gradle plugin migration, IMHO.

including the miniconda install bundled in the build directory, won't it?

In this case, we install miniconda in the ~/.gradle/cache directory (so it can be shared between multiple components and projects using Glean). So it is somewhat surprising that clean removes it. I think this may be an artifact from when we used to install it in the build directory.

Removing this is probably enough to fix it. The Gradle plugin has a similar issue and a similarly easy fix.

Assignee: nobody → mdroettboom
Whiteboard: [telemetry:glean-rs:m?] → [telemetry:glean-rs:m11]
Priority: P3 → P1

It's easy enough to make clean not clear the miniconda environment. However, having cache invalidation clear it seems to be no longer supported according to this StackOverflow answer. I think we're still better off just removing it from clean, so I will file a PR for that.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: