PTCInc / thingworx-gitbackup-extension

[Unofficial/Not supported] ThingWorx GitBackup Extension for storing your ThingWorx application code in a Git repository
MIT License
25 stars 11 forks source link

Difference in entity XML #46

Closed JensCarmbrant closed 1 year ago

JensCarmbrant commented 1 year ago

Hello,

I have noticed that there is a difference between the XML's when using the GitBackup extension and when using the built in "Export as source control" functionality of the TWX platform and then using other Git tools for source control.

There is an XML tag in the "Entities" element named "universal". This tag contains "password" when someone uses the GitBackup extension, but is empty when exported using the export as source control function.

This causes some headache when later trying to see what differences has been made in the code.

Hope this can be fixed in some way. For now the only option I can see is to use some tool to add the "password" for anyone not using the GitBackup extension.

Thanks, Jens

vrosu commented 1 year ago

Hi Jens, I tested now the GitHub Extension in ThingWorx 9.3.8. I observed that if I export entities using the Export functionality from the GitBackup Main Mashup the universal = password is there. However, the same attribute is there if I click in ThingWorx Composer "Export to Source Control" from the upper drop down list seen at each entity next to Save, Cancel etc. Can you let me know the details around the functionality you call where you don't see the attribute?

JensCarmbrant commented 1 year ago

Hello,

You are correct. It seems like the universal = password is there when exporting as source control manually for each entity. I also just tested in my 9.3.5 platform.

The issue then seems to be when exporting a whole project(?) using the exporting function, like this:

image

If you could try that as well and see, I think it will be the same issue for you.

vrosu commented 1 year ago

I did just that and tested both by selecting a project and also without selecting one (exporting all). image I then checked two entities, a DataShape and a Thing, and both contained universal=password. image For your reference, the REST request body is this: image I'm a bit puzzled by this behavior. I don't see any changes between 9.3.5 and 9.3.8 accounting this change.

vrosu commented 1 year ago

And out of curiosity, can you test this behavior in 9.3.8 let's say?

JensCarmbrant commented 1 year ago

Unfortunately we do not have any 9.3.8 platforms at my company. But I have tested it on a 9.1 platform as well and it is the same there. No password in the universal tag.

I check the REST request as well: image And I think it is the same as what you have.

I'm starting to wonder if there is some platform setting that does this? Or if it is only from my user or something... I will check with my platform team and see if they get the same results. If they do perhaps it would be worth opening a case with PTC to see if they can see something.

JensCarmbrant commented 1 year ago

The universal tag was empty for my colleague as well. This leads me to believe there could be some platform setting or something that is causing this...

Do you think I should open a case with PTC?

vrosu commented 1 year ago

Yes, I think that would be the next step. Considering what I see here I think it won't be extremely fast to solve, because effectively we either need a way to reproduce internally, or to gather enough logs to understand what happening. But yes, that's the best way to handle this as of now. Once it's solved, make sure please to comment here for others benefit.

JensCarmbrant commented 1 year ago

In the end it seems like there is a bug in the export function when also zipping the project. So this should not have anything to do with the GitBackup extension.