Skip to content

Commit

Permalink
Merge branch 'main' into 125-jlap
Browse files Browse the repository at this point in the history
  • Loading branch information
dholth authored May 28, 2024
2 parents 3ae416b + 021f4bd commit 2c93771
Show file tree
Hide file tree
Showing 11 changed files with 51 additions and 24 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/canary-weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download test results
uses: actions/download-artifact@v3
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7

- name: Upload combined test results
# provides one downloadable archive of all .coverage/test-report.xml files
# of all matrix runs for further analysis.
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: test-results-${{ github.sha }}-all
path: test-results-${{ github.sha }}-*
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check CLA
uses: conda/actions/check-cla@1e442e090ad28c9b0f85697105703a303320ffd1
uses: conda/actions/check-cla@976289d0cfd85139701b26ddd133abdd025a7b5f # v24.5.0
with:
# [required]
# A token with ability to comment, label, and modify the commit status
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ jobs:
runs-on: ubuntu-latest
steps:
# remove [pending::feedback]
- uses: actions-ecosystem/action-remove-labels@2ce5d41b4b6aa8503e285553f75ed56e0a40bae0
- uses: actions-ecosystem/action-remove-labels@2ce5d41b4b6aa8503e285553f75ed56e0a40bae0 # v1.3.0
with:
labels: ${{ env.FEEDBACK_LBL }}
github_token: ${{ secrets.PROJECT_TOKEN }}
# add [pending::support], if still open
- uses: actions-ecosystem/action-add-labels@18f1af5e3544586314bbe15c0273249c770b2daf
- uses: actions-ecosystem/action-add-labels@18f1af5e3544586314bbe15c0273249c770b2daf # v1.1.3
if: github.event.issue.state == 'open'
with:
labels: ${{ env.SUPPORT_LBL }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ jobs:
GLOBAL: https://raw.githubusercontent.com/conda/infra/main/.github/global.yml
LOCAL: .github/labels.yml
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- id: has_local
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0
with:
files: ${{ env.LOCAL }}
- name: Global Only
uses: EndBug/label-sync@52074158190acb45f3077f9099fea818aa43f97a
uses: EndBug/label-sync@52074158190acb45f3077f9099fea818aa43f97a # v2.3.3
if: steps.has_local.outputs.files_exists == 'false'
with:
config-file: ${{ env.GLOBAL }}
delete-other-labels: true
dry-run: ${{ github.event.inputs.dryrun }}
- name: Global & Local
uses: EndBug/label-sync@52074158190acb45f3077f9099fea818aa43f97a
uses: EndBug/label-sync@52074158190acb45f3077f9099fea818aa43f97a # v2.3.3
if: steps.has_local.outputs.files_exists == 'true'
with:
config-file: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
if: '!github.event.repository.fork'
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@1bf7ec25051fe7c00bdd17e6a7cf3d7bfb7dc771
- uses: dessant/lock-threads@1bf7ec25051fe7c00bdd17e6a7cf3d7bfb7dc771 # v5.0.1
with:
# Number of days of inactivity before a closed issue is locked
issue-inactive-days: 365
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
if: '!github.event.repository.fork'
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@9bfe908f2eaa7ba10340b31e314148fcfe6a2458
- uses: actions/add-to-project@9bfe908f2eaa7ba10340b31e314148fcfe6a2458 # v1.0.1
with:
# issues are added to the Planning project
# PRs are added to the Review project
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ jobs:
days-before-issue-stale: 90
days-before-issue-close: 21
steps:
- uses: conda/actions/read-yaml@1e442e090ad28c9b0f85697105703a303320ffd1
- uses: conda/actions/read-yaml@976289d0cfd85139701b26ddd133abdd025a7b5f # v24.5.0
id: read_yaml
with:
path: https://raw.githubusercontent.com/conda/infra/main/.github/messages.yml

- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e
- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0
id: stale
with:
# Only issues with these labels are checked whether they are stale
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download test results
uses: actions/download-artifact@v3
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7

- name: Upload combined test results
# provides one downloadable archive of all .coverage/test-report.xml files
# of all matrix runs for further analysis.
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: test-results-${{ github.sha }}-all
path: test-results-${{ github.sha }}-*
Expand Down
10 changes: 1 addition & 9 deletions conda_index/index/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1086,15 +1086,7 @@ def build_run_exports_data(self, subdir, verbose=False, progress=False):
run_exports_conda_packages = {}

# load cached packages
for row in cache.db.execute(
"""
SELECT path, run_exports FROM stat
LEFT JOIN run_exports USING (path)
WHERE stat.stage = ?
ORDER BY path
""",
(cache.upstream_stage,),
):
for row in cache.run_exports():
path, run_exports_data = row
run_exports_data = {"run_exports": json.loads(run_exports_data or "{}")}
if path.endswith(CONDA_PACKAGE_EXTENSION_V1):
Expand Down
15 changes: 15 additions & 0 deletions conda_index/index/sqlitecache.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,21 @@ def store_index_json_stat(self, database_path, mtime, size, index_json):
(database_path, mtime, size, index_json["sha256"], index_json["md5"]),
)

def run_exports(self):
"""
Query returning run_exports data, to be formatted by
ChannelIndex.build_run_exports_data()
"""
return self.db.execute(
"""
SELECT path, run_exports FROM stat
LEFT JOIN run_exports USING (path)
WHERE stat.stage = ?
ORDER BY path
""",
(self.upstream_stage,),
)


def _cache_post_install_details(paths_json_str):
post_install_details_json = {
Expand Down
20 changes: 20 additions & 0 deletions news/163-cache-run-exports
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
### Enhancements

* <news item>

### Bug fixes

* Move `run_exports.json` query into cache, instead of directly using SQL in
`ChannelIndex`. (#163)

### Deprecations

* <news item>

### Docs

* <news item>

### Other

* <news item>

0 comments on commit 2c93771

Please sign in to comment.