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

Conversation

alleeclark
Copy link

@alleeclark alleeclark commented Dec 17, 2024

What does this PR do?

Fixes # (add a link to the created issue in your repository if any)
OR link your project for clarity.

We received the email below stating that we need to upgrade by January.

image

Here is the recommended upgrade guide that I followed.

Does this introduce breaking change?

  • In v4, Artifacts are immutable (unless deleted). So you must change each of the uploaded Artifacts to have a different name and filter the downloads by name to achieve the same effect:

    • Since we are only uploading one artifact, it is fine. If we introduce a list, we will need to modify the name.
  • According to Github after Jan 9th if we have not upgraded there will be issues running pipelines.

Before submitting
  • Was this discussed/agreed via a GitHub issue? (no need for typos and docs improvements)
  • Did you create/update your configuration file? (in case you are adding new integration)
  • Did you set runtimes in config for GitHub action integration?
  • Are all integration tests passing?

Copy link

codecov bot commented Dec 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78%. Comparing base (9fad00e) to head (b0fb74d).

Additional details and impacted files
@@         Coverage Diff         @@
##           main   #176   +/-   ##
===================================
  Coverage    78%    78%           
===================================
  Files         2      2           
  Lines       249    249           
===================================
  Hits        194    194           
  Misses       55     55           

@alleeclark alleeclark force-pushed the fix_ci_allee_bump_upload_download_gh_actions_artifacts branch 24 times, most recently from 4190006 to aba3c02 Compare December 18, 2024 17:29
@alleeclark alleeclark force-pushed the fix_ci_allee_bump_upload_download_gh_actions_artifacts branch from 4a214b1 to b0fb74d Compare December 18, 2024 18:21
@@ -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 =========================

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.

@alleeclark
Copy link
Author

closed since we will revisit this repo later. here is a working solution that may be referenced.

@alleeclark alleeclark closed this Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant