Skip to content

Commit

Permalink
1.26.0.0 release (#25)
Browse files Browse the repository at this point in the history
* official driver altitude

* version 1.26.0.0

* initial login prompts for sso

* Update p4vfs-verify.yml

* Update p4vfs-verify.yml

* Update p4vfs-verify.yml

* Update p4vfs-verify.yml

* Update p4vfs-verify.yml

* Update p4vfs-verify.yml

* Update p4vfs-verify.yml

* Update p4vfs-verify.yml

* Update p4vfs-verify.yml

* Update p4vfs-verify.yml

* Update p4vfs-verify.yml

* Update p4vfs-verify.yml

* Update p4vfs-verify.yml

* Update p4vfs-verify.yml

* reverting configuration actions

* login unit test fixes

* fixing unit tests and removing unnecessary impersonation

* DepotClient HandleUrl for HAS auth

* service environment launch fix

* build *Dev configurations in dev/* branches

* Update p4vfs-verify.yml

* configuration

* Update p4vfs-verify.yml

* Update p4vfs-verify.yml

* Update p4vfs-verify.yml

* Update p4vfs-verify.yml

* reverting p4vfs-verify.yml to main

* Update p4vfs-verify.yml
  • Loading branch information
jessk-msft authored Jul 10, 2023
1 parent cd6d798 commit 85beb9a
Show file tree
Hide file tree
Showing 22 changed files with 304 additions and 123 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/p4vfs-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
strategy:
matrix:
os: [windows-latest]
configuration: [Debug, Release]
configuration: [DebugDev, ReleaseDev]

steps:
- name: Set image info in env
Expand Down
2 changes: 1 addition & 1 deletion external/P4VFS/P4VFS.Module.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Microsoft.P4VFS.External
{
public class P4vfsModule : Module
{
private const string P4VFS_SIGNED_VERSION = "1.25.0.0";
private const string P4VFS_SIGNED_VERSION = "1.26.0.0";
private const string P4VFS_SIGNED_ARTIFACTS_URL = "https://github.com/microsoft/p4vfs/releases/download";

public override string Name
Expand Down
9 changes: 9 additions & 0 deletions source/P4VFS.Console/P4VFS.Notes.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
Microsoft P4VFS Release Notes

Version [1.26.0.0]
* Driver using officially allocated FSFilter HSM altitude of 189700
* Refactor of perforce client login operations to support common forms of password and
SSO login. This includes password auth, classic P4LOGINSSO client script auth, and server
auth extensions such as Helix Authentication Service.
* Fixing service process launch as impersonated user to include the user's profile environment.
This allows the service's interactive password prompt, or browser authentication, to execute
with expected user environment variables.

Version [1.25.1.0]
* Addition of new "hydrate" command as synonym for "resident -x". Moved the implementation into
C++ and now using a single fstat command instead of a files & where command.
Expand Down
2 changes: 1 addition & 1 deletion source/P4VFS.Console/Source/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,7 @@ private static bool CommandLogin(string[] args)
using (DepotClient depotClient = new DepotClient())
{
depotClient.Unattended = true;
return depotClient.Connect(_P4Port, _P4Client, _P4User, _P4Directory, _P4Passwd, _P4Host) && depotClient.Login(_P4Passwd);
return depotClient.Connect(_P4Port, _P4Client, _P4User, _P4Directory, _P4Passwd, _P4Host) && depotClient.Login((_) => _P4Passwd);
}
};

Expand Down
14 changes: 6 additions & 8 deletions source/P4VFS.Core/Include/DepotClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ namespace P4 {

typedef std::shared_ptr<struct FDepotClient> DepotClient;
typedef std::function<void(LogChannel::Enum channel, const char* severity, const char* text)> FDepotClientLogCallback;
typedef FDepotClientLogCallback FOnErrorCallback;
typedef FDepotClientLogCallback FOnMessageCallback;
typedef std::shared_ptr<FDepotClientLogCallback> DepotClientLogCallback;

struct FDepotClient
{
Expand All @@ -34,7 +33,7 @@ namespace P4 {
P4VFS_CORE_API bool IsConnectedClient();

P4VFS_CORE_API bool IsLoginRequired();
P4VFS_CORE_API bool Login(const DepotString& passwd);
P4VFS_CORE_API bool Login(DepotClientPromptCallback prompt);
P4VFS_CORE_API bool Login();

P4VFS_CORE_API DepotResult Trust();
Expand All @@ -61,10 +60,10 @@ namespace P4 {
template <typename Result = DepotResult>
Result Run(const DepotString& name, const DepotStringArray& args = DepotStringArray());

virtual bool OnRequestPassword(DepotString& passwd);
virtual void OnErrorPause(const char* message);
virtual void OnErrorCallback(LogChannel::Enum channel, const char* severity, const char* text);
virtual void OnMessageCallback(LogChannel::Enum channel, const char* severity, const char* text);
virtual DepotString OnPromptCallback(const DepotCommand* command, const char* message);

P4VFS_CORE_API LogDevice* Log();
P4VFS_CORE_API void Log(LogChannel::Enum channel, const DepotString& text);
Expand Down Expand Up @@ -93,15 +92,14 @@ namespace P4 {
P4VFS_CORE_API DepotString GetEnvImpersonated(const char* name) const;
P4VFS_CORE_API WString GetEnvImpersonatedW(const char* name) const;

P4VFS_CORE_API void SetErrorCallback(FOnErrorCallback* callback);
P4VFS_CORE_API void SetMessageCallback(FOnMessageCallback* callback);
P4VFS_CORE_API void SetErrorCallback(DepotClientLogCallback callback);
P4VFS_CORE_API void SetMessageCallback(DepotClientLogCallback callback);

protected:
bool LoginUsingConfig();
bool LoginUsingSSO();
bool LoginUsingClientOwner();
bool LoginUsingImpersonation();
bool LoginUsingInteractiveSession();
bool RequestInteractivePassword(DepotString& passwd);

private:
struct Api;
Expand Down
2 changes: 1 addition & 1 deletion source/P4VFS.Core/Include/DepotClientCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ namespace P4 {
void GarbageCollect(int64_t timeoutSeconds);

size_t GetFreeCount() const;
static int64_t GetIdleTimeoutSeconds();

private:
static DepotString CreateKey(const DepotConfig& config);

private:
typedef UnorderedMultiMap<DepotString, DepotClient, StringInfo::Hash, StringInfo::EqualInsensitive> FreeMapType;

const int64_t m_KeepAliveSeconds;
CriticalSection m_FreeMapLock;
FreeMapType* m_FreeMap;
};
Expand Down
5 changes: 4 additions & 1 deletion source/P4VFS.Core/Include/DepotCommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ namespace Microsoft {
namespace P4VFS {
namespace P4 {

typedef std::function<DepotString(const DepotString&)> FDepotClientPromptCallback;
typedef std::shared_ptr<FDepotClientPromptCallback> DepotClientPromptCallback;

struct DepotCommand
{
struct Flags { enum Enum {
Expand All @@ -28,8 +31,8 @@ namespace P4 {
DepotString m_Name;
DepotStringArray m_Args;
DepotString m_Input;
DepotString m_Prompt;
Flags::Enum m_Flags;
DepotClientPromptCallback m_Prompt;
};

struct IDepotClientCommand
Expand Down
2 changes: 1 addition & 1 deletion source/P4VFS.Core/Include/SettingManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace FileCore {
_N( int32_t, CreateFileRetryWaitMs, 250 ) \
_N( int32_t, PoolDefaultNumberOfThreads, 8 ) \
_N( int32_t, GarbageCollectPeriodMs, 5*60*1000 ) \
_N( int32_t, DepotClientCacheIdleTimeoutMs, 10*60*1000 ) \
_N( int32_t, DepotClientCacheIdleTimeoutMs, 5*60*1000 ) \


class SettingManager;
Expand Down
Loading

0 comments on commit 85beb9a

Please sign in to comment.