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

Move all possible events serverside #245

Closed
alison985 opened this issue Sep 1, 2017 · 12 comments
Closed

Move all possible events serverside #245

alison985 opened this issue Sep 1, 2017 · 12 comments

Comments

@alison985
Copy link

From getredash#1501

@alison985 alison985 added this to the 10 milestone Sep 1, 2017
@alison985 alison985 self-assigned this Sep 1, 2017
alison985 added a commit to alison985/mozilla-redash that referenced this issue Sep 1, 2017
@alison985
Copy link
Author

PR #246

@madalincm
Copy link

I'm not sure how I can manually check this issue. @alison985 can you provide some steps that would help me to check this?

@alison985
Copy link
Author

Perform some actions on the staging instance (visit 1 of each page, for example. Maybe a full regression???). Then on the staging instance using the metadata data source, run a query like the following:

select object_type, action, object_id, count(1)
from events
where created_at >= '2017-09-13 13:42'
group by 1,2

Make sure the following events ARE listed:
'view', 'api_call', 'admin/outdated_queries'
'view', 'api_call', 'admin/tasks'
'view', 'api_call', 'alerts'
'view', 'api_call', 'admin/data_sources'
'view', 'api_call', 'admin/data_source'
'view', 'api_call', 'admin/destinations'
'view', 'api_call', 'admin/destination'
'view', 'api_call', 'groups'
'view', 'api_call', 'query_snippets'
'view', 'api_call', 'users'

These events have not changed parameters, only where they are located. They should be listed:
'view', 'alert', [this.alertId]
'view', 'dashboard', dashboard.id
'archive', 'dashboard', this.dashboard.id
'edit', 'dashboard', this.dashboard.id
'delete', 'widget', this.widget.id
'delete', 'datasource', $scope.dataSource.id
'test', 'datasource', $scope.dataSource.id
'test', 'data_source_version', $scope.dataSource.id
'delete', 'destination', $scope.destination.id
'view', 'group_data_sources', $scope.groupId
'view', 'group', $scope.groupId
'search', 'query', '', { term: this.term }
'fork', 'query', $scope.query.id
'delete', 'visualization', vis.id
'view', 'query', $scope.query.id
'view', 'query_snippet', this.snippetId

Make sure the following events are NOT listed:
'view', 'page', 'admin/outdated_queries'
'view', 'page', 'admin/tasks'
'view', 'page', 'alerts'
'view', 'page', 'admin/data_sources'
'view', 'page', 'admin/data_source'
'view', 'page', 'admin/destinations'
'view', 'page', 'admin/destination'
'view', 'page', 'groups'
'view', 'page', 'query_snippets'
'view', 'page', 'users'

The goal of testing here is to make sure we didn't inadvertently drop any events in the process of moving them.

@madalincm
Copy link

I have the following results after using Alison instructions in stage:

Make sure the following events ARE listed:
'view', 'api_call', 'admin/outdated_queries' - not displayed
'view', 'api_call', 'admin/tasks' - not displayed
'view', 'api_call', 'alerts' - displayed
'view', 'api_call', 'admin/data_sources' - displayed
'view', 'api_call', 'admin/data_source' - not displayed
'view', 'api_call', 'admin/destinations' - displayed
'view', 'api_call', 'admin/destination' - not displayed
'view', 'api_call', 'groups' - displayed
'view', 'api_call', 'query_snippets' - displayed
'view', 'api_call', 'users' - displayed

They should be listed:
'view', 'alert', [this.alertId] - displayed
'view', 'dashboard', dashboard.id - displayed
'archive', 'dashboard', this.dashboard.id - displayed
'edit', 'dashboard', this.dashboard.id - displayed
'delete', 'widget', this.widget.id - displayed
'delete', 'datasource', $scope.dataSource.id - not displayed
'test', 'datasource', $scope.dataSource.id - not displayed
'test', 'data_source_version', $scope.dataSource.id - displayed
'delete', 'destination', $scope.destination.id - not displayed
'view', 'group_data_sources', $scope.groupId - not displayed
'view', 'group', $scope.groupId - displayed
'search', 'query', '', { term: this.term } - displayed
'fork', 'query', $scope.query.id - displayed
'delete', 'visualization', vis.id - displayed
'view', 'query', $scope.query.id - displayed
'view', 'query_snippet', this.snippetId - displayed

