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

Integrated code lifecycle: Reduce build agent payload size #8281

Merged
merged 14 commits into from
Apr 3, 2024

Conversation

krusche
Copy link
Member

@krusche krusche commented Apr 1, 2024

Checklist

General

Server

  • Important: I implemented the changes with a very good performance and prevented too many (unnecessary) database calls.
  • I strictly followed the server coding and design guidelines.

Client

  • Important: I implemented the changes with a very good performance, prevented too many (unnecessary) REST calls and made sure the UI is responsive, even with large data.
  • I strictly followed the client coding and design guidelines.

Changes affecting Programming Exercises

  • High priority: I tested all changes and their related features with all corresponding user types on a test server configured with the integrated lifecycle setup (LocalVC and LocalCI).

Motivation and Context

The payload size over REST and web socket is too large when navigating to the build agent view

Description

  • We want to reduce the size to avoid issues
  • This PR also adds display of current builds and max build capacity
  • Fix a TypeScript issue
  • Improve DTO annotations
  • Unrelated changes
    1. Remove unused code
    2. Fix the console log settings for jest

Steps for Testing

Prerequisites:

  • 1 Instructor
  • 2 Students
  • 1 Programming Exercise
  1. Participate in programming exercises (using push and online code editor) in a course and in an exam
  2. Make sure the result display is correct
  3. Navigate to the build agent view (LocalCI), check that the result display is correct and double check the payload size for the REST call and for any web socket updates (in messages). Those should be reasonable and as small as possible without sending unnecessary information

Exam Mode Testing

Prerequisites:

  • 1 Instructor
  • 2 Students
  • 1 Exam with a Programming Exercise
  1. Log in to Artemis
  2. Participate in the exam as a student
  3. Make sure that the UI of the programming exercise in the exam mode stays unchanged. You can use the exam mode documentation as reference.
  4. ...

Testserver States

Note

These badges show the state of the test servers.
Green = Currently available, Red = Currently locked







Review Progress

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Exam Mode Test

  • Test 1
  • Test 2

Summary by CodeRabbit

  • New Features
    • Updated the getExercise function in participation.model.ts to retrieve exercises from programmingExercise and exercise properties.
  • Refactor
    • Removed the copyParticipationId method from various participation classes for improved handling.
  • Documentation
    • No changes.
  • Style
    • No changes.
  • Tests
    • No changes.
  • Bug Fixes
    • No changes.

@krusche krusche added this to the 6.9.6 milestone Apr 1, 2024
@github-actions github-actions bot added the server Pull requests that update Java code. (Added Automatically!) label Apr 1, 2024
@github-actions github-actions bot added the client Pull requests that update TypeScript code. (Added Automatically!) label Apr 1, 2024
@github-actions github-actions bot added the tests label Apr 1, 2024
@krusche krusche marked this pull request as ready for review April 1, 2024 16:40
@krusche krusche requested a review from a team as a code owner April 1, 2024 16:40
Copy link

coderabbitai bot commented Apr 1, 2024

Walkthrough

The recent changes involve the removal of the copyParticipationId() method from various classes within the Artemis platform. This adjustment affects how participation objects are managed for client-side operations across different participation types and includes enhancements to the display of online agents and build job status in the UI.

Changes

Files Change Summary
.../Participation.java
.../ParticipationInterface.java
.../ProgrammingExerciseStudentParticipation.java
.../SolutionProgrammingExerciseParticipation.java
.../StudentParticipation.java
.../TemplateProgrammingExerciseParticipation.java
Removed the copyParticipationId method from multiple participation-related classes. This impacts participation copying logic.
.../participation/participation.model.ts Updated getExercise function to handle ParticipationType.SOLUTION and ParticipationType.TEMPLATE for exercise retrieval.
.../build-agents/build-agents.component.html Introduced display enhancements for online agents and build job status in the UI, including adjustments to column widths and job display.
.../build-agents/build-agents.component.ts Added declarations for buildAgents, buildCapacity, and currentBuilds, and refactored methods for updating build agents and related calculations.

Possibly related issues

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

rstief
rstief previously approved these changes Apr 1, 2024
Copy link
Contributor

@rstief rstief left a comment

Choose a reason for hiding this comment

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

Code looks good 👍

JohannesWt
JohannesWt previously approved these changes Apr 2, 2024
Copy link
Contributor

@JohannesWt JohannesWt left a comment

Choose a reason for hiding this comment

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

Code looks good

@mateusmm01 mateusmm01 dismissed stale reviews from JohannesWt and rstief via 341f0d8 April 2, 2024 06:49
Copy link
Contributor

@mateusmm01 mateusmm01 left a comment

Choose a reason for hiding this comment

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

Tested on ts6 and localci-staging. Works as expected. All results are shown correctly!

mateusmm01
mateusmm01 previously approved these changes Apr 3, 2024
Copy link
Contributor

@mateusmm01 mateusmm01 left a comment

Choose a reason for hiding this comment

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

Code lgtm

laurenzfb
laurenzfb previously approved these changes Apr 3, 2024
Copy link
Contributor

@laurenzfb laurenzfb left a comment

Choose a reason for hiding this comment

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

tested on ts6, everything still works. submission within submissionResult for a recentBuildJob object now additionally contains a participation object, which is already present in the submissionResult (see screenshot). Is this intended?

image

@krusche krusche dismissed stale reviews from laurenzfb and mateusmm01 via 6b1c9b1 April 3, 2024 20:33
@krusche krusche merged commit 13fee2b into develop Apr 3, 2024
23 of 28 checks passed
@krusche krusche deleted the bugfix/reduce-build-agent-payload branch April 3, 2024 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client Pull requests that update TypeScript code. (Added Automatically!) ready for review server Pull requests that update Java code. (Added Automatically!) tests
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

5 participants