Skip to content

Commit

Permalink
Check pods are created before waiting for them to be ready during pub…
Browse files Browse the repository at this point in the history
…lish recipes (radius-project#6914)

# Description

This is a potential fix for the flaky test issue seen radius-project#6912 
It is possible that we see error: no matching resources found because
the pods are not yet created. Waiting on non-existent resources can
result in this error
(kubernetes/kubernetes#87352)

Adding a kubectl rollout status which will ensure the pods are created
before waiting on them to become ready

## Type of change

<!--

Please select **one** of the following options that describes your
change and delete the others. Clearly identifying the type of change you
are making will help us review your PR faster, and is used in authoring
release notes.

If you are making a bug fix or functionality change to Radius and do not
have an associated issue link please create one now.

-->

- This pull request is a minor refactor, code cleanup, test improvement,
or other maintenance task and doesn't change the functionality of Radius
(issue link optional).

<!--

Please update the following to link the associated issue. This is
required for some kinds of changes (see above).

-->

Fixes: radius-project#6912 

## Auto-generated summary

<!--
GitHub Copilot for docs will auto-generate a summary of the PR
-->

<!--
copilot:all
-->
### <samp>🤖[[deprecated]](https://githubnext.com/copilot-for-prs-sunset)
Generated by Copilot at 27fbda2</samp>

### Summary
🚀🧪🎨

<!--
1.  🚀 for adding a new feature
2.  🧪 for testing the feature
3.  🎨 for improving the formatting
-->
Add feature to generate and test Terraform recipes from YAML. Fix
formatting in `build/recipes.mk`.

> _We're the crew of the YAML ship, we sail the code sea_
> _We write our files in a simple way, to make some Terraform_
> _Heave away, me hearties, heave away with me_
> _We'll test our recipes on the web, and fix the `./build/recipes.mk`_

### Walkthrough
* Add a command to check the web server status after applying Terraform
configuration
([link](https://github.com/radius-project/radius/pull/6914/files?diff=unified&w=0#diff-d2dfe02e16036198b889fbfbe653f36f04311c2dea672498040231bfcba93d4fR50-R52))
* Remove a trailing whitespace from the echo command
([link](https://github.com/radius-project/radius/pull/6914/files?diff=unified&w=0#diff-d2dfe02e16036198b889fbfbe653f36f04311c2dea672498040231bfcba93d4fL56-R59))

---------

Signed-off-by: vinayada1 <[email protected]>
  • Loading branch information
vinayada1 authored Dec 5, 2023
1 parent 1b32aa1 commit 5cc9882
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build/recipes.mk
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ publish-test-terraform-recipes: ## Publishes test terraform recipes to the curre
kubectl apply -f ./deploy/tf-module-server/resources.yaml -n $(TERRAFORM_MODULE_SERVER_NAMESPACE)

@echo "$(ARROW) Waiting for web server to be ready..."
kubectl wait --for=condition=ready pod -l app.kubernetes.io/name=tf-module-server -n $(TERRAFORM_MODULE_SERVER_NAMESPACE) --timeout=600s
kubectl rollout status deployment.apps/tf-module-server -n $(TERRAFORM_MODULE_SERVER_NAMESPACE) --timeout=600s

@echo "$(ARROW) Web server ready. Recipes published to http://$(TERRAFORM_MODULE_SERVER_DEPLOYMENT_NAME).$(TERRAFORM_MODULE_SERVER_NAMESPACE).svc.cluster.local/<recipe_name>.zip"
@echo "$(ARROW) To test use:"
Expand Down

0 comments on commit 5cc9882

Please sign in to comment.