Skip to content
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

Build hygiene: Ensure that no packages compute their hash based on files that we .gitignore #14157

Closed
mads-hartmann opened this issue Oct 25, 2022 · 4 comments · Fixed by #15120
Assignees

Comments

@mads-hartmann
Copy link
Contributor

Some Leeway packages include files that we have in .gitignore in their source declarations, which means that the hash of the package is different in a Gitpod Workspace (due to builds performed as part of our prebuilds I believe) than in our Werft builds.

A temporary solution has been implemented in #14156 but we should fix the package definitions properly.

To see what packages needs out attention: Start a new workspace, modify dev/preview/workflow/preview/build.sh by removing git clean -dfX and adding --dry-run to the leeway invocation.

@mads-hartmann
Copy link
Contributor Author

This is breaking some workflows for developers, so worth prioritising now that people are using leeway run dev:preview ☺️ More context here

@mads-hartmann
Copy link
Contributor Author

A suggestion from Chris:

this is a great place to introduce a leeway vet rule for that checks if node_modules is part of the resolved sources.
We have source related rules for docker already.

I think this would be great way to tackle the problem.

  1. Extend vet to detect the kinds of files that are causing problems (node_modules, dist folders, etc)
  2. Bump Leeway in the workspace. Run leeyway vet and fix all the problems
  3. Remove the deletion of the files in build.sh

@mads-hartmann mads-hartmann changed the title Build: Ensure that no packages compute their hash based on files that we .gitignore Build hygiene: Ensure that no packages compute their hash based on files that we .gitignore Nov 21, 2022
@gtsiolis
Copy link
Contributor

Cross-posting a temporary workaround for visibility until this gets properly resolved, see relevant discussion (internal).

... for those wanting to use telepresence after running leeway run dev:preview, do yarn && yarn build first in /workspace/gitpod [1].

Cc @laushinka @mads-hartmann @svenefftinge @csweichel

@mads-hartmann
Copy link
Contributor Author

I created gitpod-io/leeway#140 to extend leeway to make it easier to find files in srcs that are .gitignored but I don't think I'll need it to solve this specific issue as I already made a lot of progress https://github.com/gitpod-io/gitpod/pull/15120/files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants