meltano: bug: Disabling telemetry from the UI has no effect

Meltano Version

2.6.0

Python Version

3.8

Bug scope

Other

Operating System

Linux - python:3.8 Docker image

Description

Reproduction steps:

  1. docker run --entrypoint=/bin/bash -p 5000:5000 -it python:3.8
    
  2. pip install pipx && pipx install meltano==2.6.0 && pipx ensurepath && bash
    
  3. meltano init testproject && cd testproject && meltano --log-level=debug ui
    
  4. Open your browser (n.b. I used Firefox) to http://localhost:5000
  5. In another shell within the environment, create a ProjectSettingsService to observe that send_anonymous_usage_stats is True:
    >>> from meltano.core.project_settings_service import ProjectSettingsService
    >>> from meltano.core.project import Project
    >>> ProjectSettingsService(Project('/testproject')).get_with_metadata('send_anonymous_usage_stats')
    (True, {'name': 'send_anonymous_usage_stats', 'source': <SettingValueStore.DEFAULT: 'default'>, 'setting': <SettingDefinition send_anonymous_usage_stats (boolean)>, 'expandable': False, 'auto_store': <SettingValueStore.MELTANO_YML: 'meltano_yml'>, 'overwritable': True})
    
    At this point, meltano.yml has the following content (modulo the random project ID):
    version: 1
    default_environment: dev
    environments:
    - name: dev
    - name: staging
    - name: prod
    project_id: testproject-d2c1652c-911d-4ef1-bd54-146c4d2573f5
    
    And .meltano/analytics.json has "send_anonymous_usage_stats": true.
  6. Click the “Disable” button in the popup at the bottom right of the browser: image No browser console errors/warnings were observed when this button was clicked.
  7. Before exiting meltano ui, repeat step 5, and observe the same result.
  8. Exit meltano ui by entering Ctrl-C in it’s terminal (i.e. send it SIGINT), then wait for it to cleanly shut down.
  9. Repeat step 5, and observe the same result.

Expected behaviour:

Either step 7 or step 9 (depending on the implementation of the feature) should have caused the send_anonymous_usage_stats setting to be changed from True to False.

The long output of meltano --log-level=debug ui can be provided upon request, but it didn’t seem to have any interesting information. No log lines were emitted when the “Disable” button was clicked.

Code

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (12 by maintainers)

Commits related to this issue

Most upvoted comments

@WillDaSilva it looks like it was supposed to obey the meltano config:

https://github.com/meltano/meltano/blob/dfd9650170ff97fd69fdff7ac8dc7dc0841bf663/src/webapp/src/main-embed.js#L21

https://github.com/meltano/meltano/commit/124a3ae093131773b4e01510e1a5a3ff3da3fee6

That popup may always present to comply with cookie consent laws now, or its a bug, or something else. (this is all way before my time, just poking around and sharing)

I have updated https://github.com/meltano/meltano/pull/6783 to remove the UI telemetry code. Alternatively, we can keep it around but disable it until we resolve the configuration issue, but I’d rather not keep unused code around. If we want to re-enable it later, we can refer to the git history.

@WillDaSilva I’d be fine with removing it. The UI is deprioritized anyways and anything we can do to simplify and reduce code surface area makes sense to me.