Skip to content

Commit ea8b643

Browse files
authored
[ENG-11604] es6 cleanup (again) (#11817)
* chore: remove all es6-using code (again) * fix: trailing space
1 parent 8f2ecb0 commit ea8b643

12 files changed

Lines changed: 9 additions & 801 deletions

File tree

.github/workflows/test-build.yml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,6 @@ jobs:
4848
--health-interval 10s
4949
--health-timeout 30s
5050
--health-retries 5
51-
elasticsearch6: &ES6_SERVICE
52-
image: elasticsearch:6.8.23
53-
ports:
54-
- 9201:9200
55-
options: >-
56-
--health-cmd "curl -sf http://localhost:9200/_cluster/health?wait_for_status=yellow&timeout=30s"
57-
--health-interval 10s
58-
--health-timeout 30s
59-
--health-retries 5
6051
postgres: &POSTGRES_SERVICE
6152
image: postgres
6253
env:
@@ -76,7 +67,6 @@ jobs:
7667
run: poetry run python3 -m invoke test-ci-addons --junit
7768
env:
7869
ELASTIC8_URI: http://localhost:9202
79-
ELASTIC6_URI: http://localhost:9201
8070
- name: Upload report
8171
if: (success() || failure()) # run this step even if previous step failed
8272
uses: ./.github/actions/gen-report
@@ -104,7 +94,6 @@ jobs:
10494
checks: write
10595
services:
10696
elasticsearch8: *ES8_SERVICE
107-
elasticsearch6: *ES6_SERVICE
10897
postgres: *POSTGRES_SERVICE
10998
steps:
11099
- uses: actions/checkout@v6
@@ -115,7 +104,6 @@ jobs:
115104
run: poetry run python3 -m invoke test-ci-api1-and-js --junit
116105
env:
117106
ELASTIC8_URI: http://localhost:9202
118-
ELASTIC6_URI: http://localhost:9201
119107
- name: Upload report
120108
if: (success() || failure()) # run this step even if previous step failed
121109
uses: ./.github/actions/gen-report
@@ -127,7 +115,6 @@ jobs:
127115
checks: write
128116
services:
129117
elasticsearch8: *ES8_SERVICE
130-
elasticsearch6: *ES6_SERVICE
131118
postgres: *POSTGRES_SERVICE
132119
steps:
133120
- uses: actions/checkout@v6
@@ -136,7 +123,6 @@ jobs:
136123
run: poetry run python3 -m invoke test-ci-api2 --junit
137124
env:
138125
ELASTIC8_URI: http://localhost:9202
139-
ELASTIC6_URI: http://localhost:9201
140126
- name: Upload report
141127
if: (success() || failure()) # run this step even if previous step failed
142128
uses: ./.github/actions/gen-report
@@ -155,7 +141,6 @@ jobs:
155141
run: poetry run python3 -m invoke test-ci-api3-and-osf --junit
156142
env:
157143
ELASTIC8_URI: http://localhost:9202
158-
ELASTIC6_URI: http://localhost:9201
159144
- name: Upload report
160145
if: (success() || failure()) # run this step even if previous step failed
161146
uses: ./.github/actions/gen-report

admin/management/urls.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from django.urls import re_path, path
1+
from django.urls import re_path
22

33
from admin.management import views
44

@@ -22,7 +22,6 @@
2222
name='sync_notification_templates'),
2323
re_path(r'^remove_orcid_from_user_social', views.RemoveOrcidFromUserSocial.as_view(),
2424
name='remove_orcid_from_user_social'),
25-
path('migrate_osfmetrics_fix_6to8', views.MigrateOsfmetricsFix6to8.as_view(), name='migrate_osfmetrics_fix_6to8'),
2625
re_path(r'^migrate_funder_names_to_ror', views.MigrateFunderNamesToRor.as_view(),
2726
name='migrate_funder_names_to_ror'),
2827
]

admin/management/views.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -217,21 +217,6 @@ def post(self, request):
217217
return redirect(reverse('management:commands'))
218218

219219

220-
class MigrateOsfmetricsFix6to8(ManagementCommandPermissionView):
221-
def post(self, request):
222-
_command_kwargs = {
223-
'no_color': True,
224-
'no_counts': request.POST.get('no_counts'),
225-
'delete_es8_usage_reports': request.POST.get('delete_es8_usage_reports'),
226-
'start': request.POST.get('start'),
227-
}
228-
_out_io = StringIO()
229-
call_command('migrate_osfmetrics_fix_6to8', **_command_kwargs, stdout=_out_io)
230-
for _line in _out_io.getvalue().split('\n'):
231-
messages.info(request, _line)
232-
return redirect(reverse('management:commands'))
233-
234-
235220
class MigrateFunderNamesToRor(ManagementCommandPermissionView):
236221

237222
def post(self, request):

admin/templates/management/commands.html

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -200,23 +200,6 @@ <h4><u>Remove existing orcid info from user social</u></h4>
200200
</nav>
201201
</form>
202202
</section>
203-
<section>
204-
<h4><u>migrate osf-metrics (fix) 6to8</u></h4>
205-
<p>
206-
view progress of the osf-metrics migration (fixup) from elastic6 to elastic8 (or start it)
207-
</p>
208-
<form method="post"
209-
action="{% url 'management:migrate_osfmetrics_fix_6to8'%}"
210-
style="display: flex; flex-direction: column;">
211-
{% csrf_token %}
212-
<label><input type="checkbox" name="no_counts"> no counts</label>
213-
<label><input type="checkbox" name="delete_es8_usage_reports"> delete es8 usage reports (caution)</label>
214-
<label><input type="checkbox" name="start"> start tasks (caution)</label>
215-
<nav>
216-
<input class="btn btn-success" type="submit" value="Run" />
217-
</nav>
218-
</form>
219-
</section>
220203
<section>
221204
<h4><u>Update ROR funder names to be consistent and proper.</u></h4>
222205
<p>

api/base/settings/defaults.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -322,12 +322,6 @@
322322

323323
# django-elasticsearch-metrics
324324
DJELME_BACKENDS = {
325-
'osfmetrics_es6': {
326-
'elasticsearch_metrics.imps.elastic6': {
327-
'hosts': osf_settings.ELASTIC6_URI,
328-
'retry_on_timeout': True,
329-
},
330-
},
331325
'osfmetrics_es8': {
332326
'elasticsearch_metrics.imps.elastic8': {
333327
# passthru kwargs to elasticsearch8 connection constructor
@@ -345,7 +339,6 @@
345339
},
346340
}
347341
OSF_USAGEEVENT_EXPIRATION_DAYS = 90
348-
ELASTICSEARCH_METRICS_DATE_FORMAT = '%Y'
349342
MONTHLY_USAGE_REPORT_EPOCH = '2026-05' # cannot create monthly usage reports before this point
350343

351344
WAFFLE_CACHE_NAME = 'waffle_cache'

docker-compose.yml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ volumes:
1313
external: false
1414
elasticsearch8_data_vol:
1515
external: false
16-
elasticsearch6_data_vol:
17-
external: false
1816
rabbitmq_vol:
1917
external: false
2018
preprints_dist_vol:
@@ -85,22 +83,6 @@ services:
8583
retries: 30
8684
stdin_open: true
8785

88-
# Temporary: Remove when done with es6
89-
elasticsearch6:
90-
image: docker.elastic.co/elasticsearch/elasticsearch:6.3.1
91-
environment:
92-
- ES_JAVA_OPTS=-Xms512m -Xmx512m # reduce memory usage
93-
ports:
94-
- 9201:9200
95-
volumes:
96-
- elasticsearch6_data_vol:/usr/share/elasticsearch/data
97-
healthcheck:
98-
start_period: 15s
99-
test: curl -s http://localhost:9200/_cluster/health | grep -vq '"status":"red"'
100-
interval: 10s
101-
retries: 30
102-
stdin_open: true
103-
10486
postgres:
10587
image: postgres:15.4
10688
command:

0 commit comments

Comments
 (0)