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

tool version loading loop in the toolform #18848

Open
martenson opened this issue Sep 19, 2024 · 5 comments
Open

tool version loading loop in the toolform #18848

martenson opened this issue Sep 19, 2024 · 5 comments

Comments

@martenson
Copy link
Member

martenson commented Sep 19, 2024

Animation of the disturbing version switching I see on tool kegalign, this is without any interaction from the user. I cannot reproduce this on other tools I tried. It can happen either on load or after you switch the version manually.

The tool kegalign has been updated in the last hour (with its second version, so it did not have version switching before) -- so there may be a connection.

kegalign-version


logs

Screenshot 2024-09-19 at 11 24 10 AM

logs


Galaxy Version and/or server at which you observed the bug
Galaxy version 24.1.2.dev0, commit f9703e1d4aca18a4a4462dd4a7a2c05596dd8358

Browser and Operating System
macos chrome

@mvdbeek
Copy link
Member

mvdbeek commented Sep 19, 2024

The tool kegalign has been updated in the last hour

Indeed. The safe way to fix this is to restart the instance. Most of the time curl -X 'PUT' https://usegalaxy.org/api/configuration/toolbox -H "x-api-key: $your_admin_key" is gonna work.

@mvdbeek
Copy link
Member

mvdbeek commented Sep 19, 2024

I guess we shouldn't load the tool form that often though, that would be something to fix.

@dannon
Copy link
Member

dannon commented Sep 24, 2024

xref meeting/ The quick reloading may be due to the differing response received, calling an update as soon as the form loads the new (or old) version over top.

Should make sure we can't submit an incorrect job configuration for run -- job might just fail. Hopefully we record the tool version during hte job submission process and run the exact version submitted.

@mvdbeek
Copy link
Member

mvdbeek commented Oct 4, 2024

We're building the tool form twice currently, on every new tool form we navigate to.

diff --git a/client/src/components/Form/FormDisplay.vue b/client/src/components/Form/FormDisplay.vue
index e51dfe7e39..94029923c1 100644
--- a/client/src/components/Form/FormDisplay.vue
+++ b/client/src/components/Form/FormDisplay.vue
@@ -139,10 +139,7 @@ export default {
     },
     created() {
         this.onCloneInputs();
-        // build flat formData that is ready to be submitted
-        this.formData = this.buildFormData();
-        // emit back to parent, so that parent has submittable data
-        this.$emit("onChange", this.formData);
+        this.onChange();
         // highlight initial warnings
         this.onWarnings();
         // highlight initial errors

fixes it but I didn't have time to look into it more.

@davelopez
Copy link
Contributor

Thank you Marius!

I'm investigating this. Just to be sure, are we supposed to build the tool form for every data input of the tool or just once and then when something changes?

I've observed this after adding a bunch of inputs to cat_data_and_sleep for testing and then reloading.

image

So if we have N inputs it will call api/tools/cat_data_and_sleep/build N+1 times. Where the first time it will pass these query parameters ?version=latest&tool_version=latest with no payload and the next N times it will pass the following payload:

Payload
{
    "tool_id": "cat_data_and_sleep",
    "tool_version": "latest",
    "inputs": {
        "sleep_time": "0",
        "input1": {
            "batch": false,
            "product": false,
            "values": [
                {
                    "id": "031d15afc6e5ae18",
                    "src": "hda",
                    "map_over_type": null
                }
            ]
        },
        "input2": {
            "batch": false,
            "product": false,
            "values": [
                {
                    "id": "031d15afc6e5ae18",
                    "src": "hda",
                    "map_over_type": null
                }
            ]
        },
        "input3": {
            "values": [
                {
                    "id": "031d15afc6e5ae18",
                    "src": "hda"
                }
            ]
        },
        "input4": {
            "values": [
                {
                    "id": "031d15afc6e5ae18",
                    "src": "hda"
                }
            ]
        },
        "input5": {
            "values": [
                {
                    "id": "031d15afc6e5ae18",
                    "src": "hda"
                }
            ]
        },
        "input6": {
            "values": [
                {
                    "id": "031d15afc6e5ae18",
                    "src": "hda"
                }
            ]
        },
        "input7": {
            "values": [
                {
                    "id": "031d15afc6e5ae18",
                    "src": "hda"
                }
            ]
        },
        "input8": {
            "values": [
                {
                    "id": "031d15afc6e5ae18",
                    "src": "hda"
                }
            ]
        },
        "input9": {
            "values": [
                {
                    "id": "031d15afc6e5ae18",
                    "src": "hda"
                }
            ]
        },
        "input10": {
            "values": [
                {
                    "id": "031d15afc6e5ae18",
                    "src": "hda"
                }
            ]
        },
        "input11": {
            "values": [
                {
                    "id": "031d15afc6e5ae18",
                    "src": "hda"
                }
            ]
        }
    },
    "history_id": null
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants