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

Sorted lists for json serialization for parser and annotator outputs DUG-408 #336

Closed
wants to merge 15 commits into from

Conversation

mbacon-renci
Copy link
Collaborator

As we try to use LakeFS to avoid re-processing on unnecessary changes, sometimes the output is detected as a change when no real data have changed. This is usually an ordering problem in an unordered list or key:value pair. The below URL has a LakeFS commit that should not have occurred.

https://lakefs.apps.renci.org/repositories/yk-heal/commits/e0739329347be52164815581c3d819cb4712ed5e71d66214e0888b3950c03908?prefix=annotate_and_index%2Fcrdc_dataset_pipeline_task_group.crawl_crdc%2Fphs000178.v11.pht000804.v9.TCGA_Subject.data_dict%2F

A code modification to the JSON output will be needed to fix this, after some investigation.

Copy link
Collaborator

@vladimir2217 vladimir2217 left a comment

Choose a reason for hiding this comment

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

pls see comments

Copy link
Contributor

@YaphetKG YaphetKG left a comment

Choose a reason for hiding this comment

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

Hi Michael , I don't think sorting them in the jsonable methods helps us.
Jsonpickle doesn't rely on that method when generating the json files in roger.
But I was thinking in methods like (https://github.com/helxplatform/dug/blob/develop/src/dug/core/parsers/_base.py#L58) if we sort the lists here, right after modification , maybe that could work.

@mbacon-renci
Copy link
Collaborator Author

mbacon-renci commented Jan 16, 2024 via email

@mbacon-renci
Copy link
Collaborator Author

mbacon-renci commented Jan 16, 2024

@YaphetKG I have re-done the patch to sort on assignment or change rather than on output. I am also happy to address @vladimir2217's concerns about exposing self.__dict__ if we want to add that to the change as well.

@mbacon-renci
Copy link
Collaborator Author

Also, this is apparently failing Trivy results but I can't find the result output to figure out what vulnerability needs to be addressed.

@YaphetKG YaphetKG self-requested a review January 17, 2024 14:16
@YaphetKG
Copy link
Contributor

Also, this is apparently failing Trivy results but I can't find the result output to figure out what vulnerability needs to be addressed.

The Scan results can be found at
image
going to Checks in the top of this PR
then on the next page here
image
Going to the Code Scanning Results > Trivy scans
Then View all branch results

@YaphetKG
Copy link
Contributor

Did you run this in roger ? would be nice if it is tested and ready to go. It looks good

@mbacon-renci
Copy link
Collaborator Author

Did you run this in roger ? would be nice if it is tested and ready to go. It looks good

I'm getting some DAG import errors which I think are unrelated to the code changes I made and have to do with an error in linkml-runtime 1.6.0. I'm trying to bump some versions in part to fix that and in part to get past some of the pile of vulnerabilities that are showing up on scan.

@joshua-seals
Copy link
Collaborator

I have investigated why trivy is flagging vulnerabilities, assuming it to be the caching we were doing for image builds to no avail.

I believe Trivy is somehow confused as to the "closed" vulnerability from the python docker image, which does seem to be the culprit. This could be anomalous (one time error) or could be a bug in trivy. The most simplistic way with least engineering overhead, to test the theory is letting this pr merge "bypassing the checks" for now to see if this behavior recurs on the next pr. Given that previous fixes did not experience this problem and the trivy action itself has seen no significant changes since it's last release I am somewhat confident this will not persist past the present occurrence.

@YaphetKG
Copy link
Contributor

Image version changed to a pached alpine on PR #337 . Code tested and works. Pulled in other branch. Closing this as Complete.

@YaphetKG YaphetKG closed this Jan 25, 2024
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.

4 participants