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

Fixlocks #470

Merged
merged 2 commits into from
Sep 24, 2024
Merged

Fixlocks #470

merged 2 commits into from
Sep 24, 2024

Conversation

pp-mo
Copy link
Member

@pp-mo pp-mo commented Sep 20, 2024

Addresses #466

From the actions panel, it appears that the lockfile updates were successfully occurring with the previous py39/py310/py311 version.
But this broke for python 3.12 versions, when python versions were updated.

Also ... Prior to the Python version update, the lockfiles update action seemed to be working, but did not generate PRs as expected.
It may be simply that the target branch "" had been removed, and the actions have permission to update that, but not to (re-)create it. We will check that subsequently ...

Copy link

codecov bot commented Sep 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.37%. Comparing base (cc0ea12) to head (394566e).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #470   +/-   ##
=======================================
  Coverage   90.37%   90.37%           
=======================================
  Files           6        6           
  Lines         800      800           
  Branches      105      105           
=======================================
  Hits          723      723           
  Misses         64       64           
  Partials       13       13           
Flag Coverage Δ
90.37% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pp-mo
Copy link
Member Author

pp-mo commented Sep 20, 2024

Learning notes ...
replacing version matrix ...
[py310, py311, py312] FAIL
[py310] ok
[py310, py311] ok
[py311, py312] FAIL -- py311 cancelled while building lockfile
[py312, py311] FAIL -- py311 cancelled after building lockfile successfully
[py312] simply FAILS

It's not at all clear what is going on :
The tox command for py312-lock works fine locally.
Might be something to do with local Artifactory proxy, but the message is more odd than that :
from (raw) GHA log of the failure ...

.tox create: /home/runner/work/cf-units/cf-units/.tox/.tox
.tox installdeps: tox-conda, tox-run-command, tox >= 3.27.1
py3[12](https://github.com/SciTools/cf-units/actions/runs/10964584112/job/30448507804#step:10:13)-lock create: /home/runner/work/cf-units/cf-units/.tox/py312-lock
ERROR: invocation failed (exit code 1), logfile: /home/runner/work/cf-units/cf-units/.tox/py312-lock/log/py312-lock-0.log
================================== log start ===================================
Channels:
 - conda-forge
Platform: linux-64
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... failed

PackagesNotFoundError: The following packages are not available from current channels:
  - python=3.12*

Current channels:
  - https://conda.anaconda.org/conda-forge

To search for alternate channels that may provide the conda package you're looking for, 
  navigate to 
  . . .

@pp-mo pp-mo force-pushed the fixlocks branch 2 times, most recently from 43e9bc0 to c7c7b8f Compare September 23, 2024 15:34
@pp-mo
Copy link
Member Author

pp-mo commented Sep 24, 2024

UPDATE Tues 2024-09-24

After a whole lot of investigation, and multiple dead ends...

It seems that this line was the critical thing
It was, presumably, effectively "pinning" some resources to cause an env in which tox can't successfully create a python 3.12 environment. resulting in log output something like this :

##[group]Run tox -e py312-lock
shell: /usr/bin/bash -l {0}
env:
  ENV_NAME: ci-locks
  CACHE_PERIOD: 2024.19
  INPUT_RUN_POST: true
  CONDA: /home/runner/miniconda3
  CONDA_PKGS_DIR: /home/runner/conda_pkgs_dir
##[endgroup]
.tox create: /home/runner/work/cf-units/cf-units/.tox/.tox
.tox installdeps: tox-conda, tox-run-command, tox >= 3.27.1
py312-lock create: /home/runner/work/cf-units/cf-units/.tox/py312-lock
ERROR: invocation failed (exit code 1), logfile: /home/runner/work/cf-units/cf-units/.tox/py312-lock/log/py312-lock-0.log
================================== log start ===================================
Channels:
 - conda-forge
Platform: linux-64
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... failed

PackagesNotFoundError: The following packages are not available from current channels:

  - python=3.12*

Current channels:

  - https://conda.anaconda.org/conda-forge

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.
Note: 'use_only_tar_bz2' is enabled. This might be omitting some
packages from the index. Set this option to 'false' and retry.

Reason

This happened, I think, because conda-forge now delivers only ".conda", instead of ".bz2" files. Hence newer versions of many packages were excluded.
When this control was removed, the failing py312 operation succeeds.

@pp-mo
Copy link
Member Author

pp-mo commented Sep 24, 2024

Still to do

We should check this for real, after merging this, to demonstrate that an automatically triggered operation (as opposed to manual) can still create the expected PRs.
To do that we will need to temporarily meddle with the cron settings, and once it is proved put them back.

@pp-mo pp-mo marked this pull request as ready for review September 24, 2024 13:43
Copy link
Collaborator

@trexfeathers trexfeathers left a comment

Choose a reason for hiding this comment

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

Got there in the end! Thanks @pp-mo

@trexfeathers trexfeathers merged commit 7d8c497 into main Sep 24, 2024
30 checks passed
@@ -13,7 +13,7 @@ dependencies:
# core dependencies
- antlr-python-runtime 4.11.1.* # To update this, see cf_units/_udunits2_parser/README.md
- cftime>=1.2
- numpy==1.26.4
- numpy<2
Copy link
Member Author

Choose a reason for hiding this comment

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

note

@pp-mo pp-mo mentioned this pull request Sep 26, 2024
stephenworsley added a commit to stephenworsley/cf-units that referenced this pull request Sep 27, 2024
* main:
  [DOCS] Update docstring for date2num (module function) (SciTools#483)
  Modernise setup scripts (SciTools#484)
  Make antlr optional (SciTools#423)
  Ruff: smaller steps (SciTools#364)
  Updated docstring for num2date. (SciTools#467)
  updated conda lock files (SciTools#479)
  Revert to 00:03 Mondays for lockfile updates. (SciTools#480)
  New trigger time for GMT. (SciTools#478)
  Check lockfile updates @ 3pm daily (temporary for testing). (SciTools#477)
  Fixlocks (SciTools#470)

# Conflicts:
#	pyproject.toml
#	requirements/cf-units.yml
#	requirements/locks/py310-lock-linux-64.txt
#	requirements/locks/py310-lock-osx-64.txt
#	requirements/locks/py310-lock-win-64.txt
#	requirements/locks/py311-lock-linux-64.txt
#	requirements/locks/py311-lock-osx-64.txt
#	requirements/locks/py311-lock-win-64.txt
#	requirements/locks/py312-lock-linux-64.txt
#	requirements/locks/py312-lock-osx-64.txt
#	requirements/locks/py312-lock-win-64.txt
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.

2 participants