Skip to content
Merged
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
3 changes: 3 additions & 0 deletions .github/workflows/update_sdk_details.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ jobs:
python -m pip install --upgrade pip
pip install requests

- name: Refresh indexes from checked-out SDK data
run: python sdk-details/tools/build_indexes.py

- name: Test SDK details tooling
run: python sdk-details/tools/test.py

Expand Down
12 changes: 12 additions & 0 deletions sdk-details/sdks/flutter/data/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -5147,6 +5147,18 @@
}
]
},
{
"engine": "af7e796e161ae0bb1ff0758c71a7105418bd9ded",
"releases": [
{
"flutter": "3.47.5",
"dart": "3.13.4",
"channel": "stable",
"framework": "6a19cca56475dbfba1478ee68d7bd0c2ef891da1",
"release_date": "2026-09-18T20:36:35.413968Z"
}
]
},
{
"engine": "b04955656c87de0d80d259792e3a0e4a23b7c260",
"releases": [
Expand Down
22 changes: 22 additions & 0 deletions sdk-details/tools/tests/test_indexes.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import copy
import json
import re
import tempfile
from unittest.mock import patch
from pathlib import Path
import sys
import unittest
Expand Down Expand Up @@ -31,3 +33,23 @@ def test_real_indexes_and_staged_definitions(self):
self.assertIn('path_template',active['lookups'][0])
bad=copy.deepcopy(definition);bad['lookups'][0]['index_path']='sdk-details/{value}.json'
with self.assertRaises(ValueError):validate.validate_definition(candidate,bad)

def test_refresh_repairs_index_after_provider_data_changes(self):
with tempfile.TemporaryDirectory() as directory:
root=Path(directory)
sdk=root/'sdks/flutter';(sdk/'data/engine').mkdir(parents=True)
(sdk/'definition.json').write_text(json.dumps({'lookups':[]}))
(sdk/'data/engine/first.json').write_text(json.dumps({'engine':'first','releases':[]}))
original_outputs=build_indexes.outputs
with patch.object(build_indexes,'SOURCES',{'flutter':('engine','engine')}), patch.object(build_indexes,'outputs',lambda:original_outputs(root)):
build_indexes.build()
build_indexes.build(check=True)
(sdk/'data/engine/second.json').write_text(json.dumps({'engine':'second','releases':[]}))
with self.assertRaisesRegex(ValueError,'Stale SDK index'):
build_indexes.build(check=True)
build_indexes.build()
build_indexes.build(check=True)
index=sdk/'data/index.json';before=index.read_bytes()
self.assertEqual(['first','second'],[entry['engine'] for entry in json.loads(before)['entries']])
build_indexes.build()
self.assertEqual(before,index.read_bytes())
Loading