Skip to content

Commit

Permalink
Remove references to test.yml (#4151)
Browse files Browse the repository at this point in the history
Fixes #4135
  • Loading branch information
ocelotl committed Aug 27, 2024
1 parent 98d3b3e commit 448ca8d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ CONTRIB_REPO_SHA=dde62cebffe519c35875af6d06fae053b3be65ec tox
```

The continuation integration overrides that environment variable with as per the configuration
[here](https://github.com/open-telemetry/opentelemetry-python/blob/main/.github/workflows/test.yml#L13).
[here](https://github.com/open-telemetry/opentelemetry-python/blob/main/.github/workflows/test_0.yml#L14).

### Benchmarks

Expand Down Expand Up @@ -195,9 +195,9 @@ opened in the Contrib repo with changes to make the packages compatible.

Follow these steps:
1. Open Core repo PR (Contrib Tests will fail)
2. Open Contrib repo PR and modify its `CORE_REPO_SHA` in `.github/workflows/test.yml`
2. Open Contrib repo PR and modify its `CORE_REPO_SHA` in `.github/workflows/test_x.yml`
to equal the commit SHA of the Core repo PR to pass tests
3. Modify the Core repo PR `CONTRIB_REPO_SHA` in `.github/workflows/test.yml` to
3. Modify the Core repo PR `CONTRIB_REPO_SHA` in `.github/workflows/test_x.yml` to
equal the commit SHA of the Contrib repo PR to pass Contrib repo tests (a sanity
check for the Maintainers & Approvers)
4. Merge the Contrib repo
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# OpenTelemetry Python
[![Slack](https://img.shields.io/badge/slack-@cncf/otel/python-brightgreen.svg?logo=slack)](https://cloud-native.slack.com/archives/C01PD4HUVBL)
[![Build Status](https://github.com/open-telemetry/opentelemetry-python/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/open-telemetry/opentelemetry-python/actions)
[![Build Status 0](https://github.com/open-telemetry/opentelemetry-python/actions/workflows/test_0.yml/badge.svg?branch=main)](https://github.com/open-telemetry/opentelemetry-python/actions/workflows/test_0.yml)
[![Build Status 1](https://github.com/open-telemetry/opentelemetry-python/actions/workflows/test_1.yml/badge.svg?branch=main)](https://github.com/open-telemetry/opentelemetry-python/actions/workflows/test_1.yml)
[![Minimum Python Version](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)
[![Release](https://img.shields.io/github/v/release/open-telemetry/opentelemetry-python?include_prereleases&style=)](https://github.com/open-telemetry/opentelemetry-python/releases/)
[![Read the Docs](https://readthedocs.org/projects/opentelemetry-python/badge/?version=latest)](https://opentelemetry-python.readthedocs.io/en/latest/)
Expand Down
19 changes: 13 additions & 6 deletions scripts/update_sha.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@
from ruamel.yaml import YAML

API_URL = "https://api.github.com/repos/open-telemetry/opentelemetry-python-contrib/commits/"
WORKFLOW_FILE = ".github/workflows/test.yml"
workflow_files = [
".github/workflows/test_0.yml"
".github/workflows/test_1.yml"
".github/workflows/misc_0.yml"
".github/workflows/contrib_0.yml"
".github/workflows/lint_0.yml"
]


def get_sha(branch):
Expand All @@ -33,11 +39,12 @@ def get_sha(branch):
def update_sha(sha):
yaml = YAML()
yaml.preserve_quotes = True
with open(WORKFLOW_FILE, "r") as file:
workflow = yaml.load(file)
workflow["env"]["CONTRIB_REPO_SHA"] = sha
with open(WORKFLOW_FILE, "w") as file:
yaml.dump(workflow, file)
for workflow_file in workflow_files:
with open(workflow_file, "r") as file:
workflow = yaml.load(file)
workflow["env"]["CONTRIB_REPO_SHA"] = sha
with open(workflow_file, "w") as file:
yaml.dump(workflow, file)


def main():
Expand Down

0 comments on commit 448ca8d

Please sign in to comment.