Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
ee426a8
[ENG-11325] Prevent users from using URLs as their names (#11768)
cslzchen Jun 9, 2026
5f188e7
Update changelog and bump version
cslzchen Jun 9, 2026
de9bb07
Merge branch 'hotfix/26.10.5'
cslzchen Jun 9, 2026
5fd7578
Merge tag '26.10.5' into develop
cslzchen Jun 9, 2026
0c39d14
[ENG-11012] Disable Preprint DELETE from API (#11772)
cslzchen Jun 9, 2026
6dde086
Update changelog and bump version
cslzchen Jun 10, 2026
a726370
Merge branch 'hotfix/26.10.6'
cslzchen Jun 10, 2026
c753bd6
Merge tag '26.10.6' into develop
cslzchen Jun 10, 2026
14b5a9d
Update changelog and bump version
cslzchen Jun 10, 2026
9d5d370
Merge branch 'hotfix/26.10.7'
cslzchen Jun 10, 2026
402918a
Merge tag '26.10.7' into develop
cslzchen Jun 10, 2026
eaab7f6
[ENG-9691][feature] osfmetrics cleanup drop es6 (#11745)
aaxelb Jun 10, 2026
06ef580
prepare 26.11.0
aaxelb Jun 10, 2026
fbdbf5c
Merge branch 'release/26.11.0'
aaxelb Jun 10, 2026
5d73ad4
Merge tag '26.11.0' into develop
aaxelb Jun 10, 2026
c91234f
Merge Feature/es2 consolidation into develop (#11783)
adlius Jun 23, 2026
ed8af91
Bump version no. Add CHANGELOG
adlius Jun 23, 2026
93fcd18
Merge branch 'release/26.12.0'
adlius Jun 23, 2026
011c090
Merge tag '26.12.0' into develop
adlius Jun 23, 2026
2c7d472
wrap command in handle() with atomic transaction
adlius Jun 23, 2026
76a76c8
Merge branch 'hotfix/26.12.1'
adlius Jun 23, 2026
a87ded1
Merge tag '26.12.1' into develop
adlius Jun 23, 2026
ddaadf8
improve migrations; add special casing for ibdgc (#11790)
adlius Jun 30, 2026
e034dba
Merge branch 'hotfix/26.12.2'
adlius Jun 30, 2026
931eeff
Merge tag '26.12.2' into develop
adlius Jun 30, 2026
594560b
[ENG-11458] fix: osfmetrics data lost in migration (#11774)
aaxelb Jul 1, 2026
06b2375
prepare 26.13.0
aaxelb Jul 1, 2026
74a7ad3
Merge tag '26.13.0' into develop
aaxelb Jul 1, 2026
6765448
Merge remote-tracking branch 'upstream/develop' into feature/pbs-26-9
cslzchen Jul 1, 2026
8c28cc6
Manually reorder/rename migrations and update dependencies
cslzchen Jul 1, 2026
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
32 changes: 0 additions & 32 deletions .github/actions/build-es6/action.yml

This file was deleted.

3 changes: 0 additions & 3 deletions .github/actions/start-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ runs:
- uses: ./.github/actions/build-es
with:
ELASTICSEARCH_ARCHIVE: ${{ env.ELASTICSEARCH_ARCHIVE }}
- uses: ./.github/actions/build-es6
with:
ELASTICSEARCH6_ARCHIVE: ${{ env.ELASTICSEARCH6_ARCHIVE }}
- name: Set up Python 3.12
uses: actions/setup-python@v6
with:
Expand Down
18 changes: 17 additions & 1 deletion .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ permissions:
env:
WHEELHOUSE: ~/.cache/wheelhouse
ELASTICSEARCH_ARCHIVE: elasticsearch-2.4.5.tar.gz
ELASTICSEARCH6_ARCHIVE: elasticsearch-6.3.1.tar.gz
OSF_DB_PORT: 5432
OSF_DB_PASSWORD: postgres
GITHUB_ACTIONS: true
Expand Down Expand Up @@ -49,6 +48,15 @@ jobs:
--health-interval 10s
--health-timeout 30s
--health-retries 5
elasticsearch6: &ES6_SERVICE
image: elasticsearch:6.8.23
ports:
- 9201:9200
options: >-
--health-cmd "curl -sf http://localhost:9200/_cluster/health?wait_for_status=yellow&timeout=30s"
--health-interval 10s
--health-timeout 30s
--health-retries 5
postgres: &POSTGRES_SERVICE
image: postgres
env:
Expand All @@ -68,6 +76,7 @@ jobs:
run: poetry run python3 -m invoke test-ci-addons --junit
env:
ELASTIC8_URI: http://localhost:9202
ELASTIC6_URI: http://localhost:9201
- name: Upload report
if: (success() || failure()) # run this step even if previous step failed
uses: ./.github/actions/gen-report
Expand Down Expand Up @@ -95,6 +104,7 @@ jobs:
checks: write
services:
elasticsearch8: *ES8_SERVICE
elasticsearch6: *ES6_SERVICE
postgres: *POSTGRES_SERVICE
steps:
- uses: actions/checkout@v6
Expand All @@ -105,6 +115,7 @@ jobs:
run: poetry run python3 -m invoke test-ci-api1-and-js --junit
env:
ELASTIC8_URI: http://localhost:9202
ELASTIC6_URI: http://localhost:9201
- name: Upload report
if: (success() || failure()) # run this step even if previous step failed
uses: ./.github/actions/gen-report
Expand All @@ -116,6 +127,7 @@ jobs:
checks: write
services:
elasticsearch8: *ES8_SERVICE
elasticsearch6: *ES6_SERVICE
postgres: *POSTGRES_SERVICE
steps:
- uses: actions/checkout@v6
Expand All @@ -124,6 +136,7 @@ jobs:
run: poetry run python3 -m invoke test-ci-api2 --junit
env:
ELASTIC8_URI: http://localhost:9202
ELASTIC6_URI: http://localhost:9201
- name: Upload report
if: (success() || failure()) # run this step even if previous step failed
uses: ./.github/actions/gen-report
Expand All @@ -140,6 +153,9 @@ jobs:
- uses: ./.github/actions/start-build
- name: Run tests
run: poetry run python3 -m invoke test-ci-api3-and-osf --junit
env:
ELASTIC8_URI: http://localhost:9202
ELASTIC6_URI: http://localhost:9201
- name: Upload report
if: (success() || failure()) # run this step even if previous step failed
uses: ./.github/actions/gen-report
Expand Down
34 changes: 34 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,40 @@

We follow the CalVer (https://calver.org/) versioning scheme: YY.MINOR.MICRO.

26.13.0 (2026-07-01)
====================

- add migrate_osfmetrics_fix_6to8 command to correct monthly usage reports
- temporarily re-add elasticsearch6 and some es6-based osf-metrics models


26.12.0 (2026-06-23)
====================

- ES2 Consolidation

26.11.0 (2026-06-10)
====================

- Stop using elasticsearch6
- Change all osfmetrics-consuming code to use es8 from data migration in 26.10.0


26.10.7 (2026-06-10)
====================

- Fix typo in pyproject.toml

26.10.6 (2026-06-10)
====================

- Disable Preprint DELETE from API

26.10.5 (2026-06-09)
====================

- Prevent users from using URLs/domains in their names

26.10.4 (2026-06-04)
====================

Expand Down
8 changes: 2 additions & 6 deletions README-docker-compose.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,7 @@

#### Special Instructions for Apple Chipset (M1, M2, etc.) and other ARM64 architecture

* _NOTE: The default `elasticsearch`, `elasticsearch6`, and `sharejs` containers are incompatible with ARM64._

- To run `elasticsearch6` on ARM64 architecture:

- Copy `docker-compose-dist-arm64.override.yml` into your `docker-compose.override.yml` file
* _NOTE: The default `elasticsearch` and `sharejs` containers are incompatible with ARM64._

- Running containers with docker compose

Expand Down Expand Up @@ -194,7 +190,7 @@

- Start all containers
```bash
alias dcsa="docker compose up -d assets admin_assets mfr wb fakecas sharejs worker elasticsearch elasticsearch6 web api admin preprints gv"
alias dcsa="docker compose up -d assets admin_assets mfr wb fakecas sharejs worker elasticsearch elasticsearch8 web api admin preprints gv"
```

- Shut down all containers
Expand Down
17 changes: 2 additions & 15 deletions addons/base/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import waffle
from django.db import transaction
from django.contrib.contenttypes.models import ContentType
from elasticsearch6 import exceptions as es_exceptions
from elasticsearch8 import exceptions as es_exceptions
from rest_framework import status as http_status

from api.caching.tasks import update_storage_usage_with_size
Expand All @@ -34,7 +34,7 @@
from framework.flask import redirect
from framework.sentry import log_exception
from framework.transactions.handlers import no_auto_transaction
from osf.metrics.es8_metrics import OsfCountedUsageEvent
from osf.metrics.events import OsfCountedUsageEvent
from website import settings
from addons.base import signals as file_signals
from addons.base.utils import format_last_known_metadata, get_mfr_url
Expand All @@ -54,7 +54,6 @@
FileVersionUserMetadata,
FileVersion, NotificationTypeEnum
)
from osf.metrics import PreprintView, PreprintDownload
from osf.utils import permissions
from osf.external.gravy_valet import request_helpers
from website.profile.utils import get_profile_image_url
Expand Down Expand Up @@ -686,12 +685,6 @@ def osfstoragefile_viewed_update_metrics(self, auth, fileversion, file_node):
return
if waffle.switch_is_active(features.ELASTICSEARCH_METRICS) and isinstance(resource, Preprint):
try:
PreprintView.record_for_preprint(
preprint=resource,
user=auth.user,
version=fileversion.identifier,
path=file_node.path,
)
OsfCountedUsageEvent.record(
user_id=getattr(user, '_id', None),
item_osfid=resource._id,
Expand Down Expand Up @@ -725,12 +718,6 @@ def osfstoragefile_downloaded_update_metrics(self, auth, fileversion, file_node)
return
if waffle.switch_is_active(features.ELASTICSEARCH_METRICS) and isinstance(resource, Preprint):
try:
PreprintDownload.record_for_preprint(
preprint=resource,
user=auth.user,
version=fileversion.identifier,
path=file_node.path,
)
OsfCountedUsageEvent.record(
user_id=getattr(user, '_id', None),
item_osfid=resource._id,
Expand Down
7 changes: 6 additions & 1 deletion admin/base/utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Utility functions and classes
"""
from osf.models import Subject, NodeLicense, Brand
from osf.models import Subject, NodeLicense, Brand, CedarMetadataTemplate

from django.core.exceptions import ValidationError, PermissionDenied
from django.urls import reverse
Expand Down Expand Up @@ -116,6 +116,11 @@ def get_brand_choices():
brands = Brand.objects.all()
return [no_default] + [(brand.id, brand.name) for brand in brands]

def get_cedar_template_choices():
no_default = ('', '---------')
templates = CedarMetadataTemplate.objects.filter(active=True)
return [no_default] + [(t.id, t.schema_name) for t in templates]

def get_toplevel_subjects():
return Subject.objects.filter(parent__isnull=True, provider___id='osf').values_list('id', 'text')

Expand Down
6 changes: 4 additions & 2 deletions admin/cedar/forms.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from django.forms import ModelForm, CharField, JSONField
from django.forms import ModelForm, CharField, JSONField, BooleanField

from osf.models import CedarMetadataTemplate


class CedarMetadataTemplateForm(ModelForm):
schema_name = CharField(
disabled=True,
Expand All @@ -18,7 +19,8 @@ class CedarMetadataTemplateForm(ModelForm):
template = JSONField(
disabled=True
)
is_for_collections = BooleanField(label='For collections only:', required=False)

class Meta:
model = CedarMetadataTemplate
fields = ['schema_name', 'cedar_id', 'template_version', 'template', 'active']
fields = ['schema_name', 'cedar_id', 'template_version', 'template', 'is_for_collections', 'active', 'should_index_for_search']
4 changes: 3 additions & 1 deletion admin/collection_providers/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from framework.utils import sanitize_html
from osf.models import CollectionProvider
from admin.base.utils import get_nodelicense_choices, get_defaultlicense_choices, validate_slug
from admin.base.utils import get_nodelicense_choices, get_defaultlicense_choices, validate_slug, get_cedar_template_choices


class CollectionProviderForm(forms.ModelForm):
Expand Down Expand Up @@ -37,9 +37,11 @@ class Meta:
def __init__(self, *args, **kwargs):
nodelicense_choices = get_nodelicense_choices()
defaultlicense_choices = get_defaultlicense_choices()
cedar_template_choices = get_cedar_template_choices()
super().__init__(*args, **kwargs)
self.fields['licenses_acceptable'].choices = nodelicense_choices
self.fields['default_license'].choices = defaultlicense_choices
self.fields['required_metadata_template'].choices = cedar_template_choices

def clean_description(self, *args, **kwargs):
if not self.data.get('description'):
Expand Down
Loading