Loading
Commits on Source 19
-
Maina Ng'ang'a authored
- Generate base command using cobra-cli - Register as subcommand of patch - Add patch-id argument placeholder - Verify basic command execution Related Issue: https://gitlab.com/gitlab-com/gl-infra/delivery/-/issues/21502
-
Maina Ng'ang'a authored
Add methods to find patch application commits and extract old values: - tissue.Client.FindPatchApplicationCommit: searches commit history with pagination - tissue.Client.GetCommitDiff: retrieves commit diffs - patch.ExtractOldValues: parses diffs to extract previous attribute values The revert command now successfully: - Retrieves patch metadata - Finds the commit that applied the patch - Extracts old attribute values from git diff - Logs all extracted data for verification Next: Create revert patch operations and execute deletion/creation Related: https://gitlab.com/gitlab-com/gl-infra/delivery/-/issues/21502
-
Maina Ng'ang'a authored
Enhance patch MR template to distinguish revert operations: - Add conditional logic to show revert context in MR description - Parse original patch ID from RelatedTo field - Use Origin field to detect revert patches - No signature changes to createPatchMergeRequest MR descriptions now show: - Standard patches: 'adds the patch ID...' - Revert patches: 'reverts patch X by deleting it and creating...' Verified: MR https://ops.gitlab.net/gitlab-com/gl-infra/cells/tissue/-/merge_requests/1142 shows correct revert description Related: https://gitlab.com/gitlab-com/gl-infra/delivery/-/issues/21502
-
Maina Ng'ang'a authored
- Extract extractValuesFromCellFile helper to reduce nesting - Use JSON parsing instead of regex for old value extraction - Use SearchCommits API instead of pagination - Add proper error handling for all operations Related: https://gitlab.com/gitlab-com/gl-infra/delivery/-/issues/21502
-
Maina Ng'ang'a authored
Add table-driven tests covering: - CreateRevertOperations: operation creation logic - extractValuesFromCellFile: JSON parsing and extraction - ExtractOldValues: complete value extraction flow - FindPatchApplicationCommit: commit search logic All tests use mocked GitLab API responses following existing ringctl testing patterns. Related: https://gitlab.com/gitlab-com/gl-infra/delivery/-/issues/21502
-
Maina Ng'ang'a authored
-
Maina Ng'ang'a authored
-
Maina Ng'ang'a authored
Add `ringctl patch invert` to automate patch inversion during incident response. Extracts old values from git history, creates invert patch with commit references, and deletes failed patch in single MR. Key changes: - Add InvertInfo struct (patch ID, applied SHA, parent SHA) - Implement ExtractOldValues using Compare API and JSON parsing - Add FindPatchApplicationCommit using Search API - Enhance MR template with clickable commit links - Add 9 comprehensive unit tests - Validate only 'replace' operations (fail fast on others) Related: https://gitlab.com/gitlab-com/gl-infra/delivery/-/issues/21502
-
Maina Ng'ang'a authored
-
Maina Ng'ang'a authored
Add `ringctl patch invert` to automate patch inversion during incident response. Extracts old values from git history, creates invert patch with commit references, and deletes failed patch in single MR. Key changes: - Add InvertInfo struct (patch ID, applied SHA, parent SHA) - Implement ExtractOldValues using Compare API and JSON parsing - Add FindPatchApplicationCommit using Search API - Enhance MR template with clickable commit links - Add 9 comprehensive unit tests - Validate only 'replace' operations (fail fast on others) Related: https://gitlab.com/gitlab-com/gl-infra/delivery/-/issues/21502
-
Maina Ng'ang'a authored
-
Maina Ng'ang'a authored
-
Maina Ng'ang'a authored
Add `ringctl patch invert` to automate patch inversion during incident response. Extracts old values from git history, creates invert patch with commit references, and deletes failed patch in single MR. Key changes: - Add InvertInfo struct (patch ID, applied SHA, parent SHA) - Implement ExtractOldValues using Compare API and JSON parsing - Add FindPatchApplicationCommit using Search API - Enhance MR template with clickable commit links - Add 9 comprehensive unit tests - Validate only 'replace' operations (fail fast on others) Related: https://gitlab.com/gitlab-com/gl-infra/delivery/-/issues/21502
-
Maina Ng'ang'a authored
-
Maina Ng'ang'a authored
Add `ringctl patch invert` to automate patch inversion during incident response. Extracts old values from git history, creates invert patch with commit references, and deletes failed patch in single MR. Key changes: - Add InvertInfo struct (patch ID, applied SHA, parent SHA) - Implement ExtractOldValues using Compare API and JSON parsing - Add FindPatchApplicationCommit using Search API - Enhance MR template with clickable commit links - Add 9 comprehensive unit tests - Validate only 'replace' operations (fail fast on others) Related: https://gitlab.com/gitlab-com/gl-infra/delivery/-/issues/21502
-
Maina Ng'ang'a authored
-
Maina Ng'ang'a authored
-
Maina Ng'ang'a authored
-
Siddharth Kannan authored
feat: add `ringctl patch invert` command, supporting inversion of the `replace` operation See merge request !361