Make sure the following events are NOT listed:
'view', 'page', 'admin/outdated_queries' - not displayed
'view', 'page', 'admin/tasks' - not displayed
'view', 'page', 'alerts' - not displayed
'view', 'page', 'admin/data_sources' - not displayed
'view', 'page', 'admin/data_source' - not displayed
'view', 'page', 'admin/destinations' - not displayed
'view', 'page', 'admin/destination' - not displayed
'view', 'page', 'groups' - not displayed
'view', 'page', 'query_snippets' - not displayed
'view', 'page', 'users' - not displayed

I think the events I couldn't find are all related to admin tasks that I couldn't perform. Probably after I will get the necessary permissions those will show up. What do you think @alison985

@alison985
Copy link
Author

I agree @madalincm.

@madalincm
Copy link

I managed to run the query. And i can't see all the events.

'view', 'api_call', 'admin/outdated_queries' -
This is still not displayed. In stage the admin page for outdated queries is empty so I suspect that is the reason why I can't see the event.

'view', 'api_call', 'admin/tasks' -
not displayed - not sure what I have to do to see this.

'view', 'api_call', 'admin/data_sources' - displayed
'view', 'api_call', 'admin/data_source' - not displayed
'view', 'api_call', 'admin/destinations' - displayed
'view', 'api_call', 'admin/destination' - not displayed
Is this correct?. Both data_sources and data_source shoudld be displayed?

'delete', 'datasource', $scope.dataSource.id - not displayed
'test', 'datasource', $scope.dataSource.id - not displayed

not sure what I should do to see this.

Anyone can have an input on this? @washort @spasovski @rafrombrc ?

washort pushed a commit that referenced this issue Oct 19, 2017
@washort
Copy link

washort commented Oct 19, 2017

admin/tasks and admin/outdated_queries were not recording events properly.

I've changed access to destination and data_source resources to record view events using that name as their object_type, like the edit and delete events do.

@madalincm
Copy link

Thanks @washort
'view', 'api_call', 'admin/outdated_queries' and 'view', 'api_call', 'admin/tasks' are now displayed.
The rest of my comment is still valid.

'view', 'api_call', 'admin/data_sources' - displayed
'view', 'api_call', 'admin/data_source' - not displayed
'view', 'api_call', 'admin/destinations' - displayed
'view', 'api_call', 'admin/destination' - not displayed
Is this correct?. Both data_sources and data_source shoudld be displayed?

'delete', 'datasource', $scope.dataSource.id - not displayed
'test', 'datasource', $scope.dataSource.id - not displayed

not sure what I should do to see this.

@rafrombrc rafrombrc reopened this Oct 25, 2017
@rafrombrc rafrombrc modified the milestones: 10, 11 Oct 25, 2017
@washort
Copy link

washort commented Nov 1, 2017

'view', 'api_call', 'admin/data_source' and ``'view', 'api_call', 'admin/destinations' have been changed to 'data_source', 'view', <data source id> and 'destination', 'view', <destination id> respectively.

The delete and test events weren't visible because they hadn't been run. I clicked 'Test Connection' on a data source and deleted a test data source, and both events were logged.

@washort washort closed this as completed Nov 1, 2017
@madalincm
Copy link

madalincm commented Nov 1, 2017

Thanks for the reply Allen.
'delete', 'datasource', $scope.dataSource.id 'test', 'datasource', $scope.dataSource.id are now displayed.
Also I could find 'data_source', 'view', .

The only one that I can't find is 'destination', 'view', <destination id>

@washort
Copy link

washort commented Nov 1, 2017

Found it, it was "Alert Destinations" - clicked on that and a view event for destinations appeared in the table.

@madalincm
Copy link

I can confirm that. Thanks Allen for all the help. Marking this bug as verified fixed.

washort pushed a commit that referenced this issue Jan 17, 2018
washort pushed a commit that referenced this issue Feb 6, 2018
washort pushed a commit that referenced this issue Feb 28, 2018
jezdez pushed a commit that referenced this issue Mar 5, 2018
emtwo pushed a commit that referenced this issue May 25, 2018
washort pushed a commit that referenced this issue Jul 25, 2018
washort pushed a commit that referenced this issue Jul 30, 2018
jezdez pushed a commit that referenced this issue Aug 16, 2018
jezdez pushed a commit that referenced this issue Sep 6, 2018
jezdez pushed a commit that referenced this issue Sep 6, 2018
jezdez pushed a commit that referenced this issue Sep 6, 2018
jezdez pushed a commit that referenced this issue Nov 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants