pulumi / pulumi-cloud-requests

Welcome to the public issue tracker for Pulumi Cloud (app.pulumi.com)! Feature requests and bug reports welcome!
10 stars 4 forks source link

Configuration values aren't set sometimes #319

Closed AlexTr closed 1 year ago

AlexTr commented 1 year ago

Configuration values aren't set sometimes using Pulumi API

Expected behavior

Config values are always set using Pulumi API

Current behavior

Config values aren't set sometimes (actually very often) using Pulumi API

Steps to reproduce

I use the following code to set config values via API:

    const params = {
            "aws:region": "eu-central-1",
            "aws:accessKey": "***REDACTED***",
            "aws:secretKey": "***REDACTED***",
    }
    Object.entries(params).forEach(async ([key, value]) => {
        await stack.setConfig(key, { value });
    });

but sometimes (actually very often) config values aren't set, as you can see only in 16th update all three values were set

Screen Shot 2023-11-02 at 16 53 52 Screen Shot 2023-11-02 at 16 54 26 Screen Shot 2023-11-02 at 16 54 49 Screen Shot 2023-11-02 at 16 54 59

Context (Environment)

Javascript, nodeJS v20.1.0

Affected feature

pulumi API, aws library

AlexTr commented 1 year ago

I've changed "forEach" to "for..of", it works for now, it maybe async call to set setting wasn't completed before calling next operation.