SG-42072 Update PyYAML to 6.0.3 #1086
Open
Azure Pipelines / tk-core
succeeded
Feb 10, 2026 in 11m 24s
Build #20260210.1 had test failures
Details
- Failed: 20 (0.13%)
- Passed: 15,269 (99.79%)
- Other: 12 (0.08%)
- Total: 15,301
- 66778 of 84704 lines covered (78.84%)
Annotations
azure-pipelines / tk-core
tests/integration_tests/tank_commands.py::TankCommands::test_01_setup_legacy_bootstrap_core
self = <IODescriptorAppStore sgtk:descriptor:app_store?name=tk-shell&version=v0.10.2>
@LogManager.log_timing
def __create_sg_app_store_connection(self):
"""
Creates a shotgun connection that can be used to access the Toolkit app store.
:returns: (sg, dict) where the first item is the shotgun api instance and the second
is an sg entity dictionary (keys type/id) corresponding to to the user used
to connect to the app store.
"""
# maintain a cache for performance
# cache is keyed by client shotgun site
# this assumes that there is a strict
# 1:1 relationship between app store accounts
# and shotgun sites.
if os.environ.get(constants.DISABLE_APPSTORE_ACCESS_ENV_VAR, "0") == "1":
message = (
"The '%s' environment variable is active, preventing connection to app store."
% constants.DISABLE_APPSTORE_ACCESS_ENV_VAR
)
log.debug(message)
raise TankAppStoreConnectionError(message)
sg_url = self._sg_connection.base_url
if sg_url not in self._app_store_connections:
# Connect to associated Shotgun site and retrieve the credentials to use to
# connect to the app store site
try:
(script_name, script_key) = self.__get_app_store_key_from_shotgun()
except urllib.error.HTTPError as e:
if e.code == 403:
# edge case alert!
# this is likely because our session token in shotgun has expired.
# The authentication system is based around wrapping the shotgun API,
# and requesting authentication if needed. Because the app store
# credentials is a separate endpoint and doesn't go via the shotgun
# API, we have to explicitly check.
#
# trigger a refresh of our session token by issuing a shotgun API call
self._sg_connection.find_one("HumanUser", [])
# and retry
(script_name, script_key) = self.__get_app_store_key_from_shotgun()
else:
raise
app_store = os.environ.get("SGTK_APP_STORE", constants.SGTK_APP_STORE)
log.debug("Connecting to %s..." % app_store)
# Connect to the app store and resolve the script user id we are connecting with.
# Set the timeout explicitly so we ensure the connection won't hang in cases where
# a response is not returned in a reasonable amount of time.
app_store_sg = shotgun_api3.Shotgun(
app_store,
script_name=script_name,
api_key=script_key,
http_proxy=self.__get_app_store_proxy_setting(),
connect=False,
)
# set the default timeout for app store connections
app_store_sg.config.timeout_secs = constants.SGTK_APP_STORE_CONN_TIMEOUT
# determine the script user running currently
# get the API script user ID from shotgun
try:
> script_user = app_store_sg.find_one(
"ApiUser",
filters=[["firstname", "is", script_name]],
fields=["type", "id"],
)
python\tank\descriptor\io_descriptor\appstore.py:778:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
python\tank_vendor\shotgun_api3\shotgun.py:919: in find_one
results = self.find(
python\tank_vendor\shotgun_api3\shotgun.py:1070: in find
params = self._construct_read_parameters(
python\tank_vendor\shotgun_api3\shotgun.py:1150: in _construct_read_parameters
"entities_per_page": self.config.records_per_page,
python\tank_vendor\shotgun_api3\shotgun.py
Raw output
D:\a\1\s\python\tank\descriptor\io_descriptor\downloadable.py:115: tank.descriptor.errors.TankDescriptorIOError: Failed to download into path C:\Users\VSSADM~1\AppData\Local\Temp\tmpuw1hdto0\bootstrap\install\tmp\10cb4074f63746dc9af08d2625487a55: timed out
azure-pipelines / tk-core
tests/integration_tests/tank_commands.py::TankCommands::test_02_share_site_core
self = <tank_commands.TankCommands testMethod=test_02_share_site_core>
def test_02_share_site_core(self):
"""
Shares the site config's core.
"""
self.remove_files(self.shared_core_location)
> self.run_tank_cmd(
self.site_config_location,
"share_core",
extra_cmd_line_arguments=(self.shared_core_location,) * 3,
user_input=("y",),
)
tests\integration_tests\tank_commands.py:125:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <tank_commands.TankCommands testMethod=test_02_share_site_core>
location = 'C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\tmpuw1hdto0\\site'
cmd_name = 'share_core', context = None
extra_cmd_line_arguments = ('C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\tmpuw1hdto0\\shared', 'C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\tmpuw1hdto0\\shared', 'C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\tmpuw1hdto0\\shared')
user_input = 'y\n', timeout = 120
def run_tank_cmd(
self,
location,
cmd_name,
context=None,
extra_cmd_line_arguments=None,
user_input=None,
timeout=120,
):
"""
Runs the tank command.
:param str location: Folder that contains the tank command.
:param str cmd_name: Name of the Toolkit command. Can be ``None``.
:param dict context: Shotgun entity dictionary with keys ``type`` and ``id``.
:param list(str) extra_cmd_line_arguments: List of extra command line arguments. Empty by default.
:param list user_input: List of answers to provide to provide to the tank command prompt. Empty by default.
Each entry will be followed by a \n automatically.
:param int timeout: Timeout for the subprocess in seconds. Defaults to 120 seconds.
:raises Exception: Raised then timeout occurs or when the subprocess does not return 0.
The command line argument will be generated as:
tank [context["type"] context["id"]] [cmd_name] [extra_cmd_line_arguments]
"""
# The tank command line accepts argument in the following order:
# tank <optional entity type> <optional entity id> <optional command name> <optional arguments>
# For example: tank Asset Alice folders
#
# We'll build the command line arguments for the tank command backwards.
# First, add the tailing arguments to the list of arguments.
if extra_cmd_line_arguments is not None:
cmd_line_arguments = list(extra_cmd_line_arguments)
else:
cmd_line_arguments = []
# If a command name was specified, we'll add it.
if cmd_name is not None:
cmd_line_arguments = [cmd_name] + cmd_line_arguments
# If a context was specified, add it.
if context is not None:
cmd_line_arguments = [context["type"], context["id"]] + cmd_line_arguments
# Turn every command line arguments to strings.
cmd_line_arguments = [str(arg) for arg in cmd_line_arguments]
# Take each input and turn it into a string with a \n at the end.
user_input = tuple(user_input) if user_input else tuple()
user_input = ("%s\n" * len(user_input)) % user_input
# Do not invoke the tank shell (tank.bat or tank.sh) script directly. This causes
# issues when trying to timeout the subprocess because killing the shell script
# does not terminate the python subprocess.
#
# Therefore, we'll have to replicate the logic from the tank shell script.
# Check if this is a shared core and figure out the core location.
core_cfg_map = {
"linux": "core_Linux.cfg",
"win32": "core_Windows.cfg",
"darwin": "core_Darwin.cfg",
}
core_location_file = os.path.join(
location,
Raw output
D:\a\1\s\tests\python\sgtk_integration_test.py:403: Exception: Process completed unsuccesfully.
azure-pipelines / tk-core
tests/integration_tests/tank_commands.py::TankCommands::test_03_02_setup_project_from_app_store
self = <tank_commands.TankCommands testMethod=test_03_02_setup_project_from_app_store>
def test_03_02_setup_project_from_app_store(self):
"""
Setups the project.
"""
self.remove_files(self.pipeline_location)
> self.tank_setup_project(
self.shared_core_location,
"tk-config-testing",
None,
self.project["id"],
"tankcommandtest",
self.pipeline_location,
force=True,
)
tests\integration_tests\tank_commands.py:156:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\python\sgtk_integration_test.py:494: in tank_setup_project
self.run_tank_cmd(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <tank_commands.TankCommands testMethod=test_03_02_setup_project_from_app_store>
location = 'C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\tmpuw1hdto0\\shared'
cmd_name = 'setup_project', context = None
extra_cmd_line_arguments = ['--force']
user_input = 'tk-config-testing\n3621\ntankcommandtest\nyes\n\nC:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\tmpuw1hdto0\\pipeline\n\nyes\n'
timeout = 240
def run_tank_cmd(
self,
location,
cmd_name,
context=None,
extra_cmd_line_arguments=None,
user_input=None,
timeout=120,
):
"""
Runs the tank command.
:param str location: Folder that contains the tank command.
:param str cmd_name: Name of the Toolkit command. Can be ``None``.
:param dict context: Shotgun entity dictionary with keys ``type`` and ``id``.
:param list(str) extra_cmd_line_arguments: List of extra command line arguments. Empty by default.
:param list user_input: List of answers to provide to provide to the tank command prompt. Empty by default.
Each entry will be followed by a \n automatically.
:param int timeout: Timeout for the subprocess in seconds. Defaults to 120 seconds.
:raises Exception: Raised then timeout occurs or when the subprocess does not return 0.
The command line argument will be generated as:
tank [context["type"] context["id"]] [cmd_name] [extra_cmd_line_arguments]
"""
# The tank command line accepts argument in the following order:
# tank <optional entity type> <optional entity id> <optional command name> <optional arguments>
# For example: tank Asset Alice folders
#
# We'll build the command line arguments for the tank command backwards.
# First, add the tailing arguments to the list of arguments.
if extra_cmd_line_arguments is not None:
cmd_line_arguments = list(extra_cmd_line_arguments)
else:
cmd_line_arguments = []
# If a command name was specified, we'll add it.
if cmd_name is not None:
cmd_line_arguments = [cmd_name] + cmd_line_arguments
# If a context was specified, add it.
if context is not None:
cmd_line_arguments = [context["type"], context["id"]] + cmd_line_arguments
# Turn every command line arguments to strings.
cmd_line_arguments = [str(arg) for arg in cmd_line_arguments]
# Take each input and turn it into a string with a \n at the end.
user_input = tuple(user_input) if user_input else tuple()
user_input = ("%s\n" * len(user_input)) % user_input
# Do not invoke the tank shell (tank.bat or tank.sh) script directly. This causes
# issues when trying to timeout the subprocess because killing the shell script
# does not terminate the python subprocess.
#
# Therefore, we'll have to replicate the logic from the tank shell script.
# Check if this is a shared core and figure out the core location.
core_cfg_map = {
Raw output
D:\a\1\s\tests\python\sgtk_integration_test.py:403: Exception: Process completed unsuccesfully.
azure-pipelines / tk-core
tests/integration_tests/tank_commands.py::TankCommands::test_03_01_setup_project_from_zip_file
self = <tank_commands.TankCommands testMethod=test_03_01_setup_project_from_zip_file>
def test_03_01_setup_project_from_zip_file(self):
"""
Setups the project.
"""
self.remove_files(self.pipeline_location)
zipped_config_location = os.path.join(self.temp_dir, "zipped_config.zip")
zip.zip_file(self.simple_config_location, zipped_config_location)
> self.tank_setup_project(
self.shared_core_location,
zipped_config_location,
self.local_storage["code"],
self.project["id"],
"tankcommandtest",
self.pipeline_location,
force=True,
)
tests\integration_tests\tank_commands.py:140:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\python\sgtk_integration_test.py:494: in tank_setup_project
self.run_tank_cmd(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <tank_commands.TankCommands testMethod=test_03_01_setup_project_from_zip_file>
location = 'C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\tmpuw1hdto0\\shared'
cmd_name = 'setup_project', context = None
extra_cmd_line_arguments = ['--force']
user_input = 'C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\tmpuw1hdto0\\zipped_config.zip\nintegration_tests - Azure Pipelines 5\n3621\ntankcommandtest\nyes\n\nC:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\tmpuw1hdto0\\pipeline\n\nyes\n'
timeout = 240
def run_tank_cmd(
self,
location,
cmd_name,
context=None,
extra_cmd_line_arguments=None,
user_input=None,
timeout=120,
):
"""
Runs the tank command.
:param str location: Folder that contains the tank command.
:param str cmd_name: Name of the Toolkit command. Can be ``None``.
:param dict context: Shotgun entity dictionary with keys ``type`` and ``id``.
:param list(str) extra_cmd_line_arguments: List of extra command line arguments. Empty by default.
:param list user_input: List of answers to provide to provide to the tank command prompt. Empty by default.
Each entry will be followed by a \n automatically.
:param int timeout: Timeout for the subprocess in seconds. Defaults to 120 seconds.
:raises Exception: Raised then timeout occurs or when the subprocess does not return 0.
The command line argument will be generated as:
tank [context["type"] context["id"]] [cmd_name] [extra_cmd_line_arguments]
"""
# The tank command line accepts argument in the following order:
# tank <optional entity type> <optional entity id> <optional command name> <optional arguments>
# For example: tank Asset Alice folders
#
# We'll build the command line arguments for the tank command backwards.
# First, add the tailing arguments to the list of arguments.
if extra_cmd_line_arguments is not None:
cmd_line_arguments = list(extra_cmd_line_arguments)
else:
cmd_line_arguments = []
# If a command name was specified, we'll add it.
if cmd_name is not None:
cmd_line_arguments = [cmd_name] + cmd_line_arguments
# If a context was specified, add it.
if context is not None:
cmd_line_arguments = [context["type"], context["id"]] + cmd_line_arguments
# Turn every command line arguments to strings.
cmd_line_arguments = [str(arg) for arg in cmd_line_arguments]
# Take each input and turn it into a string with a \n at the end.
user_input = tuple(user_input) if user_input else tuple()
user_input = ("%s\n" * len(user_input)) % user_input
# Do not invoke the tank shell (tank.bat or tank.sh) script directly. This causes
# issues when trying to timeout the subprocess because killing
Raw output
D:\a\1\s\tests\python\sgtk_integration_test.py:403: Exception: Process completed unsuccesfully.
Loading