* Set runner environment in runner context and env
Extract runner_environment from the global context and expose in the
`github.runner` context and env as `RUNNER_ENVIRONMENT`.
Signed-off-by: Philip Harrison <philip@mailharrison.com>
* encoding.
---------
Signed-off-by: Philip Harrison <philip@mailharrison.com>
Co-authored-by: Tingluo Huang <tingluohuang@github.com>
* [1742] Ensure multiple composite annoations are correctly written.
This implementation uses a collector pattern to allow embedded ExecutionContexts to stash Issue objects for later processing by a non-embedded ancestor ExecutionContext.
Also:
- Provide explicit constructor implementations for ExecutionContext
- Leverage explicit constructors to solidify immutability of several ExecutionContext class members.
- Fixed erroneous call to ExecutionContext.Complete in CompositeActionHandler.cs
- Use a consistent timestamp for FinishTime in ExecutionContext::Complete
* Ensure collected issues are processed only by a non-embedded ExecutionContext.
This was already implicit. Now, just making it explicit.
* Provide a clear mechanism that allows callers to opt-in/opt-out of ExecutionContext::AddIssue's logging behavior.
* Addressed deserialization inconsistencies in TimelineRecord.cs
* Added TimelineRecord unit tests.
* Refined unit tests related to TimelineRecord::Variables case-insensitivity
* Add a unit test that verifies ExecutionContextLogOptions::LogMessageOverride has the desired effect.
* Responded to PR feedback.
* Don't allow embedded ExecutionContexts to add Issues to a TimelineRecord
* Only upload to Results with new job message type
* No need to have separate websocketFeedServer
* Linting fix
* Update src/Runner.Common/JobServerQueue.cs
Co-authored-by: Tingluo Huang <tingluohuang@github.com>
* add connection timeout
* Consolidate initializing webclient to result client
* Retry websocket delivery for console logs
* Linter fix
* Do not give up for good, reconnect again in 10 minutes
* Has to reset delivered
* Only first time retry 3 times to connect to websocket
---------
Co-authored-by: Tingluo Huang <tingluohuang@github.com>
* send more stuff as part of job completed
* feedback
* set only once
* feedback
* feedback
* fix test
* feedback
* nit: spacing
* nit: line
Co-authored-by: Tingluo Huang <tingluohuang@github.com>
---------
Co-authored-by: Tingluo Huang <tingluohuang@github.com>
* Add annotations if node 12 action is found
* Better placeholder
* Only warn if FF is on
* Move annotation logic
* Pass in the LTS Url
* Raise annotation right before executing the action
* Match server side FF name
* Change name back to features
* Better warning text
* Update src/Runner.Common/Constants.cs
Co-authored-by: Thomas Boop <52323235+thboop@users.noreply.github.com>
Co-authored-by: Thomas Boop <52323235+thboop@users.noreply.github.com>
* Handle macOS upgrade smoothly
* cleanup
* misc cleanup
* final updates
* Update src/Misc/layoutbin/update.sh.template
Co-authored-by: Patrick Ellis <319655+pje@users.noreply.github.com>
* Update src/Misc/layoutbin/update.sh.template
Co-authored-by: Patrick Ellis <319655+pje@users.noreply.github.com>
* Upload telemetry and default to old method as needed
* minor fix
* add one more bit of logging
* some more telemetry
* quote variables to handle spaces
* tiny fix for ubuntu
* remove version and move telemetry to diag
* use full path
Co-authored-by: Patrick Ellis <319655+pje@users.noreply.github.com>
* Add generateIdTokenUrl as an env var
* Add generateIdTokenUrl to env vars
* Add basic telemetry class and submit it on jobcompleted
* Use constructor overload
* Rename telemetry to jobTelemetry
* Rename telemetry file
* Make JobTelemetryType a string
* Collect telemetry
* Remove debugger
* Update src/Runner.Worker/ActionCommandManager.cs
Co-authored-by: Thomas Boop <52323235+thboop@users.noreply.github.com>
* Use same JobTelemetry for all contexts
* Mask telemetry data
* Mask in JobRunner instead
* Empty line
* Change method signature
Returning with a List suggests we clone it and that the
original doesn't change..
* Update launch.json
Co-authored-by: Thomas Boop <52323235+thboop@users.noreply.github.com>
* Add generateIdTokenUrl as an env var
* Add generateIdTokenUrl to env vars
* Add name and runner_group to context
* No longer add runner-group
* Update runner name if needed
* Get interface instead of concrete class
* Check for nulls on ReservedAgent
* Avoid loading setting file unnecesseraly
* Only check agentName once
* Use Trace.Error when can't update settings
* Better equals and exception handling
* Update JobDispatcher.cs
* Add tests and null check
* Composite Action Run Steps
* Clean up trace messages + add Trace debug in ActionManager
* Change String to string
* Add comma to Composite
* Change JobSteps to a List, Change Register Step function name
* Add TODO, remove unn. content
* Remove unnecessary code
* Fix unit tests
* Add verbose trace logs which are only viewable by devs
* Sort usings in Composite Action Handler
* Change 0 to location
* Update context variables in composite action yaml
* Add helpful error message for null steps