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

pulumi: 3.122.0 -> 3.137.0 #352221

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 2 additions & 0 deletions pkgs/tools/admin/pulumi-packages/base.nix
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ in
, env ? { }
, meta
, fetchSubmodules ? false
, cmdGenPostConfigure ? ""
, ...
}@args:
let
Expand All @@ -105,6 +106,7 @@ let

cmd = cmdGen;
pname = cmdGen;
postConfigure = cmdGenPostConfigure;
};
in
mkBasePackage ({
Expand Down
12 changes: 8 additions & 4 deletions pkgs/tools/admin/pulumi-packages/pulumi-aws-native.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
mkPulumiPackage rec {
owner = "pulumi";
repo = "pulumi-aws-native";
version = "0.38.0";
version = "1.4.0";
rev = "v${version}";
hash = "sha256-v7jNPCrjtfi9KYD4RhiphMIpV23g/CBV/sKPBkMulu0=";
vendorHash = "sha256-Yu9tNakwXWYdrjzI6/MFRzVBhJAEOjsmq9iBAQlR0AI=";
hash = "sha256-MSsWK9eae1WEo/inNQ52T+B9c6XlJg2ycoFUOJhLJag=";
vendorHash = "sha256-1IGahpX7hORFm8tZpoJGwdZWyihtnqR7QqVB5dYamxE=";
cmdGen = "pulumi-gen-aws-native";
cmdRes = "pulumi-resource-aws-native";
extraLdflags = [
Expand All @@ -18,7 +18,11 @@ mkPulumiPackage rec {
postConfigure = ''
pushd ..

${cmdGen} schema aws-cloudformation-schema ${version}
chmod +w .
chmod -R +w reports/

${cmdGen} --docs-url https://github.com/cdklabs/awscdk-service-spec/raw/main/sources/CloudFormationDocumentation/CloudFormationDocumentation.json docs ${version}
${cmdGen} --schema-folder aws-cloudformation-schema --metadata-folder meta schema ${version}

popd
'';
Expand Down
12 changes: 9 additions & 3 deletions pkgs/tools/admin/pulumi-packages/pulumi-azure-native.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,20 @@
mkPulumiPackage rec {
owner = "pulumi";
repo = "pulumi-azure-native";
version = "2.13.0";
version = "2.69.0";
rev = "v${version}";
hash = "sha256-YyJxACeXyY7hZkTbLXT/ASNWa1uv9h3cvPoItR183fU=";
vendorHash = "sha256-20wHbNE/fenxP9wgTSzAnx6b1UYlw4i1fi6SesTs0sc=";
hash = "sha256-4kzLCBPHsSJHX7R4LOFYWoyQLdomihC6ppEnQQcdINE=";
vendorHash = "sha256-JZNaez9jWQc2jMXTZywClb2/LAL1FuHLCJprV8MaFTk=";
cmdGen = "pulumi-gen-azure-native";
cmdRes = "pulumi-resource-azure-native";
extraLdflags = [
"-X github.com/pulumi/${repo}/v2/provider/pkg/version.Version=${version}"
];
cmdGenPostConfigure = ''
pushd ..
cp versions/v2-lock.json provider/pkg/versionLookup/
popd
'';
Comment on lines +16 to +20
Copy link
Author

@saiintbrisson saiintbrisson Oct 30, 2024

Choose a reason for hiding this comment

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

Both builds require this file as it is embedded in a common file. Their makefile does this manually as well.

postConfigure = ''
pushd ..

Expand All @@ -23,6 +28,7 @@ mkPulumiPackage rec {

cp bin/schema-full.json provider/cmd/${cmdRes}
cp bin/metadata-compact.json provider/cmd/${cmdRes}
cp versions/v2-lock.json provider/pkg/versionLookup/

popd

Expand Down
2 changes: 1 addition & 1 deletion pkgs/tools/admin/pulumi-packages/pulumi-language-go.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildGoModule rec {

sourceRoot = "${src.name}/sdk/go/pulumi-language-go";

vendorHash = "sha256-eHsTEb4Vff2bfADScLSkZiotSSnT1q0bexlUMaWgqbg=";
vendorHash = "sha256-Bk/JxFYBnd+bOlExJKGMIl2oUHPg3ViIVBqKBojoEm4=";

ldflags = [
"-s"
Expand Down
9 changes: 6 additions & 3 deletions pkgs/tools/admin/pulumi-packages/pulumi-language-nodejs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ buildGoModule rec {

sourceRoot = "${src.name}/sdk/nodejs/cmd/pulumi-language-nodejs";

vendorHash = "sha256-L91qIud8dWx7dWWEcknKUSTJe+f4OBL8wBg6dKUWgkQ=";
vendorHash = "sha256-vs4M0JOVbNKLFNrlyeRp85EWCVGrPIhZs/KbwrQCqk4=";

postPatch = ''
# Gives github.com/pulumi/pulumi/pkg/v3: is replaced in go.mod, but not marked as replaced in vendor/modules.txt etc
substituteInPlace language_test.go \
--replace "TestLanguage" \
"SkipTestLanguage"
--replace-quiet "TestLanguage" "SkipTestLanguage"
substituteInPlace main_test.go \
--replace-quiet "TestNonblockingStdout" "SkipTestNonblockingStdout"
substituteInPlace main_test.go \
--replace-quiet "TestGetProgramDependencies" "SkipTestGetProgramDependencies"
'';

ldflags = [
Expand Down
7 changes: 4 additions & 3 deletions pkgs/tools/admin/pulumi-packages/pulumi-language-python.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ buildGoModule rec {

sourceRoot = "${src.name}/sdk/python/cmd/pulumi-language-python";

vendorHash = "sha256-Q8nnYJJN5+W2luY8JQJj1X9KIk9ad511FBywr+0wBNg=";
vendorHash = "sha256-h7X53Tbh5CCkBU0NtlVvAcow9OOGFHxi3LAhz8NKVEQ=";

postPatch = ''
substituteInPlace language_test.go \
--replace-quiet "TestLanguage" "SkipTestLanguage"
substituteInPlace main_test.go \
--replace "TestDeterminePulumiPackages" \
"SkipTestDeterminePulumiPackages"
--replace-quiet "TestDeterminePulumiPackages" "SkipTestDeterminePulumiPackages"
'';

ldflags = [
Expand Down
6 changes: 3 additions & 3 deletions pkgs/tools/admin/pulumi-packages/pulumi-random.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
mkPulumiPackage rec {
owner = "pulumi";
repo = "pulumi-random";
version = "4.14.0";
version = "4.16.7";
rev = "v${version}";
hash = "sha256-1MR7zWNBDbAUoRed7IU80PQxeH18x95MKJKejW5m2Rs=";
vendorHash = "sha256-YDuF89F9+pxVq4TNe5l3JlbcqpnJwSTPAP4TwWTriWA=";
hash = "sha256-Ef4GRbbGHe+Ni8ksHnV3oCqOw94n5XxHgvfefNpmAm0=";
vendorHash = "sha256-O0Edcdw+Auxs+DO9ktESgA4MAnoRrsUDNW6S5QIRilc=";
cmdGen = "pulumi-tfgen-random";
cmdRes = "pulumi-resource-random";
extraLdflags = [
Expand Down
6 changes: 3 additions & 3 deletions pkgs/tools/admin/pulumi-packages/pulumi-yandex-unofficial.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
mkPulumiPackage rec {
owner = "Regrau";
repo = "pulumi-yandex";
version = "0.98.0";
version = "0.99.1";
rev = "v${version}";
hash = "sha256-Olwl4JNrJUiJaGha7ZT0Qb0+6hRKxOOy06eKMJfYf0I=";
vendorHash = "sha256-8mu0msSq59f5GZNo7YIGuNTYealGyEL9kwk0jCcSO68=";
hash = "sha256-LCWrt5TIvzXssLjV523K27LWzd+za88WLzgbLLnK+sw=";
vendorHash = "sha256-z9UAGX3PRInlO8v/1zgPYR8SlTnDuZfgEruBWJfVNiU=";
cmdGen = "pulumi-tfgen-yandex";
cmdRes = "pulumi-resource-yandex";
extraLdflags = [
Expand Down
36 changes: 19 additions & 17 deletions pkgs/tools/admin/pulumi/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,18 @@

buildGoModule rec {
pname = "pulumi";
version = "3.122.0";
version = "3.137.0";

src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "v${version}";
hash = "sha256-5KHptoQliqPtJ6J5u23ZgRZOdO77BJhZbdc3Cty9Myk=";
hash = "sha256-U1BubJIqQu+tAYQz8ojVrJpx6ZbMFEarSCmmuahG6ys=";
# Some tests rely on checkout directory name
name = "pulumi";
};

vendorHash = "sha256-1UyYbmNNHlAeaW6M6AkaQ5Hs25ziHenSs4QjlnUQGjs=";

patches = [
# Fix a test failure, can be dropped in next release (3.100.0)
(fetchpatch {
url = "https://github.com/pulumi/pulumi/commit/6dba7192d134d3b6f7e26dee9205711ccc736fa7.patch";
hash = "sha256-QRN6XnIR2rrqJ4UFYNt/YmIlokTSkGUvnBO/Q9UN8X8=";
stripLen = 1;
})
];
vendorHash = "sha256-Q9NTlgd+rOD5vmbmeAepIARvFtNQT/IFLPeaFC74E7c=";

sourceRoot = "${src.name}/pkg";

Expand All @@ -62,18 +53,21 @@ buildGoModule rec {
ldflags=''${ldflags//"$importpathFlags"/}

# Create some placeholders for plugins used in tests. Otherwise, Pulumi
# tries to donwload them and fails, resulting in really long test runs
dummyPluginPath=$(mktemp -d)
# tries to donwload them and fails, resulting in really long test runs.
# This has to be linked to the cwd, otherwise tests will fail and a
# warning will be emitted noting that the plugin was located in $PATH.
for name in pulumi-{resource-pkg{A,B},-pkgB}; do
ln -s ${coreutils}/bin/true "$dummyPluginPath/$name"
ln -s ${coreutils}/bin/true "$name"
done

export PATH=$dummyPluginPath''${PATH:+:}$PATH

# Code generation tests also download dependencies from network
rm codegen/{docs,dotnet,go,nodejs,python,schema}/*_test.go
# Azure tests are not being skipped when an Azure token is not provided
rm secrets/cloud/azure_test.go
rm -R codegen/{dotnet,go,nodejs,python}/gen_program_test

unset PULUMI_ACCESS_TOKEN
export PULUMI_DISABLE_AUTOMATIC_PLUGIN_ACQUISITION=true
'' + lib.optionalString stdenv.hostPlatform.isDarwin ''
export PULUMI_HOME=$(mktemp -d)
'';
Expand Down Expand Up @@ -103,6 +97,14 @@ buildGoModule rec {
# +aws
"TestPluginMapper_MappedNamesDifferFromPulumiName"
"TestProtect"
"TestProgressEvents"
# This test depends on having a PULUMI_ACCESS_TOKEN but is not skipped when one is not provided.
# Other tests are skipped when the env var is missing. I guess they forgot about this one.
"TestPulumiNewSetsTemplateTag"
# Both tests require having a "pulumi-language-yaml" plugin installed since pulumi/pulumi#17285,
# which I'm not sure how to add.
"TestProjectNameDefaults"
"TestProjectNameOverrides"
];
in
[ "-skip=^${lib.concatStringsSep "$|^" disabledTests}$" ];
Expand Down