Commit Graph
606 Commits
Author SHA1 Message Date
Ferenc HammerlandGitHub c577be6e62 Update releaseVersion
Runner CD / check (push) Has been cancelled
Runner CD / build (./dev, windows-2019, win-x64) (push) Has been cancelled
Runner CD / build (./dev, windows-latest, win-arm64) (push) Has been cancelled
Runner CD / build (./dev.sh, macOS-latest, osx-arm64) (push) Has been cancelled
Runner CD / build (./dev.sh, macOS-latest, osx-x64) (push) Has been cancelled
Runner CD / build (./dev.sh, ubuntu-latest, linux-arm) (push) Has been cancelled
Runner CD / build (./dev.sh, ubuntu-latest, linux-arm64) (push) Has been cancelled
Runner CD / build (./dev.sh, ubuntu-latest, linux-x64) (push) Has been cancelled
Runner CD / release (push) Has been cancelled
v2.298.1
2022-10-04 17:28:24 +02:00
Ferenc HammerlandGitHub 3dd27755cf Release notes for 2.298.1 (#2174)
* Fix incorrect template vars to show SHA for WIN-ARM64 (#2171)

* Update releaseNote.md

* Update runnerversion
2022-10-04 17:14:13 +02:00
Francesco Renzi 3b8cfdae4e Update releaseVersion to 2.298.0
Runner CD / check (push) Has been cancelled
Runner CD / build (./dev, windows-2019, win-x64) (push) Has been cancelled
Runner CD / build (./dev, windows-latest, win-arm64) (push) Has been cancelled
Runner CD / build (./dev.sh, macOS-latest, osx-arm64) (push) Has been cancelled
Runner CD / build (./dev.sh, macOS-latest, osx-x64) (push) Has been cancelled
Runner CD / build (./dev.sh, ubuntu-latest, linux-arm) (push) Has been cancelled
Runner CD / build (./dev.sh, ubuntu-latest, linux-arm64) (push) Has been cancelled
Runner CD / build (./dev.sh, ubuntu-latest, linux-x64) (push) Has been cancelled
Runner CD / release (push) Has been cancelled
v2.298.0
2022-10-04 12:18:21 +00:00
Francesco RenziandGitHub 4935be5526 Prepare release notes for v2.298.0 (#2169) 2022-10-04 12:09:58 +00:00
Francesco RenziandGitHub 920fba93dc Add warning for users using deprecated commands (#2164) 2022-10-04 12:14:22 +01:00
949269104d Avastancu/joannaakl/service container error log (#2110)
* adding support for a service container docker logs

* Adding Unit test to ContainerOperationProvider

* Adding another test to ContainerOperationProvider

* placed the docker logs output in dedicated ##group section

* Removed the exception thrown if the service container was not healthy

* Removed duplicated logging to the executionContext

* Updated the container logs sub-section message

* Print service containers only if they were healthy
Unhealthy service logs are printed in ContainerHealthCheckLogs called prior to this step.

* Removed recently added method to inspect docker logs
The method was doing the same thing as the existing DockerLogs method.

* Added execution context error
This will make a failed health check more visible in the UI without disrupting the execution of the program.

* Removing the section 'Waiting for all services to be ready'

Since nested subsections are not being displayed properly and we already need one subsection per service error.

* Update src/Runner.Worker/Container/DockerCommandManager.cs

Co-authored-by: Tingluo Huang <[email protected]>

* Update src/Test/L0/TestHostContext.cs

Co-authored-by: Tingluo Huang <[email protected]>

* Change the logic for printing Service Containers logs

Service container logs will be printed in the 'Start containers' section only if there is an error.
Healthy services will have their logs printed in the 'Stop Containers' section.

* Removed unused import

* Added back section group.

* Moved service containers error logs to separate group sections

* Removed the test testing the old logic flow.

* Remove unnecessary 'IsAnyUnhealthy' flag

* Remove printHello() function

* Add newline to TestHostContext

* Remove unnecessary field 'UnhealthyContainers'

* Rename boolean flag indicating service container failure

* Refactor healthcheck logic to separate method to enable unit testing.

* Remove the default value for bool variable

* Update src/Runner.Worker/ContainerOperationProvider.cs

Co-authored-by: Tingluo Huang <[email protected]>

* Update src/Runner.Worker/ContainerOperationProvider.cs

Co-authored-by: Tingluo Huang <[email protected]>

* Rename Healthcheck back to ContainerHealthcheck

* Make test sequential

* Unextract the container error logs method

* remove test asserting thrown exception

* Add configure await

* Update src/Test/L0/Worker/ContainerOperationProviderL0.cs

Co-authored-by: Tingluo Huang <[email protected]>

* Update src/Test/L0/Worker/ContainerOperationProviderL0.cs

Co-authored-by: Tingluo Huang <[email protected]>

* Update src/Test/L0/Worker/ContainerOperationProviderL0.cs

Co-authored-by: Tingluo Huang <[email protected]>

* Update src/Test/L0/Worker/ContainerOperationProviderL0.cs

Co-authored-by: Tingluo Huang <[email protected]>

* Update src/Test/L0/Worker/ContainerOperationProviderL0.cs

Co-authored-by: Tingluo Huang <[email protected]>

* Add back test asserting exception

* Check service exit code if there is no healtcheck configured

* Remove unnecessary healthcheck for healthy service container

* Revert "Check service exit code if there is no healtcheck configured"

This reverts commit fec24e8341.

Co-authored-by: Ava S <[email protected]>
Co-authored-by: Tingluo Huang <[email protected]>
2022-10-03 17:50:20 +02:00
Tauhid AnjumandGitHub dca4f67143 Adding a new vars context for non-secret variables (#2096)
* Adding a new vars context for non-secret variables

* Fix test case

* Trigger checks

* Remove variables from env context and environment varibale

* remove extra references

* Add prefix handling to configuration variables

* Fix test cases

* Consume variables using vars in context data

* removed action_yaml changes
2022-09-30 09:37:47 -04:00
Thomas BoopandGitHub 01ff38f975 2.297.0 release notes (#2155)
* 2.297.0 release notes
2022-09-26 11:22:05 -04:00
Tatyana KostromskayaandGitHub bc67f99bae Add link to blog post to node 12 warn (#2156) 2022-09-26 17:05:29 +02:00
Thomas BoopandGitHub ae2f4a6f27 POC: Windows arm64 runner build (#2022)
Prerelease for windows-arm64 runner build
2022-09-26 09:20:43 -04:00
Francesco RenziandGitHub 15cbadb4af Add file commands for save-state and set-output (#2118) 2022-09-26 10:17:46 +01:00
Thomas BoopandGitHub 0678e8df09 Add Release branches to pull request spec (#2134) 2022-09-19 15:28:46 +00:00
JoannaaKLandGitHub 3a1c89715c Remove unused imports (#2126) 2022-09-15 15:55:45 +02:00
JoannaaKLandGitHub 6cdd27263b Remove unused imports (#2124) 2022-09-15 12:14:10 +02:00
Francesco RenziandGitHub 32845a5448 Bump @actions/core from 1.2.6 to 1.9.1 in /src/Misc/expressionFunc/hashFiles (#2123) 2022-09-15 09:43:28 +00:00
Stefan RuvceskiandGitHub 6e6410d300 fix for issue #2009 - composite summary file (#2077) 2022-09-12 14:51:36 -04:00
Thomas BoopandGitHub ed191b78ae Port hotfix to main branch (#2108)
* fix issue with env's overwriting environment

* add release notes

* handle value escaping

* compile regex for runtime perf improvements
2022-09-09 14:32:07 -04:00
Nikola JokicandGitHub 75786756bb fix ACTIONS_RUNNER_CONTAINER_HOOKS name in ADR (#2098) 2022-09-06 10:45:00 -04:00
5e0c2ef816 2.296.1 Release (#2092) (#2099)
* docker: escape key-value pair as -e KEY and VALUE being environment var

* removed code duplication, removed unused method and test

* add release notes

Co-authored-by: Nikola Jokic <[email protected]>

Co-authored-by: Thomas Boop <[email protected]>
Co-authored-by: Nikola Jokic <[email protected]>
2022-09-02 15:43:22 +00:00
Nikola JokicandGitHub 95459dea5f docker: escape key-value pair as -e KEY and VALUE being environment var (#2091)
* docker: escape key-value pair as -e KEY and VALUE being environment var

* removed code duplication, removed unused method and test
2022-08-31 13:39:58 -04:00
Konrad PabjanandGitHub 59894790de Validate lines and columns for Annotations (#2082) 2022-08-24 16:02:51 -04:00
Ava StancuandGitHub cba19c4d7e Release notes for 2.296.0 (#2078)
* Update releaseNote.md

* Update runnerversion
2022-08-23 10:42:40 -04:00
Nikola JokicandGitHub 01fd04464d Escaping key and quoting it to avoid key based command injection (#2062)
* escaping key and quoting it to avoid key based command injection

* extracted creation of flags to DockerUtil, with testing included
2022-08-23 10:42:29 -04:00
Tingluo HuangandGitHub 1cb1779d6b Include step context name and start/finish time in step telemetry (#2069)
* Include step context name in telemetry.

* .
2022-08-22 21:26:52 -04:00
Nicholas BergesenandGitHub 42c86665a7 Display full job name and nested workflow details in log (#2049) 2022-08-22 17:20:58 -07:00
f9c2bf1dd7 Improved error logs for missing 'using' configuration in metadata file (#2052)
Co-authored-by: Octavia Stancu <[email protected]>
2022-08-16 17:17:42 +02:00
Ferenc HammerlandGitHub 84e7949457 Release notes 2.295.0 (#2046)
* Update releaseNote.md

* Update runnerversion

* Update releaseNote.md
2022-08-10 16:23:51 +02:00
Ferenc HammerlandGitHub 694d73d43c Fix broken run-helper update syntax and run-helper not updating on restart (#2050)
* Fix broken syntax in update wait for loop

* Update run-helper after each restart, not only at first
2022-08-09 16:50:52 +02:00
352f201c62 Wait for update.sh|cmd to finish instead of waiting 5 seconds - before restarting a runner (#2044)
* update.sh new logic with creating a file and waiting for it for 30 sec

* pr refactor

* removing file when it's detected bu run-helper

* Update src/Misc/layoutroot/run-helper.sh.template

Co-authored-by: Ferenc Hammerl <[email protected]>

* clean up update.finished in Runner.Listener right before it starts a process _update.sh

* pr fix IOUtil.DeleteFile

* self update widnows version - cmd

* same logic for returnCode 4 - ephemeral

* Init var so cmd doesn't run into syntax errors

* Use constants, setting a var messed up ERRORLEVEL

* Use var for updatefile

Co-authored-by: stefanruvceski <[email protected]>
Co-authored-by: Thomas Boop <[email protected]>
Co-authored-by: Ferenc Hammerl <[email protected]>
2022-08-08 23:37:43 +02:00
Pavel IakovenkoandGitHub 503e50acb9 Support running Actions services on subdomain (#2041) 2022-08-05 13:29:49 -04:00
Lokesh GopuandGitHub 813af29886 Include current runner status while getting messages (#2026)
* get messages with runner status

* fixed l0 tests

* PR feedback
2022-07-28 16:42:02 -04:00
Tingluo HuangandGitHub 72e2107b5e Change the auth challenge 401 to be verbose trace. (#2021) 2022-07-25 16:02:54 -04:00
Tingluo HuangandGitHub 3567c042ea Bump newtonsoft.json to 13.0.1 (#2012) 2022-07-22 11:21:04 -04:00
Tingluo HuangandGitHub e646b6fec4 Move --jitconfig to valid ./run.sh args. (#2013) 2022-07-22 11:14:09 -04:00
aaros-plandGitHub 8d2be3d4fa missing .com in pipelines.actions url (#1973) 2022-07-21 23:12:36 -04:00
eric scipleandGitHub 407a347f83 tweak verbiage (#1977) 2022-06-28 21:03:53 -04:00
ChristopherHXandGitHub 7e74f8c9d5 fix: GITHUB_ENV in composite (#1794)
* fix: GITHUB_ENV in composite

* fix L0 Test
2022-06-28 20:50:50 -04:00
eric scipleandGitHub efdda93aeb Update git troubleshooting (#1971) 2022-06-24 12:12:07 -05:00
eric scipleandGitHub 1d1998aabb Update description for command line arg "--pat" (#1970) 2022-06-24 11:44:16 -04:00
Thomas BoopandGitHub d2c6a4e4bc 294.0 release notes (#1963)
* 293.1 release notes

* let make it a minor version bump
2022-06-22 11:57:10 -04:00
d11bd3d8be Created env var for forcing node12 actions to run on node16 (#1913)
* Created env var for forcing node12 actions to run on node16

* get value of hostContext environment variable

* changing location of forced node version check

* small code refactoring

Co-authored-by: Ferenc Hammerl <[email protected]>

* more of small code refactoring

Co-authored-by: Ferenc Hammerl <[email protected]>

* refactoring of conditions for getting internal node version

* changing expected value for node version env var

* Adding empty line between two methods

* Created method GetNodeVersion

* GetNodeVersion from function to inline call and PR fixes

Co-authored-by: Ferenc Hammerl <[email protected]>
Co-authored-by: Thomas Boop <[email protected]>
2022-06-22 11:13:28 -04:00
Tingluo HuangandGitHub 761785620f Support pass runner JitConfig as arg. (#1925) 2022-06-22 10:59:29 -04:00
Ferenc HammerlandGitHub 416771d4b1 Fix PrependPath format to be array instead of a concatenated string (#1948)
* Fix prependPath format
2022-06-22 09:11:17 -04:00
Tatyana KostromskayaandGitHub 9499f477a2 Add retry logic around getting job messages from broker (#1939)
* Jsut simple solution without additional funcs

* Delete old comment

* resolve

* Refactor retry function, make it more common

* Make retry function generic, get rid of extra params

* delete extra using

* Add cancellation token and limit of attempts

* Add some additional logging

* Rework condition

* replace to do..while

* return `while (true)` to simplify code structure

* Add other cancelling token, add TODO comment
2022-06-21 16:12:07 +02:00
Ferenc HammerlandGitHub 6bc6d475f9 No longer trace 'ex' twice, only further up in the callstack (#1949) 2022-06-16 16:36:54 -04:00
Tuukka LahtiandGitHub ca2b1bc6d5 Update dependencies list to support Ubuntu 22.04 (#1946) 2022-06-15 12:37:02 -04:00
+1 591f8c3510 Runner container hooks Beta (#1853)
* Added ability to run Dockerfile.SUFFIX ContainerAction

* Extracted IsDockerFile method

* reformatted, moved from index to Last()

* extracted IsDockerfile to DockerUtil with L0

* added check for IsDockerfile to account for docker://

* updated test to clearly show path/dockerfile:tag

* fail if Data.Image is not Dockerfile or docker://[image]

* Setup noops for JobPrepare and JobCleanup hooks

* Add container jobstarted and jobcomplete hooks

* Run 'index.js' instead of specific command hooks

* Call jobprepare with command arg

* Use right command name (hardcoded)

Co-authored-by: Nikola Jokic <[email protected]>

* Invoke hooks with arguments

* Add PrepareJob hook to work with jobcontainers

Co-authored-by: Nikola Jokic <[email protected]>

* Rename methods

* Use new hookcontainer to run prep and clean hooks

* Get path from ENV

* Use enums

* Use IOUtils.cs

* Move container files to folder

* Move namespaces

* Store "state" between hooks

* Remove stdin stream in containerstephosts

* Update Constants.cs

* Throw if stdin fails

* Cleanup obvious nullrefs and unused vars

* Cleanup containerhook directory

* Call step exec hook

* Fix windows build

* Remove hook from hookContainer

* Rename file

* More renamings

* Add TODOs

* Fix env name

* Fix missing imports

* Fix imports

* Run script step on jobcontainer

* Enable feature if env is set

* Update ContainerHookManager.cs

* Update ContainerHookManager.cs

* Hooks allowed to work even when context isn't returned

* Custom hooks enabled flag and additional null checks

* New line at the end of the FeatureFlagManager.cs

* Code refactoring

* Supported just in time container building or pulling

* Try mock-build for osx

* Build all platforms

* Run mock on self-hosted

* Remove GITHUB prefix

* Use ContainerHooksPath instead of CustomHooksPath

* Null checks simplified

* Code refactoring

* Changing condition for image builing/pulling

* Code refactoring

* TODO comment removed

Co-authored-by: Ferenc Hammerl <[email protected]>

* Call container step if FF is on

* Rename run script function

* Use JToken instead of dynamic

* Add TODO

* Small refactoring + renames + TODOs

* Throw on DetermineNodeRuntimeVersion

* Fix formatting

* Add run-container-step

* Supported nodeJS in Alpine containers

* Renamed Alpine to IsAlpine in HookResponse

* Method for checking platform for alpine container

* Added container hooks feature flag check

* Update IsHookFeatureEnabled with new params

* Rename featureflag method

* Finish rename

* Set collection null values to empty arrays when JSON serialising them

* Disable FF until we merge

* Update src/Runner.Worker/Container/ContainerHooks/HookContainer.cs

* Fix method name

* Change hookargs to superclass from interface

* Using only Path.Combine in GenerateResponsePath

* fix merge error

* EntryPointArgs changed to list of args instead of one args string

* Changed List to IEnumerable for EntryPointArgs and MountVolumes

* Get ContainerRuntimePath for JobContainers from hooks

* Read ContainerEnv from response file

* Port mappings saved after creating services

* Support case when responseFile doesn't exist

* Check if response file exists

* Logging in ExecuteHookScript

* Save hook state after all 4 hooks

* Code refactoring

* Remove TODO

Co-authored-by: Ferenc Hammerl <[email protected]>

* Remove second TODO

Co-authored-by: Ferenc Hammerl <[email protected]>

* Removing container env changes

* Removing containerEnv and dockerManager

* Delete mock-build.yml

* Update IOUtil.cs

* Add comment about containerhooks

* Fix merge mistake

* Remove solved todo

* Determine which shell to use for hooks scenario

* Overload for method ExecuteHookScript with prependPath as arg

* Adding HostContext to the GetDefaultShellForScript call

* prependPath as a mandatory parameter

* Improve logging for hooks

* Small changes in logging

* Allow null for ContainerEntryPointArgs

* Changed log messages

* Skip setting EntryPoint and EntryPointArgs if hooks are enabled

* Throw if IsAlpine is null in PrepareJob

* Code refactoring - added GetAndValidateResponse method

* Code refactoring

* Changes in exception message

* Only save hookState if returned

* Use FF from server

* Empty line

* Code refactoring

Co-authored-by: Ferenc Hammerl <[email protected]>

* Send null instead of string empty

* Remove TODO

* Code refactoring and some small changes

* Allow Globals to be null to pass L0

* Fix setup in StepHostL0

* Throw exception earlier if response file doesn't exist and prepare_job hook is running

* Refactoring GetResponse method

* Changing exception message if response file is not found

Co-authored-by: Ferenc Hammerl <[email protected]>

* Chaning exception message if isAlpine is null for prepare_job hook

* Rename hook folder

* Fail if compatible hookfile not found

* Use .Value instead of casting bool? to bool

* Format spacing

* Formatting

* User user and system mvs

* Use variables instead of entire context in featuremanager

* Update stepTelemetry if step uses containerhooks

* Restore  import

* Remove unneccessary field from HookContainer

* Refactor response context and portmappings

* Force allow hooks if FF is on

* Code refactoring

* Revert deleting usings

* Better hookContainer defaults and use correct portmapping list

* Make GetDefaultShellForScript a  HostContext extension method

* Generic hookresponse

* Code refactoring, unnecessary properties removed - HookContainer moved to the HookInput.cs

* Remove empty line

* Code refactoring and better exception handling

* code refactor, removing unnecessary props

* Move hookstate to global ContainerHookState

* Trace exception before we throw it for not losing information

* Fix for null ref exception in GetResponse

* Adding additional check for null response in prepareJob hook

* Refactoring GetResponse with additional check

* Update error messages

* Ports in ResponseContainer changed from IList to IDictionary

* Fix port format

* Include dockerfile

* Send null Registry obj if there's nothing in it

* Minor formatting

* Check if hookIndexPath exists relocated to the ContainerHookManager

* Code refactoring - ValidateHookExecutable added to the ContainerHookManager

* check if ContainerHooksPath when AllowRunnerContainerHooks is on

* Submit JSON telemetry instead of boolean

* Prefix step hooks with "run"

* Rename FeatureManager

* Fix flipped condition

* Unify js shell path getter with ps1 and sh getter

* Validate on run, not on instantiation of manager

* Cleanup ExecuteAsync methods

* Handle exception in executeHookScript

* Better exception types

* Remove comment

* Simplify boolean

* Allow jobs without jobContainer to run

* Use JObject instead of JToken

* Use correct Response type

* Format class to move cleanupJobAsync to the end of public methods

* Rename HookIndexPath to HookScriptPath

* Refactor methods into expression bodies

* Fix args class hierarchy

* Fix argument order

* Formatting

* Fix nullref and don't swallow stacktrace

* Whilelist HookArgs

* Use FF in FeatureManager

* Update src/Runner.Worker/ContainerOperationProvider.cs

Co-authored-by: Tingluo Huang <[email protected]>

* Update src/Runner.Worker/ActionRunner.cs

Co-authored-by: Thomas Boop <[email protected]>

* Update src/Runner.Worker/ActionRunner.cs

Co-authored-by: Thomas Boop <[email protected]>

* Only mount well known dirs to job containers

* Get trace from hostcontext

* Use hook execution for setting telemetry

Co-authored-by: Nikola Jokic <[email protected]>
Co-authored-by: Nikola Jokic <[email protected]>
Co-authored-by: Nikola Jokic <[email protected]>
Co-authored-by: Stefan Ruvceski <[email protected]>
Co-authored-by: ruvceskistefan <[email protected]>
Co-authored-by: Thomas Boop <[email protected]>
Co-authored-by: stefanruvceski <[email protected]>
Co-authored-by: Tingluo Huang <[email protected]>
Co-authored-by: Thomas Boop <[email protected]>
2022-06-10 13:51:20 +00:00
ac7b34a071 Release 2.293.0 (#1940)
* Update releaseNote.md

* 2.293.0 Release

* Update releaseNote.md

Co-authored-by: Thomas Boop <[email protected]>

Co-authored-by: Thomas Boop <[email protected]>
2022-06-10 15:42:51 +02:00
0d1e6fd57b Add ADR for Container Hooks (#1891)
* Add ADR for Container Hooks

* Rename 0000-container-hooks.md to 1891-container-hooks.md

* Update 1891-container-hooks.md

* Update docs/adrs/1891-container-hooks.md

Co-authored-by: Ferenc Hammerl <[email protected]>

* Update docs/adrs/1891-container-hooks.md

Co-authored-by: Ferenc Hammerl <[email protected]>

* Update docs/adrs/1891-container-hooks.md

Co-authored-by: Ferenc Hammerl <[email protected]>

* Update docs/adrs/1891-container-hooks.md

Co-authored-by: Ferenc Hammerl <[email protected]>

* Update docs/adrs/1891-container-hooks.md

Co-authored-by: Ferenc Hammerl <[email protected]>

* Update docs/adrs/1891-container-hooks.md

Co-authored-by: Ferenc Hammerl <[email protected]>

Co-authored-by: Ferenc Hammerl <[email protected]>
2022-06-10 09:35:30 -04:00
9623a44c2f Allow admins to fail jobs without container (#1895)
* Allow admins to fail jobs without container

* Make method static

* Update src/Runner.Common/Constants.cs

Co-authored-by: Thomas Boop <[email protected]>

* Update src/Runner.Worker/JobExtension.cs

Co-authored-by: Thomas Boop <[email protected]>

* Update src/Runner.Worker/JobExtension.cs

Co-authored-by: Thomas Boop <[email protected]>

* Rename env

* Add test for throwing when no container but required

* Update src/Runner.Worker/JobExtension.cs

* Update src/Test/L0/Worker/JobExtensionL0.cs

* Update src/Runner.Common/Constants.cs

Co-authored-by: Thomas Boop <[email protected]>

Co-authored-by: Thomas Boop <[email protected]>
2022-06-09 17:17:11 -04:00