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

Handle Missing Namespace #64

Merged
merged 2 commits into from
Aug 22, 2024
Merged

Handle Missing Namespace #64

merged 2 commits into from
Aug 22, 2024

Conversation

mfl-code
Copy link
Contributor

Description

When a namespace is in the state file, but not in the temporal server, applying the namespace return an error.

Way to reproduce problem:

  • In one window, run the server with temporal server start-dev
  • In another window run temporal apply. Remove old .terraform* files if exists.
  • Stop and restart the server in the firs windw.
  • In the second window run temporal apply again. You will get an error/

After the fix, the namespace would be re-added.

Read the Contribution guidelines.

  • Generate the docs.
  • Run the relevant tests successfully.
  • Include release notes. If this PR is backward incompatible, include a migration guide.

@ganievs
Copy link
Collaborator

ganievs commented Aug 21, 2024

Hi @mfl-code! The issue occurs when the Terraform state file contains information about a namespace that no longer exists in the Temporal server, often due to server restarts or manual deletions.
Instead of automatically removing resources from state, which can lead to unexpected behavior and potential data loss, it's recommended to use terraform state rm.

@mfl-code
Copy link
Contributor Author

@ganievs I removed the deletion from the state. This is still a fix for when the namespace is missing from the server, and "terraform apply" will work now.

@ganievs ganievs merged commit d1e5514 into platacard:main Aug 22, 2024
10 checks passed
@mfl-code mfl-code deleted the missing branch August 22, 2024 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants