-
Notifications
You must be signed in to change notification settings - Fork 4
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): allow fail, timeout, retry, always run tasks #9
Comments
To address these one by one:
Do you have a supporting case? What I can think of this is in the case of a synchronised call, the server end is taking long time to process. In this case, it should fall back to how the client tool is talking to the server, eg,
The design of UPcmd is to try to collaborate and try to simplify the usage of multiple threads etc, I have got the thoughts here: https://upcmd.netlify.app/ideas_and_faq/concurrency/ It is technically possible and it is a strength of golang, but do we need it? Continue above case, the responsibility should be really the client tool to deal with the timeout, rather than UPcmd. Use this in shell func, problem should be solved:
Aslo see the recommend tools
No need an implementation, the loop cmd + sleep cmd will do https://upcmd.netlify.app/cmd-func/c0087/ You might need to generate an array for the time being as it requires that to iterate through, let me know if you like some thing like while without specifying the loop var, if so please raise as a feature
I don't get this, could you explain a little bit more? Currently, you can ignoreError, it actually allows to fail and continue, see https://github.com/upcmd/up/blob/master/up.yml, I use it to ignore not supported build and move on
No change required for this, you can achieve this by:
I have this in the plan already, would you mind creating this as a feature Thanks |
@lukasmrtvy PS. what's the purpose of the pre-task? I could understand the always run post-task is to clean up resources usage, close file handler etc, why do we need pre-task? Any use case? Would below be okay?
|
@lukasmrtvy Also as to the link you mentioned: https://docs.gitlab.com/ee/ci/yaml/#yaml-anchors-for-before_script-and-after_script I am aware of using yaml anchors to do some fancy stuff and this has taken into consideration during the design phase, I find the anchor is a little hard for lots of users, the syntax will just challenge many users and this is actually the goal of the project of UPcmd to lower the bar to become more friendly to be adopted. Having said that, the pre-task and post-task are possible to be implemented in a better/easier way to end users For your above use case, do check out the doc site: https://upcmd.netlify.app/ and follow my suggestion above, if you still find challenging, I am happy to help you prototype it. |
Hello :)
Well, it can be achieved with GNU timeout, I am not aware of POSIX alternative.
CLI will stay open for some "unknown" time. I am not aware of any timeout option to aws cli.
Ok, but still, it plays nicely with possible timeout option..
Sorry, I did not notice.
Ok, its just a proposal. I like how Ansible does these type of things..
Superb. I will. Post task is definitely a must have. |
@lukasmrtvy I believe there are timeout settings for aws cli, at least for individual sub command A simple google of timeout finds this, FYI
|
yes, but for example |
Yeah, you are right, I think it is fair to have a timeout mechanism |
To conclude of this thread: Below features are considered
|
The retry should now fully work, it's in latest release:
See Examples: https://github.com/upcmd/up/blob/master/tests/functests/c0167.yml
Can you try it? and let me know how it goes |
Added the finally block support to close/clean up resources, also support a rescue element to deal with whether you'd like to suppress the error code to be non 0 return https://github.com/upcmd/up/blob/master/tests/functests/f0171.yml I will update the docs a little bit further, but you should be able to follow examples Please let me know if this could help with your use case |
@lukasmrtvy it's now in latest version or latest rolling release binary |
Would be nice to have possiblity to add:
options to tasks.
Thanks
The text was updated successfully, but these errors were encountered: