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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Imported Repo topics are sometimes undefined (in TypeScript) #168

Open
mattwynne opened this issue Nov 26, 2021 · 1 comment
Open

Imported Repo topics are sometimes undefined (in TypeScript) #168

mattwynne opened this issue Nov 26, 2021 · 1 comment
Labels
impact/reliability Something that feels unreliable or flaky kind/bug Some behavior is incorrect or out of spec

Comments

@mattwynne
Copy link

mattwynne commented Nov 26, 2021

Hello!

  • Vote on this issue by adding a 馃憤 reaction
  • To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already)

Issue details

When importing repos using a resources json doc, we're finding that the list of topics on the (Typescript) generated repo does not always match the actual topics on GitHub. For example, the [cucumber/cucumber-js] repo has three topics (javascript, typescript and cucumber) but the imported TypeScript representation in this commit shows

    topics: [
        undefined,
        "javascript",
        "cucumber",
    ],

This is non-deterministic. Sometimes, the list of topics is correct, and sometimes it contains these undefined values. We can't figure out a reason why it happens.

Steps to reproduce

pulumi import github:index/repository:Repository cucumber/cucumber-js cucumber-js --yes --out foo.ts
cat foo.ts

Sometimes one of the topics is undefined. Right now, my colleague (running the command in France, where is the afternoon, on Linux) is experiencing it, and I (running the command in Canada, where it is the morning, on an M1 Mac) am not experiencing it. I have, however, seen it before on this machine, just not right now. 馃く

Expected:

import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";

const cucumber_cucumber_js = new github.Repository("cucumber/cucumber-js", {
    allowAutoMerge: false,
    allowMergeCommit: false,
    allowRebaseMerge: false,
    allowSquashMerge: true,
    archived: false,
    deleteBranchOnMerge: true,
    description: "Cucumber for JavaScript",
    hasDownloads: true,
    hasIssues: true,
    hasProjects: true,
    homepageUrl: "https://cucumber.io",
    name: "cucumber-js",
    pages: {
        source: {
            branch: "gh-pages",
        },
    },
    topics: [
        "javascript",
        "typescript",
        "cucumber",
    ],
    vulnerabilityAlerts: true,
}, {
    protect: true,
});

Actual:

import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";

const cucumber_cucumber_js = new github.Repository("cucumber/cucumber-js", {
    allowAutoMerge: false,
    allowMergeCommit: false,
    allowRebaseMerge: false,
    allowSquashMerge: true,
    archived: false,
    deleteBranchOnMerge: true,
    description: "Cucumber for JavaScript",
    hasDownloads: true,
    hasIssues: true,
    hasProjects: true,
    homepageUrl: "https://cucumber.io",
    name: "cucumber-js",
    pages: {
        source: {
            branch: "gh-pages",
        },
    },
    topics: [
        undefined,
        "typescript",
        "cucumber",
    ],
    vulnerabilityAlerts: true,
}, {
    protect: true,
});
@mattwynne mattwynne added the kind/bug Some behavior is incorrect or out of spec label Nov 26, 2021
@mattwynne mattwynne changed the title Imported Repo Topics are sometimes undefined Imported Repo topics are sometimes undefined (in TypeScript) Nov 26, 2021
@leezen leezen added the impact/reliability Something that feels unreliable or flaky label Dec 2, 2021
@mattwynne
Copy link
Author

Any thoughts on what is causing this? We're only at a proof-of-concept stage with adopting Pulumi at the moment and honestly it's causing some of us to question whether we can rely on this tool.

If there are any pointers where we could look to help troubleshoot or fix this, we'd be happy to help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact/reliability Something that feels unreliable or flaky kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

2 participants