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

Fix/dashboard #227

Merged
merged 49 commits into from
Oct 27, 2023
Merged

Fix/dashboard #227

merged 49 commits into from
Oct 27, 2023

Conversation

ruthenian8
Copy link
Member

Description

Create data provider, add new charts to dashboard; rework existing sections

Checklist

  • I have covered the code with tests
  • I have added comments to my code to help others understand it
  • I have updated the documentation to reflect the changes
  • I have performed a self-review of the changes

Copy link
Member

@RLKRo RLKRo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of my suggested changes are to yaml configuration files.
I'm not sure if they can be applied directly. I think it's better to apply corresponding changes via superset web app and export new config files.

tutorials/stats/3_sample_data_provider.py Outdated Show resolved Hide resolved
tutorials/stats/3_sample_data_provider.py Outdated Show resolved Hide resolved
docs/source/user_guides/superset_guide.rst Outdated Show resolved Hide resolved
tutorials/stats/3_sample_data_provider.py Outdated Show resolved Hide resolved
tutorials/stats/3_sample_data_provider.py Outdated Show resolved Hide resolved
tutorials/stats/3_sample_data_provider.py Outdated Show resolved Hide resolved
dff/utils/testing/toy_script.py Outdated Show resolved Hide resolved
docs/source/user_guides/superset_guide.rst Outdated Show resolved Hide resolved
docs/source/user_guides/superset_guide.rst Outdated Show resolved Hide resolved
docs/source/user_guides/superset_guide.rst Outdated Show resolved Hide resolved
tutorials/stats/3_sample_data_provider.py Outdated Show resolved Hide resolved
dff/utils/testing/toy_script.py Show resolved Hide resolved
tutorials/stats/3_sample_data_provider.py Outdated Show resolved Hide resolved
dff/config/superset_dashboard/charts/Node_Visits_7.yaml Outdated Show resolved Hide resolved
dff/stats/__main__.py Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/deeppavlov/dialog_flow_framework/blob/eddc688912c1f3d07bf5f092f7d259e4dd7c60d3/dff/stats/__main__.py#L80-L99

I think it's better to not use actions for that.
Because the arguments are required, users are forced to specify them in the command (dff.stats config.yaml -U superset -P -dP).

I think it is better to make them not required and then process them inside the main function instead of processing with PasswordAction.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the current way is better, because it allows for clearer code; the face that users have to pass -U and -P does not sound like a concern, since that is the way it functions in MySQL, Postgresql and all kinds of other systems

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/deeppavlov/dialog_flow_framework/blob/eddc688912c1f3d07bf5f092f7d259e4dd7c60d3/dff/stats/cli.py#L184-L187

Create a temporary file instead.

Otherwise it will delete temp.zip file in the current directory if it exists.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced with uuid random name

tutorials/stats/3_sample_data_provider.py Outdated Show resolved Hide resolved
docs/source/user_guides/superset_guide.rst Outdated Show resolved Hide resolved
dff/stats/cli.py Outdated Show resolved Hide resolved
.github/workflows/update_dashboard.yml Outdated Show resolved Hide resolved
docker-compose.yml Show resolved Hide resolved
docker-compose.yml Show resolved Hide resolved
ruthenian8 and others added 4 commits October 24, 2023 11:17
Apply suggestions from @RLKRo

Co-authored-by: Roman Zlobin <[email protected]>
Apply suggestions to label_lag/flow_lag

Co-authored-by: Roman Zlobin <[email protected]>
…om charts; update docker-compose healthcheck; apply formatting
MANIFEST.in Outdated Show resolved Hide resolved
dff/stats/cli.py Outdated Show resolved Hide resolved
dff/stats/cli.py Outdated Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that in the light of the bugs I've discovered we should really test the charts.

Bugs such as request_ids being sorted as strings are difficult to catch by simply looking at the charts which makes them all the more dangerous as they still present wildly incorrect data.

I think we should prioritize finding a way to test the data in these charts.

@@ -66,13 +87,21 @@ services:
- '9000:9000'
volumes:
- ch-data:/var/lib/clickhouse/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's weird that only clickhouse has its own volume.
Why not give a volume to all db containers?

Restarting all containers still resets all the metadata stored in dashboard-metadata.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that adding volumes to all containers lies outside the scope of this PR, so for now I will only add volumes for clickhouse and dashboard-metadata

@@ -2,6 +2,7 @@
export SERVER_THREADS_AMOUNT=8
set -m
nohup /bin/bash /usr/bin/run-server.sh &
sleep 5
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe instead of a simple sleep we could use something like what we have in make wait_db?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot figure out the exact event that we need to be waiting for; it would be feasible, if we knew what it was

@@ -50,10 +50,31 @@ services:
context: ./dff/utils/docker
dockerfile: dockerfile_stats
image: ghcr.io/deeppavlov/superset_df_dashboard:latest
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should build a local image in tests instead of using a remote image.
(as mentioned here)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be addressed by passing the --build flag to the docker-compose up command

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently, it was already building instead of pulling an image in previous commits:
image

I don't know why tests didn't fail due to authentication errors.
Maybe because context storages were also launched it gave enough time to whatever dashboard awaits for.

@ruthenian8 ruthenian8 merged commit 9b2d45f into dev Oct 27, 2023
16 checks passed
@RLKRo RLKRo mentioned this pull request Nov 1, 2023
4 tasks
@RLKRo RLKRo mentioned this pull request Nov 9, 2023
4 tasks
RLKRo added a commit that referenced this pull request Nov 10, 2023
# Release notes

## dff.stats

- Fix tests for statistics module (#272)
- Dashboard config now persists after restart (#227)
- Fix several bugs with SQL statements for datasets (#227)
- Update guide with information about custom charts (#227)
- Add text descriptions for charts in dashboard (#227)
- Various chart fixes (#227)


## Other

- Update PR template (#258)
- Small doc fixesRelease v0.6.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants