Skip to content

internxt: implement re-login under refresh logic, improve retry logic - #9177

Merged
ncw merged 1 commit into
rclone:masterfrom
internxt:master
Feb 13, 2026
Merged

ncw merged 1 commit into
rclone:masterfrom
internxt:master

Conversation

@jzunigax2

Copy link
Copy Markdown
Contributor

What is the purpose of this change?

  • Fix internxt's refresh login to use stored credentials when possible instead of needing to manually run rclone config reconnect internxt:.
  • Also fixed retry logic to better handle rate limiting

Was the change discussed in an issue or in the forum before?

None that I could find, only discussed via email :)

Checklist

  • I have read the contribution guidelines.
  • I have added tests for all changes in this PR if appropriate.
  • I have added documentation for the changes if appropriate.
  • All commit messages are in house style.
  • I'm done, this Pull Request is ready for review :-)

@jzunigax2

Copy link
Copy Markdown
Contributor Author

tests passing:
imagen

➜  internxt git:(master) ✗ go test -v
=== RUN   TestIntegration
    fstests.go:438: Using remote "TestInternxt:"
=== RUN   TestIntegration/FsCheckWrap
    fstests.go:479: Not a wrapping Fs
=== RUN   TestIntegration/FsCommand
    fstests.go:507: No commands in this remote
=== RUN   TestIntegration/FsRmdirNotFound
=== RUN   TestIntegration/FsString
=== RUN   TestIntegration/FsName
=== RUN   TestIntegration/FsRoot
=== RUN   TestIntegration/FsRmdirEmpty
=== RUN   TestIntegration/FsMkdir
=== RUN   TestIntegration/FsMkdir/FsMkdirRmdirSubdir
=== RUN   TestIntegration/FsMkdir/FsListEmpty
=== RUN   TestIntegration/FsMkdir/FsListDirEmpty
=== RUN   TestIntegration/FsMkdir/FsListRDirEmpty
    fstests.go:399: FS has no ListR interface
=== RUN   TestIntegration/FsMkdir/FsListDirNotFound
2026/02/13 08:30:44 ERROR : does not exist: error listing: directory not found
=== RUN   TestIntegration/FsMkdir/FsListRDirNotFound
    fstests.go:399: FS has no ListR interface
=== RUN   TestIntegration/FsMkdir/FsEncoding
=== RUN   TestIntegration/FsMkdir/FsEncoding/control_chars
    fstests.go:708: testing "␀␁␂␃␄␅␆␇␈␉␊␋␌␍␎␏␐␑␒␓␔␕␖␗␘␙␚␛␜␝␞␟␡"
=== RUN   TestIntegration/FsMkdir/FsEncoding/dot
    fstests.go:708: testing "."
=== RUN   TestIntegration/FsMkdir/FsEncoding/dot_dot
    fstests.go:708: testing ".."
=== RUN   TestIntegration/FsMkdir/FsEncoding/punctuation
    fstests.go:708: testing "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"
=== RUN   TestIntegration/FsMkdir/FsEncoding/leading_space
    fstests.go:708: testing " leading space"
=== RUN   TestIntegration/FsMkdir/FsEncoding/leading_tilde
    fstests.go:708: testing "~leading tilde"
=== RUN   TestIntegration/FsMkdir/FsEncoding/leading_CR
    fstests.go:708: testing "␍leading CR"
=== RUN   TestIntegration/FsMkdir/FsEncoding/leading_LF
    fstests.go:708: testing "␊leading LF"
=== RUN   TestIntegration/FsMkdir/FsEncoding/leading_HT
    fstests.go:708: testing "␉leading HT"
=== RUN   TestIntegration/FsMkdir/FsEncoding/leading_VT
    fstests.go:708: testing "␋leading VT"
=== RUN   TestIntegration/FsMkdir/FsEncoding/leading_dot
    fstests.go:708: testing ".leading dot"
=== RUN   TestIntegration/FsMkdir/FsEncoding/trailing_space
    fstests.go:708: testing "trailing space "
=== RUN   TestIntegration/FsMkdir/FsEncoding/trailing_CR
    fstests.go:708: testing "trailing CR␍"
=== RUN   TestIntegration/FsMkdir/FsEncoding/trailing_LF
    fstests.go:708: testing "trailing LF␊"
=== RUN   TestIntegration/FsMkdir/FsEncoding/trailing_HT
    fstests.go:708: testing "trailing HT␉"
=== RUN   TestIntegration/FsMkdir/FsEncoding/trailing_VT
    fstests.go:708: testing "trailing VT␋"
=== RUN   TestIntegration/FsMkdir/FsEncoding/trailing_dot
    fstests.go:708: testing "trailing dot."
=== RUN   TestIntegration/FsMkdir/FsEncoding/invalid_UTF-8
    fstests.go:708: testing "invalid utf-8\xfe"
=== RUN   TestIntegration/FsMkdir/FsEncoding/URL_encoding
    fstests.go:708: testing "test%46.txt"
=== RUN   TestIntegration/FsMkdir/FsNewObjectNotFound
=== RUN   TestIntegration/FsMkdir/FsPutError
=== RUN   TestIntegration/FsMkdir/FsPutZeroLength
=== RUN   TestIntegration/FsMkdir/FsOpenWriterAt
    fstests.go:787: FS has no OpenWriterAt interface
=== RUN   TestIntegration/FsMkdir/FsOpenChunkWriter
    fstests.go:820: FS has no OpenChunkWriter interface
=== RUN   TestIntegration/FsMkdir/FsChangeNotify
    fstests.go:869: FS has no ChangeNotify interface
=== RUN   TestIntegration/FsMkdir/FsPutFiles
=== RUN   TestIntegration/FsMkdir/FsPutFiles/FsListDirFile2
=== RUN   TestIntegration/FsMkdir/FsPutFiles/FsListRDirFile2
    fstests.go:399: FS has no ListR interface
=== RUN   TestIntegration/FsMkdir/FsPutFiles/FsListR
=== RUN   TestIntegration/FsMkdir/FsPutFiles/FsListRSubdir
=== RUN   TestIntegration/FsMkdir/FsPutFiles/FsListDirRoot
=== RUN   TestIntegration/FsMkdir/FsPutFiles/FsListRDirRoot
    fstests.go:399: FS has no ListR interface
=== RUN   TestIntegration/FsMkdir/FsPutFiles/FsListSubdir
=== RUN   TestIntegration/FsMkdir/FsPutFiles/FsListRSubdir#01
    fstests.go:399: FS has no ListR interface
=== RUN   TestIntegration/FsMkdir/FsPutFiles/FsListLevel2
=== RUN   TestIntegration/FsMkdir/FsPutFiles/FsListRLevel2
    fstests.go:399: FS has no ListR interface
=== RUN   TestIntegration/FsMkdir/FsPutFiles/FsListFile1
=== RUN   TestIntegration/FsMkdir/FsPutFiles/FsNewObject
=== RUN   TestIntegration/FsMkdir/FsPutFiles/FsNewObjectCaseInsensitive
    fstests.go:1122: Not Case Insensitive
=== RUN   TestIntegration/FsMkdir/FsPutFiles/FsListFile1and2
=== RUN   TestIntegration/FsMkdir/FsPutFiles/FsNewObjectDir
=== RUN   TestIntegration/FsMkdir/FsPutFiles/FsPurge
    fstests.go:1154: FS has no Purge interface
=== RUN   TestIntegration/FsMkdir/FsPutFiles/FsPurgeRoot
    fstests.go:1191: FS has no Purge interface
=== RUN   TestIntegration/FsMkdir/FsPutFiles/FsListRootedSubdir
=== RUN   TestIntegration/FsMkdir/FsPutFiles/FsCopy
    fstests.go:1255: FS has no Copier interface
=== RUN   TestIntegration/FsMkdir/FsPutFiles/FsMove
    fstests.go:1347: FS has no Mover interface
=== RUN   TestIntegration/FsMkdir/FsPutFiles/FsDirMove
    fstests.go:1464: FS has no DirMover interface
