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

Development: Add endpoints for build agent information in local continuous integration #7785

Merged
merged 17 commits into from
Dec 21, 2023

Conversation

laurenzfb
Copy link
Contributor

@laurenzfb laurenzfb commented Dec 12, 2023

Checklist

General

Server

  • Important: I implemented the changes with a very good performance and prevented too many (unnecessary) database calls.
  • I followed the coding and design guidelines.
  • I added pre-authorization annotations according to the guidelines and checked the course groups for all new REST Calls (security).

Motivation and Context

For admins, it might be interesting to get information on available build agents in local CI, e.g. number of build jobs currently running on an agent, build job capacity.

Description

This PR adds some REST endpoints to be later used for displaying build agent information on the client. Each hazelcast member adds itself to the list when the LocalCISharedBuildJobQueueService is initialized. The information is updated everytime a member processes a build job. When calling the endpoint, the list is updated to make sure that ex members who left the cluster will not be represented.

Steps for Testing

Prerequisites:

  • 1 Instructor
  • Programming exercise
  • Postman, logged in as admin user
  1. In Postman, GET /api/admin/build-job-queue/build-agents
    • On TS6, TS11 and locally, you should see one entry, on TS3 three entries (you might have to wait for a moments, until all nodes have registered)
    • numberOfCurrentBuildJobs should be 0 for all build agents
  2. Create some submissions for the programming exercise
  3. Check the endpoint again. Some build agents should have numberOfCurrentBuildJobs > 0

Testserver States

Note

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







Review Progress

Performance Review

  • I (as a reviewer) confirm that the server changes (in particular related to database calls) are implemented with a very good performance

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Copy link

⚠️ Unable to deploy to test servers ⚠️

Testserver "artemis-test3.artemis.cit.tum.de" is already in use by PR #7764.

@github-actions github-actions bot added the deployment-error Added by deployment workflows if an error occured label Dec 13, 2023
@laurenzfb laurenzfb added deploy:artemis-test3 and removed deployment-error Added by deployment workflows if an error occured labels Dec 13, 2023
@laurenzfb laurenzfb temporarily deployed to artemis-test3.artemis.cit.tum.de December 13, 2023 15:14 — with GitHub Actions Inactive
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 locally. Work as expected. Code also LGTM

Copy link
Contributor

@reschandreas reschandreas left a comment

Choose a reason for hiding this comment

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

demonstrated in testing session, works as expected. code also lgtm!

Copy link
Contributor

@RY997 RY997 left a comment

Choose a reason for hiding this comment

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

Tested in a testing session, worked as expected

Copy link
Contributor

@milljoniaer milljoniaer left a comment

Choose a reason for hiding this comment

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

Demonstrated in small testing session, works as expected 🚀

@krusche krusche added this to the 6.7.3 milestone Dec 21, 2023
@krusche krusche merged commit 173846b into develop Dec 21, 2023
38 of 42 checks passed
@krusche krusche deleted the development/build-agent-information-localci branch December 21, 2023 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:integrated code lifecycle ready to merge server Pull requests that update Java code. (Added Automatically!)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants