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

Feat/view fix #134

Merged
merged 6 commits into from
Oct 12, 2023
Merged

Feat/view fix #134

merged 6 commits into from
Oct 12, 2023

Conversation

anngvu
Copy link
Contributor

@anngvu anngvu commented Oct 11, 2023

For really relevant context, review PLFM-4862 and PLFM-5869. The discussions there explain:

  • Why view schemas break
  • Why you don't get notified and just come upon broken ones occasionally
  • Challenges and considerations for adjusting view schemas automatically
  • Other technical details good to be aware of overall (budgeting of the schema)

The more recent issue that brought this up again is https://github.com/nf-osi/dcc-site/issues/669, so figured we can just take stab at this. Useful for:

  • If working in programmatic context, can fix without having to go to UI
  • Automatically fix things if they are broken so they can be snapshotted (versioned)

To see what this looks like in action:

library(nfportalutils)
syn_login(Sys.getenv("SYNAPSE_AUTH_TOKEN"))

# Broken view with three adjustments needed
test_view <- "syn28499567"
adjust_view(test_view)

# After fixing, reset back to the broken schema model
schema <- .syn$get(test_view)
schema <- swap_col(schema, old = "82416", new = "110715") # back to assay with too small size 15
schema <- swap_col(schema, old = "185618", new = "200178") # back to contentType with with too small size 2
schema <- swap_col(schema, old = "200109", new = "200114") # back to tumorType with too small list len 2

@anngvu anngvu linked an issue Oct 11, 2023 that may be closed by this pull request
@allaway
Copy link
Collaborator

allaway commented Oct 12, 2023

Hi @anngvu , neat idea! I'll take a look at the code now. Just as an FYI we recently reopened one of the several old Jira issues about this: https://sagebionetworks.jira.com/browse/PLFM-5346 (a different one than what you linked), so it's possible we might get some Synapse side fix or tools that we could use in the future.

@allaway
Copy link
Collaborator

allaway commented Oct 12, 2023

Code and test LGTM, thanks!

@allaway allaway merged commit 09ba648 into develop Oct 12, 2023
7 checks passed
@anngvu anngvu deleted the feat/view-fix branch October 12, 2023 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Util to help with fixing schema issues for broken views
2 participants