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

Test applications built using spin registry push #37

Closed
jsturtevant opened this issue Mar 12, 2024 · 7 comments
Closed

Test applications built using spin registry push #37

jsturtevant opened this issue Mar 12, 2024 · 7 comments
Assignees

Comments

@jsturtevant
Copy link
Contributor

I'd love to add as a follow-up, testing applications built using spin registry push.

Originally posted by @radu-matei in #36 (review)

@rajatjindal
Copy link
Member

could we please assign this to me. I wil pick this up next once my in-flight PR's are done.

@vdice
Copy link
Contributor

vdice commented Apr 12, 2024

@rajatjindal checking in to see if you are still working on this. This testing gap came up again recently in #79.

@rajatjindal
Copy link
Member

Hi @vdice

Thank you for the ping

This issue is one of the first things i have planned for next week.

This week i was busy with some other high priority stuff on my side.

@rajatjindal
Copy link
Member

I have started work on this, and based on preliminary investigation, I think I am going to make following changes at a highlevel (this may change a bit once i actually start the implementation).

  • break make up target into make up (to create k3d cluster) and make docker-images-import (to import images built using docker build into k3d cluster)
  • Then I am going to make changes to all used spin.toml files to have build command associated with the components. (this is not really required for docker image build, but required for spin registry push)
  • Next I am going to make changes to k3d config to start with an inbuilt registry support (https://k3d.io/v5.2.0/usage/registries/#using-k3d-managed-registries). This is where we will push OCI artifacts from spin registry push
  • Once we have registry, I am going to introduce a make spin-registry-push target in Makefile. This will build and push spin apps to the k3d managed registry.
  • now we can have these new OCI artifacts tested by adding support for them in workloads/*.yaml files and reusing same integration tests.

Questions:

  • does that sound like a reasoanable plan? any suggestions are most welcome.
  • one of the thing we have observed with testing in Spin is that building test artifacts on the fly adds up very quickly and results in slow CI times. any concerns with checked-in wasm files along side the testcases?

Thanks
Rajat Jindal

@vdice
Copy link
Contributor

vdice commented Apr 16, 2024

That all sounds like a good way to go to me!

one of the thing we have observed with testing in Spin is that building test artifacts on the fly adds up very quickly and results in slow CI times. any concerns with checked-in wasm files along side the testcases?

Could we build the test apps concurrently with the usual shim build stage? The app test job/workflow will of course need to depend on that stage completing... but at least other items needed (shim build/test) are happening as well, so not a total waste.

Oh, we'll also want to push the same test apps to this project's ghcr.io repo (as we've been doing for the Docker-based apps) so that they can be publicly accessible. Just want to mention in case this affects your structuring -- though totally understandable to relegate for a follow-up. (And technically, if we don't mind the tests waiting, we could only push to ghcr.io instead of loading into a configured k3d registry and then have the tests pull from ghcr.io... defer to your judgement on what is best here. Definitely understand wanting to prioritize CI efficiency.)

@rajatjindal
Copy link
Member

PR #90 opened for adding tests with "spin registry push"

@vdice
Copy link
Contributor

vdice commented May 15, 2024

Looks like this can be closed per #90 right @rajatjindal?

@Mossaka Mossaka closed this as completed Jul 24, 2024
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

No branches or pull requests

4 participants