=== RUN   TestIntegration/FsMkdir/FsPutFiles/FsRmdirFull
=== RUN   TestIntegration/FsMkdir/FsPutFiles/FsPrecision
=== RUN   TestIntegration/FsMkdir/FsPutFiles/ObjectString
=== RUN   TestIntegration/FsMkdir/FsPutFiles/ObjectFs
=== RUN   TestIntegration/FsMkdir/FsPutFiles/ObjectRemote
=== RUN   TestIntegration/FsMkdir/FsPutFiles/ObjectHashes
=== RUN   TestIntegration/FsMkdir/FsPutFiles/ObjectModTime
=== RUN   TestIntegration/FsMkdir/FsPutFiles/ObjectMimeType
    fstests.go:1597: MimeType method not supported
=== RUN   TestIntegration/FsMkdir/FsPutFiles/ObjectMetadata
    fstests.go:1628: Metadata method not supported
=== RUN   TestIntegration/FsMkdir/FsPutFiles/ObjectSetMetadata
    fstests.go:1699: SetMetadata method not supported
=== RUN   TestIntegration/FsMkdir/FsPutFiles/ObjectSetModTime
    fstests.go:1756: can't set modified time
=== RUN   TestIntegration/FsMkdir/FsPutFiles/ObjectSize
=== RUN   TestIntegration/FsMkdir/FsPutFiles/ObjectOpen
=== RUN   TestIntegration/FsMkdir/FsPutFiles/ObjectOpenSeek
=== RUN   TestIntegration/FsMkdir/FsPutFiles/ObjectOpenRange
=== RUN   TestIntegration/FsMkdir/FsPutFiles/ObjectPartialRead
=== RUN   TestIntegration/FsMkdir/FsPutFiles/ObjectUpdate
=== RUN   TestIntegration/FsMkdir/FsPutFiles/ObjectStorable
=== RUN   TestIntegration/FsMkdir/FsPutFiles/FsIsFile
=== RUN   TestIntegration/FsMkdir/FsPutFiles/FsIsFile/FsRoot
=== RUN   TestIntegration/FsMkdir/FsPutFiles/FsIsFileNotFound
2026/02/13 08:34:37 ERROR : error listing: directory not found
=== RUN   TestIntegration/FsMkdir/FsPutFiles/FromRoot
    fstests.go:1916: Opening root remote "TestInternxt:" path "rclone-test-lelajas8zaqa" from "TestInternxt:rclone-test-lelajas8zaqa"
=== RUN   TestIntegration/FsMkdir/FsPutFiles/FromRoot/List
=== RUN   TestIntegration/FsMkdir/FsPutFiles/FromRoot/ListEntries
=== RUN   TestIntegration/FsMkdir/FsPutFiles/FromRoot/ListR
    fstests.go:1953: FS has no ListR interface
=== RUN   TestIntegration/FsMkdir/FsPutFiles/FromRoot/Put
=== RUN   TestIntegration/FsMkdir/FsPutFiles/FromRoot/Put/Remove
=== RUN   TestIntegration/FsMkdir/FsPutFiles/PublicLink
    fstests.go:2012: FS has no PublicLinker interface
=== RUN   TestIntegration/FsMkdir/FsPutFiles/SetTier
    fstests.go:412: FS has no SetTier & GetTier interfaces
=== RUN   TestIntegration/FsMkdir/FsPutFiles/ObjectCheckWrap
    fstests.go:2117: Not a wrapping Fs
=== RUN   TestIntegration/FsMkdir/FsPutFiles/Bucket
    fstests.go:2133: Not a bucket based backend
=== RUN   TestIntegration/FsMkdir/FsPutFiles/ObjectRemove
=== RUN   TestIntegration/FsMkdir/FsPutFiles/ObjectAbout
=== RUN   TestIntegration/FsMkdir/FsPutFiles/FsPutStream
    fstests.go:2307: FS has no PutStream interface
=== RUN   TestIntegration/FsMkdir/FsPutFiles/Internal
    fstests.go:2351: *internxt.Fs does not implement InternalTester
=== RUN   TestIntegration/FsMkdir/FsPutChunked
    fstests.go:2372: *internxt.Fs does not implement SetUploadChunkSizer
=== RUN   TestIntegration/FsMkdir/FsCopyChunked
    fstests.go:2484: FS has no Copier interface
=== RUN   TestIntegration/FsMkdir/FsUploadUnknownSize
=== RUN   TestIntegration/FsMkdir/FsUploadUnknownSize/FsPutUnknownSize
=== RUN   TestIntegration/FsMkdir/FsUploadUnknownSize/FsUpdateUnknownSize
=== RUN   TestIntegration/FsMkdir/FsRootCollapse
=== RUN   TestIntegration/FsMkdir/FsDirSetModTime
    fstests.go:2633: FS has no DirSetModTime interface
=== RUN   TestIntegration/FsMkdir/FsMkdirMetadata
    fstests.go:2676: FS has no MkdirMetadata interface
=== RUN   TestIntegration/FsMkdir/FsDirectory
    fstests.go:2733: FS has no Directory methods and doesn't Wrap
2026/02/13 08:36:15 ERROR : error listing: directory not found
2026/02/13 08:36:16 ERROR : error listing: directory not found
2026/02/13 08:36:17 ERROR : Internxt root 'rclone-test-lelajas8zaqa': Failed to list "": directory not found
2026/02/13 08:36:18 ERROR : Failed to rmdir: directory not found
=== RUN   TestIntegration/FsShutdown
--- PASS: TestIntegration (353.07s)
    --- SKIP: TestIntegration/FsCheckWrap (0.00s)
    --- SKIP: TestIntegration/FsCommand (0.00s)
    --- PASS: TestIntegration/FsRmdirNotFound (0.79s)
    --- PASS: TestIntegration/FsString (0.00s)
    --- PASS: TestIntegration/FsName (0.00s)
    --- PASS: TestIntegration/FsRoot (0.00s)
    --- PASS: TestIntegration/FsRmdirEmpty (1.28s)
    --- PASS: TestIntegration/FsMkdir (344.59s)
        --- PASS: TestIntegration/FsMkdir/FsMkdirRmdirSubdir (7.74s)
        --- PASS: TestIntegration/FsMkdir/FsListEmpty (0.52s)
        --- PASS: TestIntegration/FsMkdir/FsListDirEmpty (0.55s)
        --- SKIP: TestIntegration/FsMkdir/FsListRDirEmpty (0.00s)
        --- PASS: TestIntegration/FsMkdir/FsListDirNotFound (0.26s)
        --- SKIP: TestIntegration/FsMkdir/FsListRDirNotFound (0.00s)
        --- PASS: TestIntegration/FsMkdir/FsEncoding (138.17s)
            --- PASS: TestIntegration/FsMkdir/FsEncoding/control_chars (8.50s)
            --- PASS: TestIntegration/FsMkdir/FsEncoding/dot (6.27s)
            --- PASS: TestIntegration/FsMkdir/FsEncoding/dot_dot (6.24s)
            --- PASS: TestIntegration/FsMkdir/FsEncoding/punctuation (6.64s)
            --- PASS: TestIntegration/FsMkdir/FsEncoding/leading_space (6.76s)
            --- PASS: TestIntegration/FsMkdir/FsEncoding/leading_tilde (6.50s)
            --- PASS: TestIntegration/FsMkdir/FsEncoding/leading_CR (6.18s)
            --- PASS: TestIntegration/FsMkdir/FsEncoding/leading_LF (5.55s)
            --- PASS: TestIntegration/FsMkdir/FsEncoding/leading_HT (7.07s)
            --- PASS: TestIntegration/FsMkdir/FsEncoding/leading_VT (9.31s)
            --- PASS: TestIntegration/FsMkdir/FsEncoding/leading_dot (8.44s)
            --- PASS: TestIntegration/FsMkdir/FsEncoding/trailing_space (7.56s)
            --- PASS: TestIntegration/FsMkdir/FsEncoding/trailing_CR (9.29s)
            --- PASS: TestIntegration/FsMkdir/FsEncoding/trailing_LF (7.58s)
            --- PASS: TestIntegration/FsMkdir/FsEncoding/trailing_HT (9.11s)
            --- PASS: TestIntegration/FsMkdir/FsEncoding/trailing_VT (7.68s)
            --- PASS: TestIntegration/FsMkdir/FsEncoding/trailing_dot (6.35s)
            --- PASS: TestIntegration/FsMkdir/FsEncoding/invalid_UTF-8 (6.61s)
            --- PASS: TestIntegration/FsMkdir/FsEncoding/URL_encoding (5.83s)
        --- PASS: TestIntegration/FsMkdir/FsNewObjectNotFound (0.67s)
        --- PASS: TestIntegration/FsMkdir/FsPutError (3.37s)
        --- PASS: TestIntegration/FsMkdir/FsPutZeroLength (4.51s)
        --- SKIP: TestIntegration/FsMkdir/FsOpenWriterAt (0.00s)
        --- SKIP: TestIntegration/FsMkdir/FsOpenChunkWriter (0.00s)
        --- SKIP: TestIntegration/FsMkdir/FsChangeNotify (0.00s)
        --- PASS: TestIntegration/FsMkdir/FsPutFiles (145.96s)
            --- PASS: TestIntegration/FsMkdir/FsPutFiles/FsListDirFile2 (3.44s)
            --- SKIP: TestIntegration/FsMkdir/FsPutFiles/FsListRDirFile2 (0.00s)
            --- PASS: TestIntegration/FsMkdir/FsPutFiles/FsListR (3.23s)
            --- PASS: TestIntegration/FsMkdir/FsPutFiles/FsListRSubdir (2.28s)
            --- PASS: TestIntegration/FsMkdir/FsPutFiles/FsListDirRoot (2.61s)
            --- SKIP: TestIntegration/FsMkdir/FsPutFiles/FsListRDirRoot (0.00s)
            --- PASS: TestIntegration/FsMkdir/FsPutFiles/FsListSubdir (1.16s)
            --- SKIP: TestIntegration/FsMkdir/FsPutFiles/FsListRSubdir#01 (0.00s)
            --- PASS: TestIntegration/FsMkdir/FsPutFiles/FsListLevel2 (1.75s)
            --- SKIP: TestIntegration/FsMkdir/FsPutFiles/FsListRLevel2 (0.00s)
            --- PASS: TestIntegration/FsMkdir/FsPutFiles/FsListFile1 (3.93s)
            --- PASS: TestIntegration/FsMkdir/FsPutFiles/FsNewObject (0.31s)
            --- SKIP: TestIntegration/FsMkdir/FsPutFiles/FsNewObjectCaseInsensitive (0.00s)
            --- PASS: TestIntegration/FsMkdir/FsPutFiles/FsListFile1and2 (3.44s)
            --- PASS: TestIntegration/FsMkdir/FsPutFiles/FsNewObjectDir (0.53s)
            --- SKIP: TestIntegration/FsMkdir/FsPutFiles/FsPurge (0.00s)
            --- SKIP: TestIntegration/FsMkdir/FsPutFiles/FsPurgeRoot (0.00s)
            --- PASS: TestIntegration/FsMkdir/FsPutFiles/FsListRootedSubdir (24.63s)
            --- SKIP: TestIntegration/FsMkdir/FsPutFiles/FsCopy (0.00s)
            --- SKIP: TestIntegration/FsMkdir/FsPutFiles/FsMove (0.00s)
            --- SKIP: TestIntegration/FsMkdir/FsPutFiles/FsDirMove (0.00s)
            --- PASS: TestIntegration/FsMkdir/FsPutFiles/FsRmdirFull (0.43s)
            --- PASS: TestIntegration/FsMkdir/FsPutFiles/FsPrecision (0.00s)
            --- PASS: TestIntegration/FsMkdir/FsPutFiles/ObjectString (0.36s)
            --- PASS: TestIntegration/FsMkdir/FsPutFiles/ObjectFs (0.31s)
            --- PASS: TestIntegration/FsMkdir/FsPutFiles/ObjectRemote (0.31s)
            --- PASS: TestIntegration/FsMkdir/FsPutFiles/ObjectHashes (0.59s)
            --- PASS: TestIntegration/FsMkdir/FsPutFiles/ObjectModTime (0.28s)
            --- SKIP: TestIntegration/FsMkdir/FsPutFiles/ObjectMimeType (0.27s)
            --- SKIP: TestIntegration/FsMkdir/FsPutFiles/ObjectMetadata (0.28s)
            --- SKIP: TestIntegration/FsMkdir/FsPutFiles/ObjectSetMetadata (0.89s)
            --- PASS: TestIntegration/FsMkdir/FsPutFiles/ObjectSetModTime (0.28s)
            --- PASS: TestIntegration/FsMkdir/FsPutFiles/ObjectSize (0.95s)
            --- PASS: TestIntegration/FsMkdir/FsPutFiles/ObjectOpen (1.97s)
            --- PASS: TestIntegration/FsMkdir/FsPutFiles/ObjectOpenSeek (1.78s)
            --- PASS: TestIntegration/FsMkdir/FsPutFiles/ObjectOpenRange (4.73s)
            --- PASS: TestIntegration/FsMkdir/FsPutFiles/ObjectPartialRead (0.97s)
            --- PASS: TestIntegration/FsMkdir/FsPutFiles/ObjectUpdate (5.40s)
            --- PASS: TestIntegration/FsMkdir/FsPutFiles/ObjectStorable (0.28s)
            --- PASS: TestIntegration/FsMkdir/FsPutFiles/FsIsFile (8.35s)
                --- PASS: TestIntegration/FsMkdir/FsPutFiles/FsIsFile/FsRoot (0.00s)
            --- PASS: TestIntegration/FsMkdir/FsPutFiles/FsIsFileNotFound (3.22s)
            --- PASS: TestIntegration/FsMkdir/FsPutFiles/FromRoot (15.02s)
                --- PASS: TestIntegration/FsMkdir/FsPutFiles/FromRoot/List (5.04s)
                --- PASS: TestIntegration/FsMkdir/FsPutFiles/FromRoot/ListEntries (0.54s)
                --- SKIP: TestIntegration/FsMkdir/FsPutFiles/FromRoot/ListR (0.00s)
                --- PASS: TestIntegration/FsMkdir/FsPutFiles/FromRoot/Put (8.85s)
                    --- PASS: TestIntegration/FsMkdir/FsPutFiles/FromRoot/Put/Remove (3.79s)
            --- SKIP: TestIntegration/FsMkdir/FsPutFiles/PublicLink (0.00s)
            --- SKIP: TestIntegration/FsMkdir/FsPutFiles/SetTier (0.00s)
            --- SKIP: TestIntegration/FsMkdir/FsPutFiles/ObjectCheckWrap (0.00s)
            --- SKIP: TestIntegration/FsMkdir/FsPutFiles/Bucket (0.00s)
            --- PASS: TestIntegration/FsMkdir/FsPutFiles/ObjectRemove (4.30s)
            --- PASS: TestIntegration/FsMkdir/FsPutFiles/ObjectAbout (39.77s)
            --- SKIP: TestIntegration/FsMkdir/FsPutFiles/FsPutStream (0.00s)
            --- SKIP: TestIntegration/FsMkdir/FsPutFiles/Internal (0.00s)
        --- SKIP: TestIntegration/FsMkdir/FsPutChunked (0.00s)
        --- SKIP: TestIntegration/FsMkdir/FsCopyChunked (0.00s)
        --- PASS: TestIntegration/FsMkdir/FsUploadUnknownSize (8.43s)
            --- PASS: TestIntegration/FsMkdir/FsUploadUnknownSize/FsPutUnknownSize (2.94s)
            --- PASS: TestIntegration/FsMkdir/FsUploadUnknownSize/FsUpdateUnknownSize (5.49s)
        --- PASS: TestIntegration/FsMkdir/FsRootCollapse (6.29s)
        --- SKIP: TestIntegration/FsMkdir/FsDirSetModTime (0.00s)
        --- SKIP: TestIntegration/FsMkdir/FsMkdirMetadata (0.00s)
        --- SKIP: TestIntegration/FsMkdir/FsDirectory (0.00s)
    --- PASS: TestIntegration/FsShutdown (0.00s)
PASS
ok      github.com/rclone/rclone/backend/internxt       353.104s

@jzunigax2
jzunigax2 marked this pull request as ready for review February 13, 2026 14:43

@ncw ncw left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks great - thank you :-)

I'll merge it now.

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.

2 participants