Skip to content

Ruigao/list disappeared vc jobs#112

Merged
hippogr merged 11 commits into
devfrom
ruigao/list_disappeared_vc_jobs
Jan 20, 2026
Merged

Ruigao/list disappeared vc jobs#112
hippogr merged 11 commits into
devfrom
ruigao/list_disappeared_vc_jobs

Conversation

@hippogr

@hippogr hippogr commented Oct 29, 2025

Copy link
Copy Markdown
Contributor

List user's history jobs which in the virtual clusters that have been removed from the service.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for tracking and using historical Virtual Cluster (VC) access for users. When users query their jobs, they can now see jobs from VCs they previously had access to, not just their current VCs.

Key changes:

  • Added history_vclist field to user schema to store historical VC access
  • Implemented getHistoryVCs() function that retrieves VCs from user's job history and group memberships
  • Modified job listing logic to include historical VCs alongside current VCs

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/rest-server/src/utils/manager/user/user.js Added history_vclist field to user schema validation
src/rest-server/src/utils/manager/user/crudK8sSecret.js Implemented getHistoryVCs() function and updated create/read/update operations to populate and persist historical VC list
src/rest-server/src/models/v2/job/k8s.js Added listVCsFromJob() function to retrieve unique VCs from a user's job history
src/rest-server/src/controllers/v2/user.js Added getUserHistoryVCs() controller function and initialized history_vclist in user creation
src/rest-server/src/controllers/v2/job.js Updated job list logic to merge current and historical VCs for filtering
Comments suppressed due to low confidence (1)

src/rest-server/src/controllers/v2/job.js:53

  • Variable currentvcs is used like a local variable, but is missing a declaration.
    currentvcs = await userController.getUserVCs(username);

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/rest-server/src/utils/manager/user/crudK8sSecret.js Outdated
Comment thread src/rest-server/src/controllers/v2/job.js Outdated
Comment thread src/rest-server/src/controllers/v2/job.js Outdated
Comment thread src/rest-server/src/controllers/v2/job.js
Comment thread src/rest-server/src/models/v2/job/k8s.js
Comment thread src/rest-server/src/utils/manager/user/crudK8sSecret.js
Comment thread src/rest-server/src/utils/manager/user/crudK8sSecret.js
Comment thread src/rest-server/src/utils/manager/user/crudK8sSecret.js
@yukirora

yukirora commented Nov 4, 2025

Copy link
Copy Markdown
Contributor

and here is a question, if a user had one vc, but currently the vcs still work, but admin delete this user from this vc, under current design, it still has access to this vc's jobs, this seems not make sense

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 9 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/rest-server/src/utils/manager/user/crudK8sSecret.js Outdated
Comment thread src/rest-server/src/utils/manager/user/crudK8sSecret.js Outdated
Comment thread src/rest-server/src/utils/manager/user/crudK8sSecret.js Outdated
Comment thread src/rest-server/src/utils/manager/user/crudK8sSecret.js Outdated
Comment thread src/rest-server/src/utils/manager/user/crudK8sSecret.js Outdated
Comment thread src/rest-server/src/controllers/v2/job.js Outdated
Comment thread src/rest-server/src/controllers/v2/job.js Outdated
Comment thread src/rest-server/src/controllers/v2/job.js Outdated
Comment thread src/rest-server/src/controllers/v2/job.js Outdated
@hippogr

hippogr commented Jan 15, 2026

Copy link
Copy Markdown
Contributor Author

For help reviewers' better understanding: this PR is used for the user to access the jobs which are in the VCs that are not existing anymore. The basic logic is that we add a history VC list in user info, which remembers all the VCs the users used to be included in. When the user requests the job list, the jobs which are in both current VCs and history VCs will be retrieved from the database and return the user. These history jobs can be accessed in detail, and their logs can be accessed by its owner too.

@zhogu @abuccts

@hippogr
hippogr force-pushed the ruigao/list_disappeared_vc_jobs branch from de4b412 to abba159 Compare January 20, 2026 08:35
@hippogr
hippogr merged commit 381cf37 into dev Jan 20, 2026
3 checks passed
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.

4 participants