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

feature/#1197 pass job as metadata for event #1277

Merged

Conversation

toan-quach
Copy link
Member

Copy link
Contributor

github-actions bot commented May 10, 2024

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
18326 16061 88% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
taipy/core/_entity/_reload.py 100% 🟢
taipy/core/_orchestrator/_orchestrator.py 93% 🟢
taipy/core/notification/notifier.py 100% 🟢
taipy/core/submission/_submission_manager.py 98% 🟢
taipy/core/submission/submission.py 95% 🟢
taipy/gui_core/_context.py 58% 🟢
TOTAL 91% 🟢

updated for commit: e7bd8bf by action🐍

Copy link
Member

@jrobinAV jrobinAV left a comment

Choose a reason for hiding this comment

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

  • We are missing the unit tests covering the new code on both reload.py and submission.py modules.
  • Even if the code looks smart, I don't like giving the notification responsibility to the entity itself. For me, it should be the repository/self_setter layer.

We can discuss and try to challenge your solution to see if we can propose a better design.

}[
manager
] # type: ignore
}[manager] # type: ignore
Copy link
Member

Choose a reason for hiding this comment

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

WHy do we need to add a "# type: ignore" here?

Copy link
Member Author

Choose a reason for hiding this comment

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

apparently we don't need it!

Copy link
Member

Choose a reason for hiding this comment

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

We should remove it, then.

@toan-quach toan-quach force-pushed the feature/#1197-add-job-to-on-submission-change-event branch from 44e9311 to a47bac4 Compare May 15, 2024 04:44
@toan-quach toan-quach requested a review from jrobinAV May 16, 2024 07:02
EventOperation.UPDATE,
"submission_status",
submission._submission_status,
job_triggered_submission_status_changed=job.id,
Copy link
Member

Choose a reason for hiding this comment

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

This parameter name is exposed to the user through the event. It becomes an attribute of the event. We must find a better name. What about: "job_id"?

Copy link
Member Author

Choose a reason for hiding this comment

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

a bit vague imho, how about trigger_job_id?

Copy link
Member

Choose a reason for hiding this comment

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

it is a submission status change. I can't see any possible confusion using job_id instead of trigger_job_id. Plus, it is a technical consideration for me to add a prefix like trigger.

The event expresses a submission_status change for a submission entity due to a job update. I don't see any possible confusion.

What do you think? and @FlorianJacta?

Copy link
Member

Choose a reason for hiding this comment

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

I agree

@toan-quach toan-quach force-pushed the feature/#1197-add-job-to-on-submission-change-event branch from 95b902f to 73a2435 Compare May 22, 2024 03:29
@toan-quach toan-quach force-pushed the feature/#1197-add-job-to-on-submission-change-event branch from 2add572 to 7d827c5 Compare May 23, 2024 03:08
FredLL-Avaiga
FredLL-Avaiga previously approved these changes May 23, 2024
taipy/gui_core/_context.py Show resolved Hide resolved
taipy/gui_core/_context.py Show resolved Hide resolved
@toan-quach toan-quach linked an issue May 28, 2024 that may be closed by this pull request
2 tasks
@toan-quach toan-quach merged commit d490ef1 into develop May 28, 2024
153 checks passed
@toan-quach toan-quach deleted the feature/#1197-add-job-to-on-submission-change-event branch May 28, 2024 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG- Scenario Viewer - Job is not accessible in on_submission_change
4 participants