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

[ZEPPELIN-6140] Add logs to the runParagraph method #4889

Merged

Conversation

ParkGyeongTae
Copy link
Contributor

What is this PR for?

This involves revising the description of the runParagraph method and adding clear logs for each step.

What type of PR is it?

Improvement

Todos

  • - NotebookService.java

What is the Jira issue?

How should this be tested?

  • Debugging

Screenshots (if appropriate)

image

Questions:

  • Does the license files need to update? No.
  • Is there breaking changes for older versions? No.
  • Does this needs documentation? No.

Copy link
Contributor

@Reamer Reamer left a comment

Choose a reason for hiding this comment

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

Only minor changes. A uniform appearance in the logs is important to me. We should avoid using “Paragraph with ID xzy” once and “Paragraph xyz” once.

if (note == null) {
LOGGER.info("Failed to run paragraph: Note is null");
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
LOGGER.info("Failed to run paragraph: Note is null");
LOGGER.info("Failed to run paragraph {}, Note is null", paragraphId);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Reamer
I have completed this task. :)

return false;
}
LOGGER.info("Start to run paragraph: {} of note: {}", paragraphId, note.getId());
if (!checkPermission(note.getId(), Permission.RUNNER, Message.OP.RUN_PARAGRAPH, context, callback)) {
LOGGER.info("Permission check failed for running paragraph: {} of note: {}", paragraphId, note.getId());
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
LOGGER.info("Permission check failed for running paragraph: {} of note: {}", paragraphId, note.getId());
LOGGER.info("Permission check failed for running paragraph {} of note {}", paragraphId, note.getId());

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Reamer
I have completed this task. :)

Paragraph p = note.getParagraph(paragraphId);

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Reamer
I have completed this task. :)

if (p == null) {
LOGGER.info("Paragraph with ID {} not found in note: {}", paragraphId, note.getId());
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
LOGGER.info("Paragraph with ID {} not found in note: {}", paragraphId, note.getId());
LOGGER.info("Paragraph {} not found in note {}", paragraphId, note.getId());

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Reamer
I have completed this task. :)

Copy link
Contributor

@Reamer Reamer left a comment

Choose a reason for hiding this comment

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

LGTM

@Reamer Reamer merged commit 50e23f3 into apache:master Nov 11, 2024
16 of 17 checks passed
asfgit pushed a commit that referenced this pull request Nov 11, 2024
### What is this PR for?
This involves revising the description of the runParagraph method and adding clear logs for each step.

### What type of PR is it?
Improvement

### Todos
* [x] - NotebookService.java

### What is the Jira issue?
* https://issues.apache.org/jira/projects/ZEPPELIN/issues/ZEPPELIN-6140

### How should this be tested?
* Debugging

### Screenshots (if appropriate)
![image](https://github.com/user-attachments/assets/a833a92f-1a0b-42e5-9b3c-084fa351a4c7)

### Questions:
* Does the license files need to update? No.
* Is there breaking changes for older versions? No.
* Does this needs documentation? No.

Closes #4889 from ParkGyeongTae/add-logs-to-the-runparagraph-method.

Signed-off-by: Philipp Dallig <[email protected]>
@Reamer
Copy link
Contributor

Reamer commented Nov 11, 2024

Merged into master/branch-0.12

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

Successfully merging this pull request may close these issues.

2 participants