Skip to content

ci: Use dotenv to set environment variables#2314

Open
thompson-tomo wants to merge 8 commits into
open-telemetry:mainfrom
thompson-tomo:dotenv
Open

ci: Use dotenv to set environment variables#2314
thompson-tomo wants to merge 8 commits into
open-telemetry:mainfrom
thompson-tomo:dotenv

Conversation

@thompson-tomo

@thompson-tomo thompson-tomo commented May 1, 2026

Copy link
Copy Markdown
Contributor

This switches all of the tests across to using dotenv to set environment variables so that both cloud & local use the same setup. Also switched is the examples which have workspace services.

Have also added linting to ci workflow

Reason file is in the root of the gem is so that they can be reused for examples.

@thompson-tomo thompson-tomo changed the title ci: Use dotenv to configure test environment pt. 1 ci: Use dotenv to configure test environment May 1, 2026
@thompson-tomo thompson-tomo changed the title ci: Use dotenv to configure test environment ci: Use dotenv to set environment variables May 1, 2026

@arielvalentin arielvalentin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we were converging in the ci yaml files?

@thompson-tomo

Copy link
Copy Markdown
Contributor Author

The CI yaml file enabled a like for like migration for what we had previously without touching any source code. This takes it a step further by enabling the env variables to be automatically set for local tests & examples, not just the CI hence further simplifying/reducing duplication.

Tbh, I was expecting to have to script something to set them locally hence why I held off but looked into it some more after #2282 (comment) and I found this solution.

Note The CI yml will still be used for variables which are needed for the ci logic ie is jruby supported but we can we can use the .env.test for the variables only needed within the ruby process.

@arielvalentin

Copy link
Copy Markdown
Contributor

I'm not sure where we are going here.

I'm going to ask that you create an issue that maps out the final state of where you want to CI, dev, and workflows with all of these changes. It would also help for us to follow along if you would file issues describing the challenges and problems you have encountered and want to address.

Changes like this are a little harder to review because I'm not sure where we are going and if there is a benefit to shifting configs around from multiple configurations (actions yaml and code) to a different set of multiple configurations (gem ci yaml and env files).

@thompson-tomo

Copy link
Copy Markdown
Contributor Author

@arielvalentin i have raised #2318 which seeks to describe what I am progressing towards with the key goal being increased efficiency in build process while reducing maintenance and increasing coverage to cover more os etc without decreasing usability of the checks in pr's.

Note the idea is eliminate duplication of config hence it is either .env.test or github-ci.yml and not both. The deciding factor is, does the variable need to be exposed outside the ruby process or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants