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

Catalog update(renaming) failing => cannot update catalog: Catalog 'new_name' does not exist. #260

Open
WP-LKL opened this issue Nov 30, 2023 · 2 comments
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

@WP-LKL
Copy link

WP-LKL commented Nov 30, 2023

What happened?

It fails to find the catalog for it to update (I assume) mistakenly querying the new_name, instead of using the old-resource reference old_name for updating the catalog name.

Example

import common
from pulumi_databricks import Catalog, CatalogWorkspaceBinding

some_catalog = Catalog(
    f"some-{common.stack}",
    metastore_id=common.config.require("metastore-id"),
    comment="(Pulumi) some data",
    properties={"purpose": "various", "project": common.project, "stack": common.stack},
    isolation_mode="ISOLATED",
    name="old",
)

pulumi up

Update name:

import common
from pulumi_databricks import Catalog, CatalogWorkspaceBinding

some_catalog = Catalog(
    f"some-{common.stack}",
    metastore_id=common.config.require("metastore-id"),
    comment="(Pulumi) some data",
    properties={"purpose": "various", "project": common.project, "stack": common.stack},
    isolation_mode="ISOLATED",
    name="new",  # <=== New change
)

Pulumi error:

    error: 1 error occurred:
        * updating urn:pulumi:env::workspaces::databricks:index/catalog:Catalog::some-env: 1 error occurred:
        * cannot update catalog: Catalog 'new' does not exist.

Output of pulumi about

❯ pulumi about
CLI          
Version      3.94.0
Go Version   go1.21.4
Go Compiler  gc

Plugins
NAME        VERSION
aws         6.10.0
databricks  1.26.0
python      unknown

Host     
OS       darwin
Version  14.1.1
Arch     arm64

This project is written in python: executable='/.../venv/bin/python3' version='3.11.6'

Current Stack: WP-LKL/...

TYPE                                                              URN
...

Found no pending operations associated with env

Backend        
Name           pulumi.com
...

Dependencies:
NAME               VERSION
pip                23.3.1
pulumi-aws         6.10.0
pulumi-databricks  1.26.0
setuptools         69.0.2
wheel              0.42.0

Pulumi locates its logs in /var/folders/kt/mm6178315mdg7r5026t78h_h0000gn/T/ by default
warning: A new version of Pulumi is available. To upgrade from version '3.94.0' to '3.94.2', run 
   $ brew update && brew upgrade pulumi
or visit https://pulumi.com/docs/install/ for manual instructions and release notes.

Additional context

I understand that I may have to contact the upstream Terraform provider, but I could not really find any similar issues.

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

@WP-LKL WP-LKL added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Nov 30, 2023
@iwahbe iwahbe 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 Dec 2, 2023
@iwahbe
Copy link
Member

iwahbe commented Dec 2, 2023

Hi @WP-LKL. Thanks for letting us know about this issue. It looks like this is a known bug in the upstream provider and a limitation in Databricks's SDK.

As soon as databricks's upstream releases with a fix, we will pick it up here.

@WP-LKL
Copy link
Author

WP-LKL commented Dec 4, 2023

Thank you @iwahbe 🥇 X)
Somewhat complicates the steps for the stack having to manually update the name on Databricks prior to running up... And I don't think we can expect it to be fixed in the near future sadly.

@mjeffryes mjeffryes added the blocked The issue cannot be resolved without 3rd party action. label Sep 27, 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