New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move ivy/coursier link farms under versioned task directories #6686

Merged
merged 6 commits into from Oct 29, 2018

Conversation

Projects
None yet
2 participants
@stuhood
Member

stuhood commented Oct 26, 2018

Problem

As described in #6679, the ivy and coursier link farms are not versioned along with the tasks that consume them. This had the effect of breaking backwards compatibility when those links converted from being symlinks to hardlinks in #6246.

Solution

Move the "task versioned workdir" logic from CacheManager to Task, to allow it to be used in more places, and then use it for both IvyTaskMixin and CoursierResolve.

Result

Rather than having a "global" link farm at .pants.d/{ivy,coursier}, the installed instances of tasks extending IvyTaskMixin or CoursierResolve will each have their own independent, versioned link farms.

Fixes #6679.

@stuhood

This comment has been minimized.

Member

stuhood commented Oct 26, 2018

The individual commits are useful to review independently.

@wisechengyi

Thanks Stu! LGTM

@classmethod
@memoized_method
def implementation_version_slug(cls):
return sha1(cls.implementation_version_str().encode('utf-8')).hexdigest()[:12]

This comment has been minimized.

@wisechengyi

wisechengyi Oct 26, 2018

Contributor

nit: can we use the same language (e.g. implementation_version_sha) to keep the meaning consistent?

# Create the task-versioned prefix of the results dir, and a stable symlink to it
# (useful when debugging).
task_version_sha = sha1(self._task_version.encode('utf-8')).hexdigest()[:12]

This comment has been minimized.

@stuhood

stuhood Oct 26, 2018

Member

I think that this is consistent in the diff? the line you commented on is older.

This comment has been minimized.

@wisechengyi

wisechengyi Oct 29, 2018

Contributor

Ah good. thanks!

@stuhood stuhood merged commit 545a00c into pantsbuild:master Oct 29, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@stuhood stuhood deleted the twitter:stuhood/ivy-coursier-versioned-links branch Oct 29, 2018

@stuhood stuhood added this to the 1.10.x milestone Oct 29, 2018

stuhood added a commit that referenced this pull request Oct 29, 2018

Move ivy/coursier link farms under versioned task directories (#6686)
### Problem

As described in #6679, the ivy and coursier link farms are not versioned along with the tasks that consume them. This had the effect of breaking backwards compatibility when those links converted from being symlinks to hardlinks in #6246.

### Solution

Move the "task versioned workdir" logic from `CacheManager` to `Task`, to allow it to be used in more places, and then use it for both `IvyTaskMixin` and `CoursierResolve`.

### Result

Rather than having a "global" link farm at `.pants.d/{ivy,coursier}`, the installed instances of tasks extending `IvyTaskMixin` or `CoursierResolve` will each have their own independent, versioned link farms.

Fixes #6679.

stuhood added a commit that referenced this pull request Oct 29, 2018

Move ivy/coursier link farms under versioned task directories (#6686)
As described in #6679, the ivy and coursier link farms are not versioned along with the tasks that consume them. This had the effect of breaking backwards compatibility when those links converted from being symlinks to hardlinks in #6246.

Move the "task versioned workdir" logic from `CacheManager` to `Task`, to allow it to be used in more places, and then use it for both `IvyTaskMixin` and `CoursierResolve`.

Rather than having a "global" link farm at `.pants.d/{ivy,coursier}`, the installed instances of tasks extending `IvyTaskMixin` or `CoursierResolve` will each have their own independent, versioned link farms.

Fixes #6679.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment