Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Exit the agent of reflection on flags doesn't work the way we expect
This method is used to ensure Environment Variables that configure the agent process aren't automatically passed down to the child process that runs each job. We want to be very explicit about which variables end up in the job process. It's implemented using reflection on the flag structs from the ufave/cli package we use for CLI structure. It checks the EnvVar field on the flag struct, which works just fine with ufave/cli/v1. However, that field doesn't exist any more in ufave/cli/v2 and this method has started silently failing since we upgraded to v2 in #1233. I haven't added tests because no files in this package have tests and I'm not 100% sure where to start adding them. However, I'm treating this like an assertion. If the reflection doesn't work the way we expect, we hard exit with an error, like other should-never-happen errors in agent_start.go. I'll fix the method to work with ufave/cli/v2 in the following commit.
- Loading branch information