Skip to content

Commit

Permalink
Revert "Merge origin/main (youtube#4005) (youtube#4078)"
Browse files Browse the repository at this point in the history
This reverts commit 708c7ab.
  • Loading branch information
madhurajayaraman committed Sep 4, 2024
1 parent 86b936f commit 6344bda
Show file tree
Hide file tree
Showing 85 changed files with 71,698 additions and 1,009 deletions.
41 changes: 14 additions & 27 deletions .github/actions/check_artifact_size/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,27 +41,13 @@ runs:
const latestRun = workflowRuns.data.workflow_runs[0].id;
// Get the artifact uploaded on the latest successful workflow run on the main branch.
let allArtifacts = [];
let page = 1;
let hasNextPage = true;
while (hasNextPage) {
const response = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: latestRun,
page: page
});
allArtifacts = allArtifacts.concat(response.data.artifacts);
if (response.data.artifacts.length === 0) {
hasNextPage = false;
} else {
page++;
}
}
const allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: latestRun
});
const matchArtifacts = allArtifacts.filter((artifact) => {
const matchArtifacts = allArtifacts.data.artifacts.filter((artifact) => {
return artifact.name == '${{ inputs.name }}';
});
Expand Down Expand Up @@ -103,15 +89,16 @@ runs:
for (let file in fileSizeThresholds) {
console.log(`Checking file size of ${file}.`);
const fileName = file.split('/').pop();
const downloadFilePath = path.join('${{ steps.download-artifact.outputs.downloadDir }}', fileName);
const downloadFilePath = path.join('${{ steps.download-artifact.outputs.downloadDir }}', file);
if (!fs.existsSync(downloadFilePath)) {
core.setFailed(`File ${file} was not uploaded to the main branch.`);
console.error(`File ${file} was not uploaded to the main branch.`);
continue;
}
const filePath = path.join(process.env.GITHUB_WORKSPACE, '${{ inputs.path }}', file);
if (!fs.existsSync(filePath)) {
core.setFailed(`File ${file} was not created in the current workflow run.`);
console.error(`File ${filePath} was not created in the current workflow run.`);
continue;
}
const oldStats = fs.statSync(downloadFilePath);
Expand All @@ -122,14 +109,14 @@ runs:
console.log(`Latest uploaded artifact size on the main branch is ${oldSize / 1024}kB, new artifact size generated in this PR is ${newSize / 1024}kB.`);
const deltaSize = newSize - oldSize;
const deltaThreshold = (Math.abs(deltaSize) / oldSize * 100).toFixed(1);
const deltaThreshold = (Math.abs(deltaSize) / oldSize * 100).toFixed(4);
if (deltaSize < 0) {
console.log(`Artifact size is decreased by ${Math.abs(deltaSize)} (${deltaThreshold}%).`);
} else {
console.log(`Artifact size is increased by ${deltaSize} (${deltaThreshold}%).`);
const threshold = (fileSizeThresholds[file] * 100).toFixed(1);
if (deltaThreshold > threshold) {
if (deltaThreshold > fileSizeThresholds[file]) {
const threshold = (fileSizeThresholds[file] * 100).toFixed(4);
console.error(`Artifact size increase exceeds threshold ${threshold}%.`);
core.setOutput("addLabel", true);
}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,8 @@ jobs:
uses: ./.github/actions/build
- name: 'Check Artifact Size'
uses: ./.github/actions/check_artifact_size
if: ${{ false }} # ${{ inputs.artifact_size_increase_thresholds }}
if: ${{ inputs.artifact_size_increase_thresholds }}
continue-on-error: true # Ignore this step if check artifact size failed.
with:
workflow: ${{ github.workflow }}
name: ${{ matrix.platform }}-${{ matrix.config }}
Expand Down
2 changes: 0 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ repos:
entry: python ./download_resources.py
language: python
stages: [post-checkout]
additional_dependencies: [certifi]
always_run: true
- id: test-download-from-gcs-helper
name: test download from gcs helper
Expand All @@ -175,7 +174,6 @@ repos:
pass_filenames: false
always_run: true
stages: [push]
additional_dependencies: [certifi]
args: [-m, unittest, cobalt/tools/download_from_gcs_test.py]
- id: test-python3-compatibility
name: Test Python 3 Compatibility
Expand Down
7 changes: 4 additions & 3 deletions BUILD_STATUS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
| Linux | [![linux](https://github.com/youtube/cobalt/actions/workflows/linux.yaml/badge.svg?branch=main&event=push)](https://github.com/youtube/cobalt/actions/workflows/linux.yaml?query=event%3Apush+branch%3Amain) | [![linux_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/linux_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/linux_25.lts.1+.yaml?query=event%3Apush+branch%3A25.lts.1%2B) | [![linux_24.lts.1+](https://github.com/youtube/cobalt/actions/workflows/linux_24.lts.1+.yaml/badge.svg?branch=24.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/linux_24.lts.1+.yaml?query=event%3Apush+branch%3A24.lts.1%2B) | [![linux_23.lts.1+](https://github.com/youtube/cobalt/actions/workflows/linux_23.lts.1+.yaml/badge.svg?branch=23.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/linux_23.lts.1+.yaml?query=event%3Apush+branch%3A23.lts.1%2B) |
| Raspi-2 | [![raspi-2](https://github.com/youtube/cobalt/actions/workflows/raspi-2.yaml/badge.svg?branch=main&event=push)](https://github.com/youtube/cobalt/actions/workflows/raspi-2.yaml?query=event%3Apush+branch%3Amain) | [![raspi-2_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/raspi-2_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/raspi-2_25.lts.1+.yaml?query=event%3Apush+branch%3A25.lts.1%2B) | [![raspi-2_24.lts.1+](https://github.com/youtube/cobalt/actions/workflows/raspi-2_24.lts.1+.yaml/badge.svg?branch=24.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/raspi-2_24.lts.1+.yaml?query=event%3Apush+branch%3A24.lts.1%2B) | [![raspi-2_23.lts.1+](https://github.com/youtube/cobalt/actions/workflows/raspi-2_23.lts.1+.yaml/badge.svg?branch=23.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/raspi-2_23.lts.1+.yaml?query=event%3Apush+branch%3A23.lts.1%2B) |
| Stub | [![stub](https://github.com/youtube/cobalt/actions/workflows/stub.yaml/badge.svg?branch=main&event=push)](https://github.com/youtube/cobalt/actions/workflows/stub.yaml?query=event%3Apush+branch%3Amain) | [![stub_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/stub_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/stub_25.lts.1+.yaml?query=event%3Apush+branch%3A25.lts.1%2B) | [![stub_24.lts.1+](https://github.com/youtube/cobalt/actions/workflows/stub_24.lts.1+.yaml/badge.svg?branch=24.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/stub_24.lts.1+.yaml?query=event%3Apush+branch%3A24.lts.1%2B) | [![stub_23.lts.1+](https://github.com/youtube/cobalt/actions/workflows/stub_23.lts.1+.yaml/badge.svg?branch=23.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/stub_23.lts.1+.yaml?query=event%3Apush+branch%3A23.lts.1%2B) |
| Win32 | - | [![win32_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/win32_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/win32_25.lts.1+.yaml?query=event%3Apush+branch%3A25.lts.1%2B) | [![win32_24.lts.1+](https://github.com/youtube/cobalt/actions/workflows/win32_24.lts.1+.yaml/badge.svg?branch=24.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/win32_24.lts.1+.yaml?query=event%3Apush+branch%3A24.lts.1%2B) | [![win32_23.lts.1+](https://github.com/youtube/cobalt/actions/workflows/win32_23.lts.1+.yaml/badge.svg?branch=23.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/win32_23.lts.1+.yaml?query=event%3Apush+branch%3A23.lts.1%2B) |
| Xbox One | - | [![xb1_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/xb1_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/xb1_25.lts.1+.yaml?query=event%3Apush+branch%3A25.lts.1%2B) | | |
| Win32 | [![win32](https://github.com/youtube/cobalt/actions/workflows/win32.yaml/badge.svg?branch=main&event=push)](https://github.com/youtube/cobalt/actions/workflows/win32.yaml?query=event%3Apush+branch%3Amain) | [![win32_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/win32_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/win32_25.lts.1+.yaml?query=event%3Apush+branch%3A25.lts.1%2B) | [![win32_24.lts.1+](https://github.com/youtube/cobalt/actions/workflows/win32_24.lts.1+.yaml/badge.svg?branch=24.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/win32_24.lts.1+.yaml?query=event%3Apush+branch%3A24.lts.1%2B) | [![win32_23.lts.1+](https://github.com/youtube/cobalt/actions/workflows/win32_23.lts.1+.yaml/badge.svg?branch=23.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/win32_23.lts.1+.yaml?query=event%3Apush+branch%3A23.lts.1%2B) |
| Xbox One | [![xb1](https://github.com/youtube/cobalt/actions/workflows/xb1.yaml/badge.svg?branch=main&event=push)](https://github.com/youtube/cobalt/actions/workflows/xb1.yaml?query=event%3Apush+branch%3Amain) | [![xb1_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/xb1_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/xb1_25.lts.1+.yaml?query=event%3Apush+branch%3A25.lts.1%2B) | | |
| Python | [![python](https://github.com/youtube/cobalt/actions/workflows/pytest.yaml/badge.svg?branch=main&event=push)](https://github.com/youtube/cobalt/actions/workflows/pytest.yaml?query=event%3Apush+branch%3Amain) | [![python_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/pytest_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/pytest_25.lts.1+.yaml?query=event%3Apush+branch%3A25.lts.1%2B) | | |
| Java | [![java](https://github.com/youtube/cobalt/actions/workflows/gradle.yaml/badge.svg?branch=main&event=push)](https://github.com/youtube/cobalt/actions/workflows/gradle.yaml?query=event%3Apush+branch%3Amain) | [![java_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/gradle_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/gradle_25.lts.1+.yaml?query=event%3Apush+branch%3A25.lts.1%2B) | | |

Expand All @@ -23,7 +23,8 @@
| Evergreen | [![evergreen](https://github.com/youtube/cobalt/actions/workflows/evergreen.yaml/badge.svg?branch=main&event=schedule)](https://github.com/youtube/cobalt/actions/workflows/evergreen.yaml?query=event%3Aschedule+branch%3Amain) | [![evergreen_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/evergreen_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/evergreen_25.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A25.lts.1%2B) | [![evergreen_24.lts.1+](https://github.com/youtube/cobalt/actions/workflows/evergreen_24.lts.1+.yaml/badge.svg?branch=24.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/evergreen_24.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A24.lts.1%2B) | [![evergreen_23.lts.1+](https://github.com/youtube/cobalt/actions/workflows/evergreen_23.lts.1+.yaml/badge.svg?branch=23.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/evergreen_23.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A23.lts.1%2B) |
| Linux | [![linux](https://github.com/youtube/cobalt/actions/workflows/linux.yaml/badge.svg?branch=main&event=schedule)](https://github.com/youtube/cobalt/actions/workflows/linux.yaml?query=event%3Aschedule+branch%3Amain) | [![linux_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/linux_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/linux_25.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A25.lts.1%2B) | [![linux_24.lts.1+](https://github.com/youtube/cobalt/actions/workflows/linux_24.lts.1+.yaml/badge.svg?branch=24.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/linux_24.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A24.lts.1%2B) | [![linux_23.lts.1+](https://github.com/youtube/cobalt/actions/workflows/linux_23.lts.1+.yaml/badge.svg?branch=23.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/linux_23.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A23.lts.1%2B) |
| Raspi-2 | [![raspi-2](https://github.com/youtube/cobalt/actions/workflows/raspi-2.yaml/badge.svg?branch=main&event=schedule)](https://github.com/youtube/cobalt/actions/workflows/raspi-2.yaml?query=event%3Aschedule+branch%3Amain) | [![raspi-2_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/raspi-2_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/raspi-2_25.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A25.lts.1%2B) | [![raspi-2_24.lts.1+](https://github.com/youtube/cobalt/actions/workflows/raspi-2_24.lts.1+.yaml/badge.svg?branch=24.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/raspi-2_24.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A24.lts.1%2B) | [![raspi-2_23.lts.1+](https://github.com/youtube/cobalt/actions/workflows/raspi-2_23.lts.1+.yaml/badge.svg?branch=23.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/raspi-2_23.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A23.lts.1%2B) |
| Win32 | - | [![win32_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/win32_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/win32_25.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A25.lts.1%2B) | [![win32_24.lts.1+](https://github.com/youtube/cobalt/actions/workflows/win32_24.lts.1+.yaml/badge.svg?branch=24.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/win32_24.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A24.lts.1%2B) | [![win32_23.lts.1+](https://github.com/youtube/cobalt/actions/workflows/win32_23.lts.1+.yaml/badge.svg?branch=23.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/win32_23.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A23.lts.1%2B) |
| Win32 | [![win32](https://github.com/youtube/cobalt/actions/workflows/win32.yaml/badge.svg?branch=main&event=schedule)](https://github.com/youtube/cobalt/actions/workflows/win32.yaml?query=event%3Aschedule+branch%3Amain) | [![win32_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/win32_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/win32_25.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A25.lts.1%2B) | [![win32_24.lts.1+](https://github.com/youtube/cobalt/actions/workflows/win32_24.lts.1+.yaml/badge.svg?branch=24.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/win32_24.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A24.lts.1%2B) | [![win32_23.lts.1+](https://github.com/youtube/cobalt/actions/workflows/win32_23.lts.1+.yaml/badge.svg?branch=23.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/win32_23.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A23.lts.1%2B) |
| Xbox One | [![xb1](https://github.com/youtube/cobalt/actions/workflows/xb1.yaml/badge.svg?branch=main&event=schedule)](https://github.com/youtube/cobalt/actions/workflows/xb1.yaml?query=event%3Aschedule+branch%3Amain) | [![xb1_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/xb1_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=schedule)](https://github.com/youtube/cobalt/actions/workflows/xb1_25.lts.1+.yaml?query=event%3Aschedule+branch%3A24.lts.1%2B) | | |


# Legacy releases
Expand Down
Loading

0 comments on commit 6344bda

Please sign in to comment.