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

BUG- Scenario Viewer - Job is not accessible in on_submission_change #1197

Closed
2 tasks
FlorianJacta opened this issue Apr 17, 2024 · 3 comments · Fixed by #1277
Closed
2 tasks

BUG- Scenario Viewer - Job is not accessible in on_submission_change #1197

FlorianJacta opened this issue Apr 17, 2024 · 3 comments · Fixed by #1277
Assignees
Labels
Core Related to Taipy Core 🖰 GUI Related to GUI 💥Malfunction Addresses an identified problem. 🟧 Priority: High Must be addressed as soon 🥶Waiting for contributor Issues or PRs waiting for a long time
Milestone

Comments

@FlorianJacta
Copy link
Member

Description
There are no keys for the 'job' in the details variable. We cannot provide correct user feedback.

This is not in line with the doc.
image

How to reproduce

from taipy.config import Config
import taipy as tp
from taipy.gui import Gui, notify

Config.configure_job_executions(mode="standalone")


# Normal function used by Taipy
def double(nb):
    return nb * 2


# Configuration of Data Nodes
input_cfg = Config.configure_data_node(id="somedata", default_data=21)
output_cfg = Config.configure_data_node(id="result")


# Configuration of tasks
first_task_cfg = Config.configure_task(id="double",
                                       function=double,
                                       input=input_cfg,
                                       output=output_cfg)


# Configuration of scenario
scenario_cfg = Config.configure_scenario(id="my_scenario",
                                         task_configs=[first_task_cfg],
                                         name="my_scenario")



def notify_from_submissions(state, submittable, details):
    print(details.keys())

if __name__=="__main__":
    tp.Core().run()
    scenario_1 = tp.create_scenario(scenario_cfg)

    scenario_md = """
<|{scenario_1}|scenario|on_submission_change=notify_from_submissions|>
"""
    Gui(scenario_md).run()

image

Expected behavior
There should be the job that changes the status of the scenario.

Runtime environment

  • Taipy: 3.1.1

Acceptance Criteria

  • Ensure new code is unit tested, and check code coverage is at least 90%
  • Create related issue in taipy-doc for documentation and Release Notes if relevant
@FlorianJacta FlorianJacta added Core Related to Taipy Core 🖰 GUI Related to GUI 💥Malfunction Addresses an identified problem. 🟧 Priority: High Must be addressed as soon labels Apr 17, 2024
@FlorianJacta FlorianJacta changed the title BUG- Job is not accessible in on_submission_change BUG- Scenario Viewer - Job is not accessible in on_submission_change Apr 17, 2024
@jrobinAV
Copy link
Member

We need to add non-regression unit tests for these kinds of issues.

@trgiangdo trgiangdo added this to the Community 3.2 milestone Apr 24, 2024
@toan-quach toan-quach self-assigned this May 6, 2024
@toan-quach
Copy link
Member

@jrobinAV this is due to the event publication is relying on the self_setter which only publish the attribute name and no extra information to go with it. In this case, we have to either change the documentation or find a way to change the self_setter function entirely

Copy link
Contributor

This issue has been labelled as "🥶Waiting for contributor" because it has been inactive for more than 14 days. If you would like to continue working on this issue, please add another comment or create a PR that links to this issue. If a PR has already been created which refers to this issue, then you should explicitly mention this issue in the relevant PR. Otherwise, you will be unassigned in 14 days. For more information please refer to the contributing guidelines.

@github-actions github-actions bot added the 🥶Waiting for contributor Issues or PRs waiting for a long time label May 22, 2024
@toan-quach toan-quach linked a pull request May 28, 2024 that will close this issue
toan-quach added a commit that referenced this issue May 28, 2024
…ission-change-event

feature/#1197 pass job as metadata for event
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Related to Taipy Core 🖰 GUI Related to GUI 💥Malfunction Addresses an identified problem. 🟧 Priority: High Must be addressed as soon 🥶Waiting for contributor Issues or PRs waiting for a long time
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants