prehistoric-sandwich-7272
02/06/2023, 3:58 PMwarning: resource plugin xyz is expected to have version >=0.0.23, but has 0.0.1; the wrong version may be on your path, or this may be a bug in the plugin
My suspect is that it is unable to install the pulumi plugin, and that my pluginDownloadURL
inside my schema.yaml is wrong - the issue is that I can’t find any examples online on how to do it properly...
my schema.yaml file is as follows:
# yaml-language-server: $schema=<https://raw.githubusercontent.com/pulumi/pulumi/master/pkg/codegen/schema/pulumi.json>
---
name: xyz
pluginDownloadURL: <github://api.github.com/amitOrganization/pulumi-amit-packages>
resources:
xyz:index:StaticPage:
isComponent: true
inputProperties:
indexContent:
type: string
description: The HTML content for index.html.
requiredInputs:
- indexContent
properties:
bucket:
"$ref": "/aws/v4.0.0/schema.json#/resources/aws:s3%2Fbucket:Bucket"
description: The bucket resource.
websiteUrl:
type: string
description: The website URL.
required:
- bucket
- websiteUrl
language:
go:
generateResourceContainerTypes: true
importBasePath: <http://github.com/pulumi/pulumi-xyz/sdk/go/xyz|github.com/pulumi/pulumi-xyz/sdk/go/xyz>
nodejs:
packageName: "@amitOrganization/xyz"
dependencies:
"@pulumi/aws": "^4.0.0"
devDependencies:
typescript: "^3.7.0"
echoing-dinner-19531
02/06/2023, 4:28 PMprehistoric-sandwich-7272
02/06/2023, 4:38 PMPULUMI_IGNORE_AMBIENT_PLUGINS=true
?echoing-dinner-19531
02/06/2023, 4:55 PMprehistoric-sandwich-7272
02/06/2023, 6:30 PMerror: Could not automatically download and install resource plugin 'pulumi-resource-xyz' at version v0.0.23, install the plugin using `pulumi plugin install resource xyz v0.0.23`.
Underlying error: error downloading plugin xyz to file: failed to download plugin: xyz-0.0.23: 403 HTTP error fetching plugin from <https://get.pulumi.com/releases/plugins/pulumi-resource-xyz-v0.0.23-darwin-arm64.tar.gz>
Maybe my pluginDownloadURL
is still wrong? its value is:
<github://api.github.com/amitOrganization/pulumi-rise-packages>
echoing-dinner-19531
02/06/2023, 6:32 PMprehistoric-sandwich-7272
02/06/2023, 6:43 PMGITHUB_TOKEN=ghp_...
set (I set it in my terminal before running pulumi up)
Looking at the logs I found kind of the same error message:
I0206 20:37:41.095459 48664 plugins.go:788] full plugin download url: <https://api.github.com/repos/pulumi/pulumi-xyz/releases/tags/v0.0.23>
Underlying error: error downloading plugin xyz to file: failed to download plugin: xyz-0.0.23: 403 HTTP error fetching plugin from <https://get.pulumi.com/releases/plugins/pulumi-resource-xyz-v0.0.23-darwin-arm64.tar.gz>\u003c{%reset%}\u003e\n","color":"raw","severity":"error"}},{"sequence":4,"timestamp":1675708662,"summaryEvent":{"maybeCorrupt":false,"durationSeconds":2,"resourceChanges":{"create":1},"PolicyPacks":{}}}]}
The part pulumi-resource-xyz-v0.0.23-darwin-arm64.tar.gz
looks correct, even though entering:
https://api.github.com/repos/pulumi/pulumi-xyz/releases/tags/v0.0.23
In my browser or doing cURL - I get not found errorechoing-dinner-19531
02/06/2023, 6:45 PMprehistoric-sandwich-7272
02/06/2023, 6:47 PMechoing-dinner-19531
02/06/2023, 6:51 PM<https://api.github.com/repos/pulumi/pulumi-xyz/releases/tags/v0.0.23>
That's our org, it should of hit your org...full plugin download url:
first?prehistoric-sandwich-7272
02/06/2023, 6:54 PMI0206 20:53:03.655370 49041 plugins.go:788] full plugin download url: <https://api.github.com/repos/pulumi/pulumi-xyz/releases/tags/v0.0.23>
So in that case, where do I configure it? in the schema.yaml file inside my package? which field should I use?echoing-dinner-19531
02/06/2023, 6:55 PMprehistoric-sandwich-7272
02/06/2023, 6:57 PMutilities.ts
file with this part:
/** @internal */
export function resourceOptsDefaults(): any {
return { version: getVersion(), pluginDownloadURL: "<github://api.github.com/@amitOrganization/pulumi-rise-packages>" };
}
echoing-dinner-19531
02/06/2023, 6:57 PM@amitOrganization
looks odd? where did the @
come from?prehistoric-sandwich-7272
02/06/2023, 7:00 PMpackageName: "@amitOrganization/xyz"
and in scripts/install-pulumi-plugin.js:
var res = childProcess.spawnSync("pulumi", ["plugin", "install", "--server", "<github://api.github.com/@amitOrganization[/pulumi-rise-packages]>"].concat(args), {
stdio: ["ignore", "inherit", "inherit"]
});
echoing-dinner-19531
02/06/2023, 7:01 PM@amitOrganization
I've never seen a github org with an at symbol in the name?prehistoric-sandwich-7272
02/06/2023, 7:02 PM[4/4] Building fresh packages...
success Saved lockfile.
$ node scripts/install-pulumi-plugin.js resource xyz ${VERSION}
[resource plugin xyz-0.0.24] installing
error: [resource plugin xyz-0.0.24] downloading from <github://api.github.com/amitOrganizaton/pulumi-rise-packages>: failed to download plugin: xyz-0.0.24: 404 HTTP error fetching plugin from <https://api.github.com/repos/amitOrganizaton/pulumi-rise-packages/releases/tags/v0.0.24>. If this is a private GitHub repository, try providing a token via the GITHUB_TOKEN environment variable. See: <https://github.com/settings/tokens>
There was an error installing the resource provider plugin. You may try to manually installing the plugin by running `pulumi plugin install resource xyz v0.0.24`
Done in 13.16s.
echoing-dinner-19531
02/06/2023, 7:05 PM404 HTTP error fetching plugin from <https://api.github.com/repos/amitOrganizaton/pulumi-rise-packages/releases/tags/v0.0.24>
The cli can't access that repoprehistoric-sandwich-7272
02/06/2023, 7:29 PM"install": "node scripts/install-pulumi-plugin.js resource xyz "
and inside install-pulumi-plugin there is this part:
var res = childProcess.spawnSync("pulumi", ["plugin", "install", "--server", "<github://api.github.com/amitOrganization[/pulumi-rise-packages]>"].concat(args), {
stdio: ["ignore", "inherit", "inherit"]
});
.
.
} else if (res.error || res.status !== 0) {
console.error("\nThere was an error installing the resource provider plugin. " +
"You may try to manually installing the plugin by running " +
"`pulumi plugin install " + args.join(" ") + "`");
}
which the error comes from
maybe the url is still incorrect? should it be with the square brackets? (e.g [/pulumi-rise-packages]
)echoing-dinner-19531
02/06/2023, 7:38 PMprehistoric-sandwich-7272
02/06/2023, 9:07 PMpluginDownloadUrl
is:
pluginDownloadURL: <github://api.github.com/amitOrganization/pulumi-rise-packages>
So I removed the square brackets from the nstall-pulumi-plugin and it still didn’t help, same error from the CICD ..echoing-dinner-19531
02/06/2023, 9:07 PMprehistoric-sandwich-7272
02/06/2023, 9:08 PMechoing-dinner-19531
02/06/2023, 9:09 PMprehistoric-sandwich-7272
02/08/2023, 9:03 PMError: node_modules/@types/node/ts4.8/util.d.ts(1485,42): error TS1005: ',' expected.
Error: node_modules/@types/node/ts4.8/util.d.ts(1485,44): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
Full error:echoing-dinner-19531
02/08/2023, 9:18 PMprehistoric-sandwich-7272
02/08/2023, 9:43 PMechoing-dinner-19531
02/08/2023, 9:44 PMprehistoric-sandwich-7272
02/08/2023, 9:47 PMerror: [resource plugin xyz-0.0.6] downloading from : failed to download plugin: xyz-0.0.6: 403 HTTP error fetching plugin from <https://get.pulumi.com/releases/plugins/pulumi-resource-xyz-v0.0.6-linux-amd64.tar.gz>
There was an error installing the resource provider plugin. You may try to manually installing the plugin by running `pulumi plugin install resource xyz v0.0.6`
echoing-dinner-19531
02/08/2023, 9:49 PMprehistoric-sandwich-7272
02/08/2023, 9:55 PMpublisher: amitOrganization
repository: my-repo
Which now gave me this error which is better, it’s looking at the right spot now:
error: [resource plugin xyz-0.0.7] downloading from <github://api.github.com/amitOrganization>: failed to download plugin: xyz-0.0.7: 404 HTTP error fetching plugin from <https://api.github.com/repos/amitOrganization/pulumi-xyz/releases/tags/v0.0.7>. If this is a private GitHub repository, try providing a token via the GITHUB_TOKEN environment variable. See: <https://github.com/settings/tokens>
Which makes me believe I need to pass GITHUB_TOKEN some place else (I am confident it has the right permissions)
p.s -regarding the things you mentioned:
pluginDownloadURL: <github://api.github.com/amitOrganization>
plus the release does exists.env:
GITHUB_TOKEN: ${{ secrets.access_token_github }}
run: |
make build_${{ matrix.language }}_sdk
2.
env:
GITHUB_TOKEN: ${{ secrets.access_token_github }}
run: |
export GITHUB_TOKEN=${{ env.GITHUB_TOKEN }}
make build_${{ matrix.language }}_sdk
GITHUB_TOKEN := ${GITHUB_TOKEN}
echoing-dinner-19531
02/08/2023, 9:57 PMprehistoric-sandwich-7272
02/08/2023, 9:58 PMUSERS_S3_FILE_PATH
which is totally custom and works greatechoing-dinner-19531
02/08/2023, 9:59 PM