Skip to content

Conversation

@mads-hartmann
Copy link
Contributor

Description

Consider the case where you have three Leeway Go packages A, B, C where A depends on B. B depends on C and C is ephemeral.

The ephemeral package C will always be built whenever B is built as it is never cached.

That means, if B doesn't need to be rebuilt, then C won't be built either.

As it is ephemeral it won't be in the cache either, which means that if you try to build package A when B is cached, then the build will fail as C isn't in the cache.

This PR fixes it so that ephemeral packages are ignored when checking the transitive dependencies of Go packages.

This was already the case for Yarn packages - the implementation (and comments) have been copied over verbatim

For more context around ephemeral packages see this internal Notion meeting note.

Related Issue(s)

No issue, this was discovered originally here and tested here (1,2).

From this comment it sounds like this fix is still needed.

How to test

Release Notes

Fix bug: [Go] Ignore ephemeral packages when checking transitive dependencies

Documentation

N/A

Consider the case where you have three Leeway Go packages A, B, C where A depends on B. B depends on C and C is ephemeral.

The ephemeral package C will always be built whenever B is built as it is never cached.

However, if B doesn't need to be rebuilt, then C won't be built either.

As it is ephemeral it won't be in the cache either, which means that if you try to build package A when B is cached, then the build will fail as C isn't in the cache.

This commit fixes it so that ephemeral packages are ignored when checking the transitive dependencies of Go packages.

This was already the case for Yarn packages - the implementation (and comments) have been copied over verbatim
@werft-gitpod-dev-com
Copy link

cannot start job - please talk to whoever's in charge of your Werft installation

@codecov
Copy link

codecov bot commented Nov 18, 2022

Codecov Report

Merging #121 (17b7e83) into main (4caf42a) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

@@           Coverage Diff            @@
##            main    #121      +/-   ##
========================================
- Coverage   8.44%   8.43%   -0.02%     
========================================
  Files         19      19              
  Lines       2972    2977       +5     
========================================
  Hits         251     251              
- Misses      2685    2690       +5     
  Partials      36      36              

@mads-hartmann mads-hartmann merged commit d3ff827 into main Nov 21, 2022
@mads-hartmann mads-hartmann deleted the mads-dont-check-ephmeral-pkgs-in-transitive-deps branch November 21, 2022 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants