RU2851031C1 - Method and system for automated management of application releases - Google Patents
Method and system for automated management of application releasesInfo
- Publication number
- RU2851031C1 RU2851031C1 RU2024136207A RU2024136207A RU2851031C1 RU 2851031 C1 RU2851031 C1 RU 2851031C1 RU 2024136207 A RU2024136207 A RU 2024136207A RU 2024136207 A RU2024136207 A RU 2024136207A RU 2851031 C1 RU2851031 C1 RU 2851031C1
- Authority
- RU
- Russia
- Prior art keywords
- application
- submetric
- value
- metric
- solidarity
- Prior art date
Links
Abstract
Description
ОБЛАСТЬ ТЕХНИКИAREA OF TECHNOLOGY
[001] Представленное техническое решение, в общем, относится к области проектирования программно-аппаратных решений, а в частности к способу и системе автоматизированного управления релизами приложений с целью предотвращения деплоя некачественных релизов.[001] The presented technical solution generally relates to the field of designing software and hardware solutions, and in particular to a method and system for automated management of application releases with the aim of preventing the deployment of low-quality releases.
УРОВЕНЬ ТЕХНИКИLEVEL OF TECHNOLOGY
[002] Из уровня техники известны различные решения, направленные на диагностику программного кода.[002] Various solutions aimed at diagnosing program code are known from the prior art.
[003] Например, известны способ и система проверки архитектуры программно-аппаратного решения, раскрытые в патенте RU 2783724 C1, опубл. 16.11.2022. Принцип, заложенный в данном способе и системе - выявление анализатором из тех или иных артефактов (например, бинарных файлов дистрибутивов, исходного кода и его лексического, синтаксического, семантического анализа, анализа данных и метрик, экспертных заключений, конфигурационных файлов, результатов анализа ИИ), описывающих архитектуру, - свойств, с последующим формированием реверсивной архитектуры и цифрового стандарта требований архитектурного контроля и далее - их сличение с получением данных соответствия предлагаемой (реверсивной) архитектуры требованиям. Однако, недостаток данного способа и системы заключается в том, что конечным результатом способа является информация проверки соответствия, не влияющая как на собственную последующую работу системы с целью изменения (повышения) качества ее работы, так и на управляемые с помощью нее иные системы, т е является простым условным конечным автоматом по своей сути, также алгоритм работает с другим типом данных и конечный результат несет иную функцию (информирующую).[003] For example, a method and system for checking the architecture of a software and hardware solution are known, disclosed in patent RU 2783724 C1, published on 16.11.2022. The principle underlying this method and system is the identification by an analyzer from certain artifacts (for example, binary files of distributions, source code and its lexical, syntactic, semantic analysis, data and metrics analysis, expert opinions, configuration files, AI analysis results) describing the architecture - properties, followed by the formation of a reverse architecture and a digital standard of architectural control requirements and then their comparison with the receipt of data on the compliance of the proposed (reverse) architecture with the requirements. However, the disadvantage of this method and system is that the final result of the method is compliance verification information that does not affect either the subsequent operation of the system itself in order to change (improve) the quality of its operation, or other systems controlled by it, i.e. it is a simple conditional finite state machine in its essence, the algorithm also works with a different type of data and the final result has a different function (informative).
[004] Также известны способ и система выявления эксплуатируемых уязвимостей в программном коде на основе машинного обучения, описанные в патенте RU 2790005 C1, опубл. 14.02.2023. Способ и система основаны на поэтапном получении данных об уязвимостях в коде, последующем построении вектора атаки на основе этих данных, типизации уязвимости в исходном коде с последующим преобразованием в AST-дерево, далее анализатор производит поиск элемента вектора атаки по координатам в AST-дереве, фиксирует пути между найденными элементами, далее из элементов пути формируется векторное представление и производится машинное обучение (МО) данному пути (векторному представлению) для того, чтобы выявить почерк эксплуатируемых уязвимостей. Цели, которых достигает решение - значительное сокращение ручных трудозатрат, повышение точности выявления за счет автоматизации анализа способом МО и сокращение ошибок ручной работы (человеческого фактора).[004] Also known are a method and system for identifying exploitable vulnerabilities in software code based on machine learning, described in patent RU 2790005 C1, published 02/14/2023. The method and system are based on the step-by-step acquisition of data on vulnerabilities in the code, the subsequent construction of an attack vector based on this data, the typification of the vulnerability in the source code with subsequent transformation into an AST tree, then the analyzer searches for an element of the attack vector by coordinates in the AST tree, records the paths between the found elements, then a vector representation is formed from the path elements and machine learning (ML) is performed on this path (vector representation) in order to identify the signature of exploited vulnerabilities. The goals achieved by the solution are a significant reduction in manual labor costs, an increase in the accuracy of detection due to the automation of analysis using the ML method and a reduction in manual errors (human factor).
[005] Однако известное решение не способно выявить проблемы системного характера, такие как понижение производительности/прерывания работоспособности для конечных пользователей, стилистические отклонения в написании кода, влекущие за собой потерю соответствия стандартам и потерю гибкости изменения/масштабирования вследствие отклонения от стандартов, т.е. не заложено управление качеством. В способе также не заложен подход к реализации ускоренной диагностики проблем безопасности кода комплексно, в составе интеграции/релиза на основе метрик (только проводится анализ кода на наличие уязвимостей), использует другой метод анализа (МО). Кроме того, способ не выявляет потенциальных проблем и сбоев с облачным биллингом на платформе, вследствие чего Компания может понести репутационные риски и финансовый ущерб как собственный, так и одновременно сразу большого числа своих Клиентов.[005] However, the existing solution is unable to identify systemic issues such as performance degradation/interruptions for end users, stylistic deviations in code that lead to loss of compliance with standards, and loss of flexibility in modification/scaling due to deviations from standards—i.e., quality management is not integrated. The method also lacks an approach for implementing accelerated diagnostics of code security issues comprehensively, as part of metrics-based integration/release (it only analyzes the code for vulnerabilities); it uses a different analysis method (AM). Furthermore, the method does not identify potential issues and failures with cloud billing on the platform, which could result in reputational risks and financial losses for the Company itself and for a large number of its Clients simultaneously.
[006] Известен способ поддержки процессов организационной системы, раскрытый в патенте RU 2725779 C1, опубл. 06.07.2020. Метод, описываемый в данном документе, построен на автоматическом формировании данных о допустимых и фактических показателях противодействующих процессов и автоматического управления сдерживанием их негативного влияния на процессы организационной системы, путем сличения показателей и реагирования по заранее предопределенным сценариям, путем уведомления и путем передачи данных в ответственные организационные подразделения (нотификация и инструктаж на исполнение). Значительным недостатком данного метода является то, что если данные о фактических показателях процессов организационной системы ниже данных соответствующих допустимых показателей, при этом заложенных заранее сценариев выполнения работ сдерживания негативного влияния противодействующих процессов нет, то метод передает данные о фактических и допустимых показателях в подразделения организационной системы для разработки новых сценариев сдерживания. Это является недочетом автоматического способа, переходом на ручной уровень разработки нового сценария, что может занять значительное время.[006] A method for supporting organizational system processes is known, disclosed in patent RU 2725779 C1, published 06.07.2020. The method described in this document is based on the automatic generation of data on the permissible and actual indicators of counteracting processes and the automatic management of the containment of their negative impact on organizational system processes, by comparing the indicators and responding according to predetermined scenarios, by notification and by transmitting data to the responsible organizational units (notification and instructions for implementation). A significant disadvantage of this method is that if the data on the actual indicators of the organizational system processes are lower than the data on the corresponding permissible indicators, and there are no pre-defined scenarios for the implementation of work to contain the negative impact of counteracting processes, then the method transmits the data on the actual and permissible indicators to the organizational system units for the development of new containment scenarios. This is a drawback of the automatic method, a transition to the manual level of developing a new scenario, which can take a significant amount of time.
[007] Известные решения, в целом, не обеспечивают комплексный и автоматизированный подход к решению проблем управления уровнем качества, безопасности и надежности релизов, предлагая автоматизацию/анализируя отдельные этапы, например, только набор сценариев, эталонных метрик и свойств артефактов на входе, без учета влияния свойств на уже работающей системе и контроля свойств (качества, безопасности и надежности работы) системы в любой момент времени. В известных решениях для анализа используют только отдельный аспект анализируемого объекта(ов) - кодовой базы или вектора атаки, не предоставляя при этом совокупного результата в виде замеров и метрик интеграционного тестирования (производительности, безопасности, надежности, соответствия эталонам и стандартам кодовой базы) релиза, жизненных показателей поведения платформы до и после релиза, в целом. Конечные результаты также носят или информирующую, или инструктирующую функцию, без описания какого-либо технического решения, результатом которого было бы или реакция самой системы в реальном мире, или комплексный набор очевидных преимуществ по сравнению с предшествующими уровнями техники.[007] Known solutions, in general, do not provide a comprehensive and automated approach to resolving the problems of managing the level of quality, security, and reliability of releases, offering automation/analysis of individual stages, for example, only a set of scenarios, benchmark metrics, and properties of input artifacts, without considering the impact of properties on an already running system and monitoring the properties (quality, security, and reliability of operation) of the system at any given time. Known solutions for analysis use only a separate aspect of the analyzed object(s) - the code base or attack vector, without providing an aggregate result in the form of measurements and metrics of integration testing (performance, security, reliability, compliance with benchmarks and standards of the code base) of the release, vital indicators of the platform's behavior before and after the release, or as a whole. The final results also have either an informational or instructive function, without a description of any technical solution that would result in either the reaction of the system itself in the real world, or a comprehensive set of obvious advantages compared to previous levels of technology.
[008] Основная проблематика заключается в отсутствии единого (комплексного) технического способа и системы, обеспечивающей автоматизированный контроль и управление всеми аспектами (безопасностью, качеством, производительностью, соответствием стандартам, процессом деплоя и отката, покрытием автотестами, финансовыми рисками) релизов, как на этапе разработки так и на этапе промышленной эксплуатации в продуктиве, с полным функциональным набором реакций (информирование, автоматизированный деплой, откат, механизм ручного согласования этапов)[008] The main problem is the lack of a single (comprehensive) technical method and system that provides automated control and management of all aspects (security, quality, performance, compliance with standards, deployment and rollback processes, automated test coverage, financial risks) of releases, both at the development stage and at the stage of industrial operation in production, with a full functional set of reactions (information, automated deployment, rollback, mechanism for manual approval of stages)
СУЩНОСТЬ ТЕХНИЧЕСКОГО РЕШЕНИЯESSENCE OF THE TECHNICAL SOLUTION
[009] Технической проблемой или задачей, поставленной в данном техническом решении, является создание простого и надежного способа и системы автоматизированного управления релизами приложений.[009] The technical problem or task posed in this technical solution is the creation of a simple and reliable method and system for automated management of application releases.
[0010] Техническим результатом, достигаемым при решении вышеуказанной технической задачи, является повышение надежности и безопасности работы устройств пользователей приложения за счет оценки качества кодовой базы приложения и отклонения запросов на внесение изменений в программный код приложения, приводящих к снижению качества кодовой базы.[0010] The technical result achieved by solving the above-mentioned technical problem is an increase in the reliability and security of the operation of the devices of the application users by assessing the quality of the application code base and rejecting requests for changes to the application program code that lead to a decrease in the quality of the code base.
[0011] Указанный технический результат достигается благодаря осуществлению способа автоматизированного управления релизами приложений, выполняемого по меньшей мере одним вычислительным устройством, содержащего этапы, на которых:[0011] The specified technical result is achieved by implementing a method for automated management of application releases, performed by at least one computing device, containing the steps of:
- получают запрос на внесение изменений в программный код приложения, сохраненного по меньшей мере в одном репозитории;- receive a request to make changes to the program code of an application stored in at least one repository;
- формируют новую версию приложения в соответствии с внесенными изменениями;- create a new version of the application in accordance with the changes made;
- определяют значение метрики качества кодовой базы приложения (Solidarity);- determine the value of the quality metric of the application code base (Solidarity);
- сравнивают значение метрики Solidarity с допустимыми значениями метрики, причем если значение метрики Solidarity не соответствует допустимым значениям, то направляют команду для отклонения запроса на внесение изменений, а если значение метрики Solidarity соответствует допустимым значениям, то выполняют сборку новой версии приложения с внесенными изменениями в релиз;- compare the Solidarity metric value with the acceptable metric values, and if the Solidarity metric value does not correspond to the acceptable values, then send a command to reject the request for changes, and if the Solidarity metric value corresponds to the acceptable values, then build a new version of the application with the changes made to the release;
- размещают новую версию приложения в сервисе приложений.- place a new version of the application in the application service.
[0012] В одном из частных примеров осуществления способа этап определения метрики Solidarity содержит этапы, на которых:[0012] In one of the particular examples of the implementation of the method, the stage of determining the Solidarity metric contains stages in which:
- извлекают настройки по меньшей мере одного репозитория;- retrieve settings from at least one repository;
- сравнивают настройки репозитория с допустимыми значениями параметров репозиториев и на основе результатов сравнения определяют значение подметрики, характеризующее корректность настроек репозитория (GitFlow);- compare repository settings with acceptable values of repository parameters and, based on the comparison results, determine the submetric value characterizing the correctness of the repository settings (GitFlow);
причем метрика Solidarity определяется с учетом значения подметрики GitFlow.where the Solidarity metric is determined taking into account the value of the GitFlow submetric.
[0013] В другом частном примере осуществления способа этап определения метрики Solidarity содержит этапы, на которых:[0013] In another particular example of the implementation of the method, the step of determining the Solidarity metric comprises the steps of:
- извлекают список зависимостей пакетов приложения, сохраненный по меньшей мере в одном репозитории;- retrieve a list of application package dependencies stored in at least one repository;
- определяют форму зависимости «shouldBeStrict»: строгая форма зависимости или нестрогая форма зависимости;- determine the form of dependency “shouldBeStrict”: strict form of dependency or non-strict form of dependency;
- на основе формы зависимости «shouldBeStrict» определяют значение подметрики shouldBeStrict;- based on the form of the “shouldBeStrict” dependency, the value of the shouldBeStrict submetric is determined;
- извлекают данные о зависимости с пакетами, сохраненными во внешних хранилищах;- extract dependency data from packages stored in external storage;
- определяют, находятся ли данные о зависимости с пакетами, сохраненными во внешних хранилищах, в соответствующих разделах;- determine whether dependency data with packages stored in external storage are located in the corresponding sections;
- на основе информации о расположении упомянутых данных о зависимости определяют значение подметрики «shouldBeDevDeps»;- based on the information about the location of the mentioned dependency data, the value of the “shouldBeDevDeps” submetric is determined;
- извлекают данные о зависимости с пакетами, сохранными во внутренних репозиториях;- extract dependency data from packages stored in internal repositories;
- определяют, находятся ли данные о зависимости с пакетами, сохраненными во внутренних репозиториях, в соответствующих разделах;- determine whether dependency data with packages stored in internal repositories is located in the appropriate sections;
- на основе информации о расположении упомянутых данных о зависимости определяют значение подметрики «shouldBeDeps»;- based on the information about the location of the mentioned dependency data, the value of the “shouldBeDeps” submetric is determined;
- извлекают данные, характеризующие версию зависимости, и сравнивают со списком актуальных версий зависимостей;- extract data characterizing the version of a dependency and compare it with the list of current versions of dependencies;
- на основе результатов сравнения определяют значение подметрики «shouldBeUpdated»;- based on the comparison results, the value of the “shouldBeUpdated” submetric is determined;
- извлекают данные о зависимости и сравнивают их со списком запрещенных зависимостей;- extract dependency data and compare it with a list of prohibited dependencies;
- на основе результатов сравнения определяют значение подметрики «shouldNotBeUsed»;- based on the comparison results, the value of the “shouldNotBeUsed” submetric is determined;
- определяют, описана ли зависимость как превью и на основе результатов определения назначают значение подметрики «previewPackages»;- determine whether the dependency is described as a preview and, based on the results of the determination, assign a value to the “previewPackages” submetric;
- осуществляют поиск в наборе файлов приложения файла с названием «renovate» и на основе наличия файла или отсутствия файла назначают значение подметрики корректности файлов;- search the set of application files for a file named "renovate" and, based on the presence or absence of the file, assign a value to the file correctness submetric;
- на основе значений подметрик «shouldBeStrict», «shouldBeDevDeps», «shouldBeDeps», «shouldBeUpdated», «shouldNotBeUsed» и корректности файлов определяют подметрику Dependencies;- based on the values of the submetrics “shouldBeStrict”, “shouldBeDevDeps”, “shouldBeDeps”, “shouldBeUpdated”, “shouldNotBeUsed” and the correctness of the files, the Dependencies submetric is determined;
причем метрика Solidarity определяется с учетом значения подметрики Dependencies.where the Solidarity metric is determined taking into account the value of the Dependencies submetric.
[0014] В другом частном примере осуществления способа этап определения метрики Solidarity содержит этапы, на которых:[0014] In another particular example of implementing the method, the step of determining the Solidarity metric comprises the steps of:
- извлекают конфигурацию пайплайна;- extract the pipeline configuration;
- сравнивают конфигурацию пайплайна с заданной допустимой конфигурацией для определения значения подметрики корректности конфигурации пайплайна;- compare the pipeline configuration with a given acceptable configuration to determine the value of the pipeline configuration correctness submetric;
- извлекают список переменных окружения для каждого репозитория;- extract a list of environment variables for each repository;
- сравнивают список переменных окружения с допустимыми значениями переменных для определения значения подметрики качества переменных репозитория;- compare the list of environment variables with the acceptable variable values to determine the value of the repository variable quality submetric;
- определяют статус приложения, указывающий на то, было ли приложение размещено по меньшей мере в одной вычислительной среде и на основе упомянутого статуса назначают подметрику развертывания приложения;- determining an application status indicating whether the application has been deployed in at least one computing environment and, based on said status, assigning a deployment submetric to the application;
- на основе подметрики корректности конфигурации пайплайна, подметрики корректности использования переменных окружения и подметрики развертывания приложения определяют значение подметрики CI/CD;- based on the pipeline configuration correctness submetric, the environment variable correctness submetric, and the application deployment submetric, the CI/CD submetric value is determined;
причем метрика Solidarity определяется с учетом значения подметрики CI/CD.Moreover, the Solidarity metric is determined taking into account the value of the CI/CD submetric.
[0015] В другом частном примере осуществления способа этап определения метрики Solidarity содержит этапы, на которых:[0015] In another particular example of the implementation of the method, the step of determining the Solidarity metric comprises the steps of:
- извлекают из по меньшей мере одного репозитория параметры маршрутизации пакетов;- retrieve packet routing parameters from at least one repository;
- сравнивают параметры маршрутизации пакетов с допустимыми значениями параметров пакетов;- compare packet routing parameters with acceptable packet parameter values;
- на основе результатов сравнения назначают значение подметрики Routing;- based on the comparison results, the value of the Routing submetric is assigned;
- причем метрика Solidarity определяется с учетом значения подметрики Routing.- moreover, the Solidarity metric is determined taking into account the value of the Routing submetric.
[0016] В другом частном примере осуществления способа этап определения метрики Solidarity содержит этапы, на которых:[0016] In another particular example of implementing the method, the step of determining the Solidarity metric comprises the steps of:
- определяют версии заданных пакетов;- determine the versions of the specified packages;
- сравнивают версии заданных пакетов с допустимыми значениями версий пакетов;- compare the versions of the specified packages with the permissible values of package versions;
- на основе результатов сравнения назначают значение подметрики Environments;- based on the comparison results, the value of the Environments submetric is assigned;
причем метрика Solidarity определяется с учетом значения подметрики Environments.where the Solidarity metric is determined taking into account the value of the Environments submetric.
[0017] В другом частном примере осуществления способа этап определения метрики Solidarity содержит этапы, на которых:[0017] In another particular example of the implementation of the method, the step of determining the Solidarity metric comprises the steps of:
- проверяют наличие файлов package.json и.gitlab/CODEOWNERS;- check the presence of the package.json and .gitlab/CODEOWNERS files;
- проверяют наличие в файлах информации о владельце кода, владельце продукта, техническом лидере;- check the presence of information in the files about the code owner, product owner, technical leader;
- на основе наличия или отсутствия упомянутой информации назначают значение подметрики CODEOWNERS;- based on the presence or absence of the mentioned information, the value of the CODEOWNERS submetric is assigned;
причем метрика Solidarity определяется с учетом значения подметрики CODEOWNERS.where the Solidarity metric is determined taking into account the value of the CODEOWNERS submetric.
[0018] В другом частном примере осуществления способа этап определения метрики Solidarity содержит этапы, на которых:[0018] In another particular example of implementing the method, the step of determining the Solidarity metric comprises the steps of:
- анализируют код посредством инструмента ESLint;- analyze the code using the ESLint tool;
- определяют количество значений «warning» в результатах анализа;- determine the number of “warning” values in the analysis results;
- на основе количества значений «warning» определяют значение подметрики CodeStyle;- based on the number of “warning” values, the value of the CodeStyle submetric is determined;
причем метрика Solidarity определяется с учетом значения подметрики CodeStyle.where the Solidarity metric is determined taking into account the value of the CodeStyle submetric.
[0019] В другом частном примере осуществления способа этап определения метрики Solidarity содержит этапы, на которых:[0019] In another particular example of implementing the method, the step of determining the Solidarity metric comprises the steps of:
- извлекают настройки helm и название проекта, а также название приложения в репозитории;- extract helm settings and the project name, as well as the application name in the repository;
- сравнивают название приложения в извлеченных данных и на основе результатов сравнения назначают значение подметрики Gitlab Structure;- compare the application name in the extracted data and, based on the comparison results, assign a value to the Gitlab Structure submetric;
причем метрика Solidarity определяется с учетом значения подметрики Gitlab Structure.Moreover, the Solidarity metric is determined taking into account the value of the Gitlab Structure submetric.
[0020] В другом частном примере осуществления способа метрика Solidarity определяется на основе подметрик GitFlow, Dependencies, CI/CD; Routing, Environments, CODEOWNERS, CodeStyle, Gitlab Structure и коэффициентов значимости каждой подметрики[0020] In another particular example of implementing the method, the Solidarity metric is determined based on the submetrics GitFlow, Dependencies, CI/CD; Routing, Environments, CODEOWNERS, CodeStyle, Gitlab Structure and the significance coefficients of each submetric
[0021] В другом частном примере осуществления способа дополнительно выполняют этапы, на которых:[0021] In another particular example of implementing the method, additional steps are performed in which:
- извлекают информацию о количестве проведенных юнит-тестов и сквозного тестирования;- extract information about the number of unit tests and end-to-end testing performed;
- на основе количества тестов определяют для приложения QA-метрику;- based on the number of tests, a QA metric is determined for the application;
- сравнивают значение QA-метрики с допустимыми значениями метрики, причем если значение QA-метрики не соответствует допустимым значениям, то направляют команду для отклонения запроса на внесение изменений, а если значение QA-метрики соответствует допустимым значениям, то выполняют сборку новой версии приложения с внесенными изменениями в релиз. [0022] В другом частном примере осуществления способа дополнительно выполняют этапы, на которых:- the value of the QA metric is compared with the permissible values of the metric, and if the value of the QA metric does not correspond to the permissible values, then a command is sent to reject the request for making changes, and if the value of the QA metric corresponds to the permissible values, then a new version of the application is assembled with the changes made to the release. [0022] In another particular example of implementing the method, additional steps are performed in which:
- в процессе работы приложения, размещенного в сервисе приложений, регистрируют события, связанные с работой приложения;- during the operation of an application hosted in the application service, events related to the operation of the application are recorded;
- определяют количество обработанных исключений или необработанных исключений определенного типа за единицу времени;- determine the number of handled exceptions or unhandled exceptions of a certain type per unit of time;
- определяет отношение количества обработанных исключений или необработанных исключений к количеству событий заданного для них типа за заданное время;- determines the ratio of the number of handled exceptions or unhandled exceptions to the number of events of the type specified for them in a specified time;
- сравнивают упомянутое отношение с допустимыми значениями;- compare the mentioned ratio with the permissible values;
- определяют, что упомянутое отношение превышает допустимые значения;- determine that the said ratio exceeds the permissible values;
- направляют команду на отмену изменений приложения и выводят в релиз предыдущую версию приложения.- send a command to cancel changes to the application and release the previous version of the application.
[0023] В другом предпочтительном варианте осуществления заявленного решения представлена система автоматизированного управления релизами приложений, содержащая по меньшей мере одно вычислительное устройство и по меньшей мере одну память, содержащую машиночитаемые инструкции, которые при их исполнении по меньшей мере одним вычислительным устройством выполняют вышеуказанный способ.[0023] In another preferred embodiment of the claimed solution, a system for automated management of application releases is provided, comprising at least one computing device and at least one memory containing machine-readable instructions that, when executed by at least one computing device, perform the above-mentioned method.
КРАТКОЕ ОПИСАНИЕ ЧЕРТЕЖЕЙBRIEF DESCRIPTION OF DRAWINGS
[0024] Признаки и преимущества настоящего изобретения станут очевидными из приводимого ниже подробного описания изобретения и прилагаемых чертежей, на которых:[0024] The features and advantages of the present invention will become apparent from the following detailed description of the invention and the accompanying drawings, in which:
На Фиг. 1 - представлен пример реализации системы автоматизированного управления релизами приложений.Fig. 1 shows an example of the implementation of an automated application release management system.
На Фиг. 2 - представлена примерная схема способа автоматизированного управления релизами приложений.Fig. 2 shows an example diagram of a method for automated management of application releases.
На Фиг. 3 - представлен пример общего вида вычислительного устройства. ПОДРОБНОЕ ОПИСАНИЕ ИЗОБРЕТЕНИЯFig. 3 shows an example of the general appearance of a computing device. DETAILED DESCRIPTION OF THE INVENTION
[0025] Ниже будут описаны понятия и термины, необходимые для понимания данного технического решения.[0025] Below, the concepts and terms necessary for understanding this technical solution will be described.
[0026] В данном техническом решении под системой подразумевается, в том числе компьютерная система, ЭВМ (электронно-вычислительная машина), ЧПУ (числовое программное управление), ПЛК (программируемый логический контроллер), компьютеризированные системы управления и любые другие устройства, способные выполнять заданную, четко определенную последовательность операций (действий, инструкций).[0026] In this technical solution, the term “system” means, among other things, a computer system, a computer (electronic computer), a numerical control (CNC), a PLC (programmable logic controller), computerized control systems and any other devices capable of performing a given, clearly defined sequence of operations (actions, instructions).
[0027] Под устройством обработки команд подразумевается электронный блок либо интегральная схема (микропроцессор), исполняющая машинные инструкции (программы).[0027] A command processing unit is an electronic unit or integrated circuit (microprocessor) that executes machine instructions (programs).
[0028] Устройство обработки команд считывает и выполняет машинные инструкции (программы) с одного или более устройств хранения данных. В роли устройства хранения данных могут выступать, но не ограничиваясь, жесткие диски (HDD), флеш-память, ПЗУ (постоянное запоминающее устройство), твердотельные накопители (SSD), оптические приводы.[0028] The command processing unit reads and executes machine instructions (programs) from one or more data storage devices. The data storage devices may include, but are not limited to, hard disk drives (HDD), flash memory, ROM (read-only memory), solid-state drives (SSD), and optical drives.
[0029] В соответствии со схемой, приведенной на фиг.1, система автоматизированного управления релизами приложений, в частном варианте ее реализации, содержит соединенные каналами связи по меньшей мере одно устройство 10 разработчика, сервис 20 приложений, устройство 30 пользователя приложения, сервис 100 анализа метрик, по меньшей мере три репозитория 101, 102, 103 и устройство 200 диспетчеризации и сервис 300 обработки live-метрик приложения.[0029] In accordance with the diagram shown in Fig. 1, the automated application release management system, in a particular embodiment of its implementation, contains at least one developer device 10, an application service 20, an application user device 30, a metrics analysis service 100, at least three repositories 101, 102, 103, and a dispatch device 200 and a service 300 for processing live application metrics, connected by communication channels.
[0030] Каждый упомянутый компонент системы может быть реализован на базе вычислительного устройства, оснащенного логическими элементами на транзисторах, для выполнения приписанным им функций.[0030] Each mentioned component of the system can be implemented on the basis of a computing device equipped with logic elements on transistors to perform the functions assigned to them.
[0031] В соответствии с заданным расписанием блок 1011 анализа метрик осуществляет сбор метрик данных о репозиториях сервисов. В частности, блок 1011 собирает настройки репозиториев 101, 102,103, а также данные о по меньшей мере одном приложении, посредством которого предоставляется по меньшей мере один сервис. Упомянутое приложение может представлять собой набор файлов, содержащих программный код приложения, размещенных в репозиториях 101, 102, 103.[0031] In accordance with a specified schedule, the metrics analysis unit 1011 collects metrics of data about service repositories. In particular, the unit 1011 collects settings of repositories 101, 102, 103, as well as data about at least one application through which at least one service is provided. The mentioned application may be a set of files containing the program code of the application, located in repositories 101, 102, 103.
[0032] Например, приложение может быть предназначено для предоставления сервиса управления ключами, причем:[0032] For example, an application may be designed to provide a key management service, wherein:
- репозиторий 101 может содержать первый набор файлов с клиентским программным кодом приложения;- repository 101 may contain a first set of files with the client program code of the application;
- репозиторий 102 может содержать второй набор файлов с библиотекой визуальных компонентов, например, с параметрами кнопки, в соответствии с которыми она будет отображена в интерфейсе пользователю сервиса,- repository 102 may contain a second set of files with a library of visual components, for example, with the parameters of a button, according to which it will be displayed in the interface to the user of the service,
- репозиторий 103 может содержать третий набор файлов с программным кодом, описывающим способ доставки программного кода из контейнера до пользователя.- repository 103 may contain a third set of files with program code describing the method of delivering program code from the container to the user.
[0033] После того, как упомянутые данные собраны, блок 1011 переходит к определению метрики качества кодовой базы приложения (Solidarity). Метрика Solidarity может быть определена на основе подметрик, характеризующих:[0033] Once the said data has been collected, block 1011 proceeds to determining the application codebase quality metric (Solidarity). The Solidarity metric may be determined based on submetrics that characterize:
- корректность настроек репозитория (GitFlow);- correctness of repository settings (GitFlow);
- уровень стабильности зависимостей пакетов (Dependencies) (см., например, статью «Stable Dependencies)), размещенную в Интернет по адресу: https://deviq.com/principles/stable-dependencies);- the level of stability of package dependencies (Dependencies) (see, for example, the article “Stable Dependencies”), located on the Internet at: https://deviq.com/principles/stable-dependencies);
корректность параметров развертывания переменных окружения приложения (CI/CD);correctness of the deployment parameters of application environment variables (CI/CD);
- корректность маршрутизации (Routing);- correctness of routing;
- корректность файлов конфигурации окружения (Environments);- correctness of environment configuration files (Environments);
- корректность файла для указания владельцев кода (CODEOWNERS);- correctness of the file for indicating code owners (CODEOWNERS);
- корректность стиля программного кода (CodeStyle);- correctness of the program code style (CodeStyle);
- корректность структуры программного кода (Gitlab Structure).- correctness of the program code structure (Gitlab Structure).
[0034] Например, для определения подметрики GitFlow блок 1011 может сравнить настройки репозиториев, в которых хранится приложение, с допустимыми значениями параметров репозиториев. Для получения настроек блок 1011 может направить запрос, например, в формате HTTP в блок хранения данных каждого репозитория, к котором хранятся настройки репозитория и которой в ответ на упомянутый запрос осуществляет поиск файла с настройками репозитория, извлекает из памяти информацию о настройках репозитория, например, в формате JSON, и направляет их в блок 1011.[0034] For example, to determine a GitFlow submetric, block 1011 may compare the settings of the repositories in which the application is stored with the permissible values of the repository parameters. To obtain the settings, block 1011 may send a request, for example, in HTTP format, to the data storage block of each repository in which the repository settings are stored, and which, in response to said request, searches for a file with the repository settings, retrieves information about the repository settings from memory, for example, in JSON format, and sends them to block 1011.
[0035] Полученные настройки репозитория блок 1011 сравнивает с допустимыми значениями настроек и на основе результатов сравнения определяет подметрики Gitflow. Например, из полученных настроек блок 1011 может извлечь значения, приведенные в полях «default_branch», «merge_method», «squash_option», и сравнить их с допустимыми значениями настроек «master», «fast_forward» и «never» соответственно, заданными в блоке 1012 хранения данных. Если значения настроек репозитория совпали с допустимыми значениями настроек, то блок 1011 назначает максимальное значение подметрики GitFlow, например, 100%. Если значения настроек репозитория не совпали с допустимыми значениями настроек, то блок 1011 назначает минимальное значение подметрики GitFlow, например, 0%. Если с допустимыми значениями настроек совпала только часть значений настроек репозитория, то в качестве подметрики GitFlow блоком 1011 может быть назначено значение, характеризующее отношение между количеством значений параметров репозитория, которые совпали с допустимыми значениями, к количеству всех возможных параметров репозитория.[0035] The received repository settings are compared by block 1011 with the allowed setting values and, based on the comparison results, the Gitflow submetrics are determined. For example, from the received settings, block 1011 may extract the values specified in the fields "default_branch", "merge_method", "squash_option" and compare them with the allowed setting values "master", "fast_forward" and "never", respectively, specified in the data storage block 1012. If the repository settings values match the allowed setting values, then block 1011 assigns the maximum value of the GitFlow submetric, for example, 100%. If the repository settings values do not match the allowed setting values, then block 1011 assigns the minimum value of the GitFlow submetric, for example, 0%. If only a portion of the repository settings match the allowed values, then block 1011 can assign a value as a GitFlow submetric that characterizes the ratio between the number of repository parameter values that match the allowed values to the number of all possible repository parameters.
[0036] Далее блок 1011 переходит к этапу определения подметрики Dependencies. Для определения упомянутой подметрики блок 1011 может быть оснащен парсером программного кода и API файлов репозитория, посредством которых блок 1011 осуществляет поиск файла package.json в блоке хранения данных каждого репозитория и анализ программного кода упомянутого файла, например, семантического анализа для поиска полей dependencies и devDependencies, в которых приведен список зависимостей пакетов приложения.[0036] Next, block 1011 proceeds to the stage of determining the Dependencies submetric. To determine said submetric, block 1011 may be equipped with a program code parser and a repository file API, through which block 1011 searches for the package.json file in the data storage block of each repository and analyzes the program code of said file, for example, semantic analysis to search for the dependencies and devDependencies fields, which contain a list of application package dependencies.
[0037] Например, список зависимостей может содержать информацию, указывающую на наличие зависимости пакета из первого набора файлов, сохраненного в репозитории 101, с по меньшей мере одним пакетом из второго набора файлов, сохраненных в репозитории 102, содержащего параметры кнопки, в соответствии с которыми она будет отображена в интерфейсе пользователю сервиса.[0037] For example, the list of dependencies may contain information indicating the presence of a dependency of a package from the first set of files stored in the repository 101 with at least one package from the second set of files stored in the repository 102, containing the parameters of the button, in accordance with which it will be displayed in the interface to the user of the service.
[0038] Список зависимостей, сохраненный в репозитории 101, может содержать следующие данные:[0038] The list of dependencies stored in repository 101 may contain the following data:
где «button» - ID пакета (например, имя пакета), идентификатор «102» указывает на то, что пакет «button» приходит из репозитория 102.where "button" is the package ID (e.g. package name), the identifier "102" indicates that the package "button" comes from repository 102.
[0039] После того, как список зависимостей извлечен, блок 1011 определяет форму зависимости «shouldBeStrict», например, посредством сопоставления символов указанной зависимости. Зависимость «shouldBeStrict» представлена в указанном выше примере как «modal-102: ∧0.0.1». Соответственно, если блоком 1011 определено, что зависимость «shouldBeStrict» указана в нестрогой форме, например, указанная зависимости содержит галочку (∧), то блок 1011 назначает минимальное значение подметрики shouldBeStrict, например, 0%. Если блоком 1011 определено, что зависимость «shouldBeStrict» указана в строгой форме, т.е. галочка (∧) отсутствует, то блок 1011 назначает максимальное значение подметрики shouldBeStrict, например, 100%.[0039] After the list of dependencies is retrieved, block 1011 determines the form of the "shouldBeStrict" dependency, for example, by matching the characters of the specified dependency. The "shouldBeStrict" dependency is represented in the above example as "modal-102: ∧ 0.0.1". Accordingly, if block 1011 determines that the "shouldBeStrict" dependency is specified in a non-strict form, for example, the specified dependency contains a check mark ( ∧ ), then block 1011 assigns a minimum value of the shouldBeStrict submetric, for example, 0%. If block 1011 determines that the "shouldBeStrict" dependency is specified in a strict form, i.e., the check mark ( ∧ ) is absent, then block 1011 assigns a maximum value of the shouldBeStrict submetric, for example, 100%.
[0040] Дополнительно блок 1011 определяет подметрику зависимости «shouldBeDevDeps», характеризующую корректность размещения данных о зависимости с пакетами, сохраненными во внешних хранилищах, в соответствующих разделах. Поскольку зависимость «shouldBeStrict» представлена в указанном выше примере как «eslint 0.0.1» и поскольку упомянутая зависимость не связана с репозиториями 101, 102 или 103, то она должна находиться в разделе devDependencies. Соответственно, если зависимость «shouldBeDevDeps» (в частности, «eslint 0.0.1») не находится в разделе devDependencies, то блок 1011 назначает минимальное значение подметрики «shouldBeDevDeps», например, 0%. Если зависимость «shouldBeDevDeps» находится в разделе devDependencies, то блок 1011 назначает максимальное значение подметрики «shouldBeDevDeps», например, 100%[0040] Additionally, block 1011 defines a dependency submetric "shouldBeDevDeps" that characterizes the correct placement of dependency data with packages stored in external repositories in the corresponding sections. Since the "shouldBeStrict" dependency is represented in the above example as "eslint 0.0.1" and since said dependency is not associated with repositories 101, 102, or 103, it must be located in the devDependencies section. Accordingly, if the "shouldBeDevDeps" dependency (in particular, "eslint 0.0.1") is not located in the devDependencies section, block 1011 assigns a minimum value for the "shouldBeDevDeps" submetric, for example, 0%. If the "shouldBeDevDeps" dependency is in the devDependencies section, then block 1011 assigns the maximum value to the "shouldBeDevDeps" submetric, for example, 100%.
[0041] Дополнительно блок 1011 определяет подметрику зависимости shouldBeDeps, характеризующую корректность размещения данных о зависимости с пакетами, сохраненными во внутренних репозиториях (в частности, в репозиториях 101, 102, 103), в соответствующих разделах. Зависимость shouldBeDeps представлена в указанном выше примере как «link-102: 0.0.1» и должна находиться в разделе dependencies, поскольку имеет связь с нашим внутренним репозиторием 102. Соответственно, если зависимость «shouldBeDeps» (в частности, «link-102: 0.0.1») не находится в разделе dependencies, то блок 1011 назначает минимальное значение подметрики «shouldBeDeps», например, 0%. Если зависимость «shouldBeDeps» находится в разделе dependencies, то блок 1011 назначает максимальное значение подметрики «shouldBeDeps», например, 100%.[0041] Additionally, block 1011 defines a dependency submetric shouldBeDeps that characterizes the correct placement of dependency data with packages stored in internal repositories (in particular, in repositories 101, 102, 103) in the corresponding sections. The shouldBeDeps dependency is represented in the above example as "link-102:0.0.1" and must be located in the dependencies section, since it has a link with our internal repository 102. Accordingly, if the "shouldBeDeps" dependency (in particular, "link-102:0.0.1") is not located in the dependencies section, then block 1011 assigns the minimum value of the "shouldBeDeps" submetric, for example, 0%. If the "shouldBeDeps" dependency is located in the dependencies section, then block 1011 assigns the maximum value of the "shouldBeDeps" submetric, for example, 100%.
[0042] Дополнительно блок 1011 определяет подметрику зависимости shouldBeUpdated, характеризую корректность версии зависимости. Для определения упомянутой подметрики в блок 1012 может быть заранее загружен список актуальных версий зависимостей, содержащий ID зависимости и ее номер актуальной версии. Соответственно, блок 1011 извлекает данные, характеризующие версию зависимости, например, «0.0.1» из поля button-102, и сравнивает со списком актуальных версий зависимостей. Если данные, характеризующие версию зависимости, совпадают с актуальной версией, то блок 1011 назначает максимальное значение подметрики «shouldBeUpdated», например, 100%. Если данные, характеризующие версию зависимости, не совпадают с актуальной версией (например, актуальная версия 0.0.2), то блок 1011 назначает минимальное значение подметрики «shouldBeUpdated», например, 0%.[0042] Additionally, block 1011 determines the shouldBeUpdated dependency submetric, which characterizes the correctness of the dependency version. To determine said submetric, a list of current dependency versions may be pre-loaded into block 1012, containing the dependency ID and its current version number. Accordingly, block 1011 extracts the data characterizing the dependency version, for example, "0.0.1" from the button-102 field, and compares it with the list of current dependency versions. If the data characterizing the dependency version matches the current version, then block 1011 assigns the maximum value of the "shouldBeUpdated" submetric, for example, 100%. If the data characterizing the dependency version does not match the current version (for example, the current version is 0.0.2), then block 1011 assigns the minimum value of the "shouldBeUpdated" submetric, for example, 0%.
[0043] Дополнительно блок 1011 определяет подметрику зависимости shouldNotBeUsed, характеризующую безопасность используемых зависимостей. Для определения упомянутой подметрики в блок 1012 может быть заранее загружен список запрещенных зависимостей, в котором может быть указана, например, зависимость «buttonBlackl_ist-102» и ее версия. Соответственно, блок 1011 извлекает из пакета данные о зависимости и сравнивает их со списком запрещенных зависимостей. Если данные о зависимости пакета содержат запрещенную зависимость, в частности «buttonBlackl_ist-102», то блок 1011 назначает минимальное значение подметрики «shouldNotBeUsed», например, 0%. Если данные о зависимости пакета не содержат запрещенную зависимость, то блок 1011 назначает максимальное значение подметрики «shouldNotBeUsed», например, 100%.[0043] Additionally, block 1011 determines a shouldNotBeUsed dependency submetric that characterizes the safety of the used dependencies. To determine said submetric, a list of prohibited dependencies may be preloaded into block 1012, which may indicate, for example, the "buttonBlackl_ist-102" dependency and its version. Accordingly, block 1011 extracts the dependency data from the package and compares it with the list of prohibited dependencies. If the package dependency data contains a prohibited dependency, in particular "buttonBlackl_ist-102", then block 1011 assigns a minimum value of the "shouldNotBeUsed" submetric, for example, 0%. If the package dependency data does not contain a prohibited dependency, then block 1011 assigns a maximum value of the "shouldNotBeUsed" submetric, for example, 100%.
[0044] Дополнительно блок 1011 может определить, что зависимость описана как превью и на основе данной информации назначить значение подметрики «previewPackages». Например, блок 1011 может извлечь зависимость «form-102: 0.0.1-assbfabd» и определить, что указанная зависимость содержит в версии буквенный постфикс и принять решение о том, что зависимость описана как превью, после чего назначить минимальное значение подметрики «previewPackages», например, 0%. Соответственно, если зависимость не содержит в версии буквенный постфикс, то блок 1011 назначает максимальное значение подметрики «previewPackages», например, 100%.[0044] Additionally, block 1011 may determine that a dependency is described as a preview and, based on this information, assign a value to the "previewPackages" submetric. For example, block 1011 may retrieve the "form-102:0.0.1-assbfabd" dependency and determine that the specified dependency contains a letter postfix in its version and decide that the dependency is described as a preview, after which it may assign a minimum value to the "previewPackages" submetric, for example, 0%. Accordingly, if the dependency does not contain a letter postfix in its version, then block 1011 may assign a maximum value to the "previewPackages" submetric, for example, 100%.
[0045] Также блок 1011 осуществляет поиск в наборе файлов, сохраненных в репозитории, файла с названием «renovate». Если упомянутый файл отсутствует в наборе фалов, то блок 1011 назначает минимальное значение подметрики корректности файлов, например, 0%. Если упомянутый файл присутствует в наборе фалов, то блок 1011 назначает максимальное значение подметрики корректности файлов, например, 100%.[0045] Block 1011 also searches the set of files stored in the repository for a file named "renovate." If the file is not present in the set of files, block 1011 assigns a minimum value for the file correctness submetric, such as 0%. If the file is present in the set of files, block 1011 assigns a maximum value for the file correctness submetric, such as 100%.
[0046] После того, как подметрики «shouldBeStrict», «shouldBeDevDeps», «shouldBeDeps», «shouldBeUpdated», «shouldNotBeUsed» и корректности файлов определены, блок 1011 определяет коэффициент значимости метрики (например, от 0 до 10), определяющий долю участия подметрики в итоговом значении подметрики Dependencies. Итоговая подметрика Dependencies рассчитывается как сумма упомянутых подметрик, помноженная на соответствующий коэффициент значимости подметрки.[0046] After the "shouldBeStrict," "shouldBeDevDeps," "shouldBeDeps," "shouldBeUpdated," "shouldNotBeUsed," and file correctness submetrics are determined, block 1011 determines a metric significance factor (e.g., from 0 to 10) that determines the submetric's contribution to the total value of the Dependencies submetric. The total Dependencies submetric is calculated as the sum of the aforementioned submetrics multiplied by the corresponding submetric significance factor.
[0047]Далее блок 1011 переходит к определению подметрики CI/CD. Для определения упомянутой подметрики блок 1011 запрашивает у блока хранения данных каждого репозитория конфигурацию пайплайна, например, в виде файла gitlab-ci.yaml из репозитория 101. Например, конфигурация пайплайна в упомянутом файле может быть представлена в виде программного кода: include:[0047]Next, block 1011 proceeds to defining the CI/CD submetric. To determine said submetric, block 1011 requests the pipeline configuration from the data storage block of each repository, for example, in the form of the gitlab-ci.yaml file from repository 101. For example, the pipeline configuration in said file may be represented as the program code: include:
- project: cp/infrastructure/devops- project: cp/infrastructure/devops
ref: masterref: master
file: /gitlab-ci/entries/front.yamlfile: /gitlab-ci/entries/front.yaml
[0048] В упомянутом файле gitlab-ci.yaml хранятся ссылки на файлы из репозитория 103, содержащие способ доставки программного кода до пользователя.[0048] The mentioned gitlab-ci.yaml file stores links to files from repository 103, which contain the method for delivering the program code to the user.
[0049] Полученная конфигурация пайплайна сравнивается с заданной допустимой конфигурацией для определения значения подметрики корректности конфигурации пайплайна. Например, данные о допустимой конфигурации могут указывать на то, что конфигурация пайплайна должна содержать поля «project» «ref» «file» со значениями «cp/infrastructure/devops», «master», «/gitlab-ci/entries/front.yaml» соответственно. Если по меньшей мере одно поле или значение отсутствует в конфигурации пайплайна или значение поля не совпадает с допустимыми, то блок 1011 назначает наименьшее значение подметрики корректности конфигурации пайплайна, например, 0%. Если конфигурации пайплайна совпадают с допустимой конфигурацией, то блок 1011 назначает наивысшее значение подметрики корректности конфигурации пайплайна, например, 100%.[0049] The received pipeline configuration is compared with a given valid configuration to determine a value of the pipeline configuration correctness submetric. For example, the valid configuration data may specify that the pipeline configuration must contain the fields "project", "ref", "file" with the values "cp/infrastructure/devops", "master", "/gitlab-ci/entries/front.yaml", respectively. If at least one field or value is missing from the pipeline configuration or the field value does not match the valid ones, then block 1011 assigns the lowest value of the pipeline configuration correctness submetric, for example, 0%. If the pipeline configurations match the valid configuration, then block 1011 assigns the highest value of the pipeline configuration correctness submetric, for example, 100%.
[0050] Дополнительно блок 1011 может быть выполнен с возможностью определения корректности использования переменных окружения для каждого репозитория. Переменные окружения - это набор значений, которые определяют поведение и настройки операционной системы, а также других программ, работающих в этой среде (см., например, статью «Что такое переменные окружения и как их использовать», размещенную в Интернет по адресу: https://sky.pro/media/chto4akoe-pere Для определения упомянутой подметрики блок 1011 запрашивает у блока хранения данных каждого репозитория список переменных посредством соответствующего запроса, в ответ на который направляется список переменных для репозитория. Далее полученный список переменных репозитория сравнивается блоком 1011 с заданными допустимыми значениями переменных. Например, блок 1011 может проанализировать упомянутый список и определить наличие в упомянутом списке информации по меньшей мере об одной переменной и назначить наименьшее значение подметрики качества переменных репозитория, например, 0%. В то же время если список переменных пуст, т.е. отсутствует информация о переменных, то блок 1011 может назначить высокое значение подметрики корректности использования переменных репозитория, например, 100%.[0050] Additionally, block 1011 may be configured to determine the correctness of the use of environment variables for each repository. Environment variables are a set of values that determine the behavior and settings of the operating system, as well as other programs running in this environment (see, for example, the article "What are environment variables and how to use them" posted on the Internet at: https://sky.pro/media/chto4akoe-pere To determine the mentioned submetric, block 1011 requests a list of variables from the data storage block of each repository by means of a corresponding request, in response to which a list of variables for the repository is sent. Then, the received list of repository variables is compared by block 1011 with the specified acceptable values of variables. For example, block 1011 can analyze the mentioned list and determine the presence in the mentioned list of information on at least one variable and assign the lowest value of the repository variables quality submetric, for example, 0%. At the same time, if the variable list is empty, i.e. there is no information on the variables, then block 1011 can assign a high value of the repository variables correctness use submetric, for example, 100%.
[0051] Дополнительно блок 1011 может быть выполнен с возможностью определения подметрики развертывания приложения. Для определения упомянутой подметрики блок 1011 определяет статус приложения, указывающий на то, было ли приложение размещено по меньшей мере в одной вычислительной среде, например, среде «development» или «production». При размещении приложения в вычислительную среду в программном коде приложения формируется соответствующая информация, описывающая идентификатор вычислительной среды, время размещения, информация об успешном размещении приложения в вычислительной среде и прочее. Например, упомянутая информация может быть представлена в следующем виде:[0051] Additionally, block 1011 may be configured to determine a submetric of application deployment. To determine said submetric, block 1011 determines the status of the application, indicating whether the application has been deployed in at least one computing environment, such as a "development" or "production" environment. When an application is deployed in a computing environment, corresponding information is generated in the program code of the application, describing the identifier of the computing environment, the time of deployment, information about the successful deployment of the application in the computing environment, etc. For example, said information may be represented in the following form:
[0052] Соответственно, блок 1011 запрашивает у блока 1012 хранения данных репозитория указанную выше информацию, извлекает информацию о статусе приложения и если упомянутый статус указывает на то, что приложение было размещено в вычислительной среде, т.е. в поле «status» указано «success», то блок 1011 может назначить высокое значение подметрики развертывания приложения, например, 100%. Если статус указывает на то, что приложение не было размещено в вычислительной среде, то блок 1011 может назначить наименьшее значение подметрики развертывания приложения, например, 0%.[0052] Accordingly, block 1011 queries the repository data storage block 1012 for the above information, retrieves information about the status of the application, and if said status indicates that the application has been deployed in the computing environment, i.e., the "status" field indicates "success", then block 1011 can assign a high value of the application deployment submetric, for example, 100%. If the status indicates that the application has not been deployed in the computing environment, then block 1011 can assign the lowest value of the application deployment submetric, for example, 0%.
[0053]Далее на основе подметрики корректности конфигурации пайплайна, подметрики корректности использования переменных окружения и по меньшей мере одной подметрики развертывания приложения блок 1011 определяет подметрику CI/CD. Например, в качестве подметрики CI/CD может быть назначено блоком 1011 значение, характеризующее процент подметрик, характеризующих высокое значение подметрик, по отношению к общему числу подметрик. Дополнительно блок 1011 может определить подметрику Routing.[0053]Next, based on the pipeline configuration correctness submetric, the environment variable correctness submetric, and at least one application deployment submetric, block 1011 determines the CI/CD submetric. For example, block 1011 may assign a value that characterizes the percentage of submetrics that characterize a high submetric value relative to the total number of submetrics as the CI/CD submetric. Additionally, block 1011 may determine the Routing submetric.
[0054] Для определения упомянутой подметрики блок 1011 запрашивает у блока хранения данных каждого репозитория параметры маршрутизации пакетов, которые могут быть представлены в файле package.json, например, в виде имен пакетов. Полученные параметры маршрутизации пакетов сравниваются блоком 1011 с заданными в блоке 1012 допустимыми значениями параметрами пакетов, например, с допустимыми именами пакетов, причем если параметры маршрутизации пакетов соответствуют упомянутым допустимым значениям, то блок 1011 назначает высокое значение метрики, например, 100%. Если параметры маршрутизации пакетов не соответствуют упомянутым допустимым значениям, то блок 1011 назначает минимальное значение метрики, например, 0%.[0054] To determine said submetric, block 1011 queries the data storage block of each repository for package routing parameters, which may be represented in the package.json file, for example, in the form of package names. The received package routing parameters are compared by block 1011 with the allowed values of the package parameters specified in block 1012, for example, with the allowed names of the packages, and if the package routing parameters correspond to said allowed values, then block 1011 assigns a high value of the metric, for example, 100%. If the package routing parameters do not correspond to said allowed values, then block 1011 assigns a minimum value of the metric, for example, 0%.
[0055] Также дополнительно в блоке 1012 может быть сохранен список требуемых параметров маршрутизации пакетов и список недопустимых параметров маршрутизации. Например, в качестве требуемых параметров маршрутизации пакетов может быть задано имя пакета «@sbercloud/ft-router», а в качестве недопустимых параметров маршрутизации - имена «react-router-dom, found, @reach/router». Соответственно, если блоком 1011 определено, что параметры маршрутизации пакетов не содержат требуемые параметры или содержат недопустимые параметры, блок 1011 назначает минимальное значение метрики, например, 0%. В ином случае блок 1011 назначает максимальное значение метрики, например, 100%.[0055] Also, in addition, a list of required packet routing parameters and a list of invalid routing parameters may be stored in block 1012. For example, the package name "@sbercloud/ft-router" may be specified as required packet routing parameters, and the names "react-router-dom, found, @reach/router" may be specified as invalid routing parameters. Accordingly, if block 1011 determines that the packet routing parameters do not contain the required parameters or contain invalid parameters, block 1011 assigns a minimum metric value, for example, 0%. Otherwise, block 1011 assigns a maximum metric value, for example, 100%.
[0056] Дополнительно блок 1011 может быть выполнен с возможностью определения подметрики Environments. Для определения упомянутой подметрики блок 1011 запрашивает у блока хранения данных каждого репозитория версии заданных пакетов, по аналогии с метрикой Dependencies, которые в свою очередь, предназначены для проверки версий файлов package.json и.nmprc, и сравнивает их с допустимыми значениями версий пакетов. Например, версии пакетов могут быть указаны в полях npm, node-js на соответствие заданным допустимым значениям версий пакета. Список пакетов, которые проверяются в рамках подметрики Environments (проверяются, что они используются в проекте и их версии актуальные, не меньше каких-то предзаданных): @sbercloud/ft-config-docker @sbercloud/ft-all-linters-pack @sbercloud/ft-config-tsconfig @sbercloud/ft-config-webpack-spa @sbercloud/ft-config-spa-entry[0056] Additionally, block 1011 may be configured to define the Environments submetric. To determine this submetric, block 1011 queries the data storage unit of each repository for versions of the specified packages, similar to the Dependencies metric, which in turn is intended to check the versions of the package.json and .nmprc files, and compares them with the permissible package version values. For example, package versions may be specified in the npm and node-js fields for compliance with the specified permissible package version values. The list of packages that are checked within the Environments submetric (it is verified that they are used in the project and their versions are up-to-date, not less than some predefined ones): @sbercloud/ft-config-docker @sbercloud/ft-all-linters-pack @sbercloud/ft-config-tsconfig @sbercloud/ft-config-webpack-spa @sbercloud/ft-config-spa-entry
[0057] Если версия пакета не соответствует допустимым значениям версий или в полученном ответе содержится файл.nmprc, то блок 1011 назначает минимальное значение подметрики Environments, например, 0%. Если версия пакета соответствует допустимым значениям версий и в полученном ответе не содержится файл.nmprc, то блок 1011 назначает максимальное значение подметрики Environments, например, 100%.[0057] If the package version does not match the allowed version values or the received response contains an .nmprc file, then block 1011 assigns the minimum value of the Environments submetric, for example, 0%. If the package version matches the allowed version values and the received response does not contain an .nmprc file, then block 1011 assigns the maximum value of the Environments submetric, for example, 100%.
[0058] Дополнительно блок 1011 может быть выполнен с возможностью определения подметрики CODEOWNERS. Для определения упомянутой подметрики блок 1011 обращается к полученному ранее файлу package.json, а также файлу.gitlab/CODEOWNERS, проверяет их наличие, проверяет наличие информации о владельце кода, владельце продукта, техническом лидере, которые могут быть указаны, например, в полях «codeOwners», «productOwner» и «techl_ead». Также дополнительно может быть проверено поле «pid» на наличие идентификатора проекта. Если информация о владельце кода или ID проекта отсутствует, то блок 1011 назначает минимальное значение подметрики CODEOWNERS, например, 0%. Если информация о владельце кода и ID проекта присутствует в файле package.json, то блок 1011 назначает максимальное значение подметрики CODEOWNERS, например, 100%.[0058] Additionally, block 1011 may be configured to determine the CODEOWNERS submetric. To determine said submetric, block 1011 accesses the previously obtained package.json file, as well as the .gitlab/CODEOWNERS file, checks for their presence, checks for the presence of information about the code owner, product owner, and technical lead, which may be specified, for example, in the "codeOwners", "productOwner", and "techl_ead" fields. The "pid" field may also be additionally checked for the presence of a project ID. If the information about the code owner or the project ID is absent, then block 1011 assigns a minimum value to the CODEOWNERS submetric, for example, 0%. If the information about the code owner and the project ID is present in the package.json file, then block 1011 assigns a maximum value to the CODEOWNERS submetric, for example, 100%.
[0059] Дополнительно блок 1011 может быть выполнен с возможностью определения подметрики CodeStyle. Для определения упомянутой подметрики блок 1011 запускает анализатор кода, реализованный на базе инструмента ESLint, который извлекает из блоков хранения данных репозиториев программный код приложения и выполняет его анализ известными методами. По результату анализа анализатор кода формирует файл с результатами анализа, после чего блок 1011 выполняет анализ упомянутого файла с результатами для определения количества сообщений, в поле которых содержится значение «warning». Далее на основе определенного количества сообщений блок 1011 определяет подметрику CodeStyle. Например, для 30 сообщений может быть назначено минимальное значение подметрики CodeStyle, например, 0%, а для 0 сообщений - максимальное значение подметрики CodeStyle, например, 100%.[0059] Additionally, block 1011 may be configured to determine a CodeStyle submetric. To determine said submetric, block 1011 launches a code analyzer implemented on the basis of the ESLint tool, which extracts the program code of the application from the data storage blocks of the repositories and analyzes it using known methods. Based on the analysis result, the code analyzer generates a file with the analysis results, after which block 1011 analyzes said file with the results to determine the number of messages in the field of which the value "warning" is contained. Then, based on the determined number of messages, block 1011 determines the CodeStyle submetric. For example, a minimum value of the CodeStyle submetric, such as 0%, may be assigned to 30 messages, and a maximum value of the CodeStyle submetric, such as 100%, may be assigned to 0 messages.
[0060] Дополнительно блок 1011 может быть выполнен с возможностью определения подметрик Gitlab Structure. Для определения упомянутой подметрики блок 1011 запрашивает у блока 1012 хранения данных настройки helm и название проекта, а также название приложения в репозитории. Если название в настройках helm совпадает с названием приложения в репозитории, а также в них содержится информация о названии проекта, то блок 1011 назначает максимальное значение подметрики Gitlab Structure, например, 100%. Если название в настройках helm не совпадает с названием приложения в репозитории или название приложения или название проекта отсутствует, то блок 1011 назначает минимальное значение подметрики Gitlab Structure, например, 0%.[0060] Additionally, block 1011 may be configured to determine Gitlab Structure submetrics. To determine said submetric, block 1011 requests helm settings and the project name, as well as the name of the application in the repository, from data storage block 1012. If the name in the helm settings matches the name of the application in the repository, and they also contain information about the project name, then block 1011 assigns the maximum value of the Gitlab Structure submetric, for example, 100%. If the name in the helm settings does not match the name of the application in the repository, or the application name or the project name is missing, then block 1011 assigns the minimum value of the Gitlab Structure submetric, for example, 0%.
[0061] Далее блок 1011 на основе по меньшей мере одной подметрики или всех подметрик GitFlow, Dependencies, CI/CD; Routing, Environments, CODEOWNERS, CodeStyle, Gitlab Structure определяет значение метрики Solidarity. Для определения значения метрики Solidarity блок 1011 определяет коэффициент значимости каждой подметрики, заранее заданный в блоке 1012 в зависимости от ее важности, после чего на основе по меньшей мере одной подметрики и коэффициента значимости определяется значение метрики Solidarity, например, посредством перемножения по меньшей мере одной подметрики и коэффициента значимости.[0061] Next, block 1011, based on at least one submetric or all submetrics of GitFlow, Dependencies, CI/CD; Routing, Environments, CODEOWNERS, CodeStyle, Gitlab Structure, determines the value of the Solidarity metric. To determine the value of the Solidarity metric, block 1011 determines the importance coefficient of each submetric, previously specified in block 1012 depending on its importance, after which, based on at least one submetric and the importance coefficient, the value of the Solidarity metric is determined, for example, by multiplying at least one submetric and the importance coefficient.
[0062] Для получения более точного значения метрики Solidarity она может быть определена на основе двух и более упомянутых подметрик (в том числе всех упомянутых подметрик) как средневзвешенное значение, определенное на основе значений коэффициентов значимости подметрик и значений упомянутых подметрик, которое и назначается в качестве значения метрики Solidarity.[0062] To obtain a more precise value of the Solidarity metric, it can be determined on the basis of two or more of the mentioned submetrics (including all of the mentioned submetrics) as a weighted average value determined on the basis of the values of the submetrics' significance coefficients and the values of the mentioned submetrics, which is then assigned as the value of the Solidarity metric.
[0063] В альтернативном варианте реализации представленного решения значение метрики Solidarity может быть определено как наименьшее значение из подметрик GitFlow, Dependencies, CI/CD; Routing, Environments, CODEOWNERS, CodeStyle, Gitlab Structure.[0063] In an alternative embodiment of the presented solution, the value of the Solidarity metric may be defined as the smallest value from the submetrics GitFlow, Dependencies, CI/CD; Routing, Environments, CODEOWNERS, CodeStyle, Gitlab Structure.
[0064] Далее блок 1011 направляет значение метрики Solidarity и подметрики в блок 201 обработки данных устройства 200 диспетчеризации, который сохраняет их в хранилище 203, а также сравнивает с допустимыми значениями метрик Solidarity. Если значение метрики Solidarity соответствует допустимым значениям, то блок 201 данных завершает свою работу до поступления новых данных от блока 1011. Если значение метрики Solidarity не соответствует допустимым значениям, то блок 201 формирует уведомление на устройство разработчика для оповещения о необходимости внести изменения в настройки репозитория или программный код приложения. Также блок 201 по истечению заданного времени формирует команду в каждый репозиторий, в котором хранится приложение, на их блокировку.[0064] Next, block 1011 sends the value of the Solidarity metric and submetrics to the data processing block 201 of the dispatch device 200, which stores them in the storage 203 and compares them with the permissible values of the Solidarity metrics. If the value of the Solidarity metric corresponds to the permissible values, then the data block 201 completes its work until new data arrives from block 1011. If the value of the Solidarity metric does not correspond to the permissible values, then block 201 generates a notification to the developer's device to notify about the need to make changes to the repository settings or the program code of the application. Also, after a specified time, block 201 generates a command to each repository in which the application is stored to block them.
[0065] Дополнительно блок 1011 может быть выполнен с возможностью определения QA-метрики - меры, позволяющей получить численное значение, характеризующее качество работы программного кода приложения. Для определения упомянутой метрики блок 1011 может обратиться к области памяти блока хранения данных каждого репозитория, в которой хранятся отчеты о запущенных юнит-тестах и сквозном тестировании (е2е-тестах). Юнит-тесты и е2е-тесты могут быть выполнены анализатором кода, реализованным на базе инструментов vitest и test-cafe, например, после загрузки приложения в репозитории, после внесений изменений в программный код приложения или согласно установленному разработчиком расписанию.[0065] Additionally, block 1011 may be configured to determine a QA metric—a measure that provides a numerical value characterizing the performance quality of the application's software code. To determine said metric, block 1011 may access the memory area of the data storage unit of each repository, which stores reports on running unit tests and end-to-end testing (e2e tests). Unit tests and e2e tests may be executed by a code analyzer implemented using the vitest and test-cafe tools, for example, after uploading the application to the repositories, after making changes to the application's software code, or according to a schedule set by the developer.
[0066] Из упомянутых отчетов блок 1011 извлекает информацию о количестве проведенных упомянутых тестов, после чего на основе количества тестов определяет для приложения QA-метрику.[0066] From said reports, block 1011 extracts information about the number of said tests performed, and then, based on the number of tests, determines a QA metric for the application.
[0067] Например, блок 1011 может определить, что был проведен один юнит-тест и два е2е-теста. Далее блок 1011 обращается к памяти, в которой может быть задано минимальное значение количества тестов, например, 20 юнит-тест и 20 е2е-теста, после чего блок 1011 на основе количества проведенных текстов и минимального значения тестов определяет подметрику юнит-теста и подметрику е2е-теста, на основе значений которых определяет QA-метрику, например, QA-метрика может быть определена как среднее значение упомянутых подметрик. [0068] Например, блоком 1011 может быть определено, что в отношении приложения выполнены 1 юнит-тест и 2 е2е-теста. Соответственно, для минимального значение количества тестов 20 подметрика юнит-теста будет равна 5%, а подметрика е2е-теста - 10%. Таким образом, QA-метрика приложения будет определена как 7.5%. Также может быть определена QA-метрика репозитория как среднее значение всех QA-метрик приложений.[0067] For example, block 1011 may determine that one unit test and two e2e tests have been executed. Block 1011 then accesses a memory in which a minimum value for the number of tests can be specified, for example, 20 unit tests and 20 e2e tests, after which block 1011, based on the number of texts executed and the minimum value of tests, determines a unit test submetric and an e2e test submetric, based on the values of which it determines a QA metric, for example, a QA metric can be defined as the average value of the mentioned submetrics. [0068] For example, block 1011 may determine that 1 unit test and 2 e2e tests have been executed with respect to the application. Accordingly, for a minimum value of the number of tests of 20, the unit test submetric will be equal to 5%, and the e2e test submetric will be equal to 10%. Thus, the application QA metric will be defined as 7.5%. The repository QA metric can also be defined as the average value of all application QA metrics.
[0069]Далее блок 1011 направляет значение QA-метрики приложения и/или репозитория в блок 201 обработки данных устройства 200 диспетчеризации, который сохраняет их в хранилище 203, а также сравнивает с допустимыми значениями QA-метрик. Если значение QA-метрики приложения и/или репозитория соответствует допустимым значениям, то блок 201 данных завершает свою работу до поступления новых данных от блока 1011. Если значение QA-метрики приложения или репозитория не соответствует допустимым значениям, то блок 201 формирует запрос на устройство 10 разработчика для внесения изменений в настройки репозитория или программный код приложения.[0069]Next, block 1011 sends the value of the QA metric of the application and/or repository to the data processing block 201 of the dispatching device 200, which stores them in the storage 203 and also compares them with the permissible values of the QA metrics. If the value of the QA metric of the application and/or repository corresponds to the permissible values, then the data block 201 completes its work until new data arrives from block 1011. If the value of the QA metric of the application or repository does not correspond to the permissible values, then block 201 generates a request to the developer device 10 to make changes to the repository settings or the program code of the application.
[0070] В процессе работы системы обработки информации посредством устройства 10 разработчика может быть направлен запрос (см. Фиг 2, позиция 400) на внесение изменений в программный код приложения, например, сохраненного в репозитории 101. В частности, запрос на внесение изменений может содержать по меньшей мере одно из:[0070] During the operation of the information processing system, a request (see Fig. 2, position 400) to make changes to the program code of the application, for example, stored in the repository 101, may be sent via the developer device 10. In particular, the request to make changes may contain at least one of:
- скорректированный программный код приложения;- corrected program code of the application;
- скорректированный список зависимостей пакетов;- adjusted list of package dependencies;
- уточненные параметры развертывания приложения и переменные окружения;- refined application deployment parameters and environment variables;
- уточненные параметры маршрутизации;- refined routing parameters;
- скорректированные файлы сетевого окружения;- adjusted network environment files;
- скорректированные файлы для указания владельцев кода.- corrected files to indicate code owners.
[0071] Упомянутый запрос поступает в блок 1013 обработки запросов, который формирует (401) в блоке 1012 новую версию приложения в соответствии с данными упомянутого запроса. После того, как новая версия приложения была сформирована, запускается блок 1011 анализ метрик, который описанный ранее способом определяет (402) подметрики GitFlow, Dependencies, CI/CD, Routing, Environments, CODEOWNERS, CodeStyle, Gitlab Structure определяет общее значение метрики Solidarity, а также QA-метрику.[0071] The said request is received by the request processing block 1013, which generates (401) in block 1012 a new version of the application in accordance with the data of the said request. After the new version of the application has been generated, the metrics analysis block 1011 is launched, which, in the manner described earlier, determines (402) the submetrics GitFlow, Dependencies, CI/CD, Routing, Environments, CODEOWNERS, CodeStyle, Gitlab Structure determines the overall value of the Solidarity metric, as well as the QA metric.
[0072] Далее блок 1011 направляет значение метрики Solidarity новой версии приложения, подметрики и QA-метрику в блок 201 обработки данных устройства 200 диспетчеризации, который сохраняет их в хранилище 203, а также сравнивает (403) с допустимыми значениями упомянутых метрик. Если значение метрики Solidarity или QA-метрики не соответствует допустимым значениям, то блок 201 формирует команду в блок 1013 для отклонения запроса на внесение изменений и направления соответствующего уведомления к устройству 10 разработчика. [0072] Next, block 1011 sends the value of the Solidarity metric of the new version of the application, the submetrics and the QA metric to the data processing block 201 of the dispatching device 200, which stores them in the storage 203 and also compares (403) with the permissible values of the said metrics. If the value of the Solidarity metric or the QA metric does not correspond to the permissible values, then block 201 generates a command to block 1013 to reject the request for making changes and send a corresponding notification to the developer device 10.
[0073] Если значения метрики Solidarity и QA-метрики соответствует допустимым значениям, то блок 201 формирует команду в блок 1013 для внесения изменений программный код приложения, после чего блок 1013 направляет команду в блок 1014 сборки приложения для сборки новой версии приложения в релиз (404). В частности, блок 1014 извлекает данные о приложении, сохранном в репозиториях, и размещает их в сервисе 20 приложений, после чего пользователь посредством устройства 30 может подключиться к сервису 20 и скачать приложение. [0074] Также дополнительно блок 201 может сравнить метрики Solidarity и QA-метрики новой версии приложения с указанными метриками предыдущей/текущей версии приложения и в случае, если упомянутые метрики нового приложения будут меньше метрик предыдущей/текущей версии приложения, блок 201 формирует команду в блок 1013 для отклонения запроса на внесение изменений описанным ранее способом.[0073] If the values of the Solidarity metric and the QA metric correspond to the permissible values, then block 201 generates a command to block 1013 for making changes to the program code of the application, after which block 1013 sends a command to block 1014 for assembling the application new version into a release (404). In particular, block 1014 extracts data about the application stored in the repositories and places them in the application service 20, after which the user can connect to the service 20 via device 30 and download the application. [0074] Also, block 201 can additionally compare the Solidarity metrics and QA metrics of the new version of the application with the specified metrics of the previous/current version of the application and in the event that the said metrics of the new application are less than the metrics of the previous/current version of the application, block 201 generates a command to block 1013 for rejecting the request for making changes in the manner described earlier.
[0075] Таким образом, обеспечивается повышение надежности и безопасности работы устройств пользователей приложения за счет оценки качества кодовой базы приложения и отклонения запросов на внесение изменений в программный код приложения, приводящих к снижению качества кодовой базы. Дополнительно надежность и безопасность работы устройств пользователей приложения повышается за счет оценки качества программного кода приложения и отклонения запросов на внесение изменений в программный код приложения, приводящих к снижению качества программного кода.[0075] This improves the reliability and security of the application's user devices by assessing the quality of the application's code base and rejecting requests for changes to the application's program code that would reduce the quality of the code base. Furthermore, the reliability and security of the application's user devices is improved by assessing the quality of the application's program code and rejecting requests for changes to the application's program code that would reduce the quality of the program code.
[0076] В процессе работы приложения, находящегося в продуктивной среде после проведения сборки и релиза, сервис 20 известными методами регистрирует различные типы событий, связанных с работой приложения. Методы регистрации упомянутых событий, например, раскрыты в статье «Поймай меня, если сможешь: руководство по обработке исключений в Python», опубликованной в Интернет по адресу https://habr.com/ru/companies/wunderfund/articles/736526/, причем событиями могут быть: логирование данных, вывод сообщения, попытка восстановить работу программы после возникновения ошибки и пр. Данные о событиях направляются сервисом 20 в сервис 300 обработки и хранения live-метрик приложения, в частности, в блок 301 обработки, который для каждого типа события определяет Live-метрику, характеризующую количество событий (связанных с работой приложения) определенного типа в единицу времени. [0077] Например, live-метрика может характеризовать количество запросов страницы интерфейса приложения за единицу времени, где запрос страницы интерфейса является конкретными типом события.[0076] During the operation of the application, which is in the production environment after the build and release, the service 20 registers various types of events related to the operation of the application using known methods. Methods for registering the mentioned events are disclosed, for example, in the article "Catch Me If You Can: A Guide to Exception Handling in Python", published on the Internet at https://habr.com/ru/companies/wunderfund/articles/736526/, and the events can be: data logging, displaying a message, an attempt to restore the operation of the program after an error has occurred, etc. The event data is sent by the service 20 to the service 300 for processing and storing live metrics of the application, in particular, to the processing block 301, which for each type of event determines a live metric that characterizes the number of events (related to the operation of the application) of a certain type per unit of time. [0077] For example, a live metric can characterize the number of requests for an application interface page per unit of time, where a request for an interface page is a specific type of event.
[0078] Также live-метрика может характеризовать количество ошибок (обработанных исключений) определенного типа за единицу времени. Например, live-метрика может характеризовать количество неверно указанной пользователем даты в интерфейсе приложения, запущенного при помощи сервиса 20, которая может быть зарегистрирована упомянутым сервисом под именем «ОшибкаДанныхДата».[0078] A live metric can also characterize the number of errors (handled exceptions) of a certain type per unit of time. For example, a live metric can characterize the number of incorrectly specified dates by the user in the application interface launched using service 20, which can be registered by said service under the name "DataErrorDate."
[0079] Дополнительно live-метрика может характеризовать количество неопознанных ошибок за единицу времени, т.е. необработанных исключений, зарегистрированных известными методами (см., например, статью «Необработанные исключения С++», размещенную в Интернет по адресу: https://learn.microsoft.com/ru-ru/cpp/cpp/unhandled-cpp-exceptions?view=msvc-170).[0079] Additionally, the live metric can characterize the number of unidentified errors per unit of time, i.e. unhandled exceptions registered by known methods (see, for example, the article “Unhandled C++ Exceptions” posted on the Internet at: https://learn.microsoft.com/ru-ru/cpp/cpp/unhandled-cpp-exceptions?view=msvc-170).
[0080] Дополнительно live-метрика может характеризовать количество вызовов API за единицу времени, например, количество вызовов метода API «api/address». Дополнительно live-метрика может характеризовать количество определенного типа действий пользователей за единицу времени, связанных с работой приложения, например, успешно отправленных сообщений посредством интерфейса приложения.[0080] Additionally, a live metric can characterize the number of API calls per unit of time, for example, the number of calls to the "api/address" API method. Additionally, a live metric can characterize the number of a certain type of user actions per unit of time related to the operation of the application, for example, successfully sent messages through the application interface.
[0081] Далее блок 301 определяет отношение количества обработанных исключений и/или необработанных исключений к количеству событий заданного (например, в хранилище 302) для них типа за заданное время. Например, для количества неверно указанной пользователем даты может быть задан тип события - количество успешно обработанных событий, например, запросов страницы интерфейса за 10 мин., а для необработанных исключений может быть задан тип событий - успешно отправленные сообщения за 10 мин. Полученное значение отношения количества обработанных исключений или необработанных исключений к количеству событий заданного для них типа за заданное время сравнивается допустимыми значениями, заданными в хранилище 302, и если упомянутое значение отношений превышает допустимое, то блок 301 формирует в диспетчере 200 команду на отмену изменений приложения.[0081] Next, block 301 determines the ratio of the number of processed exceptions and/or unhandled exceptions to the number of events of a specified type (for example, in storage 302) for them over a specified time. For example, for the number of an incorrectly specified date by the user, the event type can be set to the number of successfully processed events, for example, requests for an interface page in 10 minutes, and for unhandled exceptions, the event type can be set to successfully sent messages in 10 minutes. The obtained value of the ratio of the number of processed exceptions or unhandled exceptions to the number of events of a specified type for them over a specified time is compared with the permissible values specified in storage 302, and if the said value of the ratios exceeds the permissible value, then block 301 generates a command in the dispatcher 200 to cancel the changes to the application.
[0082] Обработку таких метрик может осуществлять специализированный инструмент, например, Prometheus. В перечень его функциональных возможностей входит вызов заранее указанного стороннего api в случае достижения каких-либо значений по каким-либо метрикам или их производным (блок 301). Например, в хранилище 302 сервиса 300 обработки live-метрик может быть установлено, что необходимо вызывать api отката релиза приложения в диспетчере 200, в случае если количество ошибок, в частности обработанных исключений, за последние, например, 10 минут, превышает 1% (допустимое значение) от общего количества запросов страницы интерфейса.[0082] Processing of such metrics can be performed by a specialized tool, for example, Prometheus. Its functionality includes calling a pre-specified third-party API in the event of reaching certain values for any metrics or their derivatives (block 301). For example, in the storage 302 of the live metrics processing service 300, it can be established that it is necessary to call the application release rollback API in the dispatcher 200 if the number of errors, in particular processed exceptions, over the last, for example, 10 minutes, exceeds 1% (the acceptable value) of the total number of interface page requests.
[0083] Блок 201 диспетчера 200 после получения команды на отмену изменений приложения формирует запрос на изменение по меньшей мере в один репозиторий, в котором хранится приложение, например, в виде реверс-коммита, который содержит в себе отмену последних изменений, т.е. вывода в релиз предыдущей версии приложения. Также, диспетчер направляет на устройство 10 разработчика уведомление о том, что live-метрики работы приложения содержат отклонения.[0083] The dispatcher unit 201 of the 200, after receiving a command to cancel changes to the application, generates a change request to at least one repository in which the application is stored, for example, in the form of a reverse commit, which contains a cancellation of the latest changes, i.e., the release of the previous version of the application. The dispatcher also sends a notification to the developer device 10 that the live metrics of the application's operation contain deviations.
[0084] Таким образом, дополнительно обеспечивается повышение надежности и безопасности работы устройств пользователей приложения за счет оценки количества ошибок, зарегистрированных вследствие работы приложения, и отката приложения на предыдущую версию в случае, если количество ошибок превышает допустимые значения.[0084] In this way, the reliability and security of the operation of the devices of the application users is further increased by assessing the number of errors registered as a result of the operation of the application and rolling back the application to the previous version in the event that the number of errors exceeds the permissible values.
[0085] В общем виде (см. фиг.3) вычислительное устройство содержит объединенные общей шиной информационного обмена один или несколько процессоров (501), средства памяти, такие как ОЗУ (502) и ПЗУ (503), интерфейсы ввода/вывода (504), устройства ввода/вывода (505), и устройство для сетевого взаимодействия (506).[0085] In general (see Fig. 3), the computing device contains one or more processors (501), memory means such as RAM (502) and ROM (503), input/output interfaces (504), input/output devices (505), and a device for network interaction (506), united by a common information exchange bus.
[0086] Процессор (501) (или несколько процессоров, многоядерный процессор и т.п.) может выбираться из ассортимента устройств, широко применяемых в настоящее время, например, таких производителей, как: Intel™, AMD™, Apple™, Samsung Exynos™, MediaTEK™, Qualcomm Snapdragon™ и т.п. Под процессором или одним из используемых процессоров в устройстве (500) также необходимо учитывать графический процессор, например, GPU NVIDIA или Graphcore, тип которых также является пригодным для полного или частичного выполнения способа, а также может применяться для обучения и применения моделей машинного обучения в различных информационных системах.[0086] The processor (501) (or several processors, a multi-core processor, etc.) can be selected from a range of devices that are widely used at present, for example, from manufacturers such as: Intel™, AMD™, Apple™, Samsung Exynos™, MediaTEK™, Qualcomm Snapdragon™, etc. Under the processor or one of the processors used in the device (500), it is also necessary to take into account a graphic processor, for example, an NVIDIA or Graphcore GPU, the type of which is also suitable for the full or partial implementation of the method, and can also be used for training and applying machine learning models in various information systems.
[0087] ОЗУ (502) представляет собой оперативную память и предназначено для хранения исполняемых процессором (501) машиночитаемых инструкций для выполнения необходимых операций по логической обработке данных. ОЗУ (502), как правило, содержит исполняемые инструкции операционной системы и соответствующих программных компонент (приложения, программные модули и т.п.). При этом, в качестве ОЗУ (502) может выступать доступный объем памяти графической карты или графического процессора.[0087] RAM (502) is a random access memory and is intended for storing machine-readable instructions executable by the processor (501) for performing the necessary operations for logical data processing. RAM (502), as a rule, contains executable instructions of the operating system and the corresponding software components (applications, software modules, etc.). In this case, the available memory capacity of a graphics card or graphics processor may serve as RAM (502).
[0088] ПЗУ (503) представляет собой одно или более устройств постоянного хранения данных, например, жесткий диск (HDD), твердотельный накопитель данных (SSD), флэш-память (EEPROM, NAND и т.п.), оптические носители информации (CD-R/RW, DVD-R/RW, BlueRay Disc, MD) и др.[0088] ROM (503) represents one or more permanent data storage devices, such as a hard disk drive (HDD), a solid state drive (SSD), flash memory (EEPROM, NAND, etc.), optical storage media (CD-R/RW, DVD-R/RW, BlueRay Disc, MD), etc.
[0089] Для организации работы компонентов устройства (500) и организации работы внешних подключаемых устройств применяются различные виды интерфейсов В/В (504). Выбор соответствующих интерфейсов зависит от конкретного исполнения вычислительного устройства, которые могут представлять собой, не ограничиваясь: PCI, AGP, PS/2, IrDa, FireWire, LPT, COM, SATA, IDE, Lightning, USB (2.0, 3.0, 3.1, micro, mini, type C), TRS/Audio jack (2.5, 3.5, 6.35), HDMI, DVI, VGA, Display Port, RJ45, RS232 и т.п.[0089] To organize the operation of the components of the device (500) and to organize the operation of external connected devices, various types of I/O interfaces (504) are used. The selection of the corresponding interfaces depends on the specific design of the computing device, which may be, but are not limited to: PCI, AGP, PS/2, IrDa, FireWire, LPT, COM, SATA, IDE, Lightning, USB (2.0, 3.0, 3.1, micro, mini, type C), TRS/Audio jack (2.5, 3.5, 6.35), HDMI, DVI, VGA, Display Port, RJ45, RS232, etc.
[0090] Для обеспечения взаимодействия пользователя с устройством (500) применяются различные средства (505) В/В информации, например, клавиатура, дисплей (монитор), сенсорный дисплей, тач-пад, джойстик, манипулятор мышь, световое перо, стилус, сенсорная панель, трекбол, динамики, микрофон, средства дополненной реальности, оптические сенсоры, планшет, световые индикаторы, проектор, камера, средства биометрической идентификации (сканер сетчатки глаза, сканер отпечатков пальцев, модуль распознавания голоса) и т.п.[0090] To ensure user interaction with the device (500), various I/O information means (505) are used, for example, a keyboard, a display (monitor), a touch display, a touchpad, a joystick, a mouse, a light pen, a stylus, a touch panel, a trackball, speakers, a microphone, augmented reality means, optical sensors, a tablet, light indicators, a projector, a camera, biometric identification means (a retinal scanner, a fingerprint scanner, a voice recognition module), etc.
[0091] Средство сетевого взаимодействия (506) обеспечивает передачу данных посредством внутренней или внешней вычислительной сети, например, Интранет, Интернет, ЛВС и т.п. В качестве одного или более средств (506) может использоваться, но не ограничиваться: Ethernet карта, GSM модем, GPRS модем, LTE модем, 5G модем, модуль спутниковой связи, NFC модуль, Bluetooth и/или BLE модуль, Wi-Fi модуль и др.[0091] The network interaction means (506) provides for the transmission of data via an internal or external computer network, for example, an Intranet, the Internet, a LAN, etc. One or more means (506) may be, but are not limited to: an Ethernet card, a GSM modem, a GPRS modem, an LTE modem, a 5G modem, a satellite communication module, an NFC module, a Bluetooth and/or BLE module, a Wi-Fi module, etc.
[0092] Дополнительно могут применяться также средства спутниковой навигации в составе устройства (500), например, GPS, ГЛОНАСС, BeiDou, Galileo. Конкретный выбор элементов устройства (500) для реализации различных программно-аппаратных архитектурных решений может варьироваться с сохранением обеспечиваемого требуемого функционала.[0092] Additionally, satellite navigation tools may also be used within the device (500), for example, GPS, GLONASS, BeiDou, Galileo. The specific selection of elements of the device (500) for implementing various software and hardware architectural solutions may vary while maintaining the required functionality.
[0093] Модификации и улучшения вышеописанных вариантов осуществления настоящего технического решения будут ясны специалистам в данной области техники. Предшествующее описание представлено только в качестве примера и не несет никаких ограничений. Таким образом, объем настоящего технического решения ограничен только объемом прилагаемой формулы изобретения.[0093] Modifications and improvements to the above-described embodiments of the present technical solution will be apparent to those skilled in the art. The preceding description is provided only as an example and does not carry any limitations. Therefore, the scope of the present technical solution is limited only by the scope of the appended claims.
Claims (70)
Publications (1)
| Publication Number | Publication Date |
|---|---|
| RU2851031C1 true RU2851031C1 (en) | 2025-11-17 |
Family
ID=
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20140040871A1 (en) * | 2012-08-02 | 2014-02-06 | Solstice Consulting, LLC | Mobile build, quality and deployment manager |
| US20190042353A1 (en) * | 2015-05-28 | 2019-02-07 | Oracle International Corporation | Automatic anomaly detection and resolution system |
| US20190294428A1 (en) * | 2018-03-26 | 2019-09-26 | Ca, Inc. | Automated software release distribution |
| US20200250070A1 (en) * | 2016-06-24 | 2020-08-06 | Intuit Inc. | Techniques for evaluating collected build metrics during a software build process |
| CN110008584B (en) * | 2019-04-02 | 2020-11-06 | 广东石油化工学院 | A GitHub-based semi-supervised heterogeneous software defect prediction method |
| US20230004383A1 (en) * | 2021-06-30 | 2023-01-05 | Micro Focus Llc | Anomaly identification within software project under development |
| US20230281012A1 (en) * | 2019-01-25 | 2023-09-07 | Allstate Insurance Company | Systems and methods for automating and monitoring software development operations |
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20140040871A1 (en) * | 2012-08-02 | 2014-02-06 | Solstice Consulting, LLC | Mobile build, quality and deployment manager |
| US20190042353A1 (en) * | 2015-05-28 | 2019-02-07 | Oracle International Corporation | Automatic anomaly detection and resolution system |
| US20200250070A1 (en) * | 2016-06-24 | 2020-08-06 | Intuit Inc. | Techniques for evaluating collected build metrics during a software build process |
| US20190294428A1 (en) * | 2018-03-26 | 2019-09-26 | Ca, Inc. | Automated software release distribution |
| US20230281012A1 (en) * | 2019-01-25 | 2023-09-07 | Allstate Insurance Company | Systems and methods for automating and monitoring software development operations |
| CN110008584B (en) * | 2019-04-02 | 2020-11-06 | 广东石油化工学院 | A GitHub-based semi-supervised heterogeneous software defect prediction method |
| US20230004383A1 (en) * | 2021-06-30 | 2023-01-05 | Micro Focus Llc | Anomaly identification within software project under development |
Non-Patent Citations (2)
| Title |
|---|
| "Controlling Exceptions and Events", опубл. 09.06.2024 по данным web.archive.org, https://web.archive.org/web/20240609053044/https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/controlling-exceptions-and-events. * |
| "Everything You Need to Know to Master Release Management", опубл. 12.04.2024 по данным web.archive.org, https://web.archive.org/web/20240412121111/https://www.smartsheet.com/release-management-process. * |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8875110B2 (en) | Code inspection executing system for performing a code inspection of ABAP source codes | |
| US8954930B2 (en) | System and method for reducing test effort by object risk analysis | |
| US11449370B2 (en) | System and method for determining a process flow of a software application and for automatically generating application testing code | |
| US9710257B2 (en) | System and method to map defect reduction data to organizational maturity profiles for defect projection modeling | |
| US8312440B2 (en) | Method, computer program product, and hardware product for providing program individuality analysis for source code programs | |
| CN107977308A (en) | interface test method and device | |
| CN113448862B (en) | Software version testing method and device and computer equipment | |
| JP2018026135A (en) | System and method for cause point analysis for effective handling of static analysis alarms | |
| CN111240981A (en) | Interface testing method, system and platform | |
| CN118093407A (en) | Code review method and device, electronic equipment and storage medium | |
| CN113419738A (en) | Interface document generation method and device and interface management equipment | |
| CN111258562B (en) | Java code quality inspection method, device, equipment and storage medium | |
| CN113051262A (en) | Data quality inspection method, device, equipment and storage medium | |
| CN117609063A (en) | API use case generation method, device, electronic equipment, storage medium and product | |
| CN120407428A (en) | A software and hardware adaptation testing method and platform based on the trusted innovation environment | |
| CN114611111A (en) | Vulnerability repair method and computing equipment | |
| RU2851031C1 (en) | Method and system for automated management of application releases | |
| CN107229487B (en) | Code processing method and device | |
| RU2851029C1 (en) | Method and system for automated management of application releases | |
| CN111061642B (en) | Full-automatic competition data processing system and method based on user data | |
| CN116661758B (en) | Method, device, electronic equipment and medium for optimizing log framework configuration | |
| WO2025160085A1 (en) | Detecting security issues in forked projects | |
| RU2830052C1 (en) | Method and system for automated application release management | |
| CN114527993A (en) | Application deployment method, device, equipment and medium | |
| CN116932414B (en) | Method and equipment for generating interface test case and computer readable storage medium |