-
Notifications
You must be signed in to change notification settings - Fork 13
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
Dependency compilation tests should run in a docker container #596
Comments
See paketo-buildpacks/cpython#450 for context. |
Personally, I'd rather see the test step defined as a Github Action in each dependency repo. One fewer bespoke interface to manage! |
I think we'd want the test Dockerfile to base itself off of the most minimal stack run image it supports since that's how it might appear in an actual application. Does this seem right? |
@ryanmoran that definitely makes sense to me. At the workflow level we may still require the buildpack author to specify how the tests are run, but it sounds like we do need the workflow to allow that to happen. Likely the most flexible way is through the actions interface. |
If/when we move to this model, should we remove the The alternative is to leave the |
I'm currently working on bundler, and about to start on the tests. In this case, my |
@fg-j right I think so, it would be smart to test against multiple stacks. I think we just need to align on whether we want to change how the test code is set up entirely to move to actions, or if we want to support both using an action-style test code as well as the strategy we have laid out now. I want it to be clear for people what their choices are |
If given the choice between a Github Action and a |
I think mostly it's just ever so slightly easier to write a |
Since I haven't yet implemented any dependency tests, happy to hear from folks who have on this! Probably @TisVictress, @joshuatcasey, @robdimsdale and @ForestEckhardt? |
The idea behind That being said, an up-to-date README with steps for how to emulate the action locally using Both actions and |
I like the |
Setting aside the question of adhering to the RFC because we can edit it after the fact if we find we don't like the direction we originally proposed, I honestly don't have strong opinions either way. I'd lean slightly towards GitHub Actions over
|
@robdimsdale That's interesting. I find testing locally makes things easier for debugging. This could also be my bias against github in general 😆 |
Great point @TisVictress - I haven't actually iterated much on the new dependency workflow - I've just tried to run it to get the new versions of a dependency. Do you think clear instructions in a README (e.g. |
Yea I think a good README will suffice. |
Alright, it sounds like the general consensus is that moving to an actions-based approach for the tests would be favourable in solving this issue if:
Implementing this for our dependencies will include:
While this change will be breaking for dependency code that has already been implemented, I don't think its worth supporting both options just for consistency's sake and keeping things simple to maintain. Happy to concede this point if people feel strongly about supporting both. Give me a 👍 if you're good with this proposal and we can get the ball rolling. |
Update on this: we will eventually do this, but at this point our first priority will be rolling out the original dependency workflows/approach to all of the dependencies so that we can enable Jammy stack support ASAP. The changes outlined here are useful but will be breaking. In the meantime, if anyone needs to test against multiple stack images, you can still do this with the existing set-up, sort of like what @joshuatcasey did in paketo-buildpacks/passenger#296 |
Currently dependency compilation tests are run directly on the github actions virtual environment by running
make test
.This means that any compilation or dynamic linking that is incompatible with the virtual environment will fail.
One solution is to run the dependency tests in the same way that the dependency compilation is run: As an action. It would be up to the buildpack authors to determine whether the compile and test steps should share dockerfiles. It's quite likely that the test dockerfile could be simpler than the compile docker file.
Another approach is for the workflow to run the
docker build
anddocker run
steps so that the buildpack author only need specify dockerfile and entrypoint. This could look like so:The text was updated successfully, but these errors were encountered: