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

Install more shared django_apps #1001

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion database/models/profiling.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class ProfilingCommit(CodecovBaseModel, MixinBaseClass):

class ProfilingUpload(CodecovBaseModel, MixinBaseClass):
__tablename__ = "profiling_profilingupload"
raw_upload_location = Column(types.Text)
raw_upload_location = Column(types.Text, nullable=False)
profiling_commit_id = Column(
types.BigInteger, ForeignKey("profiling_profilingcommit.id")
)
Expand Down
2 changes: 1 addition & 1 deletion database/models/staticanalysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class StaticAnalysisSingleFileSnapshot(CodecovBaseModel, MixinBaseClass):
repository_id = Column(types.Integer, ForeignKey("repos.repoid"))
file_hash = Column(UUID, nullable=False)
content_location = Column(types.Text, nullable=False)
state_id = Column(types.Integer)
state_id = Column(types.Integer, nullable=False)
# relationships
repository = relationship("Repository")

Expand Down
1 change: 1 addition & 0 deletions database/tests/factories/profiling.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class Meta:

class ProfilingUploadFactory(factory.Factory):
profiling_commit = factory.SubFactory(ProfilingCommitFactory)
raw_upload_location = factory.Faker("url")

class Meta:
model = ProfilingUpload
2 changes: 2 additions & 0 deletions database/tests/factories/staticanalysis.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from uuid import uuid4

import factory
from shared.labelanalysis import LabelAnalysisRequestState

from database.models.staticanalysis import (
StaticAnalysisSingleFileSnapshot,
Expand All @@ -24,6 +25,7 @@ class Meta:
repository = factory.SubFactory(RepositoryFactory)
file_hash = factory.LazyFunction(lambda: uuid4().hex)
content_location = factory.Faker("file_path", depth=3)
state_id = LabelAnalysisRequestState.CREATED.db_id


class StaticAnalysisSuiteFilepathFactory(factory.Factory):
Expand Down
22 changes: 14 additions & 8 deletions django_scaffold/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,27 @@

# Application definition
INSTALLED_APPS = [
"shared.django_apps.legacy_migrations",
"shared.django_apps.codecov_auth",
"shared.django_apps.core",
"shared.django_apps.reports",
"shared.django_apps.pg_telemetry",
"shared.django_apps.rollouts",
"shared.django_apps.user_measurements",
"shared.django_apps.bundle_analysis",
# dependencies
"psqlextra",
# Needed to install legacy migrations
"django.contrib.admin",
"django.contrib.contenttypes",
"django.contrib.auth",
"django.contrib.messages",
"django.contrib.sessions",
# Shared apps:
"shared.django_apps.legacy_migrations",
"shared.django_apps.pg_telemetry",
"shared.django_apps.rollouts",
"shared.django_apps.user_measurements",
"shared.django_apps.bundle_analysis",
"shared.django_apps.codecov_auth",
"shared.django_apps.compare",
"shared.django_apps.core",
"shared.django_apps.labelanalysis",
"shared.django_apps.profiling",
"shared.django_apps.reports",
"shared.django_apps.staticanalysis",
]

TELEMETRY_VANILLA_DB = "default"
Expand Down
2 changes: 1 addition & 1 deletion requirements.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
https://github.com/codecov/test-results-parser/archive/996ecb2aaf7767bf4c2944c75835c1ee1eb2b566.tar.gz#egg=test-results-parser
https://github.com/codecov/shared/archive/609e56d2aa30b26d44cddaba0e1ebd79ba954ac9.tar.gz#egg=shared
https://github.com/codecov/shared/archive/c1c9cb24639157fd903e40799c7d364481f42ef7.tar.gz#egg=shared
https://github.com/codecov/timestring/archive/d37ceacc5954dff3b5bd2f887936a98a668dda42.tar.gz#egg=timestring
asgiref>=3.7.2
analytics-python==1.3.0b1
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ sentry-sdk==2.13.0
# shared
setuptools==75.7.0
# via nodeenv
shared @ https://github.com/codecov/shared/archive/609e56d2aa30b26d44cddaba0e1ebd79ba954ac9.tar.gz#egg=shared
shared @ https://github.com/codecov/shared/archive/c1c9cb24639157fd903e40799c7d364481f42ef7.tar.gz#egg=shared
# via -r requirements.in
six==1.16.0
# via
Expand Down
Loading