Hub 2.19.0: the server agent's releases; Update agent picks one
- AgentRelease (migration 20261123150000_agent_release): the agent's releases, apart from the products' so licences and billing are untouched. - Release sources can be for the Server agent; the defaults include it (monorepo agent@ tags, apps/agent/WHATS-NEW.md). Same sync rules as products. A saved list without it gets an "Add the agent's source" button on the Releases page. - GET /api/admin/agent-releases; server summaries carry agentLatest; update-agent jobs go to a known agent release, the latest when none is asked for (agentTag). - Update agent is a ReleaseSelect with the chosen version's notes; the Servers list and a server's page say when a newer agent is out; the Releases page shows agent releases (Server agent filter, Everything newest first by date). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -20,7 +20,7 @@ const { render } = require('./emailLayout');
|
||||
const { getSettings } = require('./settings');
|
||||
const { PRODUCT_NAMES } = require('./products');
|
||||
const { generateLicence } = require('./licences');
|
||||
const { unmetRequirements, unmetRequirementsFor } = require('./releases');
|
||||
const { unmetRequirements, unmetRequirementsFor, agentTag } = require('./releases');
|
||||
const { searchTerm } = require('./paging');
|
||||
const { compareVersions } = require('./alerts');
|
||||
const servers = require('./servers');
|
||||
@@ -1526,6 +1526,8 @@ async function queueCentralCheck(ports, now = new Date()) {
|
||||
/** Any job by hand (status, restart): no notice, runs at once. */
|
||||
async function runNow({ serverId, type, args, deploymentId = null }, admin, now = new Date()) {
|
||||
if (!['status', 'restart', 'check-ports', 'update-agent'].includes(type)) throw fail(400, 'BAD_REQUEST', `${type} jobs are made from their own pages.`);
|
||||
// Hub 2.19.0: an agent update is to a known agent release, the latest when none is asked for.
|
||||
if (type === 'update-agent') args = { version: await agentTag(args?.version) };
|
||||
return makeJob(prisma, { serverId, type, args, deploymentId, createdById: admin?.id || null, notBefore: now });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user