Using script with Automate?

Can your script be used in tandem with Photoshop's Automate? I put the script in /Applications/../Presets/Scripts/, and it now appears in the Scripts submenu.
I include it in an Automate action successfully. But when I run the action, it stops on the main window (for some reason it's not recording the fact that I clicked on the "Run" button in the action). It's stopping here.
I would love to be able to set it up to run this Export script across several PSDs at once, without me being around. Your script is amazing and so much faster than Layers To Files...
Any help would be hugely appreciated.

I know this is an old post, but I was wondering if there was any traction on this. This is exactly what I need to finish the the full automation of a process of mine.

@JosephMerc Unfortunately there's no "team" working on this. It's simply open source and as people have time and interest to pick up certain features, they happen.
Personally I'd love to do this but right now it sounds like a lot of work and I don't have time to get into it at the moment and adobe documentation on scripting can be rather hard to parse.

@hsw107 Thanks for the quick reply!
That makes definite sense. I'll do what I can to figure out how to move forward, but if anyone here has any recommendations on how to make this work, I'd love to hear them. I'm new to Javascript, but I'm exploring triggering some key presses that cycle over to run and trigger the dialogue once it's popped up.

Hey! For anyone who is looking to automate this, I've found a workaround using another program. If you set up a persistent script in Autohotkey (or similar program), you can have a script that identifies when the dialogue box pops up, and trigger an action that tabs through the box and runs this script.
I was thrilled to have found this! I can share more info if anyone is interested.

Hey! For anyone who is looking to automate this, I've found a workaround using another program. If you set up a persistent script in Autohotkey (or similar program), you can have a script that identifies when the dialogue box pops up, and trigger an action that tabs through the box and runs this script.
I was thrilled to have found this! I can share more info if anyone is interested.

@JosephMerc I know it's been a while, but if you still have the AutoHotkey solution for this I would be very interested.
@hsw107 Was there ever a solution built-in for this? Similar to @JosephMerc I'm really finding a lot of benefit to your script, but I'm attempting to use it in a series of actions that will save and export hundreds of combinations of edited layers and the only thing preventing me from setting it to run overnight to set-it-and-forget-it is that for each export I need to press the run button, and the confirmation button when it ends.

Oh man, it's been a while since I've been on this thread; I want to send a big thank you to @hsw107 for this script. It's literally been a life changer, and I've learned enough javascript to start elaborating on things like how PNGs get are named when they're exported, and things like that. It's been a wonderful trip, so thank you for the ewonderful script!
@daniellewooding , I do have the script kicking around still! You'll need to install Autohotkey, which should be a quick and easy install, once you find it online. Once you do, you'll create a text file in Notepad, and pop the code below in, and rename the ".txt" extension to ".ahk", which should change the icon to something like a large "H", if Autohotkey was installed properly (Or download the txt file I've attached, and rewrite the extension as ".ahk")
AutoPNG.txt
:
`#Persistent
SetTitleMatchMode 2
SetTimer, RunPNG, 2000
Return
RunPNG:
IfWinExist, Export Layers To Files
{
Send {rshift Down}{TAB 4}{rshift Up}
Send {space}
return
}
return
`
What the AHK script does is essentially identifies when the Export diaologue box of hsw107's script is present on screen, and (simply enough) just tabs through the buttons to "Run", and then simulates pressing the space bar to run the script.
It has saved me a lot of tedious work when it comes to batch processing PSDs in photoshop.
Some things to note;

It's best not to touch your computer while the script is running; since this simulates keystrokes, if you start changing the focus on your screen, the script will start incessantly tabbing through whatever other window you've selected and act a nuisance. Ideally, you set up your Batch, and you let it run until it's done.
Before you activate the AHK script, manually set up the settings for and export your first image with hsw107's script; after you've manually hit "Run" and are exporting, that's when you activate the AHK script and it'll take care of all the other images that your batch brings up to process. If you have the AHK script running right from the get go, your image will start exporting before you even have a chance to change the export destination. Furthermore, the AHK script (currently) isn't smart enough to know if you've changed the focus on the dialogue box; it only knows how to Tab through  to the Run button from the default focus the window has when it first appears; so not great if you're changing export settings on the first image of a new batch, but works perfectly for every image after that.
Get familiar with how to end or pause an AHK script, if you're not already; you'll want to close the script between separate batches, and you'll want to be able to quickly turn the script off if it starts tabbing through things it shouldn't.

Feel free to try it out and let me know if you run into trouble; I'll do what I can to help out!

@daniellewooding That at least covers getting the script to run without manually hitting the Run button.
However, I don't recall the confirmation at the end you mention needing to push; it's possible I found a way to nix that ages back. I'd have to double check, and try exporting with the original script again.

Hi there! With version v2.4.0 I added a "Run Silently" checkbox which removes the final confirmation message. Hope this helps!


Automated toml settings configured by mods sometimes not been reverted.

There has been some reports on 2.5 when closing cosmo memory the SFX setting is not been changed back to default.  Possibly related to the crash reporter but not confirmed as the cause.  I have observed the same issue myself twice with the 60fps setting.

I'd assume this being fixed as I didn't receive any feedback since the commit.


Share website to Twitter

To raise awareness, we should be able to share the website to Twitter.
Note, after we've done with Twitter, we can continue to other social medias.

To be decided:

the UI component to trigger the sharing (e.g. button)
the copy


update circulation activity mobile styles to match revised design

Just checked on the test site, this looks great.


[python3] cmake FindPython3 Development component

vcpkg does not present it's python3 port well to other ports and or there may be missing development files. cmake has built in support for detecting python3 and it is struggling to find the development component when python3 is installed via vcpkg.
For context, if you install python3 for Windows via the Visual Studio installer and a port you are building uses cmake and in the cmake files there is:
find_package(Python3 COMPONENTS Development)
https://cmake.org/cmake/help/v3.12/module/FindPython3.html
When the port is then built by vcpkg, cmake will pickup the python3 development component and the build will succeed.
If instead, you do not install python3 for Windows via the Visual Studio installer and simply add the dependency python3 to the CONTROL file of the port and attempt to build, if you ensure that:
vcpkg_find_acquire_program(PYTHON3)
get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY)
set(ENV{PATH} "$ENV{PATH};${PYTHON3_DIR}")

is inside the portfile, then the python exe is picked up but the development component is not found at all by cmake and the build will fail.
If you then go on to look at the python3 port's installed files and compare them to the python for Windows installed files, it appears that there may be a large number of files useful for developing python applications missing from vcpkg's python3 port's installation.
Proposed solution
vcpkg_find_acquire_program(PYTHON3) might benefit from special logic to determine if the python3 port has been built and installed so that it can present what cmake expects to find.
The expected development files are revealed to cmake via vcpkg's python3 port's installation or a python3-dev port is created to ensure that those who only want the lib get only what they need but the development files can be had separately.
Describe alternatives you've considered
I tried the MS Visual Studio Installer Python for Windows and it's system integration was much better than vcpkg's. cmake had absolutely no problems. Obviously, that kind of support would be nice in vcpkg.
Additional context
Python's pretty big now. It's become the common language at large and it's popularity continues to grow. Python 2 has been officially announced as being depreciated  at the start of next year, so there will be lots of work going on now where developers are porting to Python 3.
Although vcpkg is primarily a C++ package manager, the growing number of C++ Python 3 bindings and the way in which vcpkg is especially useful for reproducible builds makes Python 3 integration on par with the integration found in the Visual Studio Installer an especially interesting goal.
Whilst it could be argued to just use Visual Studio's Python 3 installation, it appears more suitable to me, to use the Python 3 port instead.

I was attempting to build a vcpkg port of PySide2 and the advice is that when building, the same C++ library versions used to compile Qt, Python, llvm and PySide2 must all be the same, which is when I observed the python integration and what I think is something that might be improved in vcpkg. I wanted to avoid downloading pre-compiled binaries from here there and everywhere and just use vcpkg instead.
One downside about the Visual Studio for Windows Python installation I noticed is that pip doesn't work out of the box on Windows 10 and you need to use a command line switch to switch to using a user folder for installs due to permissions. Having to do so doesn't really make easy system wide integration of modules downloaded with pip.
That's maybe somewhere vcpkg could move ahead of Visual Studio's python3 integration. A working pip; right off the bat, simply by installing the python3 port could make a lot of python devs very happy (I would like to think.)

Any news on this?
I'm trying to use pybind11 through vcpkg and it install the python3 dependency. But after generating via CMake and building I get errors that Python3.h is missing.
After adding the header directory manually in VS2019, next is the linking error (python37_d.lib). Is this port not linking development files through vcpkg or am I missing something big here?

@penumbra23

Is this port not linking development files through vcpkg or am I missing something big here?

vcpkg does not present it's python3 port well to other ports and or there may be missing development files.

The development files aren't being presented at all as far as I could tell. You are (honestly in my opinion) going to get much better results with python3 from the Visual Studio 2019 installer (select individual components.)
My report here is basically saying that python3 development using vcpkg is pretty much in a sorry state, whereas to the point that we can currently forget about any C++/python interopt libs building. The way it currently is I couldn't get PySide2 to build at all, although I will confess it was for an open source project I was forking and I personally prefer to keep scripting languages away from my C++ (however trite that my or may not seem.)
I know it's not the news you likely want to hear but that's the current status unfortunately.
I'd take a further look myself and try and fix it if I had the time and  python wasn't completely foreign to me. I wouldn't know where to start honestly and python as a language is not interesting to me at all.
Hope this helps; at least in some way.

Wow, that's sad to hear 😢
Nevermind, I can link it to my local installation of python through CMake but I wanted to automate our build pipelines to use ONLY vcpkg. I found a solution by linking to the python interpreter in vcpkg/downloads/tools directory, but seems to me it's just temporary and unstable in the long run...
Thnx @heydojo anyway!

Sad indeed. We had started with a build solution centered around vcpkg but might be pivoting away from it.


[redis-ha] Cannot configure down-after-milliseconds

Is this a request for help?:help

Is this a BUG REPORT or FEATURE REQUEST? (choose one):BUG REPORT

Version of Helm and Kubernetes:
helm:v2.9.1
k8s:v1.11.1
Which chart:stable/redis-ha
What happened: Cannot configure down-after-milliseconds
What you expected to happen:can configure values in sentinel.conf
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know:

The chart doesn't currently support this, however with the changes in #7323 this will allow full configuration of the sentinel.conf

@ssalaues , thank you for the replies. May I know when is the targeted release date for this?

There are some changes that I have to apply to the PR but should be able to merge this week.

Thank you so much, looking forward to the merge


Specifically include Windows 8 supported version(s)

The way the original is written, it looks like only Windows 7SP1+ and Windows 10 are supported, and Windows 8.x might no longer supported.  Especially as compared to the .NET Core 1.x document, which lists "Windows Client, 7 SP1 - 10".  Added a specific mention of 8.1+, per the linked Windows lifecycle document.  (Note - if Windows 8.x is no longer supported, then it should be specifically added to the "Out of support OS versions" section at the bottom.)

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. We will now review your pull request.
Thanks,
.NET Foundation Pull Request Bot


Automatically generate helpers

This pull request allows automatic helper generation. This is achieved by listening on the command finished event of migrate, migrate:rollback and package:discover commands.
I added this feature disabled by default, but it could be default on in the next major version.
Feel free to rename the config variable, this was my first idea.

I think this pull request is complete from my side. Of course suggestions are welcomed.

This competes with https://github.com/barryvdh/laravel-ide-helper/pull/797

I'm the author of the other PR, and I agree with everything you've both said.
The reason I decided to only update the affected models was that I was having a weird issue with git at the time. After running ide-helper:models, every single model file (even unmodified ones) would show up as modified. It's not an issue any longer, and I suppose it was just a misconfiguration of git's core.autocrlf config.
So yeah, that complicated workaround wasn't necessary after all. Just update everything on MigrationsEnded.

@mortenscheel thanks for your feedback!

Looking forward to having this feature added. Any progress?

I'm still waiting response from the project maintainers about this pull request.

:/
ping @barryvdh 🤗

I will try to make a pull request to the framework with a PackagesDiscovered event so we could use that.

I like the idea, but not sure if this is the best way. For Composer commands you can just add it to composer.json, but for migrations I see the benefit. I think it would be enough to just have a config option 'post-migrate' => ['ide-helper:generate -RW'] or something?

I side with @barryvdh last comment, this would combine the "established way" (composer) but allows a way into the migration (with the flexibility of providing how)

I will update the PR for the changes, I found out that:
"test $COMPOSER_DEV_MODE -eq 0 || $PHP_BINARY artisan ide-helper:generate"
can be used in the post dump section without displaying or generating errors in the production environment

Sorry, I forgot this, I will have some time this week to update this

Is this PR dead?

Sorry for not handling this, I'm closing it in favor of #1163 which is an updated version for this.


Incremental VM build fails with "Can't load Kernel binary: Invalid SDK hash."

Repro:

Create a local branch and build runtime

git checkout -b tmp master
tools/build.py -a x64 -m release runtime

Modify VM sources, for example

diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 6c402b8287..1e9daeed81 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -6426,7 +6426,7 @@ void TypeArguments::EnumerateURIs(URIs* uris) const {

 const char* TypeArguments::ToCString() const {
   if (IsNull()) {
-    return "TypeArguments: null";
+    return "TypeArguments: null1";
   }
   Zone* zone = Thread::Current()->zone();
   const char* prev_cstr = OS::SCreate(zone, "TypeArguments: (H%" Px ")",

Commit the change into a local branch

git commit -a -m foo

Build runtime once again

tools/build.py -a x64 -m release runtime

Build fails with the following error
ninja -C out/ReleaseX64 -j1000 -l64 runtime
ninja: Entering directory `out/ReleaseX64'
[12/51] ACTION //runtime/bin:generate_snapshot_bin(//build/toolchain/linux:clang_x64)
FAILED: gen/runtime/bin/vm_snapshot_data.bin gen/runtime/bin/vm_snapshot_instructions.bin gen/runtime/bin/isolate_snapshot_data.bin gen/runtime/bin/isolate_snapshot_instructions.bin
python ../../build/gn_run_binary.py compiled_action gen_snapshot --enable-experiment=non-nullable --null-safety --deterministic --snapshot_kind=core --vm_snapshot_data=gen/runtime/bin/vm_snapshot_data.bin --vm_snapshot_instructions=gen/runtime/bin/vm_snapshot_instructions.bin --isolate_snapshot_data=gen/runtime/bin/isolate_snapshot_data.bin --isolate_snapshot_instructions=gen/runtime/bin/isolate_snapshot_instructions.bin /usr/local/google/home/alexmarkov/work/dart/sdk/out/ReleaseX64/vm_platform_strong_stripped.dill
Command failed: ./gen_snapshot --enable-experiment=non-nullable --null-safety --deterministic --snapshot_kind=core --vm_snapshot_data=gen/runtime/bin/vm_snapshot_data.bin --vm_snapshot_instructions=gen/runtime/bin/vm_snapshot_instructions.bin --isolate_snapshot_data=gen/runtime/bin/isolate_snapshot_data.bin --isolate_snapshot_instructions=gen/runtime/bin/isolate_snapshot_instructions.bin /usr/local/google/home/alexmarkov/work/dart/sdk/out/ReleaseX64/vm_platform_strong_stripped.dill
output: Can't load Kernel binary: Invalid SDK hash.

[13/51] CXX obj/runtime/vm/libdart_vm_jit.object.o
ninja: build stopped: subcommand failed.
ninja -C out/ReleaseX64 -j1000 -l64 runtime done.

This is a basic development workflow which is now broken. Same error happens when switching between commits and building the VM.
The workaround is to remove out directory and make a clean build, but it is much slower.
/cc @cskau-g @mkustermann

Hi Alex,
I'm sorry you ran into this.
I believe this is the same issue Tess ran into yesterday as well. The short version is that GN bakes the sdk_hash into the generated Ninja build files, and build.py will happily reuse these even after the sdk_hash has changed (your commit) when the build files need to be updated.
I'd say this is a bit of a short-coming of our build system.
I have a CL for build.py which should address this, but there's a bit of discussion going on about the future of gn.py, so it hasn't landed yet.
In the meantime, you have two options for work-arounds:
tools/gn.py [...]  &&  tools/build.py [...]

To will make sure GN runs and regenerates the Ninja build files every time, which is a lot quicker that rebuilding the whole thing.
Or:
tools/gn.py --no-verify-sdk-hash [...]

To configure your build to disable the check all together.
Do let me know if this doesn't do it for you.
I'll see if I can't land a fix for build.py.

The workaround is to remove out directory and make a clean build, but it is much slower.

As @cskau-g says a simple tools/gn.py --no-verify-sdk-hash -ax64 -mrelease should disable the verification for all future builds - even switching between commits or anything else.
(@alexmarkov This is effectively the same problem as with tools/gn.py --bytecode - with the difference that sdk hash verification fails whereas with bytecode one sometimes just silently builds the wrong configuration)

We'll add the same flag to tools/build.py and possibly make it correctly re-run GN if needed - to avoid confusion

(@alexmarkov This is effectively the same problem as with tools/gn.py --bytecode - with the difference that sdk hash verification fails whereas with bytecode one sometimes just silently builds the wrong configuration)

This looks different to me: bytecode is a different build mode, and the only way to select build mode with our current build scripts is to clean out and run gn.py with corresponding options. In the scenario above build mode doesn't change at all.
I don't think --no-verify-sdk-hash is a sustainable solution, as it builds Dart SDK in a mode which is different from CQ/CI bots, so building and testing your change locally doesn't mean it would build and run on CQ/CI.

I'd say this is a bit of a short-coming of our build system.

I hope we can have the build(ninja) to rely only on the sources. Otherwise, builds mechanism of confirming whether output is up-to-date or not is useless.

Thank you very much, @rmacnak-google !
Your change 48c2181179f6ee5be57e9194c4451347aab5a791 fixed the build errors after committing a change or switching between commits.


Is Ignite 2.16.0 impacted by  CVE-2024-22243 ?

we got a vulnerability https://spring.io/security/cve-2024-22243
"Applications that use UriComponentsBuilder to parse an externally provided URL (e.g. through a query parameter) AND perform validation checks on the host of the parsed URL may be vulnerable to a open redirect attack or to a SSRF attack if the URL is used after passing validation checks."
The latest ignite release2.16using spring 5.2.25,

Is ignite really vulnerable to  CVE-2024-22243?
If the first one is true, we don't have any ignite version with non vulnerable Spring version. Are there any plans of Ignite to release the same?

Can you please have a look at this Urgently. This has a huge impact for us.
Thanks!

Applications that use UriComponentsBuilder

Ignite does not use UriComponentsBuilder at all, not a single match in the source code: https://github.com/search?q=repo%3Aapache%2Fignite UriComponentsBuilder&type=code
Looks there is no issue.


Spool Sets Status Tab

Not sure if a idea was already planned for this or status in general.
Please add separate tab to show which printer or instance ip/port currently has "set" a spool and which one it is set on.
This can be used to verify the printer is set to a spool and the correct one without flipping between printer instances.

Spoolman currently has no information on what printers are "using" a spool. It is a property of the printer, not Spoolman.
However, as mentioned in other discussions, I'm contemplating adding a Printers section to Spoolman, where Spoolman would then instead be in charge of spool assignment. This would be an optional feature.

Thanks for rapid response.
I was assuming as information was sent to spoolman it would also be able to pass along a tag from moonraker.
Not sure for multiple printer instances having spoolman assign the spools would work correct if it wouldn't know what printer is sending the usage?
Sorry pretty green in the database and python but stoked on this project. Have had it up and running for several pushes now no issues 👍

Closing this as this will be tracked in #26


Remove internal usage of HTTP request prelude

Remove crate-private re-exports in request::prelude and remove internal usage of it. Preludes make it very difficult to determine where something is being imported from, and ends up making files that use them confusing to read.

This pr seems to have been combined with #821

This pr seems to have been combined with #821

Some of the changes overlap but they don't address the same thing

PR rebased.

I had comments but I rubber ducked myself


Update repo to use new qiskit sphinx theme

Summary
The latest version of the qiskit_sphinx_theme (1.10.0) includes 2 major new features:

It replaces the existing top menu with the same top menu from qiskit.org
It adds support for segment analytics (optional)

This PR removes the existing docs/templates/layout.html so that terra will stop overriding the qiskit_sphinx_theme and enable the new top menu to show. This PR also updates the conf.py to opt-in to analytics (details on what is tracked here)
I also updated the headings in the left sidebar, because some pages (e.g. tutorials) are specific to terra and not present in the new unified top bar. Similarly other pages (like contributing things) are relevant to all repos and are linked in the new top menu so don't need to be in the sidebar anymore.
Not sure if I did the env var setting the way you meant @mtreinish 😅
Details and comments

thanks for the comments @jakelishman @HuangJunye ! I think i've addressed them all, lmk if theres anything else 😄

I am not tagging automerge in case @jakelishman and others want to have a final look.


Vulkano Needs MutableDescriptorSet

Version of vulkano: 0.34.1
OS: N/A
GPU (the selected PhysicalDevice): N/A
GPU Driver: N/A
Upload of a reasonably minimal complete main.rs file that demonstrates the issue: N/A

Issue
The PersistentDescriptorSet is designed to be immutable (the update method is private), which works great if I don't want to update my descriptor set. However, I do, and using UnsafeDescriptorSet by itself doesn't work because, unlike with PersistentDescriptorSet, I can't bind UnsafeDescriptorSet using the AutoCommandBufferBuilder::bind_descriptor_sets method, because neither UnsafeDescriptorSet nor Vec<UnsafeDescriptorSet> implements DescriptorSetsCollection trait.
Are there plans to add a MutableDescriptorSet struct that implements DescriptorSetsCollection, similar to PersistentDescriptorSet, but with a public update method? If not, can there be plans to do so? I would be happy to implement it and make a PR, if that's helpful. Thanks!

This was added by #2404 and will be part of the next Vulkano release, 0.35.

Oh awesome, looking forward to it! Thanks for the response!


Failed to run on RubyMine on macOS

Bug Description
A simple hello_world on RubyMine failed to run on the first two tries, with the error:

could not determine parent directory for mirrord files, project must contain a project file or a workspace file

Steps to Reproduce

Created a new project.
Created hello.rb with puts "Hello World".
Enabled mirrord.
Ran.

This failed twice, and on the third run some time later I got the target selection dialog.
Backtrace
No response
Relevant Logs
No response
Your operating system and version
MacOS 13.5.1
Local process
ruby
Local process version
No response
Additional Info
This was not reported to happen to any user. To me it happened in a RubyMine running via a gradle runIde task that runs my installed RubyMine. I don't know if it reproduces but I didn't want to just ignore it so I opened this issue so that we can maybe have a look at it later if we have time.

Does not reproduce with
RubyMine 2023.2.3
Build #RM-232.10072.21, built on October 6, 2023
And mirrord plugin 3.55.0 with (probably) mirrord binary 3.71.2
Also did not reproduce when running RubyMine from runIde like in the issue.
Should I continue investigating, e.g. by reviewing the code, or leave it at that as long as no user reports encountering this issue, @eyalb181?

Hey, closing this then, we'll reopen if anyone encounters it again.


Installation link returns 404 on josemiguel.org/styled-bootstrap/

The "Installation" link button on http://josemiguel.org/styled-bootstrap/ takes to http://josemiguel.org/styled-bootstrap/docs/doc1.html which returns 404.

@apaatsio
A lot of links are not working since it's under construction and the project is not ready.

The documentation is still on going, soon will be ready 🚀


[5.9] [Macros] Code item macros

Explanation: Add support for declaring and expanding code item macros.  Add experimental feature flag CodeItemMacros. Add diagnostics about illegal macro introduced names in @attached and @freestanding attributes.
Scope: Declaration sites and use sites of macros declared with @freestanding(codeItem) which was previously not possible, and @attached and @freestanding attribute checking.
Issue: rdar://106326121
Risk: Low. The new capabilities added here are gated under the CodeItemMacros feature flag.
Testing: Tests added for new behavior under the CodeItemMacros feature flag.
Reviews: @DougGregor
Original pull request: #64765

@swift-ci please smoke test

@swift-ci please test

The distributed_actor_custom_executor_availability.swiftCI issue will be resolved by: https://github.com/apple/swift/pull/64890  (cherry pick: https://github.com/apple/swift/pull/64891  )
but it seems there was another failure as well.

Currently blocked on https://github.com/apple/swift/pull/64873

@swift-ci please test

@swift-ci please test macos

@swift-ci please test


Add Fourth Policy

Add details on the recently released fourth policy "[Preview]: Schedule recurring updates using Update Management Center"

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: c5db0049-b91b-310d-e7bb-2942e6735e4a
Version Independent ID: ad024046-fd02-aecb-d142-192b36ec17f8
Content: Enable periodic assessment using policy
Content Source: articles/update-center/periodic-assessment-at-scale.md
Service: automation
Sub-service: update-management
GitHub Login: @SnehaSudhirG
Microsoft Alias: sudhirsneha

@RyanLWilliams Thanks for your comment. We will review the issue and get back to you shortly

@RyanLWilliams Information about the mentioned policy is documented here.
As there are no further documentation changes, we will close the issue for now. If there are further questions, please revert and we will be glad to assist you.


Support custom Pull Request number

In our case, we have to handle every push on the PR instead of pull_request.
This PR adds pr-number, so we can do like the following workflow:
name: CI
on: [push]
jobs:
  test:
    runs-on: ubuntu-18.04
    steps:
      - ......

      - uses: jwalton/gh-find-current-pr@v1
        id: findPR
        with:
          state: open

      - uses<EMAIL_ADDRESS>        name: Hide outdated bot comments
        if: success() && steps.findPR.outputs.number
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          issue_number: ${{ steps.findPR.outputs.number }}

      - name: Report code coverage
        uses: jhen0409/github-actions-report-lcov@main
        if: success() && steps.findPr.outputs.number
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          coverage-files: ./coverage/lcov.info
          artifact-name: coverage-root
          pr-number: ${{ steps.findPR.outputs.number }}

Or we might be able to use it with workflow_dispatch.

Thanks for this! Please update the readme further. "Number of the Pull Request. Optional." is vague and doesn't explain why someone would want to set this input.

Thanks for the update. I'll keep this open since, upon review, it is closely related to #22 and #25

Hi @jhen0409! Thank you again for this. I've made some modifications that I'd like you to test before we merge to main.


Add tslint rule prefer-const

Add tslint rule prefer-const

prefer-const is custom rule that included in tslint-microsoft-contrib
Need run npm install

Remove sample test code

Coverage remained the same at 100.0% when pulling d550da19059a5eed0350f187c47b9a2e6d38a27e on add-tslint-rule-prefer-const into 6127eb434cd4504fd8480244c19466c372ac54fb on develop.

LGTM


BOAVIZTA MANUFACTURER DATABASE - PEDAGOGICAL FRONT

NOM
STORY
GUIDELINES
HELP
RESOURCES

https://github.com/Boavizta/environmental-footprint-data/pull/33

User story proposal :
As an owner of a 13-inch MacBook Air with Retina display (or any other material present in the listing) I would like to understand the impact on the environment of my equipment. I am not familiar with any scientific approach of environmental impacts measurement.
-> Boavizta should make it easy to understand that most of the impact are linked to the manufacture of the equipment and not the use of it.
To make it more pertinent : Users should select how many years does they own the equipment to get a more believable result to their eyes. The profile of use of the equipment can be predefined and explained (ie 4 hours per day)

We could add visual (an equivalent-something) representation of the impacts (like how may km of travel).
In term of impacts of use (even if we know it is relatively low compared to manufacture impacts), we should consider the region of use, because some impacts are very dependent on the region where electricity is produced (different carbon mix). https://app.electricitymap.org/map

User story 2
As a novice in digital environmental impact evaluation, I would like to browse Boavizta manufacturer database directly into Boavizta's website to facilitate access and data visualization.

User story 3
As a novice in digital environmental impact evaluation, I would like to select specific devices (with filters on each columns) and see a visualization (pie chart) scope 2 and scope 3 ratios of selected devices to learn more about scope 2 and scope 3 ratios depending on the type of devices.

User story 4
As a novice in digital environmental impact evaluation, I would like to select specific devices (with filters on each columns) and see the average GWP impact of selected devices on their whole life cycle to learn more about orders of magnitude depending on the type of devices.

User story 5
As a novice in digital environmental impact evaluation, I would like to select specific devices (with filters on each columns), set specifics Use location and Lifetime and adjust the average GWP impact of selected devices on their whole life cycle to learn more about orders of magnitude depending on the type of devices, their lifetime and use location.

Impact scope 3
Impact scope 3 = gwp_total*gwp_manufacturing_ratio
Impact scope 2
If year and data location not override :
Impact scope 2 = csv.gwp_total*csv.gwp_use_ratio
data location = csv.use_location
life time = csv.lifetime
If duration is override :
Impact scope 2 = ((csv.gwp_total*csv.gwp_use_ratio)/csv.lifetime)*duration
data location = csv.use_location
life time = duration
If data location is override :
Impact scope 2 = csv.yearly_tec*csv.lifetime*impact_factor(location)`` data location = location life time = csv.lifetime```
If duration and data location are override :
Impact scope 2 = csv.yearly_tec*duration*impact_factor(location)`` data location = location life time = duration```

Should we move this issue to https://github.com/Boavizta/boavizta-front ?


The help-text should wrap only after the width of the input box.

Help text should utilize the available width.

@frjo should we mark this as won't fix.


feat: add additional materials button - AI-539 [migration]

Description
Has a migration

Adds additional materials button.
Adds prompt guidance for additional materials
Refractors modify button to reduce duplication
add e2e test

EDIT - Removed option for translating keywords new ticket here
Acceptance Criteria
https://www.notion.so/oaknationalacademy/In-app-feedback-additional-materials-10526cc4e1b180dd8ea9cf8654ae099d

[ ]  When there is no additional materials section at all, no change to the current working
[ ]  When there are no additional materials, modify button is replaced with a ‘Add additional materials’ button.
[ ]  5 additional material options to be included in dropdown option (see above for options)
[ ]  User can select an option to add relevant additional material to their lesson
[ ]  User can select other and provide details of an additional material they’d like to add
[ ]  For the language option, Aila should follow up and ask which language to use
[ ]  When there are additional materials, option copy to be modified to suggestion above.

How to test

Go to https://oak-ai-lesson-assistant-ro5gl0ww4.vercel-preview.thenational.academy
Create lesson - when a lesson has 'none' for additional resources you should see 'add additional resource' button with different options. Modify should work as before.

Checklist

[ ] Manually tested across browsers / devices
[ ] Considered impact on accessibility
[ ] Does this PR update a package with a breaking change

:tada: This PR is included in version 1.15.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


the memory usage per watch is high

I create N watchers watching on N different key spaces.
The memory usage per watcher is around 45KB, which is pretty high.
I hope this should be O(1)KB if not bytes.

Add more details, we should be able to watch more keys (so more watcher) per connection. For each connection, we need to allocate a go-routine and user space/kernel space fd/buffer. O(10)kb memory for each connection is fine.

For v3, the average memory consumption per watch is reduced to less than 1kb when you have O(1k) clients with O(100) watchers per client.

Woo-hoo!
On Fri, Nov 13, 2015, 15:12 Xiang Li<EMAIL_ADDRESS>wrote:

Closed #2658 https://github.com/coreos/etcd/issues/2658.
—
Reply to this email directly or view it on GitHub
https://github.com/coreos/etcd/issues/2658#event-464156592.


New logger

Added very basic loggin ability to the main function, but realized I need to refactor the package in to "main" function following best practices to add other features


Add CodeBehind Framework information.

Please add the CodeBehind Framework and put information about installing, configuring, and developing with it in the new md file.
CodeBehind is a new framework based on ASP.NET Core published by Elanat.

According to the latest tests of the Elanat team, the CodeBehind framework is up to 40% faster than the default ASP.NET Core frameworks (ASP.NET Core MVC and Razor Pages).
Performance test, ASP.NET Core MVC and Razor Pages vs CodeBehind Framework in version 2.2
GitHub link:
https://github.com/elanatframework/Code_behind

Hi,
Please create a pull request to add this topic to specific and related section. and if you couldn't find related section for that, please close your issue.
Thanks.


Bewegung der NPCs und des Burgherren- Movement of NPCs and the lord

Hallo und erstmal vielen Dank für den Patch:)
Wenn sich nicht eine Möglichkeit finden lässt um Gebäude über NPCs drüber zu bauen, wäre es stattdessen möglich die Lauffreudigkeit besagter NPCs zu erhöhen?

I would be interesting if the motivation of npcs to move around could be somehow increased, since especially children have a tendency to remain at the same position for a long time. Even worse are camels in Skirmish, which, as far as I can tell, are never leaving their position, although this problem can be solved with archers.
Other than that, would it be nice, if one could get full control of the lord not just in skirmish mode, since then it would be easier to move him out of trouble.
Thanks and Greetings

Yesterday I played a match with the Nizar against the Abbot and the Caliph, with an Advantage for our enemies. The Nizar got absolutely wasted by the Caliph and when he called for help his Castle was already in ruins and he just survived by sheer luck because the swordsmen didn't walk straight to the Lord and I had time to send troops to rescue him. The Problem was that he only called for help when a heap of swordsmen was already walking towards his Keep.
I would be really cool if an AI-Ally would try to flee his Castle if it is really lost, like the Player can´in such a Situation.

I think it might be easier if AI could ask AI allies for help as well. The asked AI ally will then check its current attack force size and if enough units are in the army will send help. After the attack is survived the asking AI will cancel the help request and release the helper's army again.
All those trigger are already kinda in the game.

I think it might be easier if AI could ask AI allies for help as well. The asked AI ally will then check its current attack force size and if enough units are in the army will send help. After the attack is survived the asking AI will cancel the help request and release the helper's army again.
All those trigger are already kinda in the game.

And for the AI to ask for resources from another AI...


Update resp.go

show errors when NIL response ,  is very valuable for some type like zset

Hey @mlaoji, thanks for the PR! A lot of people have been confused by how radix handles nil responses, and this is a great way to solve that problem I think. if you could make errResNil into ErrRespNil then I'd be happy to merge, it's better to expose the error so people can check it directly (like in io.EOF or context.Canceled) rather than checking the string.


'withManager' used in example is deprecated in http-client

http-client recommends using newManager instead of withManager, so it seems the documentation on the Pipes.HTTP module should be updated.

It seems that parseURL is deprecated as well.

Fix up here: https://github.com/Gabriel439/Haskell-Pipes-HTTP-Library/pull/14


[Event Request] codeunit 100 "Calc. G/L Acc. Where-Used" OnDeleteGLNoOnBeforeTempGLAccWhereUsedFindFirst

Hello, can you please add a new Event OnDeleteGLNoOnBeforeTempGLAccWhereUsedFindFirst in codeunit 100 "Calc. G/L Acc. Where-Used" ?
    procedure DeleteGLNo(GLAccNo: Code[20]): Boolean
    var
        GLSetup: Record "General Ledger Setup";
        GLAcc: Record "G/L Account";
        ConfirmManagement: Codeunit "Confirm Management";
    begin
        GLSetup.Get();
        if GLSetup."Check G/L Account Usage" then begin
            CheckPostingGroups(GLAccNo);
            OnDeleteGLNoOnBeforeTempGLAccWhereUsedFindFirst(TempGLAccWhereUsed);
            if TempGLAccWhereUsed.FindFirst() then begin
                Commit();
                if ConfirmManagement.GetResponse(StrSubstNo(ShowWhereUsedQst, GLAcc.TableCaption()), true) then
                    ShowGLAccWhereUsed();
                Error(Text000);
            end;
        end;
        exit(true);
    end;

    [IntegrationEvent(false, false)]
    local procedure OnDeleteGLNoOnBeforeTempGLAccWhereUsedFindFirst(var TempGLAccWhereUsed: Record "G/L Account Where-Used" temporary)
    begin
    end;

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.
Build ID: 10879.


Cant configure/change the calendar

I want to change the calendar events from US Events to PH Calendar events :(

Please go to forum http://forum.magicmirror.builders for support and troubleshooting.


[vtk] Add find dependency pugixml in cmake config file

When using vtk, VTKTargets.cmake calls pugixml by name. However, VTKConfig.cmake did not add the code to find pugixml, so I added it.
Related: #9947.

@dbonhaus  @manvscode @RamanKutseika @jasjuang
Could you test this PR?
Thanks.

Will rerun CI test after #10390 merged.

/azp run


ipython error in non-spyder terminals

@jcschmitt @ktritz
I get the following errors when I run iPython in non-Spyder terminals.
[sunfire07:~] % ipython
Python 2.7.10 |Anaconda 2.3.0 (64-bit)| (default, Sep 15 2015, 14:50:01)
Type "copyright", "credits" or "license" for more information.

IPython 4.0.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.
[TerminalIPythonApp] WARNING | Error in loading extension: kernmagic
Check your config files in /u/drsmith/.ipython/profile_default
Traceback (most recent call last):
  File "/p/fdf/anaconda/lib/python2.7/site-packages/IPython/core/shellapp.py", line 267, in init_extensions
    self.shell.extension_manager.load_extension(ext)
  File "/p/fdf/anaconda/lib/python2.7/site-packages/IPython/core/extensions.py", line 89, in load_extension
    __import__(module_str)
ImportError: No module named kernmagic

The same error happens in terminal and X11 on my Mac and in non-spyder terminals in nomachine.  Any thoughts?

Try
from fdf import factory
I don't think the init file is set up properly.
On Thu, Oct 15, 2015, 5:37 PM David R. Smith<EMAIL_ADDRESS>wrote:

@jcschmitt https://github.com/jcschmitt @ktritz
https://github.com/ktritz
I get the following errors when I run iPython and fdf in non-Spyder
terminals.
[sunfire07:~] % ipython
Python 2.7.10 |Anaconda 2.3.0 (64-bit)| (default, Sep 15 2015, 14:50:01)
Type "copyright", "credits" or "license" for more information.
IPython 4.0.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.
[TerminalIPythonApp] WARNING | Error in loading extension: kernmagic
Check your config files in /u/drsmith/.ipython/profile_default
Traceback (most recent call last):
File "/p/fdf/anaconda/lib/python2.7/site-packages/IPython/core/shellapp.py", line 267, in init_extensions
self.shell.extension_manager.load_extension(ext)
File "/p/fdf/anaconda/lib/python2.7/site-packages/IPython/core/extensions.py", line 89, in load_extension
import(module_str)
ImportError: No module named kernmagic
In [1]: import fdf
In [2]: nstx = Machine(shotlist=141000)
NameError                                 Traceback (most recent call last)
 in ()
----> 1 nstx = Machine(shotlist=141000)
NameError: name 'Machine' is not defined
In [3]:
FDF runs fine in python or ipython within Spyder. The same errors happen
in terminal and X11 on my Mac and in non-spyder terminals in nomachine. Any
thoughts?
—
Reply to this email directly or view it on GitHub
https://github.com/Fusion-Data-Framework/fdf/issues/19.

sorry - the fdf error in the original comment was user (me) error.  the ipython error is real, though.

Ah, find the line
c.TerminalIPythonApp.extensions = ['kernmagic']
in your ipython_config.py file in  /u/drsmith/.ipython/profile_default
and comment it out.

great, thanks.


Enter after a video duplicates it

Pressing enter after a video tag duplicates it.

Please assign this to me.

@dselman @irmerk Raised PR here #116 Please review.

The video plugin was removed.


Added cpu-frequency indicator applet

Default profile is set to powersave mode to reduce laptop heating when using Ubuntu. Also works on Desktops.

Makes sense to keep it on powersave, should we add a note in the Readme about this?

As can be seen from https://travis-ci.org/github/rsnk96/Ubuntu-Setup-Scripts/jobs/681572113, cpufreq-info as it is right now doesn't print any info since it's inside execute
Don't think details about CPU freq will be very useful, but doesn't matter much
Using indicator-cpufreq here will fail in Travis since it's a GUI, and requires manual intervention from the user to actually proceed further. It should start by itself on the next boot, so I don't think  that should be added to the script


Add Waypoints to Route

What issues are you trying to prioritize?On Apr 24, 2023, at 8:19 AM, iKlsR @.***> wrote:
Sorry for hijacking this issue but would you consider funding to target/prioritize specific features @eopeter?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

We run our own osrm instance so we plan to ingest those vs mapbox's standard response, drawing custom or new parts of the road network using that data and making use of silent waypoints to coax certain paths was something on our roadmap so this pr assists with a part of that. We're evaluating what we need as we go along so don't have a comprehensive list now but we could also schedule a chat and discuss more if interested later on, no rush and thanks for the reply.


Write a single tutorial to cover core primitives introduced by the package

The list of core primitives could be found in the current version of README.md file.

this was done in #99


fix: clean old data

:tada: This PR is included in version 1.32.2 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Add job for extracting tables to CloudStorage

Uses #1064 as a base.

Rebased after landing #1064.

Are we all good here? AFAICT we got the :returns: issue sorted out. If yes, LGTM and feel free to merge. Ping me on the dependent PRs once rebased.


CustomOp with more than one auxiliary state segfaults

Description
A trivial CustomOp in python that uses more than one auxiliary state variable often causes
a segfault, typically on process shutdown.
Environment info (Required)
----------Python Info----------
Version      : 3.6.0
Compiler     : GCC 4.2.1 (Apple Inc. build 5666) (dot 3)
Build        : ('v3.6.0:41df79263a11', 'Dec 22 2016 17:23:13')
Arch         : ('64bit', '')
------------Pip Info-----------
Version      : 9.0.1
Directory    : /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip
----------MXNet Info-----------
Version      : 0.12.1
Directory    : /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/mxnet
Commit Hash   : c11a608310116678511d9bcad96f372309fbee4e
----------System Info----------
Platform     : Darwin-16.7.0-x86_64-i386-64bit
system       : Darwin
node         : cbarber-l02.fios-router.home
release      : 16.7.0
version      : Darwin Kernel Version 16.7.0: Wed Oct  4 00:17:00 PDT 2017; root:xnu-3789.71.6~1/RELEASE_X86_64
----------Hardware Info----------
machine      : x86_64
processor    : i386
b'machdep.cpu.extfeatures: SYSCALL XD 1GBPAGE EM64T LAHF LZCNT RDTSCP TSCI'
b'machdep.cpu.leaf7_features: SMEP ERMS RDWRFSGS TSC_THREAD_OFFSET BMI1 AVX2 BMI2 INVPCID FPU_CSDS'
b'machdep.cpu.features: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH DS ACPI MMX FXSR SSE SSE2 SS HTT TM PBE SSE3 PCLMULQDQ DTES64 MON DSCPL VMX SMX EST TM2 SSSE3 FMA CX16 TPR PDCM SSE4.1 SSE4.2 x2APIC MOVBE POPCNT AES PCID XSAVE OSXSAVE SEGLIM64 TSCTMR AVX1.0 RDRAND F16C'
b'machdep.cpu.brand_string: Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz'
----------Network Test----------
Setting timeout: 10
Error open MXNet: https://github.com/apache/incubator-mxnet, <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)>, DNS finished in 0.023125886917114258 sec.
Timing for Gluon Tutorial(en): http://gluon.mxnet.io, DNS: 0.1197 sec, LOAD: 0.2253 sec.
Error open Gluon Tutorial(cn): https://zh.gluon.ai, <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)>, DNS finished in 0.16897797584533691 sec.
Error open FashionMNIST: https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/gluon/dataset/fashion-mnist/train-labels-idx1-ubyte.gz, <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)>, DNS finished in 0.03162503242492676 sec.
Error open PYPI: https://pypi.python.org/pypi/pip, <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)>, DNS finished in 0.017091989517211914 sec.
Error open Conda: https://repo.continuum.io/pkgs/free/, <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)>, DNS finished in 0.06839799880981445 sec

Package used (Python/R/Scala/Julia):
Python 3.6
Error Message:
Usually see:
Segmentation fault: 11

Stack trace returned 9 entries:
[bt] (0) 0   libmxnet.so                         0x0000000104e5c0ef _ZN5mxnet15segfault_loggerEi + 63
[bt] (1) 1   libsystem_platform.dylib            0x00007fff94a38b3a _sigtramp + 26
[bt] (2) 2   Python                              0x00000001001a827c _Py_zfill__doc__ + 31044
[bt] (3) 3   Python                              0x00000001001493e3 _PyGC_CollectIfEnabled + 99
[bt] (4) 4   Python                              0x0000000100128b17 Py_FinalizeEx + 119
[bt] (5) 5   Python                              0x0000000100146e3e Py_Main + 1790
[ 1.]
[bt] (6) 6   Python                              0x0000000100000dfe Python + 3582
[bt] (7) 7   Python                              0x0000000100000c34 Python + 3124
[bt] (8) 8   ???                                 0x0000000000000002 0x0 + 2

Also saw:
Python(50710,0x7fff9d7463c0) malloc: *** error for object 0x10acee5e8: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug

Minimum reproducible example
import mxnet as mx

class BadAux(mx.operator.CustomOp):
    def forward(self, is_train, req, in_data, out_data, aux):
        self.assign(out_data[0], req[0], in_data[0][0])

@mx.operator.register('bad-aux')
class BadAuxProp(mx.operator.CustomOpProp):
    def __init__(self):
        super().__init__(need_top_grad=False)

    def infer_shape(self, in_shape):
        out_shape = [(1,)]
        aux_shape = [(1,), (1,)]
        return in_shape, out_shape, aux_shape

    def list_arguments(self):
        return ['data']

    def list_auxiliary_states(self):
        return ['a', 'b']

    def declare_backward_dependency(self, out_grad, in_data, out_data):
        return []

    def create_operator(self, ctx, in_shapes, in_dtypes):
        return BadAux()

q = mx.nd.Custom(mx.nd.ones((10000,)),
                 mx.nd.zeros((1,)),
                 mx.nd.zeros((1,)),
                 op_type='bad-aux')

print(q)

Steps to reproduce
Run the included script. It fails for me about 2 out of 10 tries.
What have you tried to solve it?
Haven't seen the problem when using only one auxiliary state.

In class BadAuxProp, Should it be super(BadAuxProp, self).__init__(need_top_grad=False) ?
I run the code but there is no failure. And the auxiliary states are right.
MXNet: 0.12.1 (CPU)
Python: 2.7.14/3.6.3

That change does not fix the bug in my environment (MXNet 0.12.1, Python 3.6.0, OSX 10.12.6), . You may have to run the program many times before you will see a crash.
I do not see any crash when I use only one auxiliary state.

Note that I am only using python 3, so adding the class to the super expression does not change anything.

I ran the code more than 30 times, but there was no crash.
My test environments are Arch Linux and Ubuntu 14.10.
In Arch Linux, MXNet(install by pip and compiled by myself, CPU) is 0.12.1, Python is 2.7.14/3.6.3.
In Ubuntu, MXNet(installed by pip, CPU/CUDA9.0) is 0.12.0, Python is 2.7.12/3.5.2
It seems that there is a memory allocation problem in the specific environment (MXNet on OSX).

It is possible that the bug is specific to OSX, but it could also be that the particular layout of the heap in your environment does not trigger the bug.
I find that if I add I make the auxiliary states larger and have more of them, it crashes every time on my machine using latest prerelease build (0.12.1b20171115).
import mxnet as mx

class BadAux(mx.operator.CustomOp):
    def forward(self, is_train, req, in_data, out_data, aux):
        self.assign(out_data[0], req[0], in_data[0][0])

@mx.operator.register('bad-aux')
class BadAuxProp(mx.operator.CustomOpProp):
    def __init__(self):
        super(BadAuxProp, self).__init__(need_top_grad=False)

    def infer_shape(self, in_shape):
        out_shape = [(1,)]
        aux_shape = [(100,)] * 7
        return in_shape, out_shape, aux_shape

    def list_arguments(self):
        return ['data']

    def list_auxiliary_states(self):
        return ['a', 'b', 'c', 'd', 'e','f','g']

    def declare_backward_dependency(self, out_grad, in_data, out_data):
        return []

    def create_operator(self, ctx, in_shapes, in_dtypes):
        return BadAux()

q = mx.nd.Custom(mx.nd.ones((10000,)),
                 mx.nd.zeros((100,)),
                 mx.nd.zeros((100,)),
                 mx.nd.zeros((100,)),
                 mx.nd.zeros((100,)),
                 mx.nd.zeros((100,)),
                 mx.nd.zeros((100,)),
                 mx.nd.zeros((100,)),
                 op_type='bad-aux')

print(q)

I do not see the crash when I run it using my local build of the pull request #8637, which fixes bug #8312, so perhaps that change also fixes this bug.

Local build of master as of ca4b683935529197cc7f7971765794065d67016c does not show this bug on my machine, but I do still see the bug when running the official 0.12.1 release.

@analog-cbarber are you able to reproduce this on the latest version ?

From the comments above looks like https://github.com/apache/incubator-mxnet/pull/8637 fixed the issue. The fix is in stable releases now. I'm closing this issue as resolved.


panic: runtime error: invalid memory address or nil pointer dereference

Hi, I start docker with the new version, works for a while and everything crashes with this error, and on all absolutely all servers and ports, the same problem. It happens after about a few hours of rssh, in idle mode. And the servers are clean completely, there is not even a single rssh client.
2023/09/12 22:20:37 [<IP_ADDRESS>:56866] INFO Web Server got hit:  /echo.php
2023/09/12 22:46:35 Multiplexing failed:  tls
2023/09/12 23:36:30 Multiplexing failed:  tls
2023/09/12 23:36:30 Multiplexing failed:  tls
2023/09/13 00:37:55 Multiplexing failed:  tls
2023/09/13 00:37:55 Multiplexing failed:  tls
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x7490f3]
goroutine 60 [running]:
github.com/NHAS/reverse_ssh/pkg/mux.ListenWithConfig.func1.1({0x914aa8, 0xc000230030})
github.com/NHAS/reverse_ssh/pkg/mux/multiplexer.go:270 +0x8b3
created by github.com/NHAS/reverse_ssh/pkg/mux.ListenWithConfig.func1
github.com/NHAS/reverse_ssh/pkg/mux/multiplexer.go:211 +0x14d

Ugh those are words I never want to hear "Happens after a few hours"

Just in general terms, how many clients would this have connected? None or heaps?

2023/09/12 20:39:10 [<IP_ADDRESS>:57700] INFO Web Server got hit:  /
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x7490f3]
goroutine 30 [running]:
github.com/NHAS/reverse_ssh/pkg/mux.ListenWithConfig.func1.1({0x914aa8, 0xc000228058})
github.com/NHAS/reverse_ssh/pkg/mux/multiplexer.go:270 +0x8b3
created by github.com/NHAS/reverse_ssh/pkg/mux.ListenWithConfig.func1
github.com/NHAS/reverse_ssh/pkg/mux/multiplexer.go:211 +0x14d
Here's the output from the second server

0

Okay cool, so its just dying from a nil conn by the looks of things. Not sure how we could be getting nil there is the only problem. Hmmm

Ah actually I do know why this might be happening

I took 2 servers, put ubuntu, ran rssh through docker, on 443 and 500 port, leave for a while and it crashes with this error. It's already 5 times like this, stable.

It's just that with the latest version only. There are no clients hanging on rssh, but when they were on the old server, there was exactly the same error

Yep. So whats happening is with the new determineProtocol handler in the multiplexer, I've had to do some work so we now support websockets and tls.
In rare circumstances:
	header := make([]byte, 7)
	n, err := conn.Read(header)
	if err != nil {
		return nil, "failed: " + err.Error()
	}

This can cause a nil connection to be returned and this was not checked. Let me push a new version, I believe this should solve your issue.

Thank you.

While this has been marked closed, this is my best guess at whats causing the problem (and really the only way that a nil connection could be getting to that point).
If you're still having these issues, feel free to reopen and give me some more stack traces.

All right.

Side note, you can now use rssh via cloudflare with its new websockets ability (so hopefully that makes up for this little crash :P)

Howdy, can I get confirmation this patch has resolved the issue?


chore: Enable dependabot for automatic dependency updates

Signed-off-by: William Van Hevelingen<EMAIL_ADDRESS>Don't bother creating a PR until you've done this:

[x] Run make pre-commit -B to fix codegen, lint, and commit message problems.

Create your PR as a draft.

Your PR needs to pass the required checks before it can be approved. If the check is not required (e.g. E2E tests) it
does not need to pass.
Once required tests have passed, you can make it "Ready for review".
Say how how you tested your changes. If you changed the UI, attach screenshots.

Tips:

If changes were requested, and you've made them, then dismiss the review to get it looked at again.
Add you organization to USERS.md if you like.
You can ask for help!

@blkperl The dependabot starts to spam people's forks if they have synced with the latest upstream. Is there way to disable that automatically?
https://github.com/terrytangyuan/argo-workflows/pull/3
https://github.com/terrytangyuan/argo-workflows/pull/2

Looks like it's an open issue: https://github.com/dependabot/dependabot-core/issues/2804


User vs group vs identify

In the docs, there is a section called User & Group, which states:

Once Analytics.js loaded, you can retrieve information about the currently identified user or group like their id and traits.

This is the first time the page introduces the notion of the group, and nowhere does it document how to track a group, or what a group can be used for, or how it fits in with identify.
My main question is: how do I use user and group? From the source, it looks like I can do this:
analytics.user().identify('user7');
analytics.group().identify('account21');

Does this supersede analytics.identify()? Does this play nicely with integrations?
Thanks in advance!

Group call: https://segment.com/docs/libraries/analytics.js/#group
Identify call: https://segment.com/docs/libraries/analytics.js/#identify


Does this work at all with VESC FW6 / FW5.03?

The code in this library predates these versions by many years, yet I see fairly recent commits and a lot of forks. One fork appears to target FW 3.x. Is there a newer version of this library that supports recent firmware versions, that I missed perhaps?
I want to get VESC 6 UART working with python, but I don't see any documentation / description on what the UART protocol actually is. Do such docs exist? For comparison, I currently use APD ESCs, and their UART protocol is described here.

Hi raquo,
I'm currently wondering the same thing. Have you found an answer somewhere?
Personally, I'm trying to send the COMM_DETECT_APPLY_ALL_FOC message. All my parameters seem correct, but the motor doesn't behave the same way as it does with VESC Tool, and I can't decode the responses from the VESC. So I'm starting to wonder if this library is still capable of communicating with the new VESC firmware.

@MelvinWarnet I've looked at several VESC interfacing libraries, and ended up writing my own VESC interfacing code for CircuitPython. However, I only use the COMM_GET_VALUES command, and parse its response. I don't have the code for any other commands, nor experience in using other commands.
I do think this PyVESC library can talk to VESC 6, at least the message encoding / decoding code I looked at seems to do the same things as other libraries do, and what my code does. I haven't looked much at the part of this library that reads and writes messages over the wire because CircuitPython only supports a subset of Python, and I don't think it includes the threading functionality that this library uses, so my code for that looks quite different.
I hope to eventually open source my code for the benefit of anyone else using CircuitPython, but right now the code is tied to my project, and I don't have time to detangle it yet. Maybe in a few months, if anyone cares.
Wishing you good luck trying to figure out that command... I don't know what it does, but if you have doubts that the library does not work properly, try sending other simple commands COMM_GET_VALUES and read their responses – if that doesn't work either, then the problem is probably in the codec or communication layer somewhere (or maybe even physical wiring), and is not related to your specific command.

I managed to get this working by forking and changing a few things. The get_firmware_version function will fail randomly on new VESC firmwares.


Stop command for maestro required

Stop command for maestro required
https://github.com/armPelionEdge/meta-pelion-edge/blob/master/recipes-wigwag/maestro/maestro/maestro.sh#L29
opkg install / restart of maestro results in multiple processes running for maestro

It's actually there, but it stops something called DeviceJS when I last checked.

It's actually there, but it stops something called DeviceJS when I last checked.

It does not kill Maestro - DevieJS is the child process created by maestro. Everything else is stopped and started, but we end up with 2 processes of maestro.. Confirmed with ps -aux | grep maestro

Oh my. This should be pretty easy to fix. Or we could go to systemd for this, it handles daemon processes pretty well.

This should be pretty easy to fix.

So many things to improve, so little time :sweat_smile:

#86 Should have made this irrelevant, as the init script is no longer used.


Issue #17: Handle Missing Contract Warning

Objectives of the PR:
Improve user experience by providing a clear warning when no contract is deployed on the standalone chain.
Address the issue where the error message was not specific about the absence of a deployed contract.
Changes Made:
Added a new function handleContractInteraction to handle contract interactions and provide a toast notification if no contract is deployed on the standalone chain.
Modified the chain switch logic to use the new function, which checks if the active chain is 'standalone' and alerts the user to deploy a contract first.
Possible Causes and Ideas for Resolution:
Previously, users received a generic error message that did not specify the cause. The new implementation alerts users specifically about the need for contract deployment when using the standalone chain, thus resolving confusion.
Resolves: #17

I got this when doing yarn dev and switching to standalone:


MathJax web demo tex-mml.html appears broken

The web demo "MathJax v3 with TeX input and MathML output" appears to be broken.
Browsers (with clean cache and history):
Chrome version 83.0.4103.97 (Official Build) (64-bit)
Firefox version 77.0.1 (64-bit)
Attempts to load the page
https://mathjax.github.io/MathJax-demos-web/tex-mml.html
... consistently result in error:
Uncaught (in promise) Error: MathJax retry
    at Object.e.retryAfter (core.js:formatted:3301)
    at o.checkLoading (menu.js:formatted:229)
    at Object.renderDoc (core.js:formatted:1639)
    at M.renderDoc (core.js:formatted:1655)
    at o.I.render (core.js:formatted:1807)
    at Object.pageReady (tex-mml.html:23)
    at startup.js:formatted:926

Thanks for the report.  It does appear that the demo needs updating after some recent changes.
The main fix is to add
      menuOptions: {
        settings: {
          assistiveMml: false
        }
      },

inside the options configuration block in order to disable the assistive MathML output.  It is the dynamic loading of the assistive MathML extension that was causing the error you are seeing, and since you will be generating the MathML directly, there is no need for this extension.
You may also want to add
      ready() {
        MathJax.startup.defaultReady();
        MathJax.startup.document.menu.menu.findID('Accessibility', 'AssistiveMml').disable();
      },

just inside the startup configuration block.  This will disable the menu item for the assistive MathML item so that it can't be turned on by the user.
Finally, changing
      pageReady: () => MathJax.startup.document.render()

to
      pageReady() {
        MathJax._.mathjax.mathjax.handleRetriesFor(() => {
          MathJax.startup.document.render();
        });
      }

so that if anything else has to be dynamically loaded, it will be handled properly.
I will make these changes to the example in the demos repository.

I've made the update.

Thank you @dpvc , works seamlessly for me now, and thank you for the explanation.


[Direct3D12] fix bag #622

Hello,
Fixed bag #622.
Thanks

Thanks it is merged by commit 48e4dcd07fc75a724af38f73b4d165f028573dc8


[FEATURE] The selected blocks can't undo

Is this a unique feature?

[X] I have checked "open" AND "closed" issues and this is not a duplicate

Is your feature request related to a problem/unavailable functionality? Please describe.
When I select multiple blocks with mouse drag and hit backslash to remove them. Then I want to undo the changes to revert back all those blocks. Here the undo is not working.
If mistakenly I remove 10 blocks then I have to re-write then again manually. which it super frustrating tasks to again.
Proposed Solution
when I hit ctrl+z then it should undo.
Screenshots

Do you want to work on this issue?
No
If "yes" to the above, please explain how you would technically implement this (issue will not be assigned if this is skipped)
No response

Thanks for reporting issue!
Working on it

Implemented in v4.9.0


3D hybrid fgat with pseudo model is broken

Description
The 3D hybrid fgat with a pseudo model is the configuration that I use for the soca implementation in the global-workflow. I tested with the 3D-FGAT and 4D-Var cost function and it worked fine until approximately early last week (~June 20th). I'm not 100% sure of the date, I was working on other unrelated "science" issues when things started failing after rebuilding. I wasted most of my time trying to figure out what was wrong in the yaml config, but I think the issue is in soca and/or oops.
To Reproduce:
I'll push a branch and probably issue a draft PR that will include a test with the EMC configuration. I should have done this earlier!
A problem for July 5th and beyond!

@travissluka , it looks like this PR is the culprit. I should have tested our soca implementation in the gdasapp before approving!
For our soca implementation, we read mom6's history files instead of the restarts. One of the difference is the fill value where masked. The restart's masked value are 0's while the history's fill value is a large number, hard-coded in fms.
The issue only appears when using "ensemble covariance" in B.
Possible solution:

It's very likely that there is a bug somewhere, related to the changes in 898. We could try to fix it, or not ...
Set the fill value to 0, or something user defined when reading states or increments. This actually does break quite a few tests, not sure why yet.

Thanks @travissluka .

Pointers pointing to nowhere, but I think that might have been a snafu in my configuration. NaN's when using the ensemble B. That can be corrected by changing the filled values to 0, only tested at low-res. It's very possible that there are more issues at 1/4 deg. Obviously not ideal!

Could I add our EMC config as a ctest? That would be quite useful for me, but it would require adding a few nc files to lfs.


Update tox.ini to match list of classifiers from setup.py

setup.py claims support for django 3.2 and 4.0 but tox.ini doesn't run tests again them: it does for 3.1 and 5.0 (because it is the latest version right now)

❤


ESLint autofix is wrong

This took me a while to figure out but the ESLintLinter uses the column from ESLint to tell Arc what to fix:
        $message->setChar(idx($offense, 'column'));

However this is the position of the error. It can actually be different to the position of the suggestion. For example with this code:
import { addTab, addIframeTab } from "./tabs.js";

ESLint will output:
      {
        "ruleId": "sort-imports",
        "severity": 2,
        "message": "Member 'addIframeTab' of the import declaration should be sorted alphabetically.",
        "line": 1,
        "column": 18,
        "nodeType": "ImportSpecifier",
        "messageId": "sortMembersAlphabetically",
        "endLine": 1,
        "endColumn": 30,
        "fix": {
          "range": [
            9,
            29
          ],
          "text": "addIframeTab, addTab"
        }
      },

It should use the 9 offset to calculate the column, but it actually uses 18, resulting in this silly patch:
  Auto-Fix  (ESLINT) sort-imports
    Member 'addIframeTab' of the import declaration should be sorted
    alphabetically.

    >>> -      1 import { addTab, addTab, addIframeom "./tabs.js";
        +        import { addTab, addIframeTab, addom "./tabs.js";

Unfortunately it doesn't look trivial to fix. My suggestion would be to apply all the fixes from the JSON in ESLintLinter and then just give the whole file as a single fix in one message.
I did want to just use the --fix flag but unfortunately it can add or remove lines and then the positions of the other errors are wrong (and Arc freaks out if they are beyond the end of the fixed file).

I looked into this a bit and unfortunately it is not easy to fix:

I don't think you can apply all of the fixes automatically. Even if you sort them and do everything properly there are still some whose ranges can overlap. I'm not exactly sure what ESLint does but as far as I can tell the only way to actually get a properly auto-fixed file is to have ESLint do it via --fix or --fix-dry-run.
Unfortunately if you use either of those options, ESLint changes the line/column numbers of the errors/warnings to be those of the fixed file.

Therefore the only way I found to do this correctly is to run ESLint twice - once to report errors/warnings and once to only do the autofix. It's a bit horrible but eh.

I got it working like this, but you have to add it to .arclint twice - once with fix_mode true and once with it false. That kind of sucks but eh.
<?php
/**
 * Copyright 2016 Pinterest, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/**
 * Lints JavaScript and JSX files using ESLint
 */
final class ESLintLinter extends NodeExternalLinter {
  const ESLINT_WARNING = '1';
  const ESLINT_ERROR = '2';

  private $flags = array();
  private $fixMode = false;

  public function getInfoName() {
    return 'ESLint';
  }

  public function getInfoURI() {
    return 'https://eslint.org/';
  }

  public function getInfoDescription() {
    return pht('The pluggable linting utility for JavaScript and JSX');
  }

  public function getLinterName() {
    return 'ESLINT';
  }

  public function getLinterConfigurationName() {
    return 'eslint';
  }

  public function getNodeBinary() {
    return 'eslint';
  }

  public function getVersion() {
    list($err, $stdout, $stderr) = exec_manual('%C -v', $this->getExecutableCommand());

    $matches = array();
    if (preg_match('/^v(\d\.\d\.\d)$/', $stdout, $matches)) {
      return $matches[1];
    } else {
      return false;
    }
  }

  protected function getMandatoryFlags() {
    return array(
      '--format=json',
      '--no-color',
    );
  }

  protected function getDefaultFlags() {
    if ($this->cwd) {
      $this->flags[] = '--resolve-plugins-relative-to';
      $this->flags[] = $this->cwd;
    }
    return $this->flags;
  }

  public function getLinterConfigurationOptions() {
    $options = array(
      'eslint.fix_mode' => array(
        'type' => 'optional bool',
        'help' => pht('If run in this mode, instead of reporting errors/warnings it will apply auto-fixes.'),
      ),
    );
    return $options + parent::getLinterConfigurationOptions();
  }

  public function setLinterConfigurationValue($key, $value) {
    switch ($key) {
      case 'eslint.fix_mode':
        if ($value) {
          $this->fixMode = true;
          $this->flags[] = '--fix-dry-run';
        }
        return;
    }
    return parent::setLinterConfigurationValue($key, $value);
  }

  protected function canCustomizeLintSeverities() {
    return false;
  }

  protected function parseLinterOutput($path, $err, $stdout, $stderr) {
    // Gate on $stderr b/c $err (exit code) is expected.
    if ($stderr) {
      return false;
    }

    $json = json_decode($stdout, true);
    $messages = array();

    foreach ($json as $file) {
      foreach ($file['messages'] as $offense) {
        // Skip file ignored warning: if a file is ignored by .eslintingore
        // but linted explicitly (by arcanist), a warning will be reported,
        // containing only: `{fatal:false,severity:1,message:...}`.
        if (strpos($offense['message'], "File ignored ") === 0) {
          continue;
        }

        /**
         * Example ESLint message:
         * {
         *     "ruleId": "prettier/prettier",
         *     "severity": 2,
         *     "message": "Replace `(flow.component·&&·flow.component.archived)` \
         *         with `flow.component·&&·flow.component.archived`",
         *     "line": 61,
         *     "column": 10,
         *     "nodeType": null,
         *     "messageId": "replace",
         *     "endLine": 61,
         *     "endColumn": 53,
         *     "fix": {
         *         "range": [
         *             1462,
         *             1505
         *         ],
         *         "text": "flow.component && flow.component.archived"
         *     }
         * },
         */

        if (!$this->fixMode) {
          $message = new ArcanistLintMessage();
          $message->setPath($file['filePath']);
          $message->setName(nonempty(idx($offense, 'ruleId'), 'unknown'));
          $message->setDescription(idx($offense, 'message'));
          $message->setLine(idx($offense, 'line'));
          $message->setChar(idx($offense, 'column'));
          $message->setCode($this->getLinterName());
          $message->setSeverity($this->mapSeverity(idx($offense, 'severity', '0')));

          $messages[] = $message;
        }
      }

      // `output` is present if --fix or --fix-dry-run was passed, *and*
      // some fixes were required.
      if ($this->fixMode && isset($file['output'])) {
        $originalText = $this->getData($path);

        // This requires --fix or --fix-dry-run.
        $fixedText = $file['output'];

        // Make a new auto-fix message for the whole file.
        $message = new ArcanistLintMessage();
        $message->setPath($file['filePath']);
        $message->setName('AUTOFIXES');
        $message->setDescription('Autofixes');
        $message->setLine(1);
        $message->setChar(1);
        $message->setCode($this->getLinterName());
        $message->setOriginalText($originalText);
        $message->setReplacementText($fixedText);
        $message->setSeverity(ArcanistLintSeverity::SEVERITY_AUTOFIX);

        $messages[] = $message;
      }

      // Arc freaks out the exit code is not 0 and we didn't produce any
      // messages, which can happen here (e.g. if there's nothing to fix but there
      // were unfixable errors). In that case make a dummy message which is
      // SEVERITY_DISABLED so it isn't shown to the user.
      if ($err && count($messages) === 0) {
        // Make a new auto-fix message for the whole file.
        $message = new ArcanistLintMessage();
        $message->setPath($file['filePath']);
        $message->setName('IGNORE_THIS');
        $message->setDescription('Ignore this message. It is just here to work around an Arc bug.');
        $message->setLine(1);
        $message->setChar(1);
        $message->setCode($this->getLinterName());
        $message->setSeverity(ArcanistLintSeverity::SEVERITY_DISABLED);

        $messages[] = $message;
      }
    }

    return $messages;
  }

  private function mapSeverity($eslintSeverity) {
    switch($eslintSeverity) {
      case '0':
      case '1':
        return ArcanistLintSeverity::SEVERITY_WARNING;
      case '2':
      default:
        return ArcanistLintSeverity::SEVERITY_ERROR;
    }
  }
}


undefined method 'owning_association'

I did this:
rails g super_scaffold Category Team name:text_field owning_team_id:super_select{class_name=Team}

And then when I ran rails db:migrate I got this error:
$ rails db:migrate
bin/rails aborted!
NoMethodError: undefined method 'owning_association' in 'category' factory (NoMethodError)
Did you mean? 'owning_association { :team }'

        raise NoMethodError.new(<<~MSG)
        ^^^^^
/Users/jgreen/projects/moonswitch/nfl-testbed/test/factories/categories.rb:5:in `block (2 levels) in <main>'
/Users/jgreen/projects/moonswitch/nfl-testbed/test/factories/categories.rb:2:in `block in <main>'
/Users/jgreen/projects/moonswitch/nfl-testbed/test/factories/categories.rb:1:in `<main>'
/Users/jgreen/projects/moonswitch/nfl-testbed/config/environment.rb:5:in `<main>'
Tasks: TOP => db:migrate => db:load_config => environment
(See full trace by running task with --trace)

The error points to the factory, which looks like this:
FactoryBot.define do
  factory :category do
    association :team
    name { "MyString" }
    owning_association :team
  end
end

owning_association isn't a method. I think instead that line should be:
association :owning_team

Just trying to figure out how/where this problem occurs so I'm documenting the trail here.
I run this:
rails g super_scaffold Category Team name:text_field owning_team_id:super_select{class_name=Team}

And the first thing that happens is we run this command to generate the model:
bin/rails generate model Category team:references name:string owning_team:references

As part of that rails generates a factory, and at that point the factory looks like this:
FactoryBot.define do
  factory :category do
    team { nil }
    name { "MyString" }
    owning_team { nil }
  end
end

Then eventually these lines are responsible for making the incorrect changes:
https://github.com/bullet-train-co/bullet_train-core/blob/9b7f280d3a981b11f8f925e946ebff4c1d029436/bullet_train-super_scaffolding/lib/scaffolding/transformer.rb#L1363-L1370
The scaffold_replace_line_in_file method call ends up replacing team { nil } with association: team. For the primary team relationship that works OK, but for owning_team it's overeager in matching just part of that line and so owning_team { nil } gets turned into owning_association :team. This is incorrect in two different ways:

owning_association isn't a valid factory method
The association shouldn't be to just :team

It looks like this bug is unique to any *_team association that you might try to scaffold. It doesn't happen if you included an owning_user association, for instance.
With an owning_user association:
rails g super_scaffold Category Team name:text_field owning_user_id:super_select{class_name=User}

Rails generates this factory:
FactoryBot.define do
  factory :category do
    team { nil }
    name { "MyString" }
    owning_user { nil }
  end
end

which ends up like this after the transformer does its thing:
FactoryBot.define do
  factory :category do
    association :team
    name { "MyString" }
    owning_user { nil }
  end
end

Maybe we nee to include line beginning and ending terminators in that bit of the transformer to ensure that we're only munging the primary team relationship.


Add a dag to load from a local csv to postgres

minor comment about environs - if you still think it's required can we add it using requirements.in?


Use actual paths for BAZEL_OUT and BAZEL_EXTERNAL

Progress towards #202. Fixes #261. Progress towards #858.
This partially reverts 0e6427003f150d9e0f36bc56402f9aea082e9602.
Making this change has numerous benefits:

Xcode will now index targets that solely consist of generated or external files
Generated and external sources no longer show up twice in code completion
There is no longer a difference between "bazel-out" and "gen_dir" in the codebase, greatly simplifying that logic
Project generation is faster as it doesn't have to invoke xcodebuild to determine $OBJROOT
Makes progress towards moveable .xcodeproj bundles

Workflows have an issue with git clean, so I won't push more changes here until it gets the proper approval so I can shepherd in the changes.

@jpsim Can you confirm this fixes your issue?

Can you confirm this fixes your issue?

Checking now.
Is it expected to have significantly more stale file warnings in Xcode with this change?
For example with https://github.com/jpsim/swiftlint-bazel-example:

Stale file '/Users/jsimard/src/swiftlint-bazel-example/SwiftLint.xcodeproj/rules_xcodeproj/links/external/StaticInternalSwiftSyntaxParser/lib_InternalSwiftSyntaxParser.xcframework/macos-arm64_x86_64/lib_InternalSwiftSyntaxParser.framework' is located outside of the allowed root paths.

I'm also seeing indexing errors

The file paths changed, similar to when a new starlark hash is created: https://github.com/buildbuddy-io/rules_xcodeproj/blob/main/doc/faq.md#when-i-build-i-get-warnings-like-stale-file-projectxcodeprojrules_xcodeprojgen_dir-is-located-outside-of-the-allowed-root-paths-how-do-i-fix-this. Should only hit it once.

Should only hit it once.

ok clean build does indeed make the stale file warnings go away.
I now get full auto-complete in external repositories (e.g. Source/SwiftLintFramework/Rules/Idiomatic/ForceCastRule.swift), but it's still missing from local repositories (e.g. swiftlint_extra_rules/ForbiddenVarRule.swift). So #858 is half fixed for my case.

So those indexing errors are because swiftlint doesn't compile in BwX mode. It's missing its SWIFT_INCLUDE_PATHS (which I will get a fix for in).
As for local repositories, the issue there is symlinks, just those inside of external. At this time I'm not sure how to address those, since if we changed their path in the Project navigator, the target.source-map won't be correct for them, so breakpoints won't work. I think maybe they will have to be handled with #403.

So those indexing errors are because swiftlint doesn't compile in BwX mode. It's missing its SWIFT_INCLUDE_PATHS (which I will get a fix for in).

I'm using BwB though 🤔
Or are you saying that indexing always uses BwX?

As for local repositories, the issue there is symlinks, just those inside of external.

Thanks for investigating this. I'll go ahead and approve this PR then considering that local repositories will require a different solution.
Would you like me to file a new issue copying #858 but just for local repositories?

Or are you saying that indexing always uses BwX?

The Index Build step uses whichever mode, but the live indexing, which is what you showed a screenshot of, that calls swiftc directly, using all of the settings we have set. So if BwX doesn't compile, that will fail as well. Which is why it's so important for BwX to be able to compile everything.

Would you like me to file a new issue copying https://github.com/buildbuddy-io/rules_xcodeproj/issues/858 but just for local repositories?

Yes please.

I'll fix the bugs integration tests soon, probably by exposing a hint for what the workspace directory is.

@jpsim A rules_swift version that includes https://github.com/bazelbuild/rules_swift/commit/adcc2f1bc0eab7e8b047a5e2b7eec420c826f18d fixes the swiftlint indexing issue.


[BUG] demo_avr view throws exception if splunk config not found

Describe the bug
if a user has not configured a splunk connection but selects the "DEMO: cyber alerts" (demo_avr) view, then the following error is presented to the user in main area:
Error loading dashboard

SplunkConnectException: argument of type 'NoneType' is not iterable
Traceback:
File "/apps/views/demo_avr/__init__.py", line 261, in run_all
    splunk_client: Union[SplunkConnection, Any] = cache_splunk_client(splunk_username, splunk_password, splunk_host)
File "/opt/conda/envs/rapids/lib/python3.8/site-packages/streamlit/runtime/caching/cache_utils.py", line 211, in wrapper
    return cached_func(*args, **kwargs)
File "/opt/conda/envs/rapids/lib/python3.8/site-packages/streamlit/runtime/caching/cache_utils.py", line 240, in __call__
    return self._get_or_create_cached_value(args, kwargs)
File "/opt/conda/envs/rapids/lib/python3.8/site-packages/streamlit/runtime/caching/cache_utils.py", line 266, in _get_or_create_cached_value
    return self._handle_cache_miss(cache, value_key, func_args, func_kwargs)
File "/opt/conda/envs/rapids/lib/python3.8/site-packages/streamlit/runtime/caching/cache_utils.py", line 320, in _handle_cache_miss
    computed_value = self._info.func(*func_args, **func_kwargs)
File "/apps/views/demo_avr/__init__.py", line 301, in cache_splunk_client
    assert splunk_client.connect()
File "/apps/components/Splunk.py", line 71, in connect
    raise SplunkConnectException(e)

Expected behavior
present a more user-friendly error, or fall back to using a local CSV for input vs splunk so the demo still runs if splunk is not configured, this might be a bit challenging with the filter logic being passed to splunk, so the first option would be quick+easy, but less desirable.
Observed behavior
see above
To Reproduce

clone master from graph-app-kit
add graphistry creds to .env file
./dc up
open streamlit dashboard
select "DEMO: cyber alerts"

Yeah interim be good to
try:
...
catch SplunkConnectException as e:
  # check for splunk creds
  if has_splunk creds:
      st.error('Unexpected splunk connection error: ...
  else:
      st.error('This demo currently requires a Splunk connection. To enable, ...')


Interface to HiGHS as an LP/QP solver

Add an interface to HiGHS as an LP solver and QP solver for positive semi-definite Hessians.
This should be relatively simple, since HiGHS is implemented in C++.

An interface to the LP solver HiGHS was added in https://github.com/cvanaret/Uno/pull/74.
For QPs, it's a bit trickier because HiGHS expects a compressed sparse Hessian in one of the following shapes:

column-wise lower triangular;
row-wise upper triangular.

At the moment, the CSC sparse format in Uno is only column-wise upper triangular. I need to investigate this further.

@cvanaret
I did this code a few months to get the sparse CSC format of A' based on the CSC format of A.
It could be what you need:
function MyTranspose(A::SparseMatrixCSC{T,Cint}) where {T}
    m, n = size(A)
    nnzA = nnz(A)
    A_colptr = A.colptr
    A_rowval = A.rowval
    A_nzval = A.nzval

    # Allocate storage for the column pointers and row indices of B = Aᵀ
    B_colptr = zeros(Cint, m + 1)
    B_rowval = Vector{Cint}(undef, nnzA)
    B_colptr = Vector{T)(undef, nnzA)

    # Count the number of non-zeros for each row of A.
    # It corresponds to the number of non-zeros for each column of B = Aᵀ.
    for k in 1:nnzA
        i = A_rowval[k]
        B_colptr[i] += 1
    end

    # Compute the cumulative sum to determine the starting positions of rows in B_rowval
    counter = 1
    for col in 1:m
        nnz_col = B_colptr[col]
        B_colptr[col] = counter
        counter += nnz_col
    end
    B_colptr[m + 1] = counter

    # Store the row indices for each column of B = Aᵀ
    for j in 1:n
        for index in A_colptr[j]:(A_colptr[j + 1] - 1)
            i = A_rowval[index]

            # Update B_rowval for the non-zero B[j,i].
            # It corresponds to the non-zero A[i,j].
            pos = B_colptr[i]
            B_rowval[pos] = j
            B_nzval[pos] = A_nzval[index]
            B_colptr[i] += 1
        end
    end

    # Fix offsets of B_colptr to restore correct starting positions
    for col in m:-1:2
        B_colptr[col] = B_colptr[col - 1]
    end
    B_colptr[1] = 1

    return SparseMatrixCSC{T,Cint}(n, m, B_colptr, B_rowval, B_nzval)
end

Thanks a lot, much appreciated! This is a dumb situation when you think that the immense majority of the Hessian occurrences in HiGHS are matrix-vector products :)
I think B_colptr = Vector{T)(undef, nnzA) should be B_nzval = Vector{T)(undef, nnzA)?

Yes, it's a typo. It should be B_nzval = Vector{T}(undef, nnzA).
I just wanted the sparsity pattern of A' in my Julia application (coloring of Hessian).

How do I enable the tests with the LP solver? Is there a preset that will use the LP solver and not the QP?


[5.8] assertArraySubset deprecated in PHPUnit 8

Either we need to convince PHPUnit to revert this, or find a replacement, otherwise test code using Illuminate\Foundation\Testing\TestResponse::assertJson will start to throw deprecation warnings.

Relates to https://github.com/sebastianbergmann/phpunit/issues/3494. // cc @driesvints

No worries. I already took care of this in https://github.com/laravel/framework/pull/27441. I've committed https://github.com/laravel/framework/pull/27441/commits/695a29928d5f3e595363306cf62ba4ff653d73ba which overwrites the method to prevent the warnings. I couldn't take over the full ArraySubset class because the method signature on the Constraint base class was changed and thus it will only work on either PHPUnit 7 or below or PHPUnit 8 or above. We'll take over the full class as soon as we're dropping support for PHPUnit 7 in February next year.

Thanks for mentioning btw! :)


html/template: Paths in attributes not escaped correctly

What version of Go are you using (go version)?

$ go version
go version go1.14.1 darwin/amd64

Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/epirat/Library/Caches/go-build"
GOENV="/Users/epirat/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/epirat/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/opt/local/lib/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/opt/local/lib/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="/usr/bin/clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/bh/j6gp_mw13pg06g1tt7kl6yvc0000gn/T/go-build013714662=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?
The html path escaper does not work properly, so paths are not properly escaped:
t, _ := template.New("foo").Parse(`
	{{define "T"}}Example{{end}}
`)
t.ExecuteTemplate(out, "T", "Example/Genre")

Playground
This snippet should do url.PathEscape on the variable used in the attribute,
but it does some variation that does not properly escapes the / character,
leading to incorrect URLs.
What did you expect to see?
This snippet should do url.PathEscape on the variable used in the attributes path,
resulting in Example%2FGenre.
What did you see instead?
it does some variation of a PathEscape, which does not properly escapes the / character,
leading to incorrect URLs:
Example

There is no easy workaround either I could find, that would lead to it correctly escaping this, as per the documentation it seems it assumes manual escaping is a security issue and should never be done? I could not find any function to escape the variable correctly in my template.
While I can wrap it in a different type to prevent escaping, there is no way to enforce escaping, except giving up on the html templating and do text templating instead which is a lot more dangerous as I would need to take care of all escaping myself. Maybe I am missing something obvious here? If so, clearly the documentation is lacking.

It seems what I am observing should only be happening if I would do:
t.ExecuteTemplate(out, "T", template.URL("Example/Genre"))

It seems what I am observing should only be happening if I would do:
t.ExecuteTemplate(out, "T", template.URL("Example/Genre"))

/cc @mikesamuel @empijei per owners.

Thanks for reporting this.
The template package has in its threat model for URL only to make it impossible to inject exotic protocols like javascript:.
The escaping you are pointing out in your example is more of a semantic escaping that has hardly something to do with XSS: you are correct in stating that the path could be escaped by the package, but I would argue that this should not be done.
URLs can be specified by user code to have dynamic paths safely and this is a feature of the contextual autoescaper. Patterns like  should be expressible. Percent-encoding the paths would break functioning applications, would make this pattern hard to express without disabling contextual autoescaping and I am struggling to see the security benefit in it.
Could you please provide an example of an attack that would rely on this issue to cause an XSS (or other attacks)?

I too just faced and was surprised about this "lack" of escaping path elements. Indeed, it should only skip escaping if template.URL is passed.
I ended up registering a custom pathEscape function being url.PathEscape, and I just use it in the template like this:
t := template.Must(template.New("").Funcs(template.FuncMap{
	"pathEscape": url.PathEscape,
}).Parse(`<a href="/genres/{{pathEscape .}}">Example</a>`))
if err := t.Execute(os.Stdout, "Example/Genre"); err != nil {
	panic(err)
}

This will properly output (try it on the Go Playground):
Example

Hi, thanks a lot for the answer. It's not about an XSS attack that would be possible.
The problem is, illustrated using your example:  is already possible to do by making imgpath a template.URL in Go code, which is specifically what template.URL seems to be made for according to the documentation.
What is impossible is to get the behavior where it percent-encodes it. So the current behavior is redundant and makes template.URL kind of pointless. There is no supported way I can find to get percent-encoding to work. So I had to resort to basically the same as @icza did to get it working which feels like a hack, given that the Template engine specifically does not want users to explicitly manually have to escape stuff.

This package tries to protect its user from potential attacks. I don't understand what is the threat you are surfacing.
If there is no threat, is your request to make it possible to percent-escape urls?
If so this is already possible by escaping the URL yourself and promoting it to a template.URL or by doing what icza suggested.
Adding automatic escaping would break a lot of already existing code for a benefit that I fail to see and if we were to change the API as you suggest it would become quite hard to obtain the current behavior without introducing vulnerabilities.

Do you have an idea on a precise change you'd apply to the documentation?
I am generally in favor on disambiguation in the doc, but at the same time I don't want the doc to need a TL;DR.
Let's keep this open and just change the title to reflect that this is now a discussion on doc changes.