nodejs-docs-samples icon indicating copy to clipboard operation
nodejs-docs-samples copied to clipboard

testing: add workflow for functions/v2/imagemagick sample

Open grayside opened this issue 2 years ago • 3 comments

Description

Fixes #3149

Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.

Checklist

  • [ ] I have followed guidelines from CONTRIBUTING.MD and Samples Style Guide
  • [ ] Tests pass: npm test (see Testing)
  • [ ] Lint pass: npm run lint (see Style)
  • [ ] These samples need a new API enabled in testing projects to pass (let us know which ones)
  • [ ] These samples need a new/updated env vars in testing projects set to pass (let us know which ones)
  • [ ] This pull request is from a branch created directly off of GoogleCloudPlatform/nodejs-docs-samples. Not a fork.
  • [ ] This sample adds a new sample directory, and I updated the CODEOWNERS file with the codeowners for this sample
  • [ ] This sample adds a new sample directory, and I created GitHub Actions workflow for this sample
  • [ ] This sample adds a new Product API, and I updated the Blunderbuss issue/PR auto-assigner with the codeowners for this sample
  • [ ] Please merge this PR for me once it is approved

grayside avatar Aug 24 '23 22:08 grayside

In order for this to pass, we need two environment variables in the test runtime:

  • FUNCTIONS_BUCKET where the image to be scanned is loaded
  • BLURRED_BUCKET_NAME where the modified image is loaded by the function execution

In Kokoro configuration, this looks like the following:

https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/c6e0a09b1700fd88c6a6dd53c11d39caf9a64f75/.kokoro/build.sh#L49

https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/c6e0a09b1700fd88c6a6dd53c11d39caf9a64f75/.kokoro/build.sh#L70

However, I don't see an example of where the GOOGLE_CLOUD_PROJECT variable can be sourced in the GHA implementation of test runner.

@pattishin could you provide guidance?

grayside avatar Aug 24 '23 22:08 grayside

Reassigning to @pattishin to clarify this is blocked on my end until we have preferred direction on configuring the system test behaviors.

grayside avatar Dec 06 '23 18:12 grayside

@grayside this feels like an area where we need to define the practice; we don't have a recommended practice and we should think through how we should do this (not just for this service) but this will then allow us to provide the guidance for other sample contributors.

iennae avatar Apr 26 '24 21:04 iennae

Marking this stale and closing for now. Please reopen when this is ready for review.

subfuzion avatar Aug 11 '24 02:08 subfuzion