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

Handle deployment settings in a new collection in the database #716

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

BenjaminCharmes
Copy link
Member

Closes #704

  • Added a model setting with name, value and access_level (public or private)
  • Added a setting table to the admin dashboard that display every setting set in the db
  • Added a way to update these settings

Should we have a default value for certain parameters defined in the code? or
Have an empty field in the admin dashboard for parameters not yet defined? or
Just enter them manually in the database the first time?

Copy link

codecov bot commented Apr 25, 2024

Codecov Report

Attention: Patch coverage is 16.39344% with 51 lines in your changes are missing coverage. Please review.

Project coverage is 66.13%. Comparing base (706a983) to head (b9efe79).
Report is 17 commits behind head on main.

Current head b9efe79 differs from pull request most recent head ad13bff

Please upload reports for the commit ad13bff to get more accurate results.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #716      +/-   ##
==========================================
- Coverage   66.92%   66.13%   -0.80%     
==========================================
  Files          62       62              
  Lines        3713     3768      +55     
==========================================
+ Hits         2485     2492       +7     
- Misses       1228     1276      +48     
Files Coverage Δ
pydatalab/pydatalab/routes/v0_1/info.py 86.76% <33.33%> (-2.47%) ⬇️
pydatalab/pydatalab/routes/v0_1/admin.py 38.14% <15.51%> (-30.75%) ⬇️

Copy link

cypress bot commented Apr 25, 2024

Passing run #1701 ↗︎

0 40 0 0 Flakiness 0

Details:

Merge b9efe79 into d77b3a9...
Project: datalab Commit: 0234986dca ℹ️
Status: Passed Duration: 02:05 💡
Started: May 13, 2024 10:55 AM Ended: May 13, 2024 10:57 AM

Review all test suite changes for PR #716 ↗︎

@BenjaminCharmes
Copy link
Member Author

pre-commit.ci autofix

@ml-evs
Copy link
Member

ml-evs commented May 8, 2024

pre-commit.ci autofix

@ml-evs ml-evs marked this pull request as ready for review May 8, 2024 12:58
@ml-evs ml-evs changed the title [WIP] Handle deployment settings in a new collection in the database Handle deployment settings in a new collection in the database May 8, 2024
Copy link
Member

@ml-evs ml-evs left a comment

Choose a reason for hiding this comment

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

Looking good, will need to hear more about what @jdbocarsly wants to use this for before deciding whether new settings should be created and whether we need to enumerate any defaults

200,
)

return (jsonify({"status": "success"}), 200)
Copy link
Member

Choose a reason for hiding this comment

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

As we discussed, maybe add a route for also creating a new setting that can have a simple string name/value (and maybe description?) plus whether it is public or private as a drop down

Copy link
Member Author

Choose a reason for hiding this comment

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

Done. For the moment, only the "LOGO_URL" and "HOMEPAGE_URL" settings work. So I also put a dropdown for "name" with only these two entries.

…ing, a 'description' field and model deletion
@BenjaminCharmes
Copy link
Member Author

pre-commit.ci autofix

@ml-evs
Copy link
Member

ml-evs commented May 16, 2024

I think much like #604, there's enough to tidy up here (and stuff that could subtly break deployments) that we should hold off until after the 0.4 release to merge this.

@ml-evs ml-evs added the blocked label May 16, 2024
@BenjaminCharmes
Copy link
Member Author

BenjaminCharmes commented May 24, 2024

As discussed during the datalab meeting and for future work:

  • Should we remove the "Add a setting" button?
  • Should the settings each have an entry in db or a collection by "acces_level" that includes all relative settings?
  • Do we need to be able to delete a setting or just modify it?
  • What settings should we put in the admin dashboard for the future? (only LOGO_URL and HOMEPAGE_URL work for now)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle deployment settings in a new collection in the database
2 participants