-
Notifications
You must be signed in to change notification settings - Fork 646
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
Generate workflow files with a Jinja template #2687
Conversation
|
instrumentation/opentelemetry-instrumentation-asyncio/tests/test_asyncio_cancellation.py
Outdated
Show resolved
Hide resolved
b092501
to
e39b90f
Compare
4cb0112
to
78fdff2
Compare
63c887f
to
3511ad6
Compare
ac327bc
to
9940f09
Compare
104867d
to
b7d6b3e
Compare
Ah, yes, I remembered this when I saw this uses
|
.github/workflows/generate_workflows_lib/src/generate_workflows_lib/test.yml.j2
Show resolved
Hide resolved
.github/workflows/generate_workflows_lib/src/generate_workflows_lib/misc.yml.j2
Show resolved
Hide resolved
.github/workflows/generate_workflows_lib/src/generate_workflows_lib/lint.yml.j2
Show resolved
Hide resolved
.github/workflows/generate_workflows_lib/src/generate_workflows_lib/contrib.yml.j2
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am sympathetic to Aaron concerns regarding the obvious huge listing vs the compactness of the gh matrix but once we are generating the workflows if we see areas of improvements we can iterate on it.
b9f3b44
to
21c624d
Compare
…s_lib/test.yml.j2 Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
…s_lib/misc.yml.j2 Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
…s_lib/lint.yml.j2 Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
…s_lib/contrib.yml.j2 Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
* Generate workflow files with a Jinja template Fixes open-telemetry#2686 * Remove sudo from allowlist_externals * Update workflows * Add condition to skip generate-workflows * Update workflows * Update .github/workflows/generate_workflows_lib/src/generate_workflows_lib/test.yml.j2 Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com> * Update .github/workflows/generate_workflows_lib/src/generate_workflows_lib/misc.yml.j2 Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com> * Update .github/workflows/generate_workflows_lib/src/generate_workflows_lib/lint.yml.j2 Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com> * Update .github/workflows/generate_workflows_lib/src/generate_workflows_lib/contrib.yml.j2 Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com> * Update workflows * Update workflows --------- Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
Fixes #2686
The idea behind this PR is to delete our current test and lint workflow files and replace them with automatically generated workflow files.
This automatically generated file gets its information directly from
tox.ini
, removing the duplication of test running information intox.ini
and in the Github workflow files.To achieve this, I have added a Jinja2 template that is used to generate the new workflow file. The resulting workflow file does not use a Github matrix. This is intentional, a Github matrix only supports 256 jobs, which had forced us to have 2 almost identical workflow files. With this new approach we only need one huge file.
I also cleaned up the information that is displayed in the web browser, so jobs now have more user-friendly names.
I also added a check that makes sure that the automatically generated workflow file is up to date with every PR that modifies the automatically generated workflow files so that we don't miss adding any necessary changes to this file.
I also removed the step where we cache the
tox
environment. Since everytox
run happens in a separate runner, I think there is no point in saving this cache.