-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Handling of "env" variables is not correct sometimes #416
Comments
In act-failing-python-cache workaround branch is t1.yml with the extra step added. |
Added a comment to your question about this issue here: #417 (comment) |
My diagnosis of the problem is that when a new step is created and newStepExecutor is invoked, see below. It setups a new environ with
This is fine but there is a problem, in
But notice that Here is the full code for func
My solution is to call I suspect there is a "better" solution, I'll see if I can work something up, |
This is a solution to issue nektos#416 where environment variables created or changed in the previous step are not usable in the next step because the rc.ExprEval is from the beginning of the previous step. This change refactors setupEnv so that before interpolating the environment variables a NewExpressionEvaluator is created. Fixes: 416
This is a solution to issue nektos#416 where environment variables created or changed in the previous step are not usable in the next step because the rc.ExprEval is from the beginning of the previous step. This change refactors setupEnv so that before interpolating the environment variables a NewExpressionEvaluator is created. Fixes: 416
Test issue nektos#416. With PR nektos#423 the test passes and fails otherwise. To facilitate this new test I refactored RunTestJobFile out of TestRunEvent and use it in TestRunEvent and TestPythonCache
This is a solution to issue nektos#416 where environment variables created or changed in the previous step are not usable in the next step because the rc.ExprEval is from the beginning of the previous step. This change refactors setupEnv so that before interpolating the environment variables a NewExpressionEvaluator is created. Fixes: 416
Test issue nektos#416. With PR nektos#423 the test passes and fails otherwise. To facilitate this new test I refactored RunTestJobFile out of TestRunEvent and use it in TestRunEvent and TestPythonCache
This is a solution to issue nektos#416 where environment variables created or changed in the previous step are not usable in the next step because the rc.ExprEval is from the beginning of the previous step. This change refactors setupEnv so that before interpolating the environment variables a NewExpressionEvaluator is created. Add TestSetEnvVar which specifically tests that issue 416 is fixed. As it turns out the problem manifests itself with javascript based but not docker based actions. TestSenEnvVar test both docker and js actions that set environment variables. Fixes: 416
This is a solution to issue nektos#416 where environment variables created or changed in the previous step are not usable in the next step because the rc.ExprEval is from the beginning of the previous step. This change refactors setupEnv so that before interpolating the environment variables a NewExpressionEvaluator is created. Add TestSetEnvVar which specifically tests that issue 416 is fixed. As it turns out the problem manifests itself with javascript based but not docker based actions. TestSenEnvVar test both docker and js actions that set environment variables. Fixes: 416
This is a solution to issue nektos#416 where environment variables created or changed in the previous step are not usable in the next step because the rc.ExprEval is from the beginning of the previous step. This change refactors setupEnv so that before interpolating the environment variables a NewExpressionEvaluator is created. Fixes: 416
This is a solution to issue nektos#416 where environment variables created or changed in the previous step are not usable in the next step because the rc.ExprEval is from the beginning of the previous step. This change refactors setupEnv so that before interpolating the environment variables a NewExpressionEvaluator is created. Fixes: 416
This is a solution to issue #416 where environment variables created or changed in the previous step are not usable in the next step because the rc.ExprEval is from the beginning of the previous step. This change refactors setupEnv so that before interpolating the environment variables a NewExpressionEvaluator is created. Fixes: 416
Fix with #423 |
I've created act-failing-python-cache with additional details.
This was tested with act master branch as of 11/10/2020:
On a linux computer:
I was trying to use
actions/setup-python@v2
andactions/cache@v2
:And
Python cache
step fails becasue path is empty and "not supplied":The full log:
As it so happens while creating the test case I found a hack to that solves the problem.
If you add a step between
Set up Python
andPython cache
that displaysenv.pythonLocation
(i.e. uncomment lines 22-24 of t1.yml above):
Then
act
can complete all steps:The text was updated successfully, but these errors were encountered: