Skip to content

Drop st2exporter #5676

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

Merged
merged 10 commits into from
Jul 24, 2022
Merged
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
9 changes: 9 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,15 @@ Changed

Contributed by @LiamRiddell

Removed
~~~~~~~

* Removed st2exporter service. It is unmaintained and does not get installed. It was
originally meant to help with analytics by exporting executions as json files that
could be imported into something like elasticsearch. Our code is now instrumented
to make a wider variety of stats available to metrics drivers. #5676
Contributed by @cognifloyd

3.7.0 - May 05, 2022
--------------------

Expand Down
3 changes: 0 additions & 3 deletions conf/HA/st2.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ virtualenv_opts = --always-copy
[notifier]
logging = /etc/st2/logging.notifier.conf

[exporter]
logging = /etc/st2/logging.exporter.conf

[garbagecollector]
logging = /etc/st2/logging.garbagecollector.conf

Expand Down
6 changes: 0 additions & 6 deletions conf/st2.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,6 @@ username = None
# Compression level when compressors is set to zlib. Valid values are -1 to 9. Defaults to 6.
zlib_compression_level =

[exporter]
# Directory to dump data to.
dump_dir = /opt/stackstorm/exports/
# location of the logging.exporter.conf file
logging = /etc/st2/logging.exporter.conf

[garbagecollector]
# Action execution output objects (ones generated by action output streaming) older than this value (days) will be automatically deleted. Defaults to 7.
action_executions_output_ttl = 7
Expand Down
3 changes: 0 additions & 3 deletions conf/st2.dev.conf
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,6 @@ logging = st2actions/conf/logging.scheduler.conf
[notifier]
logging = st2actions/conf/logging.notifier.conf

[exporter]
logging = st2exporter/conf/logging.exporter.conf

[workflow_engine]
logging = st2actions/conf/logging.workflowengine.conf

Expand Down
3 changes: 0 additions & 3 deletions conf/st2.package.conf
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ virtualenv_opts = --always-copy
[notifier]
logging = /etc/st2/logging.notifier.conf

[exporter]
logging = /etc/st2/logging.exporter.conf

[garbagecollector]
logging = /etc/st2/logging.garbagecollector.conf

Expand Down
3 changes: 0 additions & 3 deletions conf/st2.tests.conf
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,3 @@ remote_dir = /tmp
[notifier]
logging = st2actions/conf/logging.notifier.conf

[exporter]
logging = st2exporter/conf/logging.exporter.conf

2 changes: 0 additions & 2 deletions conf/st2.tests1.conf
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,3 @@ remote_dir = /tmp
[notifier]
logging = st2actions/conf/logging.notifier.conf

[exporter]
logging = st2exporter/conf/logging.exporter.conf
3 changes: 0 additions & 3 deletions conf/st2.tests2.conf
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,3 @@ remote_dir = /tmp
[notifier]
logging = st2actions/conf/logging.notifier.conf

[exporter]
logging = st2exporter/conf/logging.exporter.conf

Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
#!/usr/bin/env python
# Copyright 2022 The StackStorm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""
Migration which deletes the marker collections now that st2exporter has been removed.
Only st2exporter used the marker collections.

NB: Most people will not have these collections because st2exporter was optional,
and the collections were not configured to be created automatically.
"""

import sys
import traceback

import mongoengine as me

from mongoengine.connection import get_db
from oslo_config import cfg

from st2common import config
from st2common.service_setup import db_setup
from st2common.service_setup import db_teardown


MARKER_COLLECTION = "marker_d_b"
DUMPER_MARKER_COLLECTION = "dumper_marker_d_b"


def delete_marker_collections():
db = get_db()
collections = db.collection_names()

if MARKER_COLLECTION in collections:
print(f"Dropping {MARKER_COLLECTION} collection...")
db[MARKER_COLLECTION].drop()

if DUMPER_MARKER_COLLECTION in collections:
print(f"Dropping {DUMPER_MARKER_COLLECTION} collection...")
db[DUMPER_MARKER_COLLECTION].drop()


def main():
config.parse_args()
db_setup()

try:
delete_marker_collections(display_prompt=not cfg.CONF.yes)
exit_code = 0
except Exception as e:
print("ABORTED: Collection deletion aborted on first failure: %s" % (str(e)))
traceback.print_exc()
exit_code = 1

db_teardown()
sys.exit(exit_code)


if __name__ == "__main__":
main()
55 changes: 0 additions & 55 deletions st2common/st2common/models/db/marker.py

This file was deleted.

40 changes: 0 additions & 40 deletions st2common/st2common/persistence/marker.py

This file was deleted.

7 changes: 0 additions & 7 deletions st2common/st2common/transport/queues.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
"ACTIONRUNNER_CANCEL_QUEUE",
"ACTIONRUNNER_PAUSE_QUEUE",
"ACTIONRUNNER_RESUME_QUEUE",
"EXPORTER_WORK_QUEUE",
"NOTIFIER_ACTIONUPDATE_WORK_QUEUE",
"RESULTSTRACKER_ACTIONSTATE_WORK_QUEUE",
"RULESENGINE_WORK_QUEUE",
Expand Down Expand Up @@ -76,12 +75,6 @@
)


# Used by the exporter service
EXPORTER_WORK_QUEUE = execution.get_queue(
"st2.exporter.work", routing_key=publishers.UPDATE_RK
)


# Used by the notifier service
NOTIFIER_ACTIONUPDATE_WORK_QUEUE = execution.get_queue(
"st2.notifiers.execution.work", routing_key=publishers.UPDATE_RK
Expand Down
56 changes: 0 additions & 56 deletions st2common/tests/unit/test_db_marker.py

This file was deleted.

10 changes: 0 additions & 10 deletions st2exporter/MANIFEST.in

This file was deleted.

52 changes: 0 additions & 52 deletions st2exporter/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions st2exporter/README.md

This file was deleted.

Loading