-
Notifications
You must be signed in to change notification settings - Fork 910
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
Earthly build issues and feedback #5750
Comments
Something that didn't occur to me until today - do we want to back port this change to our currently maintained release branches? If not, we'll be working with two build systems. Perhaps that's okay while we run the experiment? We could update the release branches if and when we commit to Earthly. |
I've seen earthly/earthly#3736 once or twice today (but not before). It seems like we can run with |
Here's an example of a PR with a full remote registry cache hit. You can see that the lint, check-diff and unit-test jobs all complete in less than a minute. This is because none of the build inputs changed between the latest master build and this PR. Earthly knows there's no point re-running them, so it skips them just like a On the other hand, the codeql, e2e, and publish-artifacts jobs don't benefit much in this run. I'm pretty confident the publish-artifacts job doesn't benefit from cache because one of its inputs is Line 149 in 925e888
Edit: I figured out why CodeQL and E2E tests weren't being cached. It was also due to |
Just realized we need to teach Renovate about |
The E2E tests should be writing Line 62 in ed0fb98
I think this error has something to do with it:
I notice this happens every time an E2E test fails, but not when other things (e.g. Edit: Opened earthly/earthly#4173 for clarification. |
Line 149 in 925e888
If we could somehow inject this version after the binary was built it would help a lot with build caching. No idea how to do that though. Maybe patch the binary? For the OCI image we could just set an env var or inject a file, but that doesn't help with the binaries, especially |
Not quite what you are asking for, but you can move the arg down below the copy and it should save you redoing the COPY when the version changes but not the files. That may never happen, but the general principle of pushing the args down to right before they are used might be helpful in general. |
@adamgordonbell Thanks! Unfortunately the bulk of the time is definitely spent in the @jbw976 I do wonder whether we really need to compile for every architecture on every PR, though. I presume it's only going to catch fairly rare cases where some change affects only certain platforms. That said, the publish artifacts job is only really going to hold up the build in cases where nothing has changed and every other job (except fuzz testing 😒) is a no-op. For any PR that actually touches Go code the E2E tests are going to take longer. So maybe not worth optimizing for. |
I've seen actions/runner-images#7897 maybe 5-6 times since we made the switch yesterday. Anecdotally mostly on E2E tests, but also once on codeql and once or twice on publish-artifacts. It seems like it might be a symptom of using too many compute resources for the runner. Unclear whether we're computing harder (more parallelism?) with the switch to Earthly, or if it's just coincidental timing and something's going on with GitHub Actions. |
I setup our Renovate GitHub Action to use https://github.com/earthly/actions-setup, but noticed Renovate was complaining it couldn't run It's also not going to find an |
As a feedback, I wanted to note that Earthly had once switched from the original MPL-2.0 to BSL, before reversing course (see license history). The design doc mentions the latter, but not the former. I wanted to let everyone know, in case it might affect our decision. |
@mergenci Thanks! Yes, that was noted during the proposal: https://github.com/crossplane/crossplane/blob/93610dc7e7877f/design/one-pager-build-with-earthly.md#risks |
Not an issue, just surprising: https://docs.earthly.dev/docs/earthfile#options-4 - the |
@chlunde Thanks! I'm not opposed to setting that flag. I wonder if there are any downsides? |
Was just looking into installing latest from
|
Thanks @jbw976!
https://charts.crossplane.io/crossplane-1.17.0-rc.0.175.g93610dc7.tgz looks like an incorrect URL, right? I think it should be https://charts.crossplane.io/master/crossplane-1.17.0-rc.0.175.g93610dc7.tgz. I'm guessing something is wrong with this target: Lines 410 to 432 in 93610dc
Maybe the
Yeah it's definitely not supposed to be publishing PR builds there, but it seems like it is - e.g. https://github.com/crossplane/crossplane/actions/runs/9299206909/job/25592661840?pr=5764. The "Configure Earthly to Push Artifacts" step should be skipped for PRs. Technically I gated it on the required credentials existing, since I thought no PRs had access to those. I guess some do, though. 🤔 crossplane/.github/workflows/ci.yml Lines 328 to 330 in 93610dc
|
#5765 should fix the Helm issue.
|
One small downside. Because we're building in a container, and because Earthly (and Docker) won't let you For example when developing outside of a container you might use: replace sig.k8s.io/e2e-framework => ../../kubernetes-sigs/e2e-framework In theory you could |
As mentioned in #5779 (comment), I was surprised that a plain The A common workflow I've used in the past when working on the Crossplane CLI was just plain |
Here is the PR to address this #5782 |
I observed something today while testing #5786 that I don't understand yet - so I'm not sure it's a problem but was wondering what others thought. Basically, the crossplane image digest changes across builds if a See the |
I also wonder if we're seeing earthly/earthly#2823 and it is affecting us too:
|
2823 seems to be fixed by 2853 (probably not closed yet by accident). I believe the issue that we are seeing with the missing digests is earthly/earthly#2851 which is still open |
@jbw976 I tried the
I understand that this is not ideal, but it doesn't seem like a regression of earthly |
What happened?
In #5711 we decided to try using https://earthly.dev for a release (i.e. until we ship v1.17).
I expect we'll probably run into issues immediately after cutting over the build system to a new tool, so I'm opening this to track any bugs we find in the new build setup that need to be fixed. General non-bug feedback is also welcome. 😄
Tasks
earthly
#5762The text was updated successfully, but these errors were encountered: