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

feat: added wait to run_sh task. #750

Merged
merged 4 commits into from
Jun 23, 2023
Merged

feat: added wait to run_sh task. #750

merged 4 commits into from
Jun 23, 2023

Conversation

Peeeekay
Copy link
Contributor

@Peeeekay Peeeekay commented Jun 20, 2023

Added wait field to run_sh task.
The intention is that user can set a wait time-out and if the command is not completed before the time-out, it will fail. In this PR, I have also fixed the wait and ready-condition bug observed on k8s with exec-recipe.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jun 20, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 98be2b7
Status: ✅  Deploy successful!
Preview URL: https://89d50e87.kurtosis-docs.pages.dev
Branch Preview URL: https://pk-add-wait-to-run-sh.kurtosis-docs.pages.dev

View logs

Base automatically changed from pk/fix_workdir_bug to main June 20, 2023 17:37
@Peeeekay
Copy link
Contributor Author

This is the output with wait set to 40s and command that takes 50s

Screen Shot 2023-06-20 at 3 16 36 PM

@Peeeekay
Copy link
Contributor Author

Also fixed the wait for exec recipe ( this is an example with ready conditions)

Sample Code:

recipe = ExecRecipe(
        command = ["sh", "-c", "sleep 50s"]
    )
    old_pattern = plan.add_service(
        name = "old-pattern",
        config = ServiceConfig(
            image = "ethpandaops/ethereum-genesis-generator:1.0.14",
            entrypoint = ["tail", "-f", "/dev/null"],
            ready_conditions=ReadyCondition(recipe=recipe, field="code", assertion="==", target_value="0", timeout="25s")
        )
    )

Output:
Screen Shot 2023-06-20 at 3 18 26 PM

@Peeeekay Peeeekay marked this pull request as ready for review June 20, 2023 19:18
done with wait

added test for wait

made some cosmetics change

added wait

added to doc and plugin
@Peeeekay Peeeekay merged commit 8c2b697 into main Jun 23, 2023
@Peeeekay Peeeekay deleted the pk/add_wait_to_run_sh branch June 23, 2023 02:20
victorcolombo pushed a commit that referenced this pull request Jun 26, 2023
🤖 I have created a release *beep* *boop*
---


##
[0.80.1](0.80.0...0.80.1)
(2023-06-26)


### Features

* Add Rust protobuf bindings
([#765](#765))
([0e47003](0e47003))
* added wait to run_sh task.
([#750](#750))
([8c2b697](8c2b697))
* Implemented rename enclave method in container engine lib
([#755](#755))
([f1570f7](f1570f7))
* Persist enclave plan in the Starlark executor memory
([#757](#757))
([2c3d74e](2c3d74e))
* Start and Stop service Starlark instructions for K8S
([#756](#756))
([fb3e922](fb3e922))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: kurtosisbot <kurtosisbot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants