From 2f9541a9e20a12b0b430d96fc750e4a95623c99f Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Wed, 26 Nov 2025 14:36:24 +0100 Subject: [PATCH] plugin: Added message type 28 as sticky type --- README.md | 3 +++ libs/gl-plugin/.kacl.yml | 52 ++++++++++++++++++++++++++++++++++++ libs/gl-plugin/CHANGELOG.md | 11 ++++++++ libs/gl-plugin/src/stager.rs | 18 ++++++++----- 4 files changed, 78 insertions(+), 6 deletions(-) create mode 100644 libs/gl-plugin/.kacl.yml create mode 100644 libs/gl-plugin/CHANGELOG.md diff --git a/README.md b/README.md index aedf372ed..631e1ef26 100644 --- a/README.md +++ b/README.md @@ -44,14 +44,17 @@ present at a time, freeing others from that duty. The easiest way to begin using __Greenlight__ is with its command-line interface `glcli`. You can install it directly from __crates.io__ by running: + ```bash cargo install gl-cli ``` Once installed execute: + ```bash glcli --help ``` + This command will display an overview of all available commands. For additional details and usage examples, refer to `glcli` [README][glcli-doc]. diff --git a/libs/gl-plugin/.kacl.yml b/libs/gl-plugin/.kacl.yml new file mode 100644 index 000000000..6ce4f7a36 --- /dev/null +++ b/libs/gl-plugin/.kacl.yml @@ -0,0 +1,52 @@ +kacl: + file: CHANGELOG.md + allowed_header_titles: + - Changelog + - Change Log + allowed_version_sections: + - Added + - Changed + - Deprecated + - Removed + - Fixed + - Security + default_content: + - All notable changes to this project will be documented in this file. + - The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + release: + add_unreleased: True + git: + commit: False + commit_message: "[skip ci] Releasing Changelog version {new_version}" + commit_additional_files: [] + tag: False + tag_name: "v{new_version}" + tag_description: "Version v{new_version} released" + links: + auto_generate: False + compare_versions_template: '{host}/compare/{previous_version}...{version}' + unreleased_changes_template: '{host}/compare/{latest_version}...master' + initial_version_template: '{host}/tree/{version}' + extension: + post_release_version_prefix: null + issue_tracker: + jira: + host: null + username: null + password: null + issue_patterns: ["[A-Z]+-[0-9]+"] + comment_template: | + # 🚀 New version [v{new_version}]({link}) + + A new release has been created referencing this issue. Please check it out. + + ## 🚧 Changes in this version + + {changes} + + ## 🧭 Reference + + Code: [Source Code Management System]({link}) + stash: + directory: .kacl_stash + always: False diff --git a/libs/gl-plugin/CHANGELOG.md b/libs/gl-plugin/CHANGELOG.md new file mode 100644 index 000000000..2cc5906bd --- /dev/null +++ b/libs/gl-plugin/CHANGELOG.md @@ -0,0 +1,11 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## Unreleased + +### Changed + +- Added message type 28 (`hsmd_check_pubkey`) to the list of sticky signer request. diff --git a/libs/gl-plugin/src/stager.rs b/libs/gl-plugin/src/stager.rs index e43cc2f0c..b3ac06758 100644 --- a/libs/gl-plugin/src/stager.rs +++ b/libs/gl-plugin/src/stager.rs @@ -98,16 +98,22 @@ impl Stage { } pub async fn is_stuck(&self) -> bool { - let sticky = self + let sticky_types: Vec = vec![5, 28]; + let sticky: Vec = self .requests .lock() .await .values() - .filter(|r| r.request.raw[0..2] == [0u8, 5]) - .count(); - - trace!("Found {sticky} sticky requests."); - sticky != 0 + .filter(|r| { + let head: [u16; 2] = [r.request.raw[0].into(), r.request.raw[1].into()]; + let typ = head[0] << 8 | head[1]; + sticky_types.contains(&typ) + }) + .map(|r| r.clone()) + .collect(); + + trace!("Found {:?} sticky requests.", sticky); + sticky.len() != 0 } }