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

IntegrityError: new row for relation "contentcuration_file" violates check constraint "file_media_duration_int" #4040

Closed
sentry-io bot opened this issue Apr 26, 2023 · 4 comments
Assignees
Labels
P0 - critical Priority: Release blocker or regression

Comments

@sentry-io
Copy link

sentry-io bot commented Apr 26, 2023

The check constraint does not include the *_dependency presets for audio and video


Sentry Issue: STUDIO-G87

CheckViolation: new row for relation "contentcuration_file" violates check constraint "file_media_duration_int"
DETAIL:  Failing row contains (81bb2e8b5a26489c823a39691ad58c74, 2730ec240eccae3fc3e5c9a2fb18af50, 4749019, storage/2/7/2730ec240eccae3fc3e5c9a2fb18af50.mp3, file, 7591cad66e364f8997e374a420887e86, mp3, ar, audio_dependency, null, null, 10439, null, 2023-04-26 18:11:49.334694+00, 197).

  File "django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
  File "newrelic/hooks/database_psycopg2.py", line 64, in execute
    return super(CursorWrapper, self).execute(sql, parameters, *args,
  File "newrelic/hooks/database_dbapi2.py", line 38, in execute
    return self.__wrapped__.execute(sql, parameters,
  File "django_prometheus/db/common.py", line 71, in execute
    return super().execute(*args, **kwargs)

IntegrityError: new row for relation "contentcuration_file" violates check constraint "file_media_duration_int"
DETAIL:  Failing row contains (81bb2e8b5a26489c823a39691ad58c74, 2730ec240eccae3fc3e5c9a2fb18af50, 4749019, storage/2/7/2730ec240eccae3fc3e5c9a2fb18af50.mp3, file, 7591cad66e364f8997e374a420887e86, mp3, ar, audio_dependency, null, null, 10439, null, 2023-04-26 18:11:49.334694+00, 197).

(15 additional frame(s) were not displayed)
...
  File "django/db/utils.py", line 90, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
  File "newrelic/hooks/database_psycopg2.py", line 64, in execute
    return super(CursorWrapper, self).execute(sql, parameters, *args,
  File "newrelic/hooks/database_dbapi2.py", line 38, in execute
    return self.__wrapped__.execute(sql, parameters,
  File "django_prometheus/db/common.py", line 71, in execute
    return super().execute(*args, **kwargs)
@bjester bjester added the P0 - critical Priority: Release blocker or regression label Apr 26, 2023
@bjester bjester added this to the Studio: next major release milestone Apr 26, 2023
@vkWeb
Copy link
Member

vkWeb commented May 2, 2023

@bjester I think we fixed this some time back... 🤔

@bjester
Copy link
Member

bjester commented May 2, 2023

@vkWeb This is a new one. It deals with the constraint that duration is null when the file isn't one of the media presets. The media presets didn't include the dependency ones

@vkWeb
Copy link
Member

vkWeb commented May 2, 2023

Yeah, got it! @bjester I can fix this quick.

@vkWeb
Copy link
Member

vkWeb commented May 3, 2023

Closed in #4047

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P0 - critical Priority: Release blocker or regression
Projects
None yet
Development

No branches or pull requests

2 participants