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

chore: Add smoke test #80

Merged
merged 36 commits into from
Aug 27, 2024
Merged

chore: Add smoke test #80

merged 36 commits into from
Aug 27, 2024

Conversation

marikaner
Copy link
Contributor

@marikaner marikaner commented Aug 19, 2024

Add smoke tests using the sample code.

@marikaner marikaner marked this pull request as ready for review August 19, 2024 15:37
tomfrenken
tomfrenken previously approved these changes Aug 19, 2024
Copy link
Member

@tomfrenken tomfrenken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some clean-up here and there, overall LGTM

.github/workflows/smoke-test.yml Outdated Show resolved Hide resolved
tests/smoke-test/.cfignore Outdated Show resolved Hide resolved
tests/smoke-test/package.json Outdated Show resolved Hide resolved
tests/smoke-test/tsconfig.json Outdated Show resolved Hide resolved
package.json Show resolved Hide resolved
* Ask GPT about the capital of France.
* @returns The answer from the orchestration service in Gen AI Hub.
*/
export function orchestrationCompletion(): Promise<CompletionPostResponse> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[q] We could consider calling this from the e2e test, similar to how we do it for OpenAI. That way we gain additional confidence this code actually works 😉

tests/smoke-test/.cfignore Outdated Show resolved Hide resolved
tests/smoke-tests/.cfignore Show resolved Hide resolved
tests/smoke-tests/README.md Show resolved Hide resolved
tests/smoke-tests/package.json Show resolved Hide resolved
module.exports = {
hooks: {
afterAllResolved: async lockfile => {
// Object.keys(lockfile.packages)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uhm, leftover?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, I want to keep this for the follow up, because this code will most likely be needed for it.

Copy link
Member

@tomfrenken tomfrenken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks pretty straightforward, however, there seem to be some leftovers, LGTM post-cleanup.

@tomfrenken
Copy link
Member

Also, the pipeline seems to fail because cloud foundry installs node 18, I suppose you need to adjust the manifest.yaml to select node 20.

@marikaner
Copy link
Contributor Author

Also, the pipeline seems to fail because cloud foundry installs node 18, I suppose you need to adjust the manifest.yaml to select node 20.

@tomfrenken I wonder where you got this idea? To me it seems that I deleted a script during clean up. I added it back, should work now.

@marikaner marikaner enabled auto-merge (squash) August 27, 2024 07:49

app.get('/ai-core/get-deployments', async (req, res) => {
try {
res.send(await chatCompletion());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct? shouldn't we call getDeployments function?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oopsie, good catch

Copy link
Member

@tomfrenken tomfrenken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@marikaner marikaner merged commit 7ff6f50 into main Aug 27, 2024
10 checks passed
@marikaner marikaner deleted the smoke-test branch August 27, 2024 08:44
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

Successfully merging this pull request may close these issues.

4 participants