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
Added job scheduling page #23
base: main
Are you sure you want to change the base?
Conversation
@Med16-11 always rebase against latest main branch before filing a PR, or else there will likely be merge conflicts like what you see right now. |
src/pages/Schedule/index.js
Outdated
</button> | ||
</div> | ||
</div> | ||
{/* <div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check for things like commented code before committing :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I actually thought that we can use the commented code later to ensure that buttons are working properly and can write the logic in functions later.
Okay so a few things we can improve:
|
Got it. |
It seems like I have closed the PR accidentally. Could you please open it @kamoltat |
Thanks you for filling the change, here are some of the things I think can be improved:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Med16-11
Thanks for the change, I think with the table color being black it is hard to see in dark mode, might be worth also changing the border to white or light grey when in dark mode.
I realized that you have a merge commit, we can avoid that by doing:
Also, to keep the commits clean in your PR, you should try to squash your commits in to 1 commit whenever the change between the two commits serve the same purpose. You can do this by: commit your new change: In the interactive shell put an
Then it will redirect you to commit message , just edit the commit by deleting the random commit message you wrote and keep/edit the original commit message that you a squashing to. |
Pending merge conflict to be resolved |
On it. |
I'll be squashing all the commits after receiving your reviews. |
@Med16-11 Thanks for the table change the border looks good now for dark mode. |
@Med16-11 I've noticed that:
|
Okay, I'll look into it. |
@Med16-11 thanks for your new change,
|
@kamoltat @zmc @Med16-11
|
@VallariAg If I understand you correctly, you're suggesting we not allow/require the user to input the flag names in the "Key" column, and instead list all the available options and allow the user to fill in the ones they need. I think I agree with that. We could populate a This reminds me: at some point we'll want to be populating default values; perhaps we should add an endpoint to teuthology-api that provides these. |
@zmc that sounds perfect. I'll open an issue for adding an endpoint for default values on teuthology-api and using it on pulpito-ng. In teuthology meeting, we also discussed to disable editing on the command input above the table. We can focus on scheduling runs with the form table for now. I'll open a new issue for later enabling that feature. |
@zmc @VallariAg |
6ee907f
to
06e9202
Compare
This is Fixed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/components/Drawer/index.jsx
Outdated
<RouterLink to="/stats/nodes/lock" className={classes.drawerLink}> | ||
Node Locks Stats | ||
</RouterLink> | ||
<RouterLink to="/stats/nodes/jobs" className={classes.drawerLink}> | ||
Node Jobs Stats | ||
</RouterLink> | ||
<Divider /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this was maybe removed accidentally?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, let me add this back in my commit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just Added back and squashed the commit to the first commit. I removed the Divider, don't think we need that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! We can also probably disable "Run" and "Dry Run" Buttons if the user is not logged in. Or show a warning on top of schedule page.
3957229
to
1b77720
Compare
NOTE: I always forget to drop the eb58790 Nevermind, the PR for that commit is merged so it is no longer cherry-picked to my dev local branch |
5cefc09
to
aff5afd
Compare
In order, to test this PR properly, we need to modify the
(Edit: ceph/teuthology-api#48 resolved this) |
Signed-off-by: Med16-11 <singhmedhavi923@gmail.com> resolved conflits
Signed-off-by: Med16-11 <singhmedhavi923@gmail.com>
Signed-off-by: Zack Cerza <zack@redhat.com>
1. Rewrote the components with Material UI 2. Improved OnListener logics 3. Improved how we store data in useLocalStorage. Signed-off-by: Kamoltat Sirivadhna <ksirivad@redhat.com>
…ling suites Use axios post request to for run, dry-run and force-priority Signed-off-by: Kamoltat Sirivadhna <ksirivad@redhat.com>
screen-capture.mp4 |
console.log("Error: --user doesn't match username of current logged in account"); | ||
return false; | ||
} | ||
return await axios.post(url, commandValue, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kamoltat
In order to kill a run scheduled by pulpito-ng's schedule feature, teuthology would look for owner (which is set by "--owner"
parameter). If no "--owner"
is passed in teuthology-suite command, teuthology sets it as scheduled_<machine username>@<machine hostname>
.
In teuthology-api and pulpito-ng setup, I think it'll work out well if we set commandValue['--owner'] = github_username
on pulpito-ng before sending request to t-api. This way we would be able to recognise the owner as github username when we try to kill the run later.
Also, I think we can skip "--user" checks entirely since we merged https://github.com/ceph/teuthology-api/pull/47/files#diff-d64c10972091566c2a44e7e643a8e41b7a4781efb8cddb9516b0cfe320ff648f in which we set "--user" as github username in teuthology-api.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, new commit should address this.
ran into this error:
Therefore, I decided to change the name |
schedule feature uses useMutation to deal with cases like onSuccess, onError and isLoading. CircularProgress is added when button is clicked and mutation is in the state of isLoading. Signed-off-by: Kamoltat Sirivadhna <ksirivad@redhat.com>
1. After a run is scheduled, user will be able to see the results including the logs from teuthology-suite. Only success runs will show all logs from teuthology-suite, failed runs will only return the exception with descriptive failure reasons. 2. Added Warning Alerts for 0 jobs scheduled in a run 3. Added more arguments that can be use to schedule run Signed-off-by: Kamoltat Sirivadhna <ksirivad@redhat.com>
screen-capture.mp4
This PR is dependent on the following PRs:
ceph/teuthology-api#51
ceph/teuthology#1924
Testing this PR
please checkout -b the PRs above for teuthology and teuthology-api.
And in teuthology-api do