Skip to content

Pull fails due to deleted xsd file #848

Closed

Description

@raymond-rebbeck

The code base I work with previously had a single .xsd file that was unused and did not interact with Embedded Git and did not seem to cause any issues until now. This .xsd file has recently been deleted due to the interface associated with it being decommissioned.

After deleting this .xsd file from Git, doing a Pull with any Embedded Git version that has this commit 7d52f33 causes the Pull to stop after failing to delete this file. This is due to that commit causing filename in the following code snippet to be an empty string:

set filename = ##class(SourceControl.Git.Utils).FullExternalName(item)
if '##class(%File).Exists(filename) {
do ##class(SourceControl.Git.Utils).RemoveRoutineTSH(item)
// file doesn't exist anymore despite error -- should be ok
set sc = $$$OK
} else {
// Item still exists and was not deleted -- bad
set sc = e.AsStatus()
do e.Log()
}

This results in the first part of the if statement being executed where item being empty causes an exception to be thrown within RemoveRoutineTSH and the status is never set to $$$OK.

I have not tested with any other filetypes but presumably anything in the Git repo that is deleted and where ##class(SourceControl.Git.Utils).FullExternalName can return an empty string may break a subsequent pull.

IRIS for UNIX (Ubuntu Server LTS for x86-64 Containers) 2024.1.4 (Build 516_1U) Sat May 31 2025 12:35:51 EDT

Activity

  1. cambot commented on Sep 4, 2025

    @cambot
    Contributor

    Interesting. I see w ##class(%File).Exists("") return 0 both on windows and on Iris for Unix (Red Hat Enterprise Linux 8 for x86-64) 2025.1.0 (Build 198U) I presume this crashes for you on your version?

  2. raymond-rebbeck commented on Sep 4, 2025

    @raymond-rebbeck
    ContributorAuthor

    No, it returns 0 for me too, the problem is that since the referenced commit the filename is now an empty string which causes an exception to be thrown elsewhere.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions