Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Agent creates a hidden $TF folder at random in one of all mapped folders #859

Closed
jesfer opened this issue Mar 15, 2017 · 10 comments
Closed

Comments

@jesfer
Copy link

jesfer commented Mar 15, 2017

Agent creates a hidden $TF folder at random in one of all mapped folders

See screenshots below. Depending on how I structure the local folders the $TF folder will appear in a different folder. Unpredictable behaviour and it has already messed up multiple build artifacts for us.

Agent version and platform

Agent Version: 2.112.0
OS: Windows Server 2008 R2 Standard
TFS: 2017.1 (15.112.26301.0)

(TFS and build server are separate machines)

Screenshots

workspace error 1
workspace error 2

@ericsciple
Copy link
Contributor

@jesfer i think a root mapping folder would bring predictability

@jesfer
Copy link
Author

jesfer commented Mar 15, 2017

@ericsciple A root mapping folder? Can you explain/give an example?

@ericsciple
Copy link
Contributor

type: map
server path: $/
local path:

type: cloak:
server path: $/notThisFolder

type: map
server path: $/thisFolder
local path: thisFolder

type: map
server path: $/alsoThisFolder
local path: alsoThisFolder

If that would require too many cloaks, another thing that might be easier to define would be define your root as a single-level map (e.g. $/my/root/directory/*) and then it only pulls direct descendants under that location (likely empty folders?)

@jesfer
Copy link
Author

jesfer commented Mar 15, 2017

After experimenting a bit I see that the appearance of the $tf folder is consistent with how a "complex" local workspace mapping works on my machine as well... So guess I'll have to live with that, even if it is annoying :)

Your mapping/cloaking suggestion works as long as there are only a few folders involved.

In my case this was easier:
workspace mapping 1
workspace mapping 2

Gives me a nice and predictable result. Was that what you meant by "define your root as a single level map" @ericsciple ?

@jesfer
Copy link
Author

jesfer commented Mar 15, 2017

I am closing this issue as it really has nothing to do with the agent (it is just how local workspaces work) and I now have a way to get a consistent and predictable behaviour.

@jesfer jesfer closed this as completed Mar 15, 2017
@bryanmacfarlane
Copy link
Collaborator

Thanks! @ericsciple - anything to document here in the agent troubleshooting or best practices section?

@ericsciple
Copy link
Contributor

@jesfer actually this this problem came up in the context of build artifacts. Assuming you are on VSTS and use the Copy Files task (stage contents) and then the Publish Build Artifacts task (publish staging folder), then you can specify an exclude pattern, e.g. !**/$tf/**

reference doc for pattern syntax is here

@jesfer
Copy link
Author

jesfer commented Mar 15, 2017

Yes, that would also work ☺

@maheswar
Copy link

Can we clock the $tf folder, If i clock i am getting following error

The path '$/Documentation/Files/$tf' contains a '$' at the beginning of a path component. Remove the '$' and try again.

Please help me to solve this issue.

@TingluoHuang
Copy link
Contributor

$/Documentation/Files/$tf is not a valid TFSVC path, why you have a nested $tf folder?

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

No branches or pull requests

5 participants