Skip to content

Commit

Permalink
Merge branch 'qa' into feat/logging-domain
Browse files Browse the repository at this point in the history
Signed-off-by: ubabar123 <[email protected]>
  • Loading branch information
ubabar123 authored Dec 18, 2024
2 parents 6770ba1 + 346ca71 commit dfb4c55
Show file tree
Hide file tree
Showing 13 changed files with 825 additions and 285 deletions.
63 changes: 47 additions & 16 deletions .github/workflows/validation-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,21 +85,52 @@ jobs:
fi
validate-dart-sdk-version:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Validate Dart SDK version
run: |
# Extract the Dart SDK version from pubspec.yaml
SDK_VERSION=$(grep 'sdk: ">=*' open-feature-dart-server-sdk/pubspec.yaml | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+')
MINIMUM_VERSION="3.6.0"
# Use sort and version compare to determine if the SDK version is less than the minimum version
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Validate Dart SDK versions in all pubspec.yaml files
run: |
echo "Validating Dart SDK versions in all pubspec.yaml files..."
# Find all pubspec.yaml files (recursively)
PUBSPEC_FILES=$(find . -name "pubspec.yaml")
echo "Found the following pubspec.yaml files:"
echo "$PUBSPEC_FILES"
# Define the minimum required Dart SDK version
MINIMUM_VERSION="3.5.4"
ALL_VALID="true"
# Iterate over each pubspec.yaml file
for PUBSPEC in $PUBSPEC_FILES; do
echo "Checking $PUBSPEC..."
# Extract the Dart SDK version in the ^<version> format
SDK_VERSION=$(grep -Po '(?<=sdk:\s\^)[0-9]+\.[0-9]+\.[0-9]+' "$PUBSPEC" || echo "not_found")
echo "Extracted Dart SDK version from $PUBSPEC: $SDK_VERSION"
# Validate the extracted version
if [ "$SDK_VERSION" = "not_found" ]; then
echo "❌ Failed to extract Dart SDK version from $PUBSPEC. Ensure the file contains a valid 'sdk: ^<version>' entry."
ALL_VALID="false"
continue
fi
# Compare the version
if [[ $(echo -e "${SDK_VERSION}\n${MINIMUM_VERSION}" | sort -V | head -n1) != "$MINIMUM_VERSION" ]]; then
echo "❌ Dart SDK version must be at least $MINIMUM_VERSION, found $SDK_VERSION"
exit 1
echo "❌ Dart SDK version in $PUBSPEC must be at least $MINIMUM_VERSION, found $SDK_VERSION"
ALL_VALID="false"
else
echo "✅ Dart SDK version is satisfactory: $SDK_VERSION"
fi
echo "✅ Dart SDK version in $PUBSPEC is satisfactory: $SDK_VERSION"
fi
done
# Exit with failure if any pubspec.yaml file has an invalid version
if [ "$ALL_VALID" != "true" ]; then
echo "❌ One or more pubspec.yaml files have an invalid Dart SDK version."
exit 1
else
echo "✅ All pubspec.yaml files have a valid Dart SDK version."
fi
Binary file modified .gitignore
Binary file not shown.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

### Requirements

Dart language version: [3.54](https://dart.dev/get-dart/archive)
Dart language version: [3.6.0](https://dart.dev/get-dart/archive)

> [!NOTE]
> The OpenFeature DartServer SDK only supports the latest currently maintained Dart language versions.
Expand Down
54 changes: 36 additions & 18 deletions open-feature-dart-server-sdk/.dart_tool/package_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@
},
{
"name": "build",
"rootUri": "file:///C:/Users/HP/AppData/Local/Pub/Cache/hosted/pub.dev/build-2.4.1",
"rootUri": "file:///C:/Users/HP/AppData/Local/Pub/Cache/hosted/pub.dev/build-2.4.1",

"packageUri": "lib/",
"languageVersion": "2.19"
"languageVersion": "3.6"
},
{
"name": "built_collection",
Expand Down Expand Up @@ -80,7 +81,8 @@
},
{
"name": "coverage",
"rootUri": "file:///C:/Users/HP/AppData/Local/Pub/Cache/hosted/pub.dev/coverage-1.11.0",
"rootUri": "file:///C:/Users/HP/AppData/Local/Pub/Cache/hosted/pub.dev/coverage-1.11.0",

"packageUri": "lib/",
"languageVersion": "3.4"
},
Expand Down Expand Up @@ -130,8 +132,9 @@
{
"name": "http_multi_server",
"rootUri": "file:///C:/Users/HP/AppData/Local/Pub/Cache/hosted/pub.dev/http_multi_server-3.2.1",

"packageUri": "lib/",
"languageVersion": "2.12"
"languageVersion": "3.2"
},
{
"name": "http_parser",
Expand All @@ -141,9 +144,10 @@
},
{
"name": "io",
"rootUri": "file:///C:/Users/HP/AppData/Local/Pub/Cache/hosted/pub.dev/io-1.0.4",
"rootUri": "file:///C:/Users/HP/AppData/Local/Pub/Cache/hosted/pub.dev/io-1.0.4",

"packageUri": "lib/",
"languageVersion": "2.12"
"languageVersion": "3.4"
},
{
"name": "js",
Expand All @@ -154,8 +158,9 @@
{
"name": "lints",
"rootUri": "file:///C:/Users/HP/AppData/Local/Pub/Cache/hosted/pub.dev/lints-5.0.0",

"packageUri": "lib/",
"languageVersion": "3.5"
"languageVersion": "3.6"
},
{
"name": "logging",
Expand Down Expand Up @@ -203,8 +208,9 @@
{
"name": "package_config",
"rootUri": "file:///C:/Users/HP/AppData/Local/Pub/Cache/hosted/pub.dev/package_config-2.1.0",

"packageUri": "lib/",
"languageVersion": "2.12"
"languageVersion": "3.4"
},
{
"name": "path",
Expand All @@ -220,9 +226,10 @@
},
{
"name": "pub_semver",
"rootUri": "file:///C:/Users/HP/AppData/Local/Pub/Cache/hosted/pub.dev/pub_semver-2.1.4",
"rootUri": "file:///C:/Users/HP/AppData/Local/Pub/Cache/hosted/pub.dev/pub_semver-2.1.4",

"packageUri": "lib/",
"languageVersion": "2.17"
"languageVersion": "3.4"
},
{
"name": "shelf",
Expand Down Expand Up @@ -262,15 +269,17 @@
},
{
"name": "source_maps",
"rootUri": "file:///C:/Users/HP/AppData/Local/Pub/Cache/hosted/pub.dev/source_maps-0.10.12",
"rootUri": "file:///C:/Users/HP/AppData/Local/Pub/Cache/hosted/pub.dev/source_maps-0.10.12",

"packageUri": "lib/",
"languageVersion": "2.18"
"languageVersion": "3.3"
},
{
"name": "source_span",
"rootUri": "file:///C:/Users/HP/AppData/Local/Pub/Cache/hosted/pub.dev/source_span-1.10.0",
"rootUri": "file:///C:/Users/HP/AppData/Local/Pub/Cache/hosted/pub.dev/source_span-1.10.0",

"packageUri": "lib/",
"languageVersion": "2.18"
"languageVersion": "3.1"
},
{
"name": "stack_trace",
Expand All @@ -286,19 +295,24 @@
},
{
"name": "string_scanner",

"rootUri": "file:///C:/Users/HP/AppData/Local/Pub/Cache/hosted/pub.dev/string_scanner-1.4.0",

"packageUri": "lib/",
"languageVersion": "3.1"
},
{
"name": "term_glyph",

"rootUri": "file:///C:/Users/HP/AppData/Local/Pub/Cache/hosted/pub.dev/term_glyph-1.2.1",

"packageUri": "lib/",
"languageVersion": "2.12"
"languageVersion": "3.1"
},
{
"name": "test",
"rootUri": "file:///C:/Users/HP/AppData/Local/Pub/Cache/hosted/pub.dev/test-1.25.9",

"packageUri": "lib/",
"languageVersion": "3.5"
},
Expand All @@ -310,7 +324,8 @@
},
{
"name": "test_core",
"rootUri": "file:///C:/Users/HP/AppData/Local/Pub/Cache/hosted/pub.dev/test_core-0.6.6",
"rootUri": "file:///C:/Users/HP/AppData/Local/Pub/Cache/hosted/pub.dev/test_core-0.6.6",

"packageUri": "lib/",
"languageVersion": "3.5"
},
Expand All @@ -322,15 +337,17 @@
},
{
"name": "vm_service",
"rootUri": "file:///C:/Users/HP/AppData/Local/Pub/Cache/hosted/pub.dev/vm_service-14.3.1",
"rootUri": "file:///C:/Users/HP/AppData/Local/Pub/Cache/hosted/pub.dev/vm_service-14.3.1",

"packageUri": "lib/",
"languageVersion": "3.3"
},
{
"name": "watcher",
"rootUri": "file:///C:/Users/HP/AppData/Local/Pub/Cache/hosted/pub.dev/watcher-1.1.0",

"packageUri": "lib/",
"languageVersion": "3.0"
"languageVersion": "3.1"
},
{
"name": "web",
Expand Down Expand Up @@ -371,6 +388,7 @@
],

"generated": "2024-12-11T11:36:38.971389Z",

"generator": "pub",
"generatorVersion": "3.5.4",
"pubCache": "file:///C:/Users/HP/AppData/Local/Pub/Cache"
Expand Down
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit dfb4c55

Please sign in to comment.