DocsArchive-<IP_ADDRESS>Auto archive content

Please don't merge this PR until target archive repo PR https://github.com/OPS-E2E-PPE/docs-archive-test-target_61a0bec8-8d19-4c9d-a76a-cad06fab3368/pull/1 is merged into live branch.
Auto archive content to https://github.com/opstest2/docs-archive-test-target_61a0bec8-8d19-4c9d-a76a-cad06fab3368.git

Docs Build status updates of commit d47a5bc:
:x: Validation status: errors
Please follow instructions here which may help to resolve issue.

File
Status
Preview URL
Details

:x:Error

Details

[Error: RepositoryUnauthorizedWithSourceCommit] Git data access to 'https://github.com/opstest2/docs-archive-test-source' (branch: Release_Archive_main_2022-01-10-04-31-33) is not authorized.. It looks like this might be the first time user: v-alji submitted a pull request to this repo. Before user can run builds in a pull request, he/she can enable 'v-alji' GitHub account in Docs by visiting Docs Portal (https://ops.microsoft.com). After enabling his/her account (v-alji), close and then reopen this pull request to start another build.

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel


[🧹] Migrate insecurity.js lib to TypeScript

During the migration of the server-side codebase to TypeScript the /lib/insecurity.js was not migrated as this caused errors in automated tests and at runtime which could not be solved back then.
Recommended steps

Renaming the file into insecurity.ts
Running all test suites (particularly npm run frisby)
Gradually correcting the runtime issues
Fix all errors from npm run build:server on insecurity.ts

Please assign this to me!

Happy to do so!

I have forked and cloned the repo, and ran npm run frisby and technically it should pass as I have not made any changes in the  code but still one of out of 47 test suites is failing.
Failed test suite:

What could be the reason? Stackoverflow.com is working fine in browser then why is it receiving timeout?

Yeah, that test is glitchy sometimes... 😐

Hi @njmulsqb! Any progress on this issue or should I unassign it so someone else might work on it?

Hi @njmulsqb! Any progress on this issue or should I unassign it so someone else might work on it?

Actually these days I am working on a ZAP issue and would come back to this later, but if its urgent you can assign it to someone else, no problem

@njmulsqb @bkimminich Let me know if you want me to take this up? Should not ideally take much time as it should be pretty direct after the migration of the models in my opinion!

@njmulsqb @bkimminich Let me know if you want me to take this up? Should not ideally take much time as it should be pretty direct after the migration of the models in my opinion!

Sure

Can we close this now? @bkimminich? I doubt that the PR got linked hence auto-closing failed


Avoid mutating the script argument in place

Addresses: https://github.com/Homebrew/homebrew-cask/issues/139715#issuecomment-1402751301
Mutating the argument in place, and in particular deleting the :executable entry, leads to a bug when the same code path leading to read_script_arguments is invoked twice, like in https://github.com/Homebrew/homebrew-cask/pull/139749
This commit makes a shallow copy of the argument, so that it can be safely mutated in the rest of the method.

[x] Have you followed the guidelines in our Contributing document?
[x] Have you checked to ensure there aren't other open Pull Requests for the same change?
[x] Have you added an explanation of what your changes do and why you'd like us to include them?
[x] Have you written new tests for your changes? Here's an example.

[x] Have you successfully run brew typecheck with your changes locally?
[ ] Have you successfully run brew tests with your changes locally?

The reported decrease in test coverage is not correct. I added a new spec file for abstract_artifact.rb to test the method I changed. There previously was no test for this class, now there is a test file that only tests the method I touched. Technically, the coverage increased, but the coverage report thinks differently, possibly because abstract_artifact.rb was not on its radar before.

Happy to have helped :)


[WIP] Fix appveyor build (setting JAVA_HOME).

Thanks @chrisdembia Is that because default install location of Java has changed on appveyor? Branch pr builds were passing but master wasn't I think

Yes, Chocolatey updated jdk8 from 1.8.0_121 to 1.8.0_152. I'm hoping these changes will help us avoid disruptions the next time Chocolately updates jdk8.
I think even the PR builds are failing.

AppVeyor build still failing because can't find java

@chrisdembia This feels so painful and time consuming, maybe we can use the full path to java.exe instead of adding to the path? Thanks for all your work on this, appreciate it.

Yes, pretty frustrating. Good idea, but it's Ant that is trying to use java.exe, not us. I'm not sure how to tell Ant what to do.

@chrisdembia one more thought, could it be permissions on java.exe (not executable)? The dir command earlier shows only "a" permission, is that expected? Just trying to get the automated build upagain. Thanks.


[Feature] state_dict hooks compatibility in from_module and to_module

Optionally calls the state_dict hooks in state_dict and load_state_dict.
cc @fegin

@vmoens The PR looks good to me.
I'm thinking to write a DCP storage plugin with TensorDict to see how it works. But we will need TensorDict to support 1.) DTensor and 2.) optimizer state_dict.

@fegin I made the from-module method a little more recursive.
Let me see about DTensors and optimizers state-dict compatibility.


Addition Subfolder created in Get-SFTPItem

SFTP Server:  OpenSSH 7.4 on RHEL 7.4
I would like to transfer the whole backup folder, its sub-directories, and files to a CIFS share eventually.  To start, make the destination to a local Windows folder.
$srcPath = "/folder/subfolderA "
$destPath = "c:\destFolder"
Get-SFTPItem -SessionId 0 -Path $srcPath -Destion $destPath
I expected the result to be:
c:\destFolder\file1.txt
c:\destFolder\file2.txt, etc.
Instead, it created an additional sub-folder from the srcPath and the result is like:
c:\destFolder\subfolderA\file1.txt
c:\destFolder\subfolderA\file2.txt, etc.
Intriguingly, if I ran Set-SFTPLocation first with $srcPath, then run
Get-SFTPItem -SessionId 0 -Path . -Destion $destPath
The additional subfolder would still be createdl, but this time named as "v1.0" (if executing from PowerISE) like:
c:\destFolder\v1.0\file1.txt
c:\destFolder\v1.0.\file2.txt, etc.
In both scenarios above, when executing Get-SFTPItem, the powershell session would crush and restart, but files transfer and creation of folders appear to complete before that happens.
In contrast, if executing in the powershell console, the additional sub-directory name created would be the login username (e.g. johndoe) instead of" v1.0", and powershell console shell would also crush and restart.
I wonder anyone experience the same symptoms and a fix may be available soon.  I plan to run ths powershell script in a schedule task.  If the powershell session keeps crushing, the schedule task would work right.  Thanks.

I think it is behaving like it should since it is "*Path" the parameter, you specify the location to place the file or folder, it behaves just like the Item cmdlets. by "crushing" you mean crashing?  Will look as to why it is crashing on ISE, I do most of my development in code so I rarely use the ISE.

You ca see on the first case it is behaving as expected. The example in help shows the way it behaves. on the second case can you do a -verbose?
PS C:\Users\carlos\Documents\Posh-SSH\Release> help Get-SFTPItem -Examples

NAME
    Get-SFTPItem

SYNOPSIS
    Downloads via SFTP an item from a SSH server.

    Example 1

    PS C:\>Get-SFTPItem -SessionId 0 -Path .ssh -Destination ./ -Verbose

    Downloads the .ssh folder from the server to the current directory.