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

Add default parameters to DB schema migration script #10060

Merged
merged 1 commit into from
Mar 7, 2023

Conversation

oplantalech
Copy link
Contributor

@oplantalech oplantalech commented Mar 1, 2023

Reopen #10055 so all tests run

@sonarcloud
Copy link

sonarcloud bot commented Mar 2, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link
Member

@inodb inodb left a comment

Choose a reason for hiding this comment

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

@oplantalech thanks for this suggestion! This overall seems relatively innocuous but it does feel a little odd to me that this script is aware of the location of these files. It seems like something that should be set at the docker image level and then it could e.g. use a docker specific wrapper script to call this with the appropriate paths

Note btw also that the database gets migrated automatically already: https://github.com/cBioPortal/cbioportal/blob/master/docker/web-and-data/docker-entrypoint.sh#L61-L70

@inodb inodb added devops and removed enhancement labels Mar 7, 2023
@inodb inodb merged commit c54ab39 into cBioPortal:master Mar 7, 2023
@oplantalech oplantalech deleted the improve_migrate_db_script branch March 7, 2023 08:27
@oplantalech
Copy link
Contributor Author

@inodb Thanks for the review. The idea is follow the pattern of the rest of scripts, try to infer the parameters from PORTAL_HOME (or similar) so you don't need to explicitly define them. That is also less prone-errors because you will get the config of the cBioPortal you are calling the script from - and you still have the option to pass the parameters if you do really want to use specific files outside of your installation.

@inodb
Copy link
Member

inodb commented Mar 7, 2023

Thanks @oplantalech ! Makes sense. I guess I mean that relying on file paths feels a little finicky even tho we do it in other places. I'm not sure what common patterns are for this kind of thing tho. It feels this issue stems from stuffing python scripts +web backend etc into one docker image

jagnathan pushed a commit to pughlab/cbioportal that referenced this pull request Nov 8, 2023
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.

2 participants