galaxyproject / galaxy Public
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
Make access to parameters in sections also require full path #9493
base: dev
Are you sure you want to change the base?
Make access to parameters in sections also require full path #9493
Conversation
|
That's a nice test, fixing this probably also fixes #9486 |
|
Cool. Do you know if this worked in the past and just broke or if this never worked? |
|
You're not supposed to duplicate parameter names (if they're not the same thing, as in conditional switches), so there is a chance it never worked, but some years ago we also reworked the param dict lookup for unqualified parameter names that could have affected this. |
|
I understand and would never do this when crating wrappers manually. But, I stumbled over this when autogenerating wrappers for OpenMS .. so I don't have any influence on the parameter names .. or need quite a bit of additional code which I would like to avoid. |
|
sure, and that's why I like your test. clearly we don't want to mask |
|
Good thing is that the test fails: But from my test that brought be to this bug I would have expected |
This comment has been hidden.
This comment has been hidden.
2f796e0
to
7a1390c
|
Hey @mvdbeek .. this gets a bit tricky and I could need a bit of feedback. Seemingly I guess this would break a few tools in its current state (quick check at IUC confirms this). Also there are some side effects which I do not understand yet (e.g. the py3 api tests). I'm thinking about a good way to fix this.
What's your take on this? |
|
Reformulated title and descriptions and opened a branch on IUC https://github.com/bernt-matthias/tools-iuc/tree/topic/test-format_source for testing. Tests are running here https://github.com/bernt-matthias/tools-iuc/actions/runs/83804958 |
|
Seems that Maybe it was only |
|
The change seems to have some side effect on workflows (corresponding API tests should be fixed) and conditionals (totally forgot that conditionals are also affected) There was a comment (likely) from @jmchilton and it seems that the behaviour is now as desired galaxy/lib/galaxy_test/api/test_workflows.py Line 2957 in 802ddaf
|
|
I thought it was intentional that sections don't require the prefix addition? Won't this break things? |
|
With respect to tools this seems not to be the case. I just tested the complete IUC repo against this branch (https://github.com/bernt-matthias/tools-iuc/actions/runs/83804958).. All tests passed. I checked some tools and found that in cheetah the access is already Main question seems to be where |
It will and we shouldn't change the test tools.
Can we not make both work ? |
Do you recall the idea behind this intention? On a first glance it seems inconsistent to require prefix in cheetah but not in other places.
Maybe :). So far the good news is that all tests here pass .. as well as all IUC tools -- even if I do not understand why in parts: e.g. https://github.com/galaxyproject/tools-iuc/blob/7f0dbcf650d20acd80d7082bdae9759d51a1480c/tools/sickle/sickle.xml .. does not use prefix addition for conditionals (admittedly as documented: https://docs.galaxyproject.org/en/master/dev/schema.html#tool-outputs-data) .. and should fail for this branch .. hrm.
For
Good question. The first thing that came to my mind is to tweak callback helper but for this one would need to define and implement an failure case (exception) for the callback functions. E.g. try the new behavior and if it fails spit out a warning and try the old behavior. But I guess this idea is much more complicated to implement than it sounds. |
It's the old default. Just because this isn't widely used in modern tool doesn't mean we can break this. Of course fully-prefixed is better.
Case in point are the test tools.
Yes, that used to work and I insist that this must continue working. If you think there is no way to have both working we can make the new behavior conditional on a new |
and add new ones testing the profile version for 21.01 that requires qualified access to parameters in secions and conditionals
to cover that references to inputs from outputs need to be fully qualified
|
I guess we should put the change to identifier_in_conditional.xml to a separate PR (if at all .. do not understand why this worked before).
Should we add tests here for the new profile? Currently I just added the default profile.
It seems that |
|
Yeah, let's not change test/functional/tools/identifier_in_conditional.xml. The rest looks good to me, I don't think we need extra profile tests given that you have the high-level framework tests. |
because test currently covers only old behavior
|
The remaining two workflow api tests should pass now again after I undid the changes. Considering the source comment of @jmchilton Do I need to create duplicates of the tests using a mapper2 tool xml for the 21.01 profile? |
|
But in the end it seems a odd/wrong to me that access to variables in workflows might be inconsistent from tool to tool .. depending on their corresponding profile. |
|
I think that (the PJA rename) should be straightforward to fix if we always pass in the fully-prefixed versions. I've experimented a bit with this, and I think we can get away with something like which means we don't have to pass the profile version around, instead we always generate the fully prefixed version internally and generate the fallback for the param_dict. |
|
I spent the better part of today looking at this, and I suspect this isn't quite working as it should. It breaks for profile >= 21.01 and multiple="true" iteration in the command block, and it only works in other cases because the fallback that should only be used in rare cases (https://github.com/galaxyproject/galaxy/blob/dev/lib/galaxy/tools/evaluation.py#L288) saves the day. The code itself looks good and results in fully prefixed job parameters and JobToInputDatasetAssociations, which I think is a big plus if we can use that for all tool executions. I think we can handle unprefixed parameters in the params_dict. Given this fixes a bug, I will branch without this, but we should come back to it. |
|
fwiw that is where I stopped today: d1445c6 |
|
Hey @martenson .. just checked: The change is not in dev, but I can find it in the 21.05 branch. I'm confused how this happened. Should I revert it only on the 21.05 branch? |
Just thought to rebase this to keep the PR up to date. Should I just include your commit before doing this? |
|
Well that is confusing, one can hope that this was the only thing that is stuck there in the limbo. :/ |
I think it's also in dev? https://github.com/galaxyproject/galaxy/blob/dev/lib/galaxy/tool_util/xsd/galaxy.xsd#L2524-L2530 |
galaxyproject#11026 extended the description on how parameters in sections are referenced. this already included syntax that is not merged yet: galaxyproject#9493 this PR reverts this, see galaxyproject#9493 (comment)
So far the access to values of parameter in sections did not require to specify the full access path.
For
in format_source just
parwas used. With the change the access is format_sourcesec|par.In cheetah
$sec.paris already used.The problem was discovered for an automatic tool conversion where two parameters with the same name existed where one was in a section and the other wasn't. Then one did overwrite the other.
The text was updated successfully, but these errors were encountered: