Skip to content

Add null checks to consumers of QueryForm.getQueryDef - #159

Closed
labkey-tchad wants to merge 1 commit into
developfrom
fb_querydef_null_checks
Closed

Add null checks to consumers of QueryForm.getQueryDef#159
labkey-tchad wants to merge 1 commit into
developfrom
fb_querydef_null_checks

Conversation

@labkey-tchad

Copy link
Copy Markdown
Member

Hoping to prevent crawler errors before they happen

@labkey-tchad

Copy link
Copy Markdown
Member Author

Also fixes a crawler error I found this morning:

java.lang.NullPointerException
       at org.labkey.query.controllers.QueryController$ImportAction.initRequest(QueryController.java:3245)
       at org.labkey.query.controllers.QueryController$ImportAction.getView(QueryController.java:3255)
       at org.labkey.query.controllers.QueryController$ImportAction.getView(QueryController.java:3233)

@labkey-jeckels

Copy link
Copy Markdown
Contributor

I have a competing approach here, which makes getQueryDef() throw NotFoundException. I think that will be safe and eliminate a lot of null checks.

https://github.com/LabKey/platform/tree/fb_containerFilterSelectRows

I've kicked off the BVTs and DailyA to assess the change. @labkey-tchad feel free to queue more tests if there are any you think should be especially diagnostic

@labkey-tchad
labkey-tchad deleted the fb_querydef_null_checks branch June 6, 2019 19:30
cnathe added a commit that referenced this pull request Jul 31, 2026
…ontainer's @scripts dir (#7895)

## Rationale
LabKey/internal-issues#159

Assay transform scripts configured through the designer must now live in
the design's own container `@scripts` directory (writable only by
platform developers), enforced by a new validateScriptLocation() in the
save path, with a site-wide deprecated feature flag as an escape hatch
and a usage metric approximating how many existing designs are
non-compliant. The Selenium page object switches the default
addTransformScript(File) to file-upload mode, deleting any same-named
leftover from `@scripts` first.

## Related Pull Requests
- #7895
- LabKey/testAutomation#3133
- LabKey/limsModules#2369

## Changes
- Add validateScriptLocation() call to make sure that assay transform
script path is a child of the container's @scripts dir
- Add optional feature flag to "turn off" the @scripts dir path
validation check
- Metric for approximate count of assay transform script paths that are
not in an @scripts dir path
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.

2 participants