diff --git a/pkgs/by-name/pu/pulumi/plugins/pulumi-python/package.nix b/pkgs/by-name/pu/pulumi/plugins/pulumi-python/package.nix index 405b110e23b2..fbe31bae618b 100644 --- a/pkgs/by-name/pu/pulumi/plugins/pulumi-python/package.nix +++ b/pkgs/by-name/pu/pulumi/plugins/pulumi-python/package.nix @@ -12,7 +12,7 @@ buildGoModule (finalAttrs: { sourceRoot = "${finalAttrs.src.name}/sdk/python/cmd/pulumi-language-python"; - vendorHash = "sha256-BfkjDesPdPDV2uILYaMJFIvaEBKT15ukwaReAL3yziw="; + vendorHash = "sha256-1P90hdwBwCNRfR1PDSHQuEOCcrbnoJrmU4ggG7ktAGY="; ldflags = [ "-s" @@ -23,8 +23,10 @@ buildGoModule (finalAttrs: { checkFlags = [ "-skip=^${ lib.concatStringsSep "$|^" [ - "TestLanguage" - "TestDeterminePulumiPackages" + "TestLanguageDefault" + "TestLanguageTOML" + "TestLanguageClasses" + "TestListPulumiPackageInfos" ] }$" ]; @@ -42,8 +44,7 @@ buildGoModule (finalAttrs: { postInstall = '' cp -t "$out/bin" \ ../pulumi-language-python-exec \ - ../../dist/pulumi-resource-pulumi-python \ - ../../dist/pulumi-analyzer-policy-python + ../../dist/pulumi-resource-pulumi-python ''; passthru.tests.smokeTest = callPackage ./smoke-test/default.nix { }; @@ -55,6 +56,7 @@ buildGoModule (finalAttrs: { mainProgram = "pulumi-language-python"; maintainers = with lib.maintainers; [ tie + untio11 ]; }; }) diff --git a/pkgs/development/python-modules/pulumi/default.nix b/pkgs/development/python-modules/pulumi/default.nix index adbed7f545ca..8fb594748b9a 100644 --- a/pkgs/development/python-modules/pulumi/default.nix +++ b/pkgs/development/python-modules/pulumi/default.nix @@ -12,6 +12,10 @@ pyyaml, debugpy, pip, + opentelemetry-api, + opentelemetry-sdk, + opentelemetry-instrumentation-grpc, + opentelemetry-exporter-otlp-proto-grpc, pytest, pytest-asyncio, pytest-timeout, @@ -48,6 +52,10 @@ buildPythonPackage { pyyaml debugpy pip + opentelemetry-api + opentelemetry-sdk + opentelemetry-instrumentation-grpc + opentelemetry-exporter-otlp-proto-grpc ]; pythonRelaxDeps = [ @@ -55,6 +63,10 @@ buildPythonPackage { "grpcio" "pip" "semver" + "opentelemetry-api" + "opentelemetry-sdk" + "opentelemetry-instrumentation-grpc" + "opentelemetry-exporter-otlp-proto-grpc" ]; nativeCheckInputs = [ @@ -64,19 +76,20 @@ buildPythonPackage { pulumi-python ]; - disabledTestPaths = [ - # TODO: remove disabledTestPaths once the test is fixed upstream. - # https://github.com/pulumi/pulumi/pull/19080#discussion_r2309611222 - "lib/test/provider/experimental/test_property_value.py::test_nesting" - ]; - + # CheckPhase script based on: # https://github.com/pulumi/pulumi/blob/0acaf8060640fdd892abccf1ce7435cd6aae69fe/sdk/python/scripts/test_fast.sh#L10-L11 # https://github.com/pulumi/pulumi/blob/0acaf8060640fdd892abccf1ce7435cd6aae69fe/sdk/python/scripts/test_fast.sh#L16 + # Script updated in https://github.com/pulumi/pulumi/pull/21365 + # + # Ignore lib/test/langhost because tests require `uv` / virtualenv which is not supported in the Nix sandbox. installCheckPhase = '' runHook preInstallCheck declare -a _disabledTestPathsArray concatTo _disabledTestPathsArray disabledTestPaths - ${python.executable} -m pytest --junit-xml= --ignore=lib/test/automation lib/test \ + ${python.executable} -m pytest --junit-xml= \ + --ignore=lib/test/automation \ + --ignore=lib/test/langhost \ + lib/test \ "''${_disabledTestPathsArray[@]/#/--deselect=}" pushd lib/test_with_mocks ${python.executable} -m pytest --junit-xml= @@ -95,6 +108,7 @@ buildPythonPackage { license = lib.licenses.asl20; maintainers = with lib.maintainers; [ tie + untio11 ]; }; }