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

Issue with organizations #73

Open
BenjaminDecreusefond opened this issue Oct 14, 2024 · 3 comments
Open

Issue with organizations #73

BenjaminDecreusefond opened this issue Oct 14, 2024 · 3 comments

Comments

@BenjaminDecreusefond
Copy link
Contributor

Hi again !

Continuing to test the different provider resources, I tried to provision an organization using terraform and I have the follow issue:

  • I found the doc might not be completely up to date as the link state to create resource with executionModule parameter which does not exists
  • When i created the resource to apply it, terraform said that there was no changes using the following resource
resource "terrakube_organization" "organization" {
  name            = "my-orga-name"
  description     = "Default company orga"
  execution_mode = "remote"
}

I don't know if I missed something ? Knowing that I had no issue to create a workspace within an organization created by hand.

Regards !

@alfespa17
Copy link
Member

The parameter exists

"execution_mode": schema.StringAttribute{

@BenjaminDecreusefond
Copy link
Contributor Author

Sorry I mean the doc specify executionModule but it is not the correct parameter. Have you ever heard about the other issue ?

@BenjaminDecreusefond
Copy link
Contributor Author

I think there is an issue with Organizations in Terrakube.
Steps to reproduce:

  • Create an organization manually on Terrakube.
  • Delete it manually and then try to create it with the same name from terraform provider
    You will get the below error
org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "const_organization"
  Detail: Key (name)=(XXX) already exists.
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2733) ~[postgresql-42.7.4.jar:42.7.4]
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2420) ~[postgresql-42.7.4.jar:42.7.4]
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:372) ~[postgresql-42.7.4.jar:42.7.4]
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:330) ~[postgresql-42.7.4.jar:42.7.4]
	at org.postgresql.jdbc.PgConnection.executeTransactionCommand(PgConnection.java:981) ~[postgresql-42.7.4.jar:42.7.4]
	at org.postgresql.jdbc.PgConnection.commit(PgConnection.java:1003) ~[postgresql-42.7.4.jar:42.7.4]
	at org.hibernate.resource.jdbc.internal.AbstractLogicalConnectionImplementor.commit(AbstractLogicalConnectionImplementor.java:87) ~[hibernate-core-6.5.3.Final.jar:6.5.3.Final]
	at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.commit(JdbcResourceLocalTransactionCoordinatorImpl.java:268) ~[hibernate-core-6.5.3.Final.jar:6.5.3.Final]
	at org.hibernate.engine.transaction.internal.TransactionImpl.commit(TransactionImpl.java:101) ~[hibernate-core-6.5.3.Final.jar:6.5.3.Final]
	at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:562) ~[spring-orm-6.1.13.jar:6.1.13]
	at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:795) ~[spring-tx-6.1.13.jar:6.1.13]
	at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:758) ~[spring-tx-6.1.13.jar:6.1.13]
	at com.yahoo.elide.spring.orm.jpa.PlatformJpaTransaction.commit(PlatformJpaTransaction.java:71) ~[elide-spring-boot-autoconfigure-7.1.2.jar:na]
	at com.yahoo.elide.core.datastore.inmemory.InMemoryStoreTransaction.commit(InMemoryStoreTransaction.java:199) ~[elide-core-7.1.2.jar:na]
	at com.yahoo.elide.jsonapi.JsonApi.handleRequest(JsonApi.java:293) ~[elide-core-7.1.2.jar:na]
	at com.yahoo.elide.jsonapi.JsonApi.post(JsonApi.java:129) ~[elide-core-7.1.2.jar:na]
	at jdk.internal.reflect.GeneratedMethodAccessor371.invoke(Unknown Source) ~[na:na]
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:na]
	at java.base/java.lang.reflect.Method.invoke(Unknown Source) ~[na:na]
	at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:281) ~[spring-core-6.1.13.jar:6.1.13]
	at org.springframework.cloud.context.scope.GenericScope$LockedScopedProxyFactoryBean.invoke(GenericScope.java:482) ~[spring-cloud-context-4.1.4.jar:4.1.4]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184) ~[spring-aop-6.1.13.jar:6.1.13]
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:768) ~[spring-aop-6.1.13.jar:6.1.13]
	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:720) ~[spring-aop-6.1.13.jar:6.1.13]
	at com.yahoo.elide.jsonapi.JsonApi$$SpringCGLIB$$0.post(<generated>) ~[elide-core-7.1.2.jar:na]
	at com.yahoo.elide.spring.controllers.JsonApiController$2.call(JsonApiController.java:111) ~[elide-spring-boot-autoconfigure-7.1.2.jar:na]
	at com.yahoo.elide.spring.controllers.JsonApiController$2.call(JsonApiController.java:101) ~[elide-spring-boot-autoconfigure-7.1.2.jar:na]
	at org.springframework.web.context.request.async.WebAsyncManager.lambda$startCallableProcessing$4(WebAsyncManager.java:367) ~[spring-web-6.1.13.jar:6.1.13]
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[na:na]
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source) ~[na:na]
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[na:na]
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[na:na]
	at java.base/java.lang.Thread.run(Unknown Source) ~[na:na]

The org does not exists anymore but it seems like the DB can still see it

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

No branches or pull requests

2 participants