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

Fix: Updated Self install script to point towards the correct release. #3634

Closed
wants to merge 1 commit into from

Conversation

Dippys
Copy link

@Dippys Dippys commented Feb 12, 2024

The issue currently is that Plane tries to install from the Master Branch which causes the API server to not launch properly due to migration issues.

Simply changing to the stable release of plane fixes this.

@CLAassistant
Copy link

CLAassistant commented Feb 12, 2024

CLA assistant check
All committers have signed the CLA.

@mguptahub
Copy link
Collaborator

@Dippys

Kindly share details on API Migration issue and how is it linked to "latest" branch.

We know there was issue wrt Self Hosting which was reported and this has been fixed (Ref: #3571)

@Dippys
Copy link
Author

Dippys commented Feb 14, 2024

image

If you use the release provided in the guide for self-install this is the error that happens. @mguptahub

@Dippys
Copy link
Author

Dippys commented Feb 14, 2024

Moreover


root@vmi1607831:~# docker container logs 0a19f6cb14dc
Waiting for database...
Database available!
Operations to perform:
Apply all migrations: auth, authtoken, contenttypes, db, django_celery_beat, license, sessions, token_blacklist
Running migrations:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py", line 87, in _execute
return self.cursor.execute(sql)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/psycopg/cursor.py", line 737, in execute
raise ex.with_traceback(None)
psycopg.errors.DuplicateTable: relation "issue_mentions" already exists

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/code/manage.py", line 17, in
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.11/site-packages/django/core/management/init.py", line 442, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.11/site-packages/django/core/management/init.py", line 436, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 412, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 458, in execute
output = self.handle(*args, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 106, in wrapper
res = handle_func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/django/core/management/commands/migrate.py", line 356, in handle
post_migrate_state = executor.migrate(
^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/django/db/migrations/executor.py", line 135, in migrate
state = self._migrate_all_forwards(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/django/db/migrations/executor.py", line 167, in _migrate_all_forwards
state = self.apply_migration(
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/django/db/migrations/executor.py", line 252, in apply_migration
state = migration.apply(state, schema_editor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/django/db/migrations/migration.py", line 132, in apply
operation.database_forwards(
File "/usr/local/lib/python3.11/site-packages/django/db/migrations/operations/models.py", line 96, in database_forwards
schema_editor.create_model(model)
File "/usr/local/lib/python3.11/site-packages/django/db/backends/base/schema.py", line 451, in create_model
self.execute(sql, params or None)
File "/usr/local/lib/python3.11/site-packages/django/db/backends/postgresql/schema.py", line 45, in execute
return super().execute(sql, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/django/db/backends/base/schema.py", line 201, in execute
cursor.execute(sql, params)
File "/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py", line 67, in execute
return self._execute_with_wrappers(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py", line 80, in _execute_with_wrappers
return executor(sql, params, many, context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py", line 84, in _execute
with self.db.wrap_database_errors:
File "/usr/local/lib/python3.11/site-packages/django/db/utils.py", line 91, in exit
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py", line 87, in _execute
return self.cursor.execute(sql)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/psycopg/cursor.py", line 737, in execute
raise ex.with_traceback(None)
django.db.utils.ProgrammingError: relation "issue_mentions" already exists
Applying db.0046_label_sort_order_alter_analyticview_created_by_and_more...Waiting for database...
Database available!
Operations to perform:
Apply all migrations: auth, authtoken, contenttypes, db, django_celery_beat, license, sessions, token_blacklist
Running migrations:

Copy link
Collaborator

@mguptahub mguptahub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets us discuss about code like below to be handled @sriramveeraghanta

if [ "$BRANCH" == "master" ];
then
    export APP_RELEASE=latest
fi

@mguptahub
Copy link
Collaborator

@Dippys

This PR is no more valid as all deployment runs the STABLE tag by default. Migrator os running without any issues as well.

Closing this PR. Feel free to reopen in case the issue still persists for any.

@mguptahub mguptahub closed this Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants