Skip to content

Conversation

@d-w-moore
Copy link
Owner

No description provided.

paulborgermans and others added 30 commits July 2, 2024 17:00
When data objects were opened on redirected host connections, the
old connection was being leaked (overwritten without being properly released.)
The accumulation of irods.Connection object in source iRODSSession's active pool
caused agents to pile up rather than closing down and exiting as they should.
Eventually this caused a failure to connect from the client.
…ed connection timeout.

Note also: a connection_timeout of value None is now allowed, and
effectively disables the timeout.
This will allow tests that depend on irods.test.helpers.unique_name
to run in Python3.11+.

The aforementioned hashing was internally and noiselessly performed
in Python 3.8 and before, but was deprecated in 3.9 and then
discontinued in 3.11.

As a result, we'll now perform it ourselves.
... rather than straight from class Exception. This conforms to test_add_obj_meta_empty()'s expectation of
catching a ValueError.
Silence Python2 string-type mismatches.

These also caused some tests to fail if they were logging to io.BytesIO objects.
Also, pool tests no longer complain about unclosed file resource.
This change enables the iRODSAccess constructor to handle iRODSCollection and
iRODSDataObject types in addition to str-like types for the 'path' parameter.
A TypeError is now raised when an unsupported type is used for this parameter.
Works for both parallel as well as single threaded gets and puts.
updatable objects are either bound update functions taking a number of bytes in a transfer,
or progress-bar objects.  If the latter, the object's type must already be registered.

(See tests: Use of the progressbar and tqdm modules is demonstrated.)
The runner.py script which is used to run the full test suite looks for
files with the pattern "*_test.py". login_auth_test.py requires a special
environment and so should not be run with the regular suite of tests. It
must be run independently and manually, so the login_auth_test.py file has
been renamed to login_auth_test_must_run_manually.py in order to allow it
to continue to exist and be run, but not along with the rest of the suite.
Many of the tests in genquery2_tests.py include assertions on the
specific SQL strings generated by GenQuery2. These assertions assume
a Postgres database, causing the tests to fail on non-Postgres databases
which are nonetheless supported by the iRODS server. These assertions
have been replaced.

This changes the Postgres-specific assertions in many of the genquery2_test
tests to just assert that a table name is returned. We cannot assert the
specific contents without reaching out to the server to detect the version
and flavor of the database. Even then, the specific results may vary over
time. Testing the generated SQL is more the responsibility of the GenQuery2
parser and API in the server anyway, so this test should just be asserting
that a result that sort of looks like what we want is being returned by the
library.
The BETWEEN clause behaves differently for mysql (and mariadb, I assume)
than postgres, and the test_files_query_case_sensitive test assumes that
we are using postgres. In order to avoid this, the BETWEEN sub-tests have
been commented out until such a time as we can make meaningful assertions
about the case-sensitive query with a BETWEEN clause based on the flavor
of database being used by the connected iRODS server.
…hon 2 or 3)

The test:
  irods.test.access_test.TestAccess.test_iRODSAccess_cannot_be_constructed_using_unsupported_type__issue_558
needs this change to pass under Python2.

del empty line
This change modifies the irods.message.IRODS_VERSION global variable
to bring the advertised level of server compatibility up-to-date with
release 4.3.3 of the iRODS Server.  The only obvious effect is in the
use of irods.test.helpers.make_session() to create session objects for
test purposes, as this call will raise an exception if the server is too
recent.

IRODS_VERSION is also reflected in the 'relVersion' and 'apiVersion' tags
of the StartupPack message when a session is initiated.
…g' attribute

Includes test with atomic_metadata.
Other APIs that could use this feature include:
  replica_truncate
  atomic_apply_acls
This corrects a typographical error in the original implementation, which had
resulted in the "ticket_applied" attribute being mistakenly modified on the original
object rather than the cloned object.

Co-authored-by: Terrell Russell <[email protected]>
d-w-moore and others added 19 commits October 2, 2024 12:24
Also, make sure that hard-limiting and error checks to happen at session
creation time.
…ult.

When first implemented, the client redirect feature was on by default, meaning
that an open() call on a data object always favored a connection to the server hosting
the replica indicated by the resource hierarchy resolution outcome, and then subsequent
data movements would involve the new server host.  This proved problematic in some
scenarios, notably whenever the client was unable to connect using the server hostname
attached to the storage resource in question - DNS often being a factor.

As of now, therefore, the client redirects will no longer happen without explicit
"approval" by way of assigning the value of True to either the open() method's
allow_redirect parameter or (more globally) to a new configuration setting,
named irods.client_configuration.data_objects.allow_redirect
… native authentication.

This commit introduces iinit-like capability to generate the .irodsA file, when not
previously existing, for the pam_password authentication scheme.  Also, free functions
are introduced which create the .irodsA file from a cleartext password value in the native and
pam_password authentication schemes.
There is a race condition in BSD (of which MacOS is a decendent)
where socket.shutdown() only succeeds if the socket is still open.

If the socket is closed, the call fails with
OSError: [Errno 57] Socket is not connected

Linux and Windows do not error out if the socket is closed.
This test checks against a header file in the iRODS
development package, and therefore is skipped unless that
package is pre-installed.
The test should succeed only if no incorrect name-to-number column mappings
are loaded for COL_META_COLL_ATTR_UNITS.  When present, these faulty
mappings can create redundant and/or incorrect column-to-value entries in a
CollectionMeta query result.
@d-w-moore
Copy link
Owner Author

d-w-moore commented Nov 22, 2025

I've #'d everything but still am unsure about #3 for the setup_ssl.py renaming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants