Skip to content
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

Update (ci): github action's artifact upgrade v4 #176

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/job-dump/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ runs:
shell: bash

- name: Upload pytest test results
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.artifact-name }}
path: meta.json
23 changes: 14 additions & 9 deletions .github/workflows/ci_compatible.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:

- run: echo "[]" > projects.json
- name: Upload placeholder
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: compatibility-${{ github.sha }}
path: projects.json
Expand Down Expand Up @@ -81,31 +81,36 @@ jobs:
matrix: ${{ fromJSON(needs.generator.outputs.matrix) }}
steps:
- name: Download 📥 summary
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: compatibility-${{ github.sha }}
- name: Download 📥 project
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
id: download-project
with:
name: project-${{ github.sha }}-${{ strategy.job-index }}
pattern: project-${{ github.sha }}-*

- run: ls -l
- name: append result
run: |
import json
import os
with open("projects.json") as fp:
data = json.load(fp)
with open("meta.json") as fp:
data.append(json.load(fp))
for root, dirs, files in os.walk("${{ steps.download-project.outputs.download-path }}"):
Copy link
Author

Choose a reason for hiding this comment

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

For w/e reason this output is not that useful https://github.com/actions/download-artifact?tab=readme-ov-file#outputs and the artifact does not unpack in the current directory. Added some logic to collect the meta files from the artifacts.

if "meta.json" in files:
with open(root+"/meta.json") as fp:
data.append(json.load(fp))
with open("projects.json", "w") as fp:
json.dump(data, fp)
shell: python

- name: Upload pytest test results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: compatibility-${{ github.sha }}
path: projects.json
overwrite: true

watcher:
runs-on: ubuntu-latest
Expand All @@ -129,7 +134,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Download 📥 summary
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: compatibility-${{ github.sha }}
- run: cat projects.json
Expand Down Expand Up @@ -170,7 +175,7 @@ jobs:
git config user.email [email protected]
git merge origin/main
- name: Download 📥 summary
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: compatibility-${{ github.sha }}
- name: Update results
Expand Down
2 changes: 1 addition & 1 deletion _actions/_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ dependencies:
install_flags:
- "--find-links https://download.pytorch.org/whl/cpu/torch_stable.html"
- name: typing_extensions
checkout: 4.1.1
checkout: 4.7.1
Copy link
Author

Choose a reason for hiding this comment

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

After updating artifacts this error was shown. A bump resolves this issue .

_ ERROR collecting _integrations/tests/integrations/lightning/boring_model.py __
tests/integrations/lightning/boring_model.py:15: in <module>
    import torch
/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/torch/__init__.py:1954: in <module>
    _C._initExtension(_manager_path())
/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/torch/cuda/__init__.py:1292: in <module>
    from .memory import *  # noqa: F403
/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/torch/cuda/memory.py:12: in <module>
    from typing_extensions import deprecated
E   ImportError: cannot import name 'deprecated' from 'typing_extensions' (/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/typing_extensions.py)
- generated xml file: /home/runner/work/ecosystem-ci/ecosystem-ci/_integrations/junit/test-project.xml -
=========================== short test summary info ============================
ERROR tests/integrations/test_lightning.py - ImportError: cannot import name 'deprecated' from 'typing_extensions' (/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/typing_extensions.py)
ERROR tests/integrations/test_lightning.py
ERROR tests/integrations/lightning/boring_model.py - ImportError: cannot import name 'deprecated' from 'typing_extensions' (/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/typing_extensions.py)
!!!!!!!!!!!!!!!!!!! Interrupted: 3 errors during collection !!!!!!!!!!!!!!!!!!!!
========================= 1 warning, 3 errors in 1.21s =========================

install_flags: "--use-pep517"

# OPTIONAL, running before installing your project
Expand Down
Loading