import pcs-0.11.1-10.el9

This commit is contained in:
CentOS Sources 2022-05-17 04:36:50 -04:00 committed by Stepan Oksanichenko
commit 767c205aef
15 changed files with 2653 additions and 0 deletions

22
.gitignore vendored Normal file
View File

@ -0,0 +1,22 @@
SOURCES/backports-3.17.2.gem
SOURCES/dacite-1.6.0.tar.gz
SOURCES/daemons-1.3.1.gem
SOURCES/ethon-0.12.0.gem
SOURCES/eventmachine-1.2.7.gem
SOURCES/ffi-1.13.1.gem
SOURCES/mustermann-1.1.1.gem
SOURCES/open4-1.3.4-1.gem
SOURCES/pcs-0.11.1.tar.gz
SOURCES/pcs-web-ui-0.1.12.tar.gz
SOURCES/pcs-web-ui-node-modules-0.1.12.tar.xz
SOURCES/pyagentx-0.4.pcs.2.tar.gz
SOURCES/rack-2.2.3.gem
SOURCES/rack-protection-2.0.8.1.gem
SOURCES/rack-test-1.1.0.gem
SOURCES/rexml-3.2.5.gem
SOURCES/ruby2_keywords-0.0.2.gem
SOURCES/sinatra-2.0.8.1.gem
SOURCES/thin-1.7.2.gem
SOURCES/tilt-2.0.10.gem
SOURCES/tornado-6.1.0.tar.gz
SOURCES/webrick-1.7.0.gem

22
.pcs.metadata Normal file
View File

@ -0,0 +1,22 @@
28b63a742124da6c9575a1c5e7d7331ef93600b2 SOURCES/backports-3.17.2.gem
31546c37fbdc6270d5097687619e9c0db6f1c05c SOURCES/dacite-1.6.0.tar.gz
e28c1e78d1a6e34e80f4933b494f1e0501939dd3 SOURCES/daemons-1.3.1.gem
921ef1be44583a7644ee7f20fe5f26f21d018a04 SOURCES/ethon-0.12.0.gem
7a5b2896e210fac9759c786ee4510f265f75b481 SOURCES/eventmachine-1.2.7.gem
cfa25e7a3760c3ec16723cb8263d9b7a52d0eadf SOURCES/ffi-1.13.1.gem
50a4e37904485810cb05e27d75c9783e5a8f3402 SOURCES/mustermann-1.1.1.gem
41a7fe9f8e3e02da5ae76c821b89c5b376a97746 SOURCES/open4-1.3.4-1.gem
47d8d30bf502ff2a6a81c6cebc262fc272b48011 SOURCES/pcs-0.11.1.tar.gz
a29bfd22130ac978c5d4a6a82108ce37ad2a5db9 SOURCES/pcs-web-ui-0.1.12.tar.gz
c9723466d7bfb353899307a5700177f47e7e6cff SOURCES/pcs-web-ui-node-modules-0.1.12.tar.xz
3176b2f2b332c2b6bf79fe882e83feecf3d3f011 SOURCES/pyagentx-0.4.pcs.2.tar.gz
345b7169d4d2d62176a225510399963bad62b68f SOURCES/rack-2.2.3.gem
1f046e23baca8beece3b38c60382f44aa2b2cb41 SOURCES/rack-protection-2.0.8.1.gem
b80bc5ca38a885e747271675ba91dd3d02136bf1 SOURCES/rack-test-1.1.0.gem
e7f48fa5fb2d92e6cb21d6b1638fe41a5a7c4287 SOURCES/rexml-3.2.5.gem
0be571aacb5d6a212a30af3f322a7000d8af1ef9 SOURCES/ruby2_keywords-0.0.2.gem
04cca7a5d9d641fe076e4e24dc5b6ff31922f4c3 SOURCES/sinatra-2.0.8.1.gem
41395e86322ffd31f3a7aef1f697bda3e1e2d6b9 SOURCES/thin-1.7.2.gem
d265c822a6b228392d899e9eb5114613d65e6967 SOURCES/tilt-2.0.10.gem
c23c617c7a0205e465bebad5b8cdf289ae8402a2 SOURCES/tornado-6.1.0.tar.gz
10ba51035928541b7713415f1f2e3a41114972fc SOURCES/webrick-1.7.0.gem

View File

@ -0,0 +1,41 @@
From e58f7897d561cff2f9c257933acdb36d57cc130c Mon Sep 17 00:00:00 2001
From: Tomas Jelinek <tojeline@redhat.com>
Date: Tue, 4 Jan 2022 12:56:56 +0100
Subject: [PATCH 2/4] Make ocf:linbit:drbd agent pass OCF validation
---
data/ocf-1.0.rng | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/data/ocf-1.0.rng b/data/ocf-1.0.rng
index 36ba4611..1e14a83b 100644
--- a/data/ocf-1.0.rng
+++ b/data/ocf-1.0.rng
@@ -169,16 +169,14 @@ RNGs. Thank you.
<optional>
<element name="content">
<choice>
- <attribute name="type">
- <choice>
- <value>boolean</value>
- <value>string</value>
- <value>integer</value>
- <value>second</value><!-- used by fence agents -->
- <value>int</value><!-- used by fence agents intead of integer -->
- <value>time</value><!-- used by pacemaker metadata -->
- </choice>
- </attribute>
+ <!--
+ OCF 1.0 allows values: boolean, integer, string. Agents, however,
+ quite often use other values: int (fence agents), numeric
+ (ocf:linbit:drbd), second (fence agents), time (pacemaker
+ metadata). Since pcs doesn't actually care about the type, we
+ allow any type to keep compatibility with existing agents.
+ -->
+ <attribute name="type" />
<group>
<!--
used by fence agents and processed by pcs even though it is not
--
2.31.1

View File

@ -0,0 +1,84 @@
From e1573865543a3d59930b315a40ecd9b7a807e1c1 Mon Sep 17 00:00:00 2001
From: Ondrej Mular <omular@redhat.com>
Date: Mon, 13 Dec 2021 12:48:26 +0100
Subject: [PATCH 3/3] revert of disallowing to clone a group with a stonith
inside
Originally, this was not fixed properly (it was possible to add a stonith
into a cloned group), therefore to stay consistent, this change is being
reverted. It will be fixed in the future by not allowing stonith to be
placed into a group.
---
pcs/resource.py | 16 ++--------------
.../tier1/cib_resource/test_clone_unclone.py | 8 ++------
2 files changed, 4 insertions(+), 20 deletions(-)
diff --git a/pcs/resource.py b/pcs/resource.py
index 928477b2..c7cf4c7e 100644
--- a/pcs/resource.py
+++ b/pcs/resource.py
@@ -1697,7 +1697,7 @@ def resource_clone_create(
):
element.parentNode.parentNode.removeChild(element.parentNode)
- def _reject_stonith_clone_report(force_flags, stonith_ids, group_id=None):
+ if element.getAttribute("class") == "stonith":
process_library_reports(
[
reports.ReportItem(
@@ -1706,24 +1706,12 @@ def resource_clone_create(
is_forced=reports.codes.FORCE in force_flags,
),
message=reports.messages.CloningStonithResourcesHasNoEffect(
- stonith_ids, group_id=group_id
+ [name]
),
)
]
)
- if element.getAttribute("class") == "stonith":
- _reject_stonith_clone_report(force_flags, [name])
-
- if element.tagName == "group":
- stonith_ids = [
- resource.getAttribute("id")
- for resource in element.getElementsByTagName("primitive")
- if resource.getAttribute("class") == "stonith"
- ]
- if stonith_ids:
- _reject_stonith_clone_report(force_flags, stonith_ids, name)
-
parts = parse_clone_args(argv, promotable=promotable)
if not update_existing:
clone_id = parts["clone_id"]
diff --git a/pcs_test/tier1/cib_resource/test_clone_unclone.py b/pcs_test/tier1/cib_resource/test_clone_unclone.py
index 7b0e89f9..4cc4cb3e 100644
--- a/pcs_test/tier1/cib_resource/test_clone_unclone.py
+++ b/pcs_test/tier1/cib_resource/test_clone_unclone.py
@@ -354,12 +354,9 @@ class Clone(
def test_clone_group_with_stonith(self):
self.set_cib_file(FIXTURE_GROUP_WITH_STONITH)
- self.assert_pcs_fail(
+ self.assert_effect(
"resource clone Group".split(),
- fixture_clone_stonith_msg(group=True),
- )
- self.assert_resources_xml_in_cib(
- fixture_resources_xml(FIXTURE_GROUP_WITH_STONITH)
+ fixture_resources_xml(FIXTURE_CLONED_GROUP_WITH_STONITH),
)
def test_clone_group_with_stonith_forced(self):
@@ -367,7 +364,6 @@ class Clone(
self.assert_effect(
"resource clone Group --force".split(),
fixture_resources_xml(FIXTURE_CLONED_GROUP_WITH_STONITH),
- output=fixture_clone_stonith_msg(forced=True, group=True),
)
def test_promotable_clone(self):
--
2.31.1

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,73 @@
From 69bfb22dbd68023069f6dae11e418f6ad455474f Mon Sep 17 00:00:00 2001
From: Ondrej Mular <omular@redhat.com>
Date: Tue, 7 Dec 2021 11:14:37 +0100
Subject: [PATCH 2/3] fix rsc update cmd when unable to get agent metadata
`resource update` command failed with a traceback when updating a
resource with a non-existing resource agent
---
pcs/resource.py | 14 ++++++++------
pcs_test/tier1/legacy/test_resource.py | 21 +++++++++++++++++++++
2 files changed, 29 insertions(+), 6 deletions(-)
diff --git a/pcs/resource.py b/pcs/resource.py
index b2a5e355..928477b2 100644
--- a/pcs/resource.py
+++ b/pcs/resource.py
@@ -1075,13 +1075,15 @@ def resource_update(lib, args, modifiers, deal_with_guest_change=True):
if report_list:
process_library_reports(report_list)
except lib_ra.ResourceAgentError as e:
- severity = (
- reports.ReportItemSeverity.WARNING
- if modifiers.get("--force")
- else reports.ReportItemSeverity.ERROR
- )
process_library_reports(
- [lib_ra.resource_agent_error_to_report_item(e, severity)]
+ [
+ lib_ra.resource_agent_error_to_report_item(
+ e,
+ reports.get_severity(
+ reports.codes.FORCE, modifiers.get("--force")
+ ),
+ )
+ ]
)
except LibraryError as e:
process_library_reports(e.args)
diff --git a/pcs_test/tier1/legacy/test_resource.py b/pcs_test/tier1/legacy/test_resource.py
index 417ca131..0f8415b4 100644
--- a/pcs_test/tier1/legacy/test_resource.py
+++ b/pcs_test/tier1/legacy/test_resource.py
@@ -4882,6 +4882,27 @@ class UpdateInstanceAttrs(
),
)
+ def test_nonexisting_agent(self):
+ agent = "ocf:pacemaker:nonexistent"
+ message = (
+ f"Agent '{agent}' is not installed or does "
+ "not provide valid metadata: Metadata query for "
+ f"{agent} failed: Input/output error"
+ )
+ self.assert_pcs_success(
+ f"resource create --force D0 {agent}".split(),
+ f"Warning: {message}\n",
+ )
+
+ self.assert_pcs_fail(
+ "resource update D0 test=testA".split(),
+ f"Error: {message}, use --force to override\n",
+ )
+ self.assert_pcs_success(
+ "resource update --force D0 test=testA".split(),
+ f"Warning: {message}\n",
+ )
+
def test_update_existing(self):
xml = """
<resources>
--
2.31.1

View File

@ -0,0 +1,25 @@
From 798d054db1a20b7cd2f2aed2b35b9e51835dec55 Mon Sep 17 00:00:00 2001
From: Tomas Jelinek <tojeline@redhat.com>
Date: Mon, 6 Dec 2021 16:06:31 +0100
Subject: [PATCH 1/3] fix enabling corosync-qdevice
---
pcsd/remote.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pcsd/remote.rb b/pcsd/remote.rb
index b569e249..e1923d6f 100644
--- a/pcsd/remote.rb
+++ b/pcsd/remote.rb
@@ -2002,7 +2002,7 @@ def qdevice_client_enable(param, request, auth_user)
unless allowed_for_local_cluster(auth_user, Permissions::WRITE)
return 403, 'Permission denied'
end
- if not ServiceChecker.new('corosync', enabled: true).is_enabled?('corosync')
+ if not ServiceChecker.new(['corosync'], enabled: true).is_enabled?('corosync')
return pcsd_success('corosync is not enabled, skipping')
elsif enable_service('corosync-qdevice')
return pcsd_success('corosync-qdevice enabled')
--
2.31.1

View File

@ -0,0 +1,86 @@
From 1f91f67a18885937794e775bbbcde973ffe59468 Mon Sep 17 00:00:00 2001
From: Miroslav Lisik <mlisik@redhat.com>
Date: Thu, 16 Dec 2021 14:12:58 +0100
Subject: [PATCH 1/4] skip checking of scsi devices to be removed before
unfencing to be added devices
---
pcs/lib/commands/scsi.py | 3 ++-
pcs_test/tier0/lib/commands/test_scsi.py | 21 +++++++++++++++++----
2 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/pcs/lib/commands/scsi.py b/pcs/lib/commands/scsi.py
index ff20a563..ab732805 100644
--- a/pcs/lib/commands/scsi.py
+++ b/pcs/lib/commands/scsi.py
@@ -31,7 +31,8 @@ def unfence_node(
return
fence_scsi_bin = os.path.join(settings.fence_agent_binaries, "fence_scsi")
fenced_devices = []
- for device in original_devices:
+ # do not check devices being removed
+ for device in sorted(set(original_devices) & set(updated_devices)):
stdout, stderr, return_code = env.cmd_runner().run(
[
fence_scsi_bin,
diff --git a/pcs_test/tier0/lib/commands/test_scsi.py b/pcs_test/tier0/lib/commands/test_scsi.py
index 8ef9836a..bc2357a9 100644
--- a/pcs_test/tier0/lib/commands/test_scsi.py
+++ b/pcs_test/tier0/lib/commands/test_scsi.py
@@ -13,10 +13,13 @@ class TestUnfenceNode(TestCase):
self.old_devices = ["device1", "device3"]
self.new_devices = ["device3", "device0", "device2"]
self.added_devices = set(self.new_devices) - set(self.old_devices)
+ self.check_devices = sorted(
+ set(self.old_devices) & set(self.new_devices)
+ )
self.node = "node1"
def test_success_devices_to_unfence(self):
- for old_dev in self.old_devices:
+ for old_dev in self.check_devices:
self.config.runner.scsi.get_status(
self.node, old_dev, name=f"runner.scsi.is_fenced.{old_dev}"
)
@@ -38,9 +41,19 @@ class TestUnfenceNode(TestCase):
)
self.env_assist.assert_reports([])
+ def test_success_replace_unavailable_device(self):
+ self.config.runner.scsi.unfence_node(self.node, {"device2"})
+ scsi.unfence_node(
+ self.env_assist.get_env(),
+ self.node,
+ {"device1"},
+ {"device2"},
+ )
+ self.env_assist.assert_reports([])
+
def test_unfencing_failure(self):
err_msg = "stderr"
- for old_dev in self.old_devices:
+ for old_dev in self.check_devices:
self.config.runner.scsi.get_status(
self.node, old_dev, name=f"runner.scsi.is_fenced.{old_dev}"
)
@@ -98,7 +111,7 @@ class TestUnfenceNode(TestCase):
def test_unfencing_skipped_devices_are_fenced(self):
stdout_off = "Status: OFF"
- for old_dev in self.old_devices:
+ for old_dev in self.check_devices:
self.config.runner.scsi.get_status(
self.node,
old_dev,
@@ -116,7 +129,7 @@ class TestUnfenceNode(TestCase):
[
fixture.info(
report_codes.STONITH_UNFENCING_SKIPPED_DEVICES_FENCED,
- devices=sorted(self.old_devices),
+ devices=sorted(self.check_devices),
)
]
)
--
2.31.1

View File

@ -0,0 +1,94 @@
From 94d411afc37de231c8a3101c30e1e6ba66ecd223 Mon Sep 17 00:00:00 2001
From: Tomas Jelinek <tojeline@redhat.com>
Date: Thu, 13 Jan 2022 17:32:38 +0100
Subject: [PATCH 4/4] fix creating empty cib
---
pcs/utils.py | 21 +++++++++++----------
pcs_test/tier1/test_misc.py | 25 ++++++++++++++++++++++++-
2 files changed, 35 insertions(+), 11 deletions(-)
diff --git a/pcs/utils.py b/pcs/utils.py
index 2f5949a7..b5b8af05 100644
--- a/pcs/utils.py
+++ b/pcs/utils.py
@@ -2135,16 +2135,17 @@ def write_empty_cib(cibfile):
"""
Commandline options: no options
"""
- empty_xml = """<?xml version="1.0" encoding="UTF-8"?>
-<cib admin_epoch="0" epoch="1" num_updates="1" validate-with="pacemaker-1.2">
- <configuration>
- <crm_config/>
- <nodes/>
- <resources/>
- <constraints/>
- </configuration>
- <status/>
-</cib>"""
+ empty_xml = """
+ <cib admin_epoch="0" epoch="1" num_updates="1" validate-with="pacemaker-3.1">
+ <configuration>
+ <crm_config/>
+ <nodes/>
+ <resources/>
+ <constraints/>
+ </configuration>
+ <status/>
+ </cib>
+ """
with open(cibfile, "w") as f:
f.write(empty_xml)
diff --git a/pcs_test/tier1/test_misc.py b/pcs_test/tier1/test_misc.py
index 13312a69..abd02c61 100644
--- a/pcs_test/tier1/test_misc.py
+++ b/pcs_test/tier1/test_misc.py
@@ -1,8 +1,10 @@
+import os
from unittest import TestCase
from pcs_test.tools.assertions import AssertPcsMixin
from pcs_test.tools.misc import (
get_test_resource as rc,
+ get_tmp_dir,
get_tmp_file,
outdent,
write_file_to_tmpfile,
@@ -19,7 +21,7 @@ class ParseArgvDashDash(TestCase, AssertPcsMixin):
cmd = "constraint colocation add R1 with R2".split()
def setUp(self):
- self.temp_cib = get_tmp_file("tier1_misc")
+ self.temp_cib = get_tmp_file("tier1_misc_dashdash")
write_file_to_tmpfile(rc("cib-empty.xml"), self.temp_cib)
self.pcs_runner = PcsRunner(self.temp_cib.name)
self.allowed_roles = format_list(const.PCMK_ROLES)
@@ -89,3 +91,24 @@ class ParseArgvDashDash(TestCase, AssertPcsMixin):
"""
),
)
+
+
+class EmptyCibIsPcmk2Compatible(TestCase, AssertPcsMixin):
+ # This test verifies that a default empty CIB created by pcs when -f points
+ # to an empty file conforms to minimal schema version supported by
+ # pacemaker 2.0. If pcs prints a message that CIB schema has been upgraded,
+ # then the test fails and shows there is a bug. Bundle with promoted-max
+ # requires CIB compliant with schema 3.1, which was introduced in pacemaker
+ # 2.0.0.
+ def setUp(self):
+ self.cib_dir = get_tmp_dir("tier1_misc_empty_cib")
+ self.pcs_runner = PcsRunner(os.path.join(self.cib_dir.name, "cib.xml"))
+
+ def tearDown(self):
+ self.cib_dir.cleanup()
+
+ def test_success(self):
+ self.assert_pcs_success(
+ "resource bundle create b container docker image=my.img promoted-max=1".split(),
+ "",
+ )
--
2.31.1

View File

@ -0,0 +1,23 @@
From fa75f40361bc39cbd645b8014713e4c0ad0cda18 Mon Sep 17 00:00:00 2001
From: Ivan Devat <idevat@redhat.com>
Date: Mon, 24 Jan 2022 14:08:54 +0100
Subject: [PATCH 2/2] fix backend parameter "all" in cluster destroy
---
src/app/backend/calls/destroyCluster.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/backend/calls/destroyCluster.ts b/src/app/backend/calls/destroyCluster.ts
index b6e83a41..cf41ea42 100644
--- a/src/app/backend/calls/destroyCluster.ts
+++ b/src/app/backend/calls/destroyCluster.ts
@@ -4,5 +4,5 @@ const { url } = endpoints.destroyCluster;
export const destroyCluster = (clusterName: string): CallResult =>
http.post(url({ clusterName }), {
- params: [["--all", "1"]],
+ params: [["all", "1"]],
});
--
2.31.1

View File

@ -0,0 +1,25 @@
From 7902bb8fe7f97fbbc93e7001a6c4e8a445dcb44e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Valentin=20Vidi=C4=87?= <vvidic@valentin-vidic.from.hr>
Date: Wed, 15 Dec 2021 20:32:26 +0100
Subject: [PATCH 1/2] Fix snmp client
Required constant is missing causing the command to fail on startup and breaking the pcs_snmp_agent service.
---
pcsd/pcsd-cli-main.rb | 1 +
1 file changed, 1 insertion(+)
diff --git a/pcsd/pcsd-cli-main.rb b/pcsd/pcsd-cli-main.rb
index 29b9006d..be72d543 100644
--- a/pcsd/pcsd-cli-main.rb
+++ b/pcsd/pcsd-cli-main.rb
@@ -10,6 +10,7 @@ require 'remote.rb'
PCS = get_pcs_path()
+PCS_INTERNAL = get_pcs_internal_path()
$logger_device = StringIO.new
$logger = Logger.new($logger_device)
early_log($logger)
--
2.34.1

View File

@ -0,0 +1,38 @@
From 49d9c698697b0dd49f53b60340705b4fd656e248 Mon Sep 17 00:00:00 2001
From: Ivan Devat <idevat@redhat.com>
Date: Tue, 20 Nov 2018 15:03:56 +0100
Subject: [PATCH] do not support cluster setup with udp(u) transport in RHEL9
---
pcs/pcs.8.in | 2 ++
pcs/usage.py | 1 +
2 files changed, 3 insertions(+)
diff --git a/pcs/pcs.8.in b/pcs/pcs.8.in
index 0bbee071..ba14251d 100644
--- a/pcs/pcs.8.in
+++ b/pcs/pcs.8.in
@@ -457,6 +457,8 @@ By default, encryption is enabled with cipher=aes256 and hash=sha256. To disable
Transports udp and udpu:
.br
+WARNING: These transports are not supported in RHEL 9.
+.br
These transports are limited to one address per node. They do not support traffic encryption nor compression.
.br
Transport options are: ip_version, netmtu
diff --git a/pcs/usage.py b/pcs/usage.py
index bc885918..4e286f46 100644
--- a/pcs/usage.py
+++ b/pcs/usage.py
@@ -916,6 +916,7 @@ Commands:
hash=sha256. To disable encryption, set cipher=none and hash=none.
Transports udp and udpu:
+ WARNING: These transports are not supported in RHEL 9.
These transports are limited to one address per node. They do not
support traffic encryption nor compression.
Transport options are:
--
2.31.1

View File

@ -0,0 +1,25 @@
From f759872276ed8ff04bbf05010c18bbe4d1abdb11 Mon Sep 17 00:00:00 2001
From: Tomas Jelinek <tojeline@redhat.com>
Date: Tue, 1 Feb 2022 16:10:35 +0100
Subject: [PATCH 2/2] fix translating resource roles in colocation constraints
---
pcs/lib/xml_tools.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pcs/lib/xml_tools.py b/pcs/lib/xml_tools.py
index 07752f92..6a652fd1 100644
--- a/pcs/lib/xml_tools.py
+++ b/pcs/lib/xml_tools.py
@@ -66,7 +66,7 @@ def export_attributes(
result = {str(key): str(value) for key, value in element.attrib.items()}
if not with_id:
result.pop("id", None)
- for role_name in ("role", "rsc-role"):
+ for role_name in ("role", "rsc-role", "with-rsc-role"):
if role_name in result:
result[role_name] = pacemaker.role.get_value_primary(
const.PcmkRoleType(result[role_name].capitalize())
--
2.34.1

View File

@ -0,0 +1,26 @@
From f44cdc871a39da3960bd04565b4d1d5ffa19bd23 Mon Sep 17 00:00:00 2001
From: Ivan Devat <idevat@redhat.com>
Date: Thu, 20 Jan 2022 13:32:49 +0100
Subject: [PATCH 1/2] simplify ternar expression
The motivation for this is that covscan complains about it.
---
src/app/view/share/useUrlTabs.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/view/share/useUrlTabs.ts b/src/app/view/share/useUrlTabs.ts
index 7278dad8..a1136bf3 100644
--- a/src/app/view/share/useUrlTabs.ts
+++ b/src/app/view/share/useUrlTabs.ts
@@ -13,7 +13,7 @@ export const useUrlTabs = <TABS extends ReadonlyArray<string>>(
return {
currentTab,
- matchedContext: tab !== null ? tab.matched : `/${defaultTab}`,
+ matchedContext: tab?.matched ?? `/${defaultTab}`,
tabList,
};
};
--
2.31.1

1013
SPECS/pcs.spec Normal file

File diff suppressed because it is too large Load Diff