Repository navigation
Add global VoteSites synchronization workflow - #6
Conversation
|
You have reached your Codex usage limits for security reviews. Please try again later. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9142c8bbf6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (QUICK_SETUP.equals(domain) && VOTE_SITES_SYNC.equals(preset) && options.containsKey("sourceContent")) { | ||
| Map<String, String> visible = new LinkedHashMap<>(options); | ||
| visible.remove("sourceContent"); | ||
| return new ManagedConfiguration(domain, sendVotesToAllServers, blockedServers, fileName, content, | ||
| preset, visible); |
There was a problem hiding this comment.
Redact source YAML from successful result configurations
When a sync target returns its successful typed configuration with the submitted sourceContent, this method redacts only the operation's top-level configuration. ConfigurationOperations.boundedResult() retains the first successful non-file result configuration unchanged, and OperationView.results then exposes the complete source YAML through the operation API. Apply publicView() to retained sync result configurations as well so VoteSites secrets are not echoed.
Useful? React with 👍 / 👎.
| function syncSourceCandidates() { | ||
| return visibleNodeItems.filter(node => isBackend(node) && node.online && | ||
| node.acceptedCapabilities.includes('config.files.v1') && | ||
| node.acceptedCapabilities.includes('config.file-comments.v1')); | ||
| } | ||
|
|
||
| function syncTargetCandidates() { | ||
| return visibleNodeItems.filter(node => isBackend(node) && node.online && | ||
| node.acceptedCapabilities.includes('config.vote-sites-sync.v1')); |
There was a problem hiding this comment.
Load sync candidates beyond the current node page
In installations with more than 100 registered nodes, both candidate lists are derived only from visibleNodeItems, which is the current /nodes?offset=...&limit=100 page. Changing pages replaces that array and also discards the previous source and targets, so a source on one page cannot be synchronized to a target on another page despite this being a global workflow. Fetch or retain eligible candidates across pages, or provide a dedicated unpaginated/batched selector.
Useful? React with 👍 / 👎.
| const targetIds = new Set(targetsAvailable.map(node => node.nodeId)); | ||
| voteSitesTargetIds = new Set([...voteSitesTargetIds].filter(nodeId => | ||
| targetIds.has(nodeId) && nodeId !== voteSitesSourceId)); |
There was a problem hiding this comment.
Invalidate in-flight previews when refresh removes targets
If Refresh runs while the sync preview is polling and a target goes offline or loses its sync capability, this filtering silently removes it without incrementing inputGeneration. The completed preview therefore still passes the generation check and stores an approval containing the original target IDs; apply can subsequently queue that stale target because createApply does not revalidate capabilities. Clear/invalidate the in-flight preview whenever this filtering changes the selected target set.
Useful? React with 👍 / 👎.
💡 Codex ReviewVotingPlugin-Control/src/main/resources/web/app.js Lines 483 to 484 in 0fbded0 After the new all-page node load, deployments with more than 100 eligible sync targets select every target by default, but VotingPlugin-Control/src/main/resources/web/app.js Lines 470 to 472 in 0fbded0 If Refresh makes the selected source ineligible after its read finishes but while target preview polling is still running, this branch silently substitutes another source without incrementing VotingPlugin-Control/src/main/resources/web/app.js Lines 814 to 816 in 0fbded0 Each ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
# Conflicts: # src/main/resources/web/app.js
|
Stack follow-up:
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Final stack follow-up:
AI-assisted implementation; changes and stack ancestry were reviewed before publication. @codex review |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
config.vote-sites-sync.v1and add a Network-tab source/target workflowVoteSites.ymlfrom one comment-preserving backend, then preview the merge on selected targetsSafety
Validation
node --check src/main/resources/web/app.jsgit diff --check