Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Reuse Agent artifacts if nothing in src/agent changes #2115

Merged
merged 8 commits into from
Jul 12, 2022

Conversation

Porges
Copy link
Member

@Porges Porges commented Jul 1, 2022

The agent build takes most of the CI runtime, so improve it by only rebuilding if the pre-reqs or something inside src/agent changes.

@Porges Porges force-pushed the cache-agent-artifacts branch 3 times, most recently from e621a2b to 12f129b Compare July 3, 2022 22:25
@Porges
Copy link
Member Author

Porges commented Jul 3, 2022

We should probably build the Rust version into the cache key for both this and the pre-reqs.

@tevoinea
Copy link
Member

tevoinea commented Jul 4, 2022

If I remember correctly, the check-pr pipeline pulls down the github actions artifacts when testing against a PR. We should make sure this doesn't break that flow. I do see artifacts published at the end of the actions run so it might 'just work'.

@Porges
Copy link
Member Author

Porges commented Jul 5, 2022

If I remember correctly, the check-pr pipeline pulls down the github actions artifacts when testing against a PR. We should make sure this doesn't break that flow. I do see artifacts published at the end of the actions run so it might 'just work'.

Yes, the artifacts are still downloaded and packaged into the release zip, so it should work the same as before.

@Porges Porges force-pushed the cache-agent-artifacts branch from 12f129b to 4cfd94d Compare July 5, 2022 20:37
@Porges
Copy link
Member Author

Porges commented Jul 5, 2022

We should probably build the Rust version into the cache key for both this and the pre-reqs.

This is done now.

@Porges Porges force-pushed the cache-agent-artifacts branch 2 times, most recently from 167e555 to 6710de7 Compare July 5, 2022 22:01
@Porges
Copy link
Member Author

Porges commented Jul 5, 2022

Running one more check-pr to ensure this didn't break anything.

@Porges
Copy link
Member Author

Porges commented Jul 6, 2022

One thing to think about is that the version number in the compiled binary might be wrong. Need to disable this cache on builds from a specific tag.

@Porges
Copy link
Member Author

Porges commented Jul 6, 2022

One thing to think about is that the version number in the compiled binary might be wrong. Need to disable this cache on builds from a specific tag.

This is done now.

@Porges Porges force-pushed the cache-agent-artifacts branch 2 times, most recently from b3d9bd6 to 65c5b69 Compare July 6, 2022 23:46
@Porges
Copy link
Member Author

Porges commented Jul 7, 2022

Cleanly passed check-pr.

@Porges
Copy link
Member Author

Porges commented Jul 7, 2022

Hold off on merging as I think we still have a problem with the version check in the API service, which will try to reimage the nodes if they don't have an exact version match.

@Porges
Copy link
Member Author

Porges commented Jul 8, 2022

We now set ONEFUZZ_ALLOW_OUTDATED_AGENT during check-pr to allow the use of older versions.

@Porges Porges force-pushed the cache-agent-artifacts branch 5 times, most recently from 9b8cdcc to 5e5807d Compare July 12, 2022 21:07
@Porges Porges force-pushed the cache-agent-artifacts branch from 5e5807d to c37c089 Compare July 12, 2022 22:03
@Porges Porges enabled auto-merge (squash) July 12, 2022 22:05
@Porges Porges merged commit 0b8093b into main Jul 12, 2022
@Porges Porges deleted the cache-agent-artifacts branch July 20, 2022 22:46
@ghost ghost locked as resolved and limited conversation to collaborators Aug 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants