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

Unable to create OrganizationProject: 410 error from API #428

Open
HectorCastelli opened this issue Sep 7, 2023 · 1 comment
Open

Unable to create OrganizationProject: 410 error from API #428

HectorCastelli opened this issue Sep 7, 2023 · 1 comment
Labels
awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). blocked The issue cannot be resolved without 3rd party action. kind/bug Some behavior is incorrect or out of spec

Comments

@HectorCastelli
Copy link

HectorCastelli commented Sep 7, 2023

What happened?

When trying to create an OrganizationProject, the API call fails with 410 even if my organization and my PAT have the correct permissions.

With the following code (some things redacted):

export const organization = new github.OrganizationSettings("org", {
	name: "myorg",

	hasOrganizationProjects: true,
	hasRepositoryProjects: true,
}, {
	protect: true,
},)

export const roadmapProject = new github.OrganizationProject("roadmap", {
	name: "Roadmap",
	body: "A visual representation of the short, and long term priorities and goals.",
}, {
	dependsOn: [organization],
	parent: organization,
});

The following error occurs:

  github:index:OrganizationProject (roadmap):
    error: POST https://api.github.com/orgs/myorg/projects: 410 Projects are disabled for this organization []

Expected Behavior

The project should be created

Steps to reproduce

  • Create a PAT with the following permissions:
    • Organization permissions
      • Read and Write access to:
        • members
        • organization administration
        • organization projects
    • Repository permissions
      • Read access to:
        • metadata
      • Read and Write access to:
        • administration
        • code
        • issues
  • Define an organization & a project in the organization
  • pulumi up

Output of pulumi about

CLI          
Version      3.81.0
Go Version   go1.21.1
Go Compiler  gc

Plugins
NAME     VERSION
command  0.8.2
gandi    0.0.14
github   5.17.0
nodejs   unknown

Host     
OS       darwin
Version  13.5.1
Arch     x86_64

This project is written in nodejs: executable='/usr/local/bin/node' version='v20.4.0'

Current Stack: HectorCastelli/infrastructure/public

TYPE                                                    URN
pulumi:pulumi:Stack                                     urn:pulumi:public::infrastructure::pulumi:pulumi:Stack::infrastructure-public
improvmx:improvmx:Alias                                 urn:pulumi:public::infrastructure::improvmx:improvmx:Alias::powerd6/email/contact
pulumi:providers:github                                 urn:pulumi:public::infrastructure::pulumi:providers:github::default_5_17_0
github:index/organizationSettings:OrganizationSettings  urn:pulumi:public::infrastructure::github:index/organizationSettings:OrganizationSettings::powerd6
pulumi:providers:gandi                                  urn:pulumi:public::infrastructure::pulumi:providers:gandi::default_0_0_14_github_/api.github.com/pulumiverse
gandi:domains/domain:Domain                             urn:pulumi:public::infrastructure::gandi:domains/domain:Domain::powerd6/rootDomain
github:index/repository:Repository                      urn:pulumi:public::infrastructure::github:index/organizationSettings:OrganizationSettings$github:index/repository:Repository::branding
github:index/repository:Repository                      urn:pulumi:public::infrastructure::github:index/organizationSettings:OrganizationSettings$github:index/repository:Repository::landing_page
github:index/repository:Repository                      urn:pulumi:public::infrastructure::github:index/organizationSettings:OrganizationSettings$github:index/repository:Repository::infrastructure
github:index/issueLabel:IssueLabel                      urn:pulumi:public::infrastructure::github:index/organizationSettings:OrganizationSettings$github:index/repository:Repository$github:index/issueLabel:IssueLabel::infrastructure/IssueLabel/priority-low
github:index/branch:Branch                              urn:pulumi:public::infrastructure::github:index/organizationSettings:OrganizationSettings$github:index/repository:Repository$github:index/branch:Branch::infrastructure/Branch/Main
github:index/issueLabel:IssueLabel                      urn:pulumi:public::infrastructure::github:index/organizationSettings:OrganizationSettings$github:index/repository:Repository$github:index/issueLabel:IssueLabel::infrastructure/IssueLabel/good-first-issue
github:index/issueLabel:IssueLabel                      urn:pulumi:public::infrastructure::github:index/organizationSettings:OrganizationSettings$github:index/repository:Repository$github:index/issueLabel:IssueLabel::infrastructure/IssueLabel/goal-improvement
github:index/issueLabel:IssueLabel                      urn:pulumi:public::infrastructure::github:index/organizationSettings:OrganizationSettings$github:index/repository:Repository$github:index/issueLabel:IssueLabel::infrastructure/IssueLabel/help-wanted
github:index/issueLabel:IssueLabel                      urn:pulumi:public::infrastructure::github:index/organizationSettings:OrganizationSettings$github:index/repository:Repository$github:index/issueLabel:IssueLabel::infrastructure/IssueLabel/goal-fix
github:index/issueLabel:IssueLabel                      urn:pulumi:public::infrastructure::github:index/organizationSettings:OrganizationSettings$github:index/repository:Repository$github:index/issueLabel:IssueLabel::infrastructure/IssueLabel/priority-high
github:index/issueLabel:IssueLabel                      urn:pulumi:public::infrastructure::github:index/organizationSettings:OrganizationSettings$github:index/repository:Repository$github:index/issueLabel:IssueLabel::infrastructure/IssueLabel/goal-addition
github:index/issueLabel:IssueLabel                      urn:pulumi:public::infrastructure::github:index/organizationSettings:OrganizationSettings$github:index/repository:Repository$github:index/issueLabel:IssueLabel::infrastructure/IssueLabel/priority-medium
github:index/issueLabel:IssueLabel                      urn:pulumi:public::infrastructure::github:index/organizationSettings:OrganizationSettings$github:index/repository:Repository$github:index/issueLabel:IssueLabel::branding/IssueLabel/priority-medium
github:index/issueLabel:IssueLabel                      urn:pulumi:public::infrastructure::github:index/organizationSettings:OrganizationSettings$github:index/repository:Repository$github:index/issueLabel:IssueLabel::branding/IssueLabel/priority-low
github:index/issueLabel:IssueLabel                      urn:pulumi:public::infrastructure::github:index/organizationSettings:OrganizationSettings$github:index/repository:Repository$github:index/issueLabel:IssueLabel::branding/IssueLabel/good-first-issue
github:index/issueLabel:IssueLabel                      urn:pulumi:public::infrastructure::github:index/organizationSettings:OrganizationSettings$github:index/repository:Repository$github:index/issueLabel:IssueLabel::branding/IssueLabel/goal-fix
github:index/issueLabel:IssueLabel                      urn:pulumi:public::infrastructure::github:index/organizationSettings:OrganizationSettings$github:index/repository:Repository$github:index/issueLabel:IssueLabel::branding/IssueLabel/help-wanted
github:index/branch:Branch                              urn:pulumi:public::infrastructure::github:index/organizationSettings:OrganizationSettings$github:index/repository:Repository$github:index/branch:Branch::branding/Branch/Main
github:index/issueLabel:IssueLabel                      urn:pulumi:public::infrastructure::github:index/organizationSettings:OrganizationSettings$github:index/repository:Repository$github:index/issueLabel:IssueLabel::branding/IssueLabel/priority-high
github:index/issueLabel:IssueLabel                      urn:pulumi:public::infrastructure::github:index/organizationSettings:OrganizationSettings$github:index/repository:Repository$github:index/issueLabel:IssueLabel::branding/IssueLabel/goal-addition
github:index/issueLabel:IssueLabel                      urn:pulumi:public::infrastructure::github:index/organizationSettings:OrganizationSettings$github:index/repository:Repository$github:index/issueLabel:IssueLabel::branding/IssueLabel/goal-improvement
github:index/branch:Branch                              urn:pulumi:public::infrastructure::github:index/organizationSettings:OrganizationSettings$github:index/repository:Repository$github:index/branch:Branch::landing_page/Branch/Main
github:index/issueLabel:IssueLabel                      urn:pulumi:public::infrastructure::github:index/organizationSettings:OrganizationSettings$github:index/repository:Repository$github:index/issueLabel:IssueLabel::landing_page/IssueLabel/priority-low
github:index/issueLabel:IssueLabel                      urn:pulumi:public::infrastructure::github:index/organizationSettings:OrganizationSettings$github:index/repository:Repository$github:index/issueLabel:IssueLabel::landing_page/IssueLabel/goal-fix
github:index/issueLabel:IssueLabel                      urn:pulumi:public::infrastructure::github:index/organizationSettings:OrganizationSettings$github:index/repository:Repository$github:index/issueLabel:IssueLabel::landing_page/IssueLabel/help-wanted
github:index/issueLabel:IssueLabel                      urn:pulumi:public::infrastructure::github:index/organizationSettings:OrganizationSettings$github:index/repository:Repository$github:index/issueLabel:IssueLabel::landing_page/IssueLabel/goal-improvement
github:index/issueLabel:IssueLabel                      urn:pulumi:public::infrastructure::github:index/organizationSettings:OrganizationSettings$github:index/repository:Repository$github:index/issueLabel:IssueLabel::landing_page/IssueLabel/good-first-issue
github:index/issueLabel:IssueLabel                      urn:pulumi:public::infrastructure::github:index/organizationSettings:OrganizationSettings$github:index/repository:Repository$github:index/issueLabel:IssueLabel::landing_page/IssueLabel/priority-medium
github:index/issueLabel:IssueLabel                      urn:pulumi:public::infrastructure::github:index/organizationSettings:OrganizationSettings$github:index/repository:Repository$github:index/issueLabel:IssueLabel::landing_page/IssueLabel/priority-high
github:index/issueLabel:IssueLabel                      urn:pulumi:public::infrastructure::github:index/organizationSettings:OrganizationSettings$github:index/repository:Repository$github:index/issueLabel:IssueLabel::landing_page/IssueLabel/goal-addition
pulumi:providers:command                                urn:pulumi:public::infrastructure::pulumi:providers:command::default_0_8_2
gandi:domains/nameservers:Nameservers                   urn:pulumi:public::infrastructure::gandi:domains/domain:Domain$gandi:domains/nameservers:Nameservers::powerd6/rootDomain/nameServers
command:local:Command                                   urn:pulumi:public::infrastructure::improvmx:improvmx:Alias$command:local:Command::alias
gandi:livedns/record:Record                             urn:pulumi:public::infrastructure::gandi:domains/domain:Domain$gandi:domains/nameservers:Nameservers$gandi:livedns/record:Record::powerd6/rootDomain/nameServer/improvMX/MX
gandi:livedns/record:Record                             urn:pulumi:public::infrastructure::gandi:domains/domain:Domain$gandi:domains/nameservers:Nameservers$gandi:livedns/record:Record::powerd6/rootDomain/nameServer/A-atDnsRecord
gandi:livedns/record:Record                             urn:pulumi:public::infrastructure::gandi:domains/domain:Domain$gandi:domains/nameservers:Nameservers$gandi:livedns/record:Record::powerd6/rootDomain/nameServer/AAAA-atDnsRecord
gandi:livedns/record:Record                             urn:pulumi:public::infrastructure::gandi:domains/domain:Domain$gandi:domains/nameservers:Nameservers$gandi:livedns/record:Record::powerd6/rootDomain/nameServer/githubPages/www
gandi:livedns/record:Record                             urn:pulumi:public::infrastructure::gandi:domains/domain:Domain$gandi:domains/nameservers:Nameservers$gandi:livedns/record:Record::powerd6/rootDomain/nameServer/improvMX/TXT
gandi:livedns/record:Record                             urn:pulumi:public::infrastructure::gandi:domains/domain:Domain$gandi:domains/nameservers:Nameservers$gandi:livedns/record:Record::powerd6/rootDomain/nameServer/githubPages/challenge/_github-pages-challenge-powerd6
github:index/branchProtection:BranchProtection          urn:pulumi:public::infrastructure::github:index/organizationSettings:OrganizationSettings$github:index/repository:Repository$github:index/branch:Branch$github:index/branchProtection:BranchProtection::infrastructure/BranchProtection/Main
github:index/branchProtection:BranchProtection          urn:pulumi:public::infrastructure::github:index/organizationSettings:OrganizationSettings$github:index/repository:Repository$github:index/branch:Branch$github:index/branchProtection:BranchProtection::branding/BranchProtection/Main
github:index/repositoryFile:RepositoryFile              urn:pulumi:public::infrastructure::github:index/organizationSettings:OrganizationSettings$github:index/repository:Repository$github:index/repositoryFile:RepositoryFile::infrastructure/Files/License
github:index/repositoryFile:RepositoryFile              urn:pulumi:public::infrastructure::github:index/organizationSettings:OrganizationSettings$github:index/repository:Repository$github:index/repositoryFile:RepositoryFile::infrastructure/Files/Contributing
github:index/repositoryFile:RepositoryFile              urn:pulumi:public::infrastructure::github:index/organizationSettings:OrganizationSettings$github:index/repository:Repository$github:index/repositoryFile:RepositoryFile::branding/Files/License
github:index/repositoryFile:RepositoryFile              urn:pulumi:public::infrastructure::github:index/organizationSettings:OrganizationSettings$github:index/repository:Repository$github:index/repositoryFile:RepositoryFile::branding/Files/Contributing
github:index/branchProtection:BranchProtection          urn:pulumi:public::infrastructure::github:index/organizationSettings:OrganizationSettings$github:index/repository:Repository$github:index/branch:Branch$github:index/branchProtection:BranchProtection::landing_page/BranchProtection/Main
github:index/repositoryFile:RepositoryFile              urn:pulumi:public::infrastructure::github:index/organizationSettings:OrganizationSettings$github:index/repository:Repository$github:index/repositoryFile:RepositoryFile::landing_page/Files/License
github:index/repositoryFile:RepositoryFile              urn:pulumi:public::infrastructure::github:index/organizationSettings:OrganizationSettings$github:index/repository:Repository$github:index/repositoryFile:RepositoryFile::landing_page/Files/Contributing


Found no pending operations associated with public

Backend        
Name           pulumi.com
URL            https://app.pulumi.com/HectorCastelli
User           HectorCastelli
Organizations  HectorCastelli, powerd6

Dependencies:
NAME                              VERSION
@pulumiverse/gandi                0.0.14
@types/node                       20.5.9
@typescript-eslint/eslint-plugin  6.6.0
@typescript-eslint/parser         6.6.0
@pulumi/command                   0.8.2
@pulumi/github                    5.17.0
@pulumi/pulumi                    3.81.0
@tsconfig/recommended             1.0.2
eslint                            8.48.0

Pulumi locates its logs in /var/folders/c5/g_g9nqvj2x17gqt89zs_kn6h0000gn/T/ by default

Additional context

Running the API with gh api works as expected:

gh api \    
  --method POST \
  -H "Accept: application/vnd.github+json" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  /orgs/powerd6/projects \
  -f name='Roadmap' \
 -f body='blablabla.'

Creating with gh project create works as expected.

Creating it with the UI, also works.

Contributing

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).

@HectorCastelli HectorCastelli added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Sep 7, 2023
@mikhailshilkov
Copy link
Member

It sounds like we are blocked on this upstream: integrations/terraform-provider-github#1681

@mikhailshilkov mikhailshilkov added awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). and removed needs-triage Needs attention from the triage team labels Sep 8, 2023
@mjeffryes mjeffryes added the blocked The issue cannot be resolved without 3rd party action. label Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). blocked The issue cannot be resolved without 3rd party action. kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

3 participants