blkiodev: limit blkio device's read/write Bps/IOps

Signed-off-by: Leno Hou<EMAIL_ADDRESS>
Ⅰ. Describe what this PR did

blkiodev: limit blkio device's read/write Bps/IOps
testcase: add blkio device bps/iops testcase

Ⅱ. Does this pull request fix one issue?

fix #2509
Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗？)
To be added later
Ⅳ. Describe how to verify it
Create Container with:

pouch run -it --device /dev/sda:/dev/sda --device-read-bps=/dev/sda:100M busybox sh
Check inside Container's Cgroup filesystem
#cat /sys/fs/cgroup/blkio/blkio.throttle.read_bps_device
8:0 104857600

Ⅴ. Special notes for reviews

I am afraid that we must add integration test case for this pull request. @houstar 😄

I am afraid that we must add integration test case for this pull request. @houstar 😄

OK. I'll update the unit test later

Could you add some TestUpdateSuite test case in file test/cli_update_test.go? Thanks a lot. @houstar

@allencloud  OK. Will be update at tomorrow

2. This patch will update the container metadata and send these contents to RUNC runtime but runc
don't support update blkio write/read bps/iops.  So the updated Container configuration will not make sense immediately as same as RestartPolicy now.

Yes, runc should update its resource.BlockIO.  I'm coding in runc now and will push it in few days.

This patch will update the container metadata and send these contents to RUNC runtime but runc
don't support update blkio write/read bps/iops.  So the updated Container configuration will not make sense immediately as same as RestartPolicy now.

Yes, runc should update its resource.BlockIO. I'm coding in runc now and will push it in few days.

OK. Great~~

I think function toLinuxResources() in ctrd/utils.go should be also modified.  It change pouch container resource to linux resource. Such as change "/dev/sda5 2000" to "8:5 2000".  Finally, linux resource "8:5 2000" is passed to containerd and runc

I think function toLinuxResources() in ctrd/utils.go should be also modified. It change pouch container resource to linux resource. Such as change "/dev/sda5 2000" to "8:5 2000". Finally, linux resource "8:5 2000" is passed to containerd and runc

But modifying this function is a challenge. Because there is already a function called getThrottleDevice() in module mgr which can change container device to linux device. It's nice to use it  in toLinuxResources() .  However  toLinuxResources() is belong to ctrd module, we can't call back from ctrd to mgr.
I have no idea whether there is another more graceful code than copying function getThrottleDevice() to ctrd

Done. thanks.

I think function toLinuxResources() in ctrd/utils.go should be also modified. It change pouch container resource to linux resource. Such as change "/dev/sda5 2000" to "8:5 2000". Finally, linux resource "8:5 2000" is passed to containerd and runc

But modifying this function is a challenge. Because there is already a function called getThrottleDevice() in module mgr which can change container device to linux device. It's nice to use it in toLinuxResources() . However toLinuxResources() is belong to ctrd module, we can't call back from ctrd to mgr.
I have no idea whether there is another more graceful code than copying function getThrottleDevice() to ctrd

Yes. so the common code should be refactor later. but now, let's just add toLinuxThrottleDevice to let's you developing RUNC

@zjumoon01  How about add this common code to pouch/pkg/utils/resource_convert.go ?
This utils provides convert between Linux Resource and Pouch Resource.

@zjumoon01 How about add this common code to pouch/pkg/utils/resource_convert.go ?
This utils provides convert between Linux Resource and Pouch Resource.

Using a common function is nice. But I don't know where the common code should be.

Close this PR since this was resolved.


Get in browser editing of content under raneto working.

This is going to mean fixing raneto, which has a bug that login page doesn't when base_url is set. The fix is to pass config to rendering in login page as currently missing but login page template expects it.

Create PR https://github.com/gilbitron/Raneto/pull/280 against Raneto to fix various issues with running with base URL setting. Waiting to see if PR accepted. If not will need to maintain a separate fork which has fixes for the bugs in Raneto.

No relevant any more since ditching Raneto.


Fix typos in rocm_smi.py, README.md, rsmiBindings.py

Hi there,
when I contributing to another project, a spellcheck highlighted several typos in the ROCm library.
This pull request aims to fix those typos for clarity and accuracy.
Files affected:

rocm_smi.py
rsmiBindings.py.in
rsmiBindings.py
README.md

These corrections help improving the documentation and code quality, ensuring better understanding!

https://github.com/ROCm/rocm_smi_lib/commit/9e2a6ea4bfb50eb3c576903029111dfb3a39eaf4
Merged!


Screen resolution setting

Is there any way to build this container so that resolution can be set as an environment variable so it can be set along with the docker run command?

Opps, this looks like a duplicate of https://github.com/fcwu/docker-ubuntu-vnc-desktop/issues/47


Fix Get-Credential to not prompt twice when no parameter is specified

Fix #2306

Hi @daxian-dbw, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

It looks like you're a Microsoft contributor (Dongbo Wang). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;

@lzybkr can you please review this PR? Thanks!

The Credential parameter set is the default parameter set, and -Credential is the only mandatory parameter in that parameter set, so it's natural that the parameter binder will kick in prompting for the missing mandatory parameter -Credential when no argument is specified.

Of course - but I'm asking a different question - can we get the same effect of prompting in Get-Credential without relying on the parameter binder?
For example, if we changed the default message/title in Get-Credential, we'd also want a similar change in the parameter binder. I don't think that's obvious or ideal.
But really - I'm just saying we should be seeing the parameter binding prompts when asking the user for a credential. Ever.

Got @lzybkr 's point now. The current change gives inconsistent prompting experience for Get-Credential and Get-Credential -UserName bar. Note that the default caption and message are not displayed for Get-Credential
PS D:\> Get-Credential

cmdlet Get-Credential at command pipeline position 1
Supply values for the following parameters:
Credential
User:
PS D:\>
PS D:\> Get-Credential -UserName bar

Windows PowerShell credential request.
Password for user bar:

This is because for Get-Credential, the prompting comes from the parameter binder, while the other comes from Host.UI.PromptForCredential. I will update the PR to provide consistent prompting experience.

@daxian-dbw Please take a look #2327

I approve this fix 👍
But why not move the last writeobject to the try ?
try
{
    Credential = this.Host.UI.PromptForCredential(_title, _message, _userName, string.Empty);
    WriteObject(Credential);
}

@McAndersDK it's to avoid a very very rare edge case -- WriteObject somehow throws ArgumentException. If that really happens, we should allow that exception to propagate and be handled by the engine.


exec: "socketplane": executable file not found in $PATH

Getting this on both Ubuntu and Fedora, def a block. Sounds like a gopath issue but the logs
cmd: sudo socketplane install
Ubuntu:
 Error response from daemon: Cannot start container a3e9644978c5: exec: "socketplane": executable file not found in $PATH
    FATA[0000] Error: failed to start one or more containers
    brent@ub136:~/socketplane/scripts$ sudo -E  echo $PATH
    /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/bin:/usr/local/go/bin:/home/brent/go//bin

Fedora:
    Is this the first node in the cluster? (y/n)y
    2014/12/27 03:49:23 Error response from daemon:
     Cannot start container a94810fd5b281397e1dfdeddc4abc6b4197ccbf73d8e38aaa242e75827103d66:
      exec: "socketplane": executable file not found in $PATH

Any chance we could get some output from docker images here?
Could be an issue with starting the container. I'd suggest trying to start it manually, if it exists, so we can work out what the root cause is.

I got this issue when I tried testing with golang:1.3 instead of golang:1.3-onbuild.  Could be related....

Hi folks
First thing: you guys are doing a great job!
I am trying to run through the demo (https://github.com/socketplane/socketplane) to get more familiarity. I am hitting the same issue as mentioned:
Error:
-- Snippet --
==> socketplane-1: 2015/01/08 04:45:53 Error response from daemon: Cannot start container acf58ddf28d4696b5e37e4782706ab
e9933de0e8811982e667e3d815e1a4284c: exec: "socketplane": executable file not found in $PATH
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
-- Snippet --
I tried the same manually from the VM:
-- Snippet --
vagrant@socketplane-1:~$ sudo docker images
REPOSITORY                TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
socketplane/socketplane   latest              789e49bd78cf        9 minutes ago       514.7 MB
golang                    1.3-onbuild         5d93ad3a90be        6 days ago          448.5 MB
golang                    1.3                 ebd3fd90ae2e        6 weeks ago         448 MB
               feb755848a9a        3 months ago        85.19 MB
vagrant@socketplane-1:~$ sudo docker run -itd --privileged=true --net=host socketplane/socketplane socketplane
2182de7ff95619978d0973dbeb8c39ec5c709db9d1adfc627d92243a7d9b55f4
2015/01/08 04:56:20 Error response from daemon: Cannot start container 2182de7ff95619978d0973dbeb8c39ec5c709db9d1adfc627
d92243a7d9b55f4: exec: "socketplane": executable file not found in $PATH
---Snippet --
Any workarounds available?
2 other things that I want to mention:
Initially, I tried this on Virtualbox with Ubuntu. I realized that its not possible to run Virtualbox within Virtualbox(nested virt) for a 64 bit image because of VT-X issue with Virtualbox. Not sure if it will work with Vmware player. This will work fine with 32 bit images. I moved to using Windows directly instead of Virtualbox and then it worked. It will be good to put this as a note as help for other users.
I faced another issue with Windows(the famous ^M issue)
==> socketplane-2: /tmp/vagrant-shell: /usr/bin/socketplane: /bin/sh^M: bad interpreter: No such file or directory
name="socketplane_socketplane-2_1420644619635_8946"
I worked around by converting the scripts to unix format. Better way is to take care of this using .gitattributes so that git will work fine with Windows systems. Let me know if I need to open a seperate issue for this.
Thanks
Sreenivas

Smakam,
Thanks...
I tried to recreate this issue a few times and I can't get it to fail in my environment.  I am running Virtualbox on my mac with Ubuntu VM's.  Would you mind sharing some more details about your setup.
John

Hi John
My environment:
Windows 7 with Vagrant 1.7.2 and Virtualbox 4.3.20
Pls let me know if you need anything else.
Just 1 thing to note as I mentioned above:
I had to manually run dos2unix on the files in script directory to overcome "^M" error.
Thanks
Sreenivas

hi John
1 thing that I noted:
If I manually update the docker image(from docker hub) for socketplane/socketplane, I was able to start the container using:
sudo docker run -itd --privileged=true --net=host socketplane/socketplane socketplane
Not sure if that tells something or not...
I had few other issues after that because of which I could not continue.
Thanks
Sreenivas

Hi John
Sorry for too many messages...
I was able to get it working without using Vagrant and using multiple Ubuntu VMs as hosts instead.
Thanks
Sreenivas

This issue appears to be a problem with building the socketplane container locally. For those affected, please can you send the output of vagrant up?
A workaround, as @smakam noted, is to:
sudo docker rmi socketplane/socketplane
sudo docker pull socketplane/socketplane
sudo socketplane install

On line-endings @smakam, I'd recommend you open a separate issue.
I think the best way of fixing this would be to update your global git configuration see here, but we can discuss that the new ticket.

Hi Dave
Opened separate issue for ^M.
This is the error for "vagrant up" for 1 of the VMs:
-- Snippet start ---
==> socketplane-2: Importing base box 'socketplane/ubuntu-14.10'...
==> socketplane-2: Matching MAC address for NAT networking...
==> socketplane-2: Setting the name of the VM: socketplane_socketplane-2_1420820282041_73192
==> socketplane-2: Fixed port collision for 22 => 2222. Now on port 2200.
==> socketplane-2: Clearing any previously set network interfaces...
==> socketplane-2: Preparing network interfaces based on configuration...
socketplane-2: Adapter 1: nat
socketplane-2: Adapter 2: intnet
==> socketplane-2: Forwarding ports...
socketplane-2: 22 => 2200 (adapter 1)
==> socketplane-2: Running 'pre-boot' VM customizations...
==> socketplane-2: Booting VM...
==> socketplane-2: Waiting for machine to boot. This may take a few minutes...
socketplane-2: SSH address: <IP_ADDRESS>:2200
socketplane-2: SSH username: vagrant
socketplane-2: SSH auth method: private key
socketplane-2: Warning: Connection timeout. Retrying...
socketplane-2:
socketplane-2: Vagrant insecure key detected. Vagrant will automatically replace
socketplane-2: this with a newly generated keypair for better security.
socketplane-2:
socketplane-2: Inserting generated public key within guest...
socketplane-2: Removing insecure key from the guest if its present...
socketplane-2: Key inserted! Disconnecting and reconnecting using new SSH key...
==> socketplane-2: Machine booted and ready!
==> socketplane-2: Checking for guest additions in VM...
==> socketplane-2: Setting hostname...
==> socketplane-2: Configuring and enabling network interfaces...
==> socketplane-2: Mounting shared folders...
socketplane-2: /vagrant => C:/Users/srmakam/Documents/GitHub/socketplane
==> socketplane-2: Running provisioner: shell...
socketplane-2: Running: inline script
==> socketplane-2: stdin: is not a tty
==> socketplane-2: Running provisioner: shell...
socketplane-2: Running: inline script
==> socketplane-2: stdin: is not a tty
==> socketplane-2: Running provisioner: shell...
socketplane-2: Running: inline script
==> socketplane-2: stdin: is not a tty
==> socketplane-2: Selecting previously unselected package unzip.
==> socketplane-2: (Reading database ... 33797 files and directories currently installed.)
==> socketplane-2: Preparing to unpack .../unzip_6.0-12ubuntu1_amd64.deb ...
==> socketplane-2: Unpacking unzip (6.0-12ubuntu1) ...
==> socketplane-2: Processing triggers for man-db (<IP_ADDRESS>-2) ...
==> socketplane-2: Processing triggers for mime-support (3.55ubuntu1) ...
==> socketplane-2: Setting up unzip (6.0-12ubuntu1) ...
==> socketplane-2: Archive:  0.4.1_linux_amd64.zip
==> socketplane-2:   inflating: consul
==> socketplane-2: Sending build context to Docker daemon 530.9 kB
==> socketplane-2: Sending build context to Docker daemon 1.088 MB
==> socketplane-2: Sending build context to Docker daemon 1.614 MB
==> socketplane-2: Sending build context to Docker daemon 2.139 MB
==> socketplane-2: Sending build context to Docker daemon 2.666 MB
==> socketplane-2: Sending build context to Docker daemon 3.204 MB
==> socketplane-2: Sending build context to Docker daemon 3.744 MB
==> socketplane-2: Sending build context to Docker daemon 4.297 MB
==> socketplane-2: Sending build context to Docker daemon 4.822 MB
==> socketplane-2: Sending build context to Docker daemon 5.359 MB
==> socketplane-2: Sending build context to Docker daemon 5.884 MB
==> socketplane-2: Sending build context to Docker daemon 6.329 MB
==> socketplane-2: Sending build context to Docker daemon
==> socketplane-2: Installing SocketPlane...
==> socketplane-2: -----> Setting Linux Kernel Options
==> socketplane-2:            net.ipv4.ip_forward = 1
==> socketplane-2:            net.ipv4.icmp_echo_ignore_broadcasts = 0
==> socketplane-2: -----> Curl already installed!
==> socketplane-2: -----> Open vSwitch already installed!
==> socketplane-2: -----> Setting OVSDB Listener
==> socketplane-2: -----> Docker already installed!
==> socketplane-2: -----> Starting the SocketPlane container
==> socketplane-2: 2015/01/09 16:37:19 Error response from daemon: Cannot start container e7d109a5be0d8f81313f9421f3fe71
1cc9a3a1724524e601de7c65ee73e8464a: exec: "socketplane": executable file not found in $PATH
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
-- Snippet end --
As you mentioned, after pulling the latest socketplane and installing, things work fine:
sudo docker pull socketplane/socketplane
sudo socketplane install
There is no need to do "sudo docker rmi socketplane/socketplane" in the first step.
Thanks
Sreenivas


cli: dataflow: diagram: Added link on condition in dataflow graphs

Fixes #327

examples/maintained/cgi-bin/dataflow.yaml

examples/ffmpeg/deploy/webhook/df/webhook.yaml

Nice work! Good job with the commit messages!!


Camera fields may be undefined if it is still morphing

Fix for #3865

Thanks @lasalvavida! Can you add a unit test?

@hpinkos Updated with test

The test you wrote passes in master.  That means it's not really testing the change you made.  It should fail in master and pass on this branch.  I think that's happening because options.camera isn't a real Camera.  It's mocked at the top of the file.  Change heading and pitch to undefined for this test, then change them back to 0.0 so subsequent tests still pass.

Good catch @hpinkos; I updated the test

Great, thanks @lasalvavida!  Update CHANGES.md and this will be good to go

Updated

@hpinkos This update should avoid that race condition. It also removes the need to explicitly set the properties to undefined since it is a real camera now whose fields will be undefined while in morphing mode.

Everything looks good! Thanks @lasalvavida!


Better / more compact admin settings page

One of the first pages realm admins will see is the administration settings page, so it would be great to make this page look reasonably nice. If nothing else, currently there is a huge amount of wasted space, and just making it so that you can see more of the settings on one page would already be a huge improvement.
Note that PR #1404 will add another section (Authentication methods) to this page, and I imagine there will be others added in the future.

Closing this, since it is being addressed in the current visual redesign.


Add prometheus metric

Thanks! I'll look into it soon!

not sure how you imagine this to work. Cause who will register the metrics (gauges/counters) cause that is how prometheus works. if you expect it so send back some details, then it is still up to the user to set the gauges and counters. imho prometheus is one of the most commonly used metrics tools out there.
i'm happy to update this, don't get me wrong. i'm not that familiar as you with the whole concept of the interfaces you have. just getting some more background info and context from you :)

Agree, adding a bunch of extra deps to go.mod is not a good idea for this small lib. I also like @alexliesenfeld 's idea to make the metrics lib implement ResultWriter interface in a separate project.
About the metrics format, I don't feel mapping discrete up/down/unknown to 0/1/2 value is right. I'm still not sure but I think I'm going to make my own format which is more or less like this:
# if service1 is up
app_name_health{name="service1", status="up"} 1
app_name_health{name="service1", status="down"} 0
app_name_health{name="service1", status="unknown"} 0

# if service1 is down
app_name_health{name="service1", status="up"} 0
app_name_health{name="service1", status="down"} 1
app_name_health{name="service1", status="unknown"} 0

# if service1 is unknown
app_name_health{name="service1", status="up"} 0
app_name_health{name="service1", status="down"} 0
app_name_health{name="service1", status="unknown"} 1

This way, we can create a fine grained and unambiguous prom query/aggregation.

a format like that will result in more timeseries overall (3 for each check), also you need to reset all the gauges before you update the correct one, it's a bit more complex to do.
i get that you don't want to inject into the lib itself, but i'm not sure how to do this

not sure how you imagine this to work. Cause who will register the metrics (gauges/counters) cause that is how prometheus works. if you expect it so send back some details, then it is still up to the user to set the gauges and counters. imho prometheus is one of the most commonly used metrics tools out there. i'm happy to update this, don't get me wrong. i'm not that familiar as you with the whole concept of the interfaces you have. just getting some more background info and context from you :)

Sure, I can provide some more details. What I was referring to was that there is a ResultWriter interface that the library uses to write a check result into a specific format. For example, the default JSONResultWriter takes the current check status and transforms it into a JSON HTTP response.
https://github.com/alexliesenfeld/health/blob/09f6eabefbfdb6f4ee9dfaf4caf122720aa55da6/handler.go#L49-L64
The same way, we probably could have a PrometheusResultWriter that takes the overall check result and transforms it into a format that can be processed by Prometheus.
The user can then configure the library to use the PrometheusResultWriter rather than the default one by configuring similar similar to this example:
https://github.com/alexliesenfeld/health/blob/09f6eabefbfdb6f4ee9dfaf4caf122720aa55da6/examples/showcase/main.go#L105-L109

Just taken a look at WithResultWriter. Turns out it doesn't seem appropriate for my use case, because it's directly produce HTTP responses. I want to have it easily mixed along with metrics from another library.
So I created a lib myself: https://github.com/chickenzord/go-health-prometheus
Please let me know what you think, thanks

Looks nice! As of now it seems to only exposes the aggregated/overall system status. I wonder if it would help if health.CheckState would actually contain all the component check results as well. AFAICS, this way you could actually expose components individually as well.

@alexliesenfeld it's already showing per-component healths...
actually I haven't found a way to get the overall status 😅  for the aggregated/overall, instead of only up/down/unknown, I'd love to add one more degraded status if any non-critical component is down.. but I think that should be out of the scope of this lib because the real implementation can be different for each use cases 🤔

@alexliesenfeld it's already showing per-component healths...
actually I haven't found a way to get the overall status 😅 for the aggregated/overall, instead of only up/down/unknown, I'd love to add one more degraded status if any non-critical component is down.. but I think that should be out of the scope of this lib because the real implementation can be different for each use cases 🤔

you can solve this by creating prom queries and generate alerts if the result (count or something) drops below a x percentage

any updates on this? :D


Update thread_local

Pulls in https://github.com/Amanieu/thread_local-rs/pull/30 which fixes
a leak when dropping ThreadLocal.

bors r+


Implement proper requestTimeout

We should switch to the (now again maintained) famous DIO package as it supports a proper requestTimeout which should work fine even with long offline data requests.
This should even help us simplify our multipart request code.
Package: https://pub.dev/packages/dio

Not sure if this package makes our client better?
web compatible?

Our current client (the HttpClient from Flutter) is not really great to use for our feature requirements, and we had to implement a lot of features in a not really convenient way.
And yes, it's web compatible.


Start command should pass in Rack config file if present

The Thin server supports passing a Rackup config file via a -R flag in the start command. It would be great if the buildpack could detect presence of a config.ru flag and set the start command with this config file if it's present.

@paketo-buildpacks/ruby-maintainers Is this still a relevant feature request? Are there any blockers?

As far as I know, it's viable and there are no blockers. I believe this is a reasonable request, since it's use-case supported by Thin already.

It looks like thin supports both -C thin.yml and -R config.ru at the same time, which means we don't have any issues with priority.
Unlike the thin config feature I do not think we should support a user-provided file location (e.g. via BP_RACKUP_CONFIG_LOCATION) because the Rackup Buildpack does not yet support this, and I think it would be very confusing (and possibly wrong) to support it here and not in that buildpack.
@paketo-buildpacks/ruby-maintainers does anyone have a good way to isolate the config.ru portion such that the thin application wouldn't run without the -R config.ru flag? I'm not familiar enough with the tools to know if this is possible. If not, I think we can leverage the existing integration test fixture for the thin config file, and validate that thin -R config.ru -C thin.yml start runs as expected.


feat: Log when error occurs while pushing

And upgrade h2-auto-push to v0.4.0.
Also update other packages.

Codecov Report

Merging #28 into master will decrease coverage by 2.42%.
The diff coverage is 66.66%.

@@            Coverage Diff             @@
##           master      #28      +/-   ##
==========================================
- Coverage   97.29%   94.87%   -2.43%
==========================================
  Files           1        1
  Lines          37       39       +2
  Branches        8        8
==========================================
+ Hits           36       37       +1
- Misses          1        2       +1

Impacted Files
Coverage Δ

ts/src/index.ts
94.87% <66.66%> (-2.43%)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d885d4b...7551110. Read the comment docs.

/cc @mcollina


Implement support for listing organizations

Both for the currently-authenticated user and a named user. Little bits more of the API! :tada:

Wow you're on a roll here. Thanks @carols10cents!

You're welcome!! I've got more coming too... hope you're not sick of me yet! ;)


[wagtail] Rewrite content to be more concise

Use LTS as abbreviation instead of Long-Term-Support.
Remove main as a supported branch, it isn't a release
Simplify release schedule explanation
Remove note about unsupported releases not getting security fixes, that is implied.

@zerolab Could you take a look at this please.

Thanks!


fix(Contributing): typo correction

Saw a small typo in the CONTRIBUTING.md file

[Current coverage][cc-pull] is 89.64%

Merging [#331][cc-pull] into [master][cc-base-branch] will not change coverage

@@             master       #331   diff @@
==========================================
  Files            67         67
  Lines           927        927
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
  Hits            831        831
  Misses           96         96
  Partials          0          0

Powered by Codecov. Last updated by [9beb4a9...a34aa23][cc-compare]
[cc-base-branch]: https://codecov.io/gh/TechnologyAdvice/stardust/branch/master?src=pr
[cc-compare]: https://codecov.io/gh/TechnologyAdvice/stardust/compare/9beb4a9e60ccc93fd2a0a42fd194287965889cd5...a34aa2316b9be77194ec56611bc8978c02d68d60?src=pr
[cc-pull]: https://codecov.io/gh/TechnologyAdvice/stardust/pull/331?src=pr

Awesome, thanks!


OSGI r6: Use of the @ObjectDefinitionClass SiteMapServlet

Contributes to completion of #1666

Closing as we had to revert back to SCR - See: https://github.com/Adobe-Consulting-Services/acs-aem-commons/issues/1741#issuecomment-461836942


Add Pradyun to copyright holders

I reckon I've made sufficient enough changes here to count toward this.

@GaretJax I'd like to get your OK on this.


Incompatible changes will lead to added labels and failing actions

Incompatible by means on JSON Schema. This is a necessary, not sufficient criteria.

get changed files via GitHub Action
https://github.com/marketplace/actions/changed-files#on-pull_request-
and pass to script.
This cannot be run locally. So maybe figure out what is checkedout and what is 'main'.

Rm label if_success

Test scenario: adding a new object type
Expect: Don't do anything.


Upgrade gevent to 1.0.2

We recently updated the version of python we use internally to run httpbin and have upgraded gevent for this bug fix:
https://github.com/gevent/gevent/issues/477

:shipit:


chore: update bf-generate-library

Description
Updates the library to the latest.
Task Item
#minor

Coverage remained the same at 54.996% when pulling 8a28745f0b2c492420ab93f0a2b78087777ee21b on hatpick:sorgh/update_bfg_lib into fa7578ce8397e5a6581de97e50f68c1ce3c71ff3 on microsoft:main.


Missing dependency for bookstack-system-cli

Hello,
I wanted to create a full backup of my BookStack using a dedicated  bookstack-system-cli application, but there is missing installation of mysqldump.
www-data@bookstack-c884f59d5-8ktj9:~/bookstack$ ./bookstack-system-cli backup
WARNING: This CLI is in early alpha testing.
There's a high chance of running into bugs, and the CLI API is subject to change.

Checking system requirements...

Warning: ZipArchive::addFile(): No such file or directory in phar:///var/www/bookstack/bookstack-system-cli/src/Commands/BackupCommand.php on line 55
Dumping the database via mysqldump...

An error occurred when attempting to run a command:

Could not locate "mysqldump" program.

Can you please add mysqldump as part of the docker image?
Environment:

Kubernetes: 1.25
Bookstack:  23.8.3

Sounds sensible enough to me, feel free to open a PR and I'll review.
You might find it easier to create Kubernetes cron jobs to back up database (via a dump) and your media volume (or, even easier, use S3 or equivalent for media storage).


Dynamic Reconfiguration

Exposes the dynamic reconfiguration methods from the core ZooKeeper API to the top level JavaScript ZooKeeper class.
Description
Exposes the following methods to the ZooKeeper class as both async and callback funtions:
zoo_agetconfig
zoo_awgetconfig
zoo_areconfig
The following only has one variant as it's a syncronous function
zoo_setservers
Also expose the ZOO_CONFIG_NODE constant
These allow the user to implement client side dynamic reconfiguration support.
Motivation and Context
Adds Dynamic Reconfiguration support to the client
https://github.com/yfinkelstein/node-zookeeper/issues/208
How Has This Been Tested?
Tested in an external command line ZooKeeper client application that uses this module and implements a full client Dynamic Reconfiguration workflow. Also tested unauthenticated reconfiguration from the same client app.
Implementation is a straight line from the C API to top level JavaScript functions with no interaction with other parts of the codebase.
Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[ x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

[ x] I have read the code of conduct.
[ x] I have read the contributing guide.
[ x] I have updated the documentation accordingly (if applicable).

Great! Thank you for this PR @bhack-onshape !
I will have a look at it during this week.

LGTM. The only thing that I have spotted missing are TypeScript definitions. @bhack-onshape do you think you would be able to add TypeScript definitions for the new methods?
There is also typedefs.js file, however I cannot remember its purpose, @DavidVujic will propably explain it better than me.

LGTM. The only thing that I have spotted missing are TypeScript definitions. @bhack-onshape do you think you would be able to add TypeScript definitions for the new methods?
There is also typedefs.js file, however I cannot remember its purpose, @DavidVujic will propably explain it better than me.

The typedefs.js is for custom "data types" (objects with properties + data types) written in a JsDoc  format.
The TypeScript definition file is generated using a script/cli, based on the JsDoc comments in the source code (combined with the typedefs.js file). But there are some quirks when generating that file.
If there is a need for new data types, please add them to typedefs.js and I can generate a new TypeScript definitions file in a separate PR - and try to fix the quirks too 😄

There's no new data types but the config_version is a Number rather than int32 since it's a 64 bit. And therefore theoretically may not be representable.JSdoc comments for the new functions should be good already unless I missed something.

Okay, all is clear to me now!


Restrict Completion to Habits with Custom Day selection.

Currently, custom habits with specific days (e.g., Monday - Friday) allow users to mark them as completed on any day, including weekends. This affects statistics calculations, leading to inflated completion percentages (e.g., showing 120% completion).
Possible Solution: Modify the markHabitAsCompletedOnDate method in the ProgressController to restrict marking completion to the specified days for custom habits. Display a warning if the user attempts to mark completion on an unsupported day.

Resolved: Added a soft warning for users when attempting to mark a custom habit as completed on non-specified days. Users can still Mark a habit complete on the day, however they will not be able to mark previous days outside the custom schedule as complete. This allows flexibility while encouraging users to adhere to their custom schedules. In addition, the performance metrics are now capped at 100%, ensuring that extra completions won’t inflate the statistics.


landing page

📝 Description
basic landing page using html css(eg background image, navbar ,footer)
🖼 Screenshots
No response
📋 Additional Information
No response

add the landing page and will include background image, navbar and footer using html and css

pls assign this to me

A similar issue #2 Already exist


Remove dollar prefix, make it convenient to copy

Please describe the purpose of this pull request.
Is it to add a new feature? Is it to fix a bug?
How to test
How can we test your PR during review? What commands should we run? What outcomes should we expect?
Have you tested this PR?
Have you tested the latest commit on the PR? If so please provide outputs from your tests.
Related issues or PRs
Please link any related GitHub issues or PRs.
Is your PR over 500 lines of code?
If so, please break up your PR into multiple smaller PRs so that we can review them quickly, or provide justification for its length.
Additional context
Add any other context or screenshots about the PR here.

@ssteo happy to merge if you reopen, lgtm

@cpacker  sure, thanks


Fix socket leak in component tests

Summary: Close server socket in server component tests.
Type: Fix
Test Plan: Unittests, Component Tests.
Jira: NO-JIRA

Job for AI/job/AI_BUILDS/job/AI-Trigger-PullRequests started: https://pv-jen015.uk2.scp.bskyb.com/job/AI/job/AI_BUILDS/job/AI-Trigger-PullRequests/64/

https://jenkins.code.rdkcentral.com/job/github-triggered/46349/ started

https://jenkins.code.rdkcentral.com/job/build-component/85026/ started.

https://jenkins.code.rdkcentral.com/job/github-triggered/46351/ started

https://jenkins.code.rdkcentral.com/job/build-component/85027/ started.

https://jenkinsrdkm.cmf.code.rdkcentral.com/job/github-triggered/11612/ started

https://jenkinsrdkm.cmf.code.rdkcentral.com/job/build-component-platform/17271/ started.

https://jenkinsrdkm.cmf.code.rdkcentral.com/job/github-triggered/11614/ started

https://jenkinsrdkm.cmf.code.rdkcentral.com/job/build-component-platform/17272/ started.

build-brcm-refboard2 Console Log uploaded to Gist URL: https://gist.github.com/rdkcmf-jenkins/5b0048baa0b60b320172138aba1e9826

Sanity tests for ['RPI4 Hybrid'] added.
https://jenkinsrdkm.cmf.code.rdkcentral.com/job/test-components-flow/34828/

Sanity tests for ['RPI4 Hybrid'] added.
https://jenkinsrdkm.cmf.code.rdkcentral.com/job/test-components-flow/34829/

Job for AI/job/AI_BUILDS/job/AI-Trigger-PullRequests started: https://pv-jen015.uk2.scp.bskyb.com/job/AI/job/AI_BUILDS/job/AI-Trigger-PullRequests/65/


autoprefixer-core was deprecated. Use autoprefixer package

it seem not up-to-date since 8 months. a dead project?

thanks for the hint. We will update that package.


What about Azure Batch?

would that work with managed identities?

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

ID: 726adac9-1848-01a6-9586-842c81f820f7
Version Independent ID: 249db438-8c95-8e69-f69e-8e48fcd0b359
Content: Azure Services that support managed identities - Azure AD
Content Source: articles/active-directory/managed-identities-azure-resources/services-support-managed-identities.md
Service: active-directory
Sub-service: msi
GitHub Login: @MarkusVi
Microsoft Alias: markvi

@rarera Thanks for your feedback! We will investigate and update as appropriate.

@rarera No currently MSI support is not available in Azure Batch. You can view and upvote existing Uservoice over here.

@rarera We will now proceed to close this thread. If there are further questions regarding this matter, please reopen it and we will gladly continue the discussion.


Python2 or 3 or both ?

My only ask is to be compatible with python3. I see you had used python 2 style class declarations
class WalletService(object):
    ....

My order of preference would be

Python3 code but be usable with both python2 and python3
Python3 code but be usable with only python3

Does it cause any problems in Python3?

Does it cause any problems in Python3?

It works. There is no issue with that at all.
But when looking at the code to understand what it is doing, not seeing the type annotations is kind of confusing. Or maybe thats just me been using python3 with type annotations for several years now.

Well, I've never used them personally and always described types in the docstring. However, if annotations turn out nicely in auto-generated docs, we might consider that solution.
I'm rather not planning to make the code compatible with Py2, if that matters. Although I'm not considering that decision final.
For doc generation I'd like to use Sphinx

Since python 2 is no longer supported, I would say it's safe to drop python 2 and use just python from e.g. 3.6.
Type annotations are very useful IMHO (linting, refactoring, code navigation). We use them in our IOHK python projects, like https://github.com/input-output-hk/cardano-node-tests and https://github.com/input-output-hk/cardano-clusterlib-py
You can see how it looks like in sphinx docs in https://cardano-clusterlib-py.readthedocs.io/en/latest/cardano_clusterlib.html#module-cardano_clusterlib.clusterlib
off topic:
Also tools for automatic code checking and formatting make it easier to contribute, find errors as well as clean code from legacy stuff, like constructs used in old python versions (this class Something(object), etc.). E.g. pre-commit with checks like black, flake8, pyupgrade, ... - https://github.com/input-output-hk/cardano-clusterlib-py/blob/master/.pre-commit-config.yaml


If a root project has plugins enabled, projects in sub-folders should have those plugins too

Currently in a mono-repo, all projects need to install custom_lint + plugins.
We could alleviate that by having a pubspec at the root of the workspace which installs both custom_lint and plugins. And then enable plugins for all sub-projects in the workspace.

Hey @rrousselGit, I'm wondering if it's possible to run custom_lint checks in a terminal/CI without enabling it as an analyzer plugin in an IDE, so without adding this?
analyzer:
  plugins:
    - custom_lint

It goes without saying that having the IDE highlighting problems is really handy but taking into account that the IDE may become very slow on larger mono-projects (we have 100+ dart/flutter packages already, and it is not recommended for 10+ packages).

Yes that works.

Yes that works.

@rrousselGit, then I must be missing something.
I get the lints when I run dart run custom_lint having custom_lint referenced in the analyzer->plugins section.

But when I run the same command without custom_lint referenced in the analyzer->plugins section, I always get "No issues found!"

So, what will be the correct way to run the checks in the terminal without having to enable the plugin for the IDE?

Actually you're correct, I've changed that at some point.

Actually you're correct, I've changed that at some point.

@rrousselGit, I'm a bit confused. So running the checks from a terminal without enabling custom_lint as an analyzer plugin is NOT supported, right?

Kind of. The command line voluntarily excludes projects where it isn't enabled, to avoid cases where the linter runs in places where it shouldn't

The command line voluntarily excludes projects where it isn't enabled

Would it make sense then to do the filtering based on the presence of custom_lint dev_dependency in a project rather than based on the presence of the enabled plugin?

You can technically install the command line globally and not add it as dev_dependency

So, do you see the value in having an option to run the tool without the need to enable the analyzer_plugin? If so, do you see a relatively easy way to get it implemented?

Our team would also find it valuable to be able to run custom_lint from the command line while disabling the plugin in analysis_options.yaml.
Unfortunately, we've had multiple devs negatively impacted by the increased memory and CPU usage after I added custom_lint to our (rather large monorepo) project.
However, we would still gain good value by being able to run our custom lint rules via custom_lint in CI (or locally via command line).
Alternatively, (and maybe this isn't a great idea), it could be useful to support an env var or maybe a dart/flutter vs code extension config that allows individual developers to opt out of custom analyzer plugins.


enhancement:  impact handling for change in configprovider

service-core impact handling for change in configprovider

Closing as done


Suggestion: Per table cell alignment attributes

You can set alignment on a per-column basis in GFM.
The excerpt:

Finally, by including colons : within the header row, you can define text to be left-aligned, right-aligned, or center-aligned:

| Left-Aligned  | Center Aligned  | Right Aligned |
| :------------ |:---------------:| -----:|
| col 3 is      | some wordy text | $1600 |
| col 2 is      | centered        |   $12 |
| zebra stripes | are neat        |    $1 |

I see an align attribute on the master table interface, but it should be parsed and applied to the tablecells as well to support this distinction.

Thanks again for raising the issues, Evan.
However, in this case I don’t agree on the premise of your proposed change.
That would introduce, for example, cases where cells in the same column could have different alignments, which makes no sense.
I think this problem stems from how you’re implementing mdast. I’m guessing you’re not keeping parents in memory (?), making a look-up to the parent table impossible. I would advice you to build that too.
I suggest taking a look at mdast-react for inspiration: https://github.com/mapbox/mdast-react/blob/master/lib/compilers.js

@wooorm I don't understand your argument. In the mdastnode man page, it says that TableCell does not have an align property, so how can the alignment of a particular column be gleaned without this information?
There is a master align property on the Table, but they should exist on a per-column basis per the GFM Table spec. Your philosophy is that all columns would have the same alignment, which is not the case.

Here’s an example. How should someone compile the following to anything other than HTML, for example, markdown (note the differing align properties):
{
  "type": "root",
  "children": [
    {
      "type": "table",
      "children": [
        {
          "type": "tableHeader",
          "children": [
            {
              "type": "tableCell",
              "align": "left",
              "children": [
                {
                  "type": "text",
                  "value": "foo",
                  "position": {
                    "start": {
                      "line": 1,
                      "column": 3
                    },
                    "end": {
                      "line": 1,
                      "column": 6
                    },
                    "indent": []
                  }
                }
              ],
              "position": {
                "start": {
                  "line": 1,
                  "column": 3
                },
                "end": {
                  "line": 1,
                  "column": 7
                },
                "indent": []
              }
            },
            {
              "type": "tableCell",
              "align": "right",
              "children": [
                {
                  "type": "text",
                  "value": "bar",
                  "position": {
                    "start": {
                      "line": 1,
                      "column": 10
                    },
                    "end": {
                      "line": 1,
                      "column": 13
                    },
                    "indent": []
                  }
                }
              ],
              "position": {
                "start": {
                  "line": 1,
                  "column": 10
                },
                "end": {
                  "line": 1,
                  "column": 13
                },
                "indent": []
              }
            }
          ],
          "position": {
            "start": {
              "line": 1,
              "column": 1
            },
            "end": {
              "line": 1,
              "column": 15
            },
            "indent": []
          }
        },
        {
          "type": "tableRow",
          "children": [
            {
              "type": "tableCell",
              "align": "center",
              "children": [
                {
                  "type": "text",
                  "value": "baz",
                  "position": {
                    "start": {
                      "line": 3,
                      "column": 3
                    },
                    "end": {
                      "line": 3,
                      "column": 6
                    },
                    "indent": []
                  }
                }
              ],
              "position": {
                "start": {
                  "line": 3,
                  "column": 3
                },
                "end": {
                  "line": 3,
                  "column": 7
                },
                "indent": []
              }
            },
            {
              "type": "tableCell",
              "align": null,
              "children": [
                {
                  "type": "text",
                  "value": "qux",
                  "position": {
                    "start": {
                      "line": 3,
                      "column": 10
                    },
                    "end": {
                      "line": 3,
                      "column": 13
                    },
                    "indent": []
                  }
                }
              ],
              "position": {
                "start": {
                  "line": 3,
                  "column": 10
                },
                "end": {
                  "line": 3,
                  "column": 13
                },
                "indent": []
              }
            }
          ],
          "position": {
            "start": {
              "line": 3,
              "column": 1
            },
            "end": {
              "line": 3,
              "column": 15
            },
            "indent": []
          }
        },
        {
          "type": "tableRow",
          "children": [
            {
              "type": "tableCell",
              "children": [
                {
                  "type": "text",
                  "value": "quux",
                  "position": {
                    "start": {
                      "line": 4,
                      "column": 3
                    },
                    "end": {
                      "line": 4,
                      "column": 7
                    },
                    "indent": []
                  }
                }
              ],
              "position": {
                "start": {
                  "line": 4,
                  "column": 3
                },
                "end": {
                  "line": 4,
                  "column": 7
                },
                "indent": []
              }
            },
            {
              "type": "tableCell",
              "children": [
                {
                  "type": "text",
                  "value": "foo",
                  "position": {
                    "start": {
                      "line": 4,
                      "column": 10
                    },
                    "end": {
                      "line": 4,
                      "column": 13
                    },
                    "indent": []
                  }
                }
              ],
              "position": {
                "start": {
                  "line": 4,
                  "column": 10
                },
                "end": {
                  "line": 4,
                  "column": 13
                },
                "indent": []
              }
            }
          ],
          "position": {
            "start": {
              "line": 4,
              "column": 1
            },
            "end": {
              "line": 4,
              "column": 15
            },
            "indent": []
          }
        }
      ],
      "position": {
        "start": {
          "line": 1,
          "column": 1
        },
        "end": {
          "line": 4,
          "column": 15
        },
        "indent": [
          1,
          1,
          1
        ]
      }
    }
  ],
  "position": {
    "start": {
      "line": 1,
      "column": 1
    },
    "end": {
      "line": 4,
      "column": 15
    }
  }
}

Not really understanding your concern here, in an output medium that doesn't have the concept of alignment it would just be ignored. GFM's primary output is HTML or something that ends up as HTML, so the capability should be there, even if a plugin or non HTML-like compiler doesn't make use of it.

Also is that example theoretical or a proposal? I didn't see align on any TableCell node before...

Yes, that example is theoretical, and most importantly, an example of why this won't work..
Primarily, I don't agree regarding HTML being the primary output of markdown. At least, I've seen a change in that and hope mdast will facilitate that change.
Honestly, you're way to fixated on one less look-up in your implementation. Where that one less look-up leads to ambigue logic and many more look-ups in other formats.

This particular issue isn't a matter of less lookups though. I'd be ok if you added the align to the cells only in TableHeader. The issue is one central align on Table, can't accommodate the need for aligns per column, as per the GFM table spec.
There's no way for me to cache the header cells and then figure out the alignment to apply if it's not there in the first place.

It actually might make sense to make a new node type for this: TableHeaderCell which is TableCell + align

I took a quick look ate your code. Here you're already iterating over the rows, why not iterate over the cells too?

OH OH OH. I just realized the top align is an array. SORRY! That explains everything and I apologize for making a fuss.

Haha, okay. No worries :+1:


Add type specific settings

As mentioned in https://github.com/toptal/chewy/pull/340 adding per type settings for import options would be a nice idea. It allows to tune batch size for each defined type specifically.
@pyromaniac What do you think about it?

I think settings name is too common, default_import_options maybe?

@pyromaniac Is it better now?

Yeah, much better, thanks!


Add support for disabling the sorting and list creation for WordNet object relation methods

Add support for disabling the sorting and list creation for WordNet object relation methods. It keeps backward compatibility.
See #3193.

@bryant1410, how big a speed improvement do you typically observe on your use case, when setting sort and force_list to False?

Hey, I did a quick test based on one of the functions I use. The setup is:
pip install git+https://github.com/bryant1410/nltk@patch-5

def _get_sibling_or_cousin_co_hyponym_lemmas(synset):
    for parent in synset.hypernyms():
        for grandparent in parent.hypernyms():
            for uncle_or_parent in grandparent.hyponyms():
                for cousin_or_sibling in uncle_or_parent.hyponyms():
                    if cousin_or_sibling != synset:
                        yield from cousin_or_sibling.lemmas()

def _get_sibling_or_cousin_co_hyponym_lemmas_no_sort(synset):
    for parent in synset.hypernyms(sort=False, force_list=False):
        for grandparent in parent.hypernyms(sort=False, force_list=False):
            for uncle_or_parent in grandparent.hyponyms(sort=False, force_list=False):
                for cousin_or_sibling in uncle_or_parent.hyponyms(sort=False, force_list=False):
                    if cousin_or_sibling != synset:
                        yield from cousin_or_sibling.lemmas()

import timeit
from nltk.corpus import wordnet as wn

synset = wn.synset("man.n.01")

# We warm it up before benchmarking:
list(_get_sibling_or_cousin_co_hyponym_lemmas(synset))

With default values:
>>> timeit.timeit(lambda: list(_get_sibling_or_cousin_co_hyponym_lemmas(synset)), number=100)
0.30820278730243444

With disabling sorting and list creations:
>>> timeit.timeit(lambda: list(_get_sibling_or_cousin_co_hyponym_lemmas_no_sort(synset)), number=100)
0.20816301740705967

About 50% faster for this example.
More examples:

Synset
Before
After

man.n.01
308
208

woman.n.01
308
207

banana.n.01
62
37

apple.n.01
36
24

orange.n.01
13
9

dog.n.01
15
11

cat.n.01
4
3

calamagrostis.n.01
274
148

adult_male.n.01
309
213

adult.n.01
118
63

girlfriend.n.01
183
123

somebody
159
109

In my real use case example, I call this function multiple times per data loader worker (which, in turn, I have one per CPU core). It's part of a code that bottlenecks (starves) the GPU usage, as I have to compute thousands of these per second per data loader worker.

This PR is perfect and LGTM.
But there are two problems with the above test script.
First, it only shows the speedups attributed to sort=False. Setting force_list to False has no effect on the speed since the output is converted to a list anyway at last.
Second, the test only checks that any cousin_or_sibling found is different from the input synset, while it should also check that they have not been seen yet. For this reason, the list of cousin_or_sibling lemmas of man.n.01 has length 4430, while the corresponding set only has 2085 elements.

First, it only shows the speedups attributed to sort=False. Setting force_list to False has no effect on the speed since the output is converted to a list anyway at last.

Note that the list conversion occurs to the final output, not the intermediate ones. The list creations that are avoided are each of the outputs to the hypernyms or hyponyms calls.
Still, we can do a test that avoids the final list. E.g., we can follow this SO post and just consume the iterable the fastest way possible. I did this and observed differences of 1-7ms.
Having said this, I later observed that using force_list=True actually makes it a bit faster (single-digit milliseconds). I looked online and found people discussing that it depends on the use case (e.g., using these functions for _get_sibling_or_cousin_co_hyponym_lemmas vs for a different use case). Still, there are memory benefits, so it's a tradeoff.

Second, the test only checks that any cousin_or_sibling found is different from the input synset, while it should also check that they have not been seen yet. For this reason, the list of cousin_or_sibling lemmas of man.n.01 has length 4430, while the corresponding set only has 2085 elements.

Thanks for catching this! For my use case, it's fine, and I believe it's preferred.

I also observe slightly better timings with force_list=True. The difference is small but consistent, so this additional parameter does not contribute to solving the speed bottleneck from #3193. Still, it may be useful for uses where one wants to consume the output one piece at a time instead of waiting for the whole list.

Testing with more inputs, the speedup from force_list= False stays small, but it displays some randomness, and it is not always positive or negative. It may be questionable whether it is worth the cost of managing this additional parameter:

Input
Unique cousins
sort gain
list gain

man.n.01
2085
25.74%
-0.12%

woman.n.01
2085
25.94%
-1.3%

banana.n.01
1357
59.19%
-0.2%

apple.n.01
210
41.86%
0.27%

orange.n.01
95
33.44%
0.35%

dog.n.01
204
26.96%
1.65%

cat.n.01
104
22.75%
1.54%

calamagrostis.n.01
4824
39.42%
-0.72%

adult_male.n.01
2085
26.61%
1.46%

adult.n.01
971
52.92%
2.5%

girlfriend.n.01
2377
25.42%
1.08%

It's an iterable regardless.
On Sat, Mar 30, 2024, 5:19 AM Eric Kafe @.***> wrote:

@.**** requested changes on this pull request.
    if relation_symbol not in self._pointers:
        return []

With force_list= False, the return type of _related() becomes
unpredictable, because it is an iterator when the relation_symbol is
present in self._pointers, but an empty list otherwise, in which case
calling next() on the output fails with an Error.
—
Reply to this email directly, view it on GitHub
https://github.com/nltk/nltk/pull/3240#pullrequestreview-1969871965, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AA5ZPXJLUDVN25AA2XKSDQTY2ZYQZAVCNFSM6AAAAABEZVFBUGVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTSNRZHA3TCOJWGU
.
You are receiving this because you were mentioned.Message ID:
@.***>

It's an iterable regardless.

But it is not an iterator: next([]) fails with

TypeError: 'list' object is not an iterator

while next(iter([])) returns

StopIteration

You can do iter regardless, then next. Or a for loop directly.
On Sat, Mar 30, 2024, 5:44 AM Eric Kafe @.***> wrote:

It's an iterable regardless.
But it is not an iterator: next([]) fails with
TypeError: 'list' object is not an iterator
while next(iter([])) returns
StopIteration
—
Reply to this email directly, view it on GitHub
https://github.com/nltk/nltk/pull/3240#issuecomment-2027994095, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AA5ZPXOAWCX5IDCLUQESZPDY2Z3NHAVCNFSM6AAAAABEZVFBUGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRXHE4TIMBZGU
.
You are receiving this because you were mentioned.Message ID:
@.***>

Wouldn't you prefer that the output of _related(force_list=False) had the same predictable type, no matter whether targets were found or not?

For me personally no but I can see how other people would prefer that. If
it's always e.g. an iterable type (that has __iter__) then it's fine for
me. So I have that one guarantee. Which makes sense with something not
being forced; it's more relaxed and something is not guaranteed then (that
is not a list).
On Sat, Mar 30, 2024, 6:22 AM Eric Kafe @.***> wrote:

Wouldn't you prefer that the output of _related(force_list=False) had
the same predictable type, no matter whether targets were found or not?
—
Reply to this email directly, view it on GitHub
https://github.com/nltk/nltk/pull/3240#issuecomment-2028004275, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AA5ZPXN2B5URPVJNH3BNQPDY2Z76DAVCNFSM6AAAAABEZVFBUGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRYGAYDIMRXGU
.
You are receiving this because you were mentioned.Message ID:
@.***>

https://github.com/nltk/nltk/commit/9ad1956d4f665d88b6ab26486bac779bd7352e63 fixed #3193.

Should I close this one?

Obviously, this PR is less relevant, now that #3193 is solved otherwise. There may still be a case for iterators, though that could go into a different PR.


Put all Learning Goals in the Same page

Problem Description
There are two Learning Goals pages. Make sure that the ONE source of truth is update

Move all the information over from the Archived (non-used) version

Make sure each matches up with goals.json and the Miro Board:
https://miro.com/app/board/uXjVOB6tchQ=/
Where Can we find out more about this topic?
Additional context
Add any other context or screenshots about the feature request here.
Milestones (Optional)
1) Milstone Name Text
2) Milstone Name Text
Acceptance Criteria
Describe the out put and criteria for this output for considering this task completed

Done! 😄

@marco the IPFS and IPLD look great, however it looks like libp2p and PLN still need updating!
Take a look at this, and also make sure you cross reference everthing with the goals.json!

Note-- Updated & Done! https://www.notion.so/pl-strflt/8e6c3e8aa7a446ecb4a2f6cd55462218?v=43c411da4dbf45838a18716547c50929


Lissom resettling activity between two inputs.

Hello,
If GCAL resettles the activity of V1 at the end of each run and before presenting new input where exactly it happens.(Hint: I am trying to prevent the history of activation to see direction sensitivity bypassing LGN layers !  )

GCAL uses a SettlingCFSheet, which is a subclass of JointNormalizingCFSheet that counts the number of activations and uses that for resetting activity and for ensuring that learning is done only once per iteration, rather than at each settling step.  There are a couple of ways to avoid the resetting.  (1) You can change GCAL to use a JointNormalizingCFSheet instead, and avoid all counting of activations, including the resetting.  If you do that, GCAL will work about the same except that it will now learn at every single input presentation, which means that you'll need to reduce the learning rate by a factor of tsettle or so, and there will be other more subtle effects caused by learning intermediate patterns.  (2) Or, you could subclass from SettlingCFSheet, reimplementing just the input_event method so that you skip the resetting while keeping everything else the same.  Doing that should have almost no effect on GCAL; the resetting is not crucial for anything.
It is unlikely that either approach will help you develop direction sensitivity, for a variety of reasons, but they will at least let you test it!  I believe @jlstevens has an implementation of option 1 already ready to use, as part of his PhD thesis he defends in a couple of weeks, and he should be making that public soon afterwards if that's any help.

Thanks for your reply.Yeah it hasn't much significance here but to be sure of it doesn't affect the way direction sensitivity is captured.So if I map  this with Gcal what I think is I can take two layers on lissom where first layer calculates my sequence response and keeps the response until i present next frame,whereas second layer with bigger afferent RF chooses the best response (accumulated input winner).I am not sure how I can map it while not using LGN ?

I'm not sure what you are proposing here, either what the two layers would be doing or mapping it without using LGN.  I'm guessing that you are trying to figure out how to measure direction selectivity without using the "multiple retinas and LGNs" hack that our earliest direction maps used?  I don't think you need any of what you are discussing here, then; we've already implemented proper direction maps that don't depend on that hack.  Both versions are available, currently controlled by a very ugly mechanism whereby if "_old_motion_model" is defined in the main namespace, it uses the old hacky way, and otherwise it uses the reasonable way (where each image is presented sequentially).  Unfortunately I don't remember much about this -- we never got around to publishing the improved direction model, and so it would take some digging for us to remember the final status of any of that code.

'm guessing that you are trying to figure out how to measure direction selectivity without using the "multiple retinas and LGNs
I am exactly looking for this ! and yes I do present images sequentially.It would be great if you can provide some direction in this.I also tried to see if i can give delay in particular neurons in V1 to hold the responses. seems I am missing something!

@jlstevens has also written code to give variable delays to various V1 neurons, which he will also release with part of his thesis.  The variable-delay code wasn't developed for GCAL, but it would presumably be combined with it.  @jlstevens, can you please make sure that CGCAL is checked in to the repository in its latest version and let us know?  I'll also try to track down the improved motion model.

Thanks a lot James.


Update dependencies and make php-parse a dev dependency

Closes #159

From my experience, it can avoid a lot of hassle to run PHP-CS-Fixer and PHPStan only with one PHP version, one TYPO3 version and one set of dependencies (highest vs. lowest) on CI as the results otherwise tend to vary somewhat.

From my experience, it can avoid a lot of hassle to run PHP-CS-Fixer and PHPStan only with one PHP version, one TYPO3 version and one set of dependencies (highest vs. lowest) on CI as the results otherwise tend to vary somewhat.

Actually I'm not a big fan of this but yes, it can become pretty complex. PHPStan itself does also have a special solution to support PHP 7.4. But i think... Time has come and PHP 7.4 support is ready to be dropped. I've now increased PHP requirement to 8.1 which should be fine for nearly everyone.

I've now increased PHP requirement to 8.1 which should be fine for nearly everyone.

I'm using this package in quite a few extensions that still support TYPO3 11LTS (and all PHP versions that TYPO3 11LTS supports, i.e., also PHP 7.4.). I'd like to be able to use the latest features and bugfixes and would appreciate either 7.4 support as long as TYPO3 11LTS is officially supported, or one last 7.4-compatible release before this PR gets merged. Thanks! :pray:

@oliverklee Here you go. I've now just adjusted some PHPCS rules so PHPCS is also happy when using PHP 7.4

@sascha-egerer Oh, thanks! :heart:


i64 support

As a user, I want to be able to specify a 64-bits integer ( i64 type )

long does support this 64-bit integer


mfrc522: reworked public/private API.

Fixed the wait for edge block, removed synchronization code.
Moved private-related access methods to the low-level driver.
Added concurrent execution protection via config.

@maruel , @vkorn please have a look

gohci

The only big problem is the race condition I noted. Also double check how some godoc shows up, I'm not sure it'll be well formatted everywhere but that's less critical.

The only big problem is the race condition I noted. Also double check how some godoc shows up, I'm not sure it'll be well formatted everywhere but that's less critical.

gohci

Weird, I think I had many comments I had forgot posting so you'll see a few outdated comment. Sorry about that. :/

gohci


Failsafe from rollbar-gem. ArgumentError: "wrong number of arguments (1 for 0)"  .../rollbar-2.7.1/lib/rollbar/core_ext/basic_socket.rb:4:in `as_json': error in process_payload

We have a Sinatra application using rollbar-gem 2.7.1 and recently we have integrated ActiveRecord support in the application.
Immediately after that we started to receive this error:
Failsafe from rollbar-gem. ArgumentError: "wrong number of arguments (1 for 0)"  .../rollbar-2.7.1/lib/rollbar/core_ext/basic_socket.rb:4:in `as_json': error in process_payload
I understand from  the changelog that this comes from  a patch created to avoid a bug  for ActiveSupport versions prior to  4.1.0, but our ActiveSupport version is 4.2.6.
Why is this patch active in our configuration?
Can we safely disable it through the configuration settings?
Is there another workaround to solve the error?
Many thanks in advance.

Hi @acaporrini, sorry for this inconvenience. We'll need to investigate what is happening exactly in your scenario.
For the moment you can use this config config.disable_core_monkey_patch = true in your Rollbar configuration. This will disable that monkey patch.
Do you have a backtrace of this exception? We don't send it in failsafe errors to avoid possible bugs in the backtrace parsing.
Beside this, can you tell us if you have installed any other JSON serializing library? If you can paste your Gemfile it'd be very useful, or you can send it to us using<EMAIL_ADDRESS>Thanks and sorry for the inconvenience.

Hi @jondeandres I have sent you an email ;)

This should be already fixed. Closing


[1.14.x] KOGITO-5508 Data Index Dev Service

Cherry-pick https://github.com/kiegroup/kogito-runtimes/pull/1689

The (build) kogito-examples check has failed. Please check the logs.

Jenkins rerun examples tests

Jenkins rerun examples tests


Object [object Performance] has no method 'now' errors in different 4.x.x Android browsers

I know that in this docs said that performance.now is supported by v4 android browsers but I still got errors from some of them:

Device: Prestigio PAP4322DUO
OS: Android 4.1.1

Mozilla/5.0 (Linux; U; Android 4.1.1; en-us; PAP4322DUO Build/PrestigioPAP4322DUO) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30

Device: HUAWEI G750-U10
OS: Android 4.2.2

Mozilla/5.0 (Linux; U; Android 4.2.2; en-us; HUAWEI G750-U10 Build/HuaweiG750-U10) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 ACHEETAHI/1

Device: Q10
OS: Android 4.3

Mozilla/5.0 (Linux; U; Android 4.3; en-; Q10 Build/<IP_ADDRESS>8) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30

Device: HTC Desire 500 dual sim
OS: Android 4.1.2

Mozilla/5.0 (Linux; U; Android 4.1.2; en-in; HTC_Desire_500_dual_sim Build/JZO54K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30

Device: Sony ST26i
OS: Android 4.1.2

Mozilla/5.0 (Linux; U; Android 4.1.2; en-us; SonyST26i Build/11.2.A.0.33) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30

Device: Lenovo A706_ROW
OS: Android 4.1.2

Mozilla/5.0 (Linux; U; Android 4.1.2; en-us; Lenovo A706_ROW Build/JZO54K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 ACHEETAHI/1

Device: Micromax A116
OS: Android 4.1.2

Mozilla/5.0 (Linux; U; Android 4.1.2; en-in; Micromax A116 Build/JZO54K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30

Device: Asus ME301T
OS: Android 4.1.1

Mozilla/5.0 (Linux; U; Android 4.1.1; en-us; ME301T Build/JRO03C) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30

I can confirm this error.
Object [object Performance] has no method 'now'
/v2/polyfill.min.js in n.requestAnimationFrame at line 52:6977

Here are some more UA strings ;)

One X
Android 4.2.2

Mozilla/5.0 (Linux; U; Android 4.2.2; de-de; HTC_One_X/<IP_ADDRESS> Build/JDQ39) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30

Z30
Android 4.3

Mozilla/5.0 (Linux; U; Android 4.3; de-de; Z30 Build/<IP_ADDRESS>8) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30

Here are the affected Android versions according to our error tracking system:

Yup, our compat.json shows that it fails until 4.4 --> https://github.com/Financial-Times/polyfill-service/blob/master/docs/assets/compat.json#L4764
Happy to accept a PR for this, the instructions for this are --> https://qa.polyfill.io/v2/docs/contributing/common-scenarios#adding-browsers

I guess here problem with not Android itself but AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30

@umidbekkarimov I'm not sure I understand, the string you posted identifies as safari 4, this issue is for Android 4.

All these https://github.com/Financial-Times/polyfill-service/issues/1020#issue-195645589 and these https://github.com/Financial-Times/polyfill-service/issues/1020#issuecomment-268809066 android devices use AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 browser or WebKit v534
Here more examples with this browser.

Yup, our compat.json shows that it fails until 4.4

Actually this is right cause from 4.4 android jumped to WebKit v537.36 (http://jimbergman.net/webkit-version-in-android-version/) and I never had a problem with this version.
I guess problem should be here https://github.com/Financial-Times/polyfill-service/blob/master/polyfills/Intl/config.json#L3 no ?

If wanting to change the range of Android versions we target the performance.now polyfill at, you will need to modify the contents of polyfills/performance/now/config.json. We have instructions for this on our website to help new contributors, would you be able to give them a read and see if you can do the change? The instructions can be found here -- https://polyfill.io/v2/docs/contributing/common-scenarios#adding-browsers
If you have any questions at all, feel free to post them in here and I will do my best to help, we're trying to make contributing to this project as simple as possible :-)

We are observing same issues. I've opened a PR to fix this.


tests: remove more sleeps from ctr.bats

Change wait_until_exit function to now also
receive the expected exit status, this way we
can wait for containers that we know will fail.
Which is the case of test #3 of ctr.bats.
Also change sleeps use wait_until_exit on test #2
and #3.
Signed-off-by: Salvador Fuentes<EMAIL_ADDRESS>
- What I did
- How I did it
- How to verify it
- Description for the changelog

/test integration

@chavafg Could you port this to release-1.11 branch as well?

@mrunalp sure, I'll portback to 1.11 an 1.10


Skip the EC Symbol Map when parsing COFF archives

Arm64EC introduced a new special member in COFF called /<ECSYMBOL>/ which contains the symbol table for EC-specific symbols: https://github.com/llvm/llvm-project/blob/1aceee7bb6c4423da73f71aff2004493bdf620d1/llvm/lib/Object/ArchiveWriter.cpp#L647
When parsing an archive, object should skip over this member.

Is this related to the change in #657? I guess before it would have returned an empty name for this?


Adding Header & Footer

We can add a header and footer for improved responsiveness and better navigation.

@Sameeratweb  dude you can added header and footer.. just tell me what you are gonna add on it.. since it is a single page application

@muruga21 , I would like to contribute to this issue by adding header and footer to the website . In header , I would like to add a logo to your site  and in footer I would be adding your github profile , linkedin profile if possible and other common stuffs.

@linga-007 work on this issue. you can find the logo in assets folder..  and for the footer is possible try to add number of stars, forks, and list of contributors.. else we can have it as new issue


Fixing bug in automatic casting of PayloadAlert to dict

The is comparison doesn’t work, needs to be isinstance.

Thanks


Fix 404 in README

The current link 404s for me, but I think it's trying to point to: https://github.com/actions/toolkit/blob/master/docs/javascript-action.md

Yep, this got renamed. Thanks for the contribution


some tensorflow headers are no longer needed

This commit https://github.com/tensorflow/tensorflow/commit/4dadd1262353df4671b43f8275f3d03129bbb973 from https://github.com/tensorflow/tensorflow/pull/46438 removed the need for tensorflow/core/public/version.h and tensorflow/lite/version.h
These files can be removed from the arduino examples repo.
Tagging @PiotrZierhoffer

Great catch. Reported this as an issue in our generator

Great catch. Reported this as an issue in our generator

As mentioned in the linked issue, the generator is fixed and the latest PR I just merged has no version.h files.

As mentioned in the linked issue, the generator is fixed and the latest PR I just merged has no version.h files.


[sdl2] allow sdl2 vulkan support

The sdl2 build will automatically enable vulkan support if the requisite library and headers are available, but the vcpkg build will force vulkan support off. This pull request allows vulkan support if available.
I couldn't find anything in the history that suggested a problem with vulkan support in particular. The flag was added with e6c65b93b125cf0be13254cf2f5a9d27cb009707 for reasons that aren't immediately apparent to me.

This should probably be enabled as an optional feature in the CONTROL file, that way if someone wants it vcpkg will take care of the vulkan dependency.

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: jhs67 sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.

I turned it into feature as requested. Seems to work.
Included is a change that fixes the vulkan test on linux. I only have access to linux, so I needed this for testing. This would need to be carefully tested on windows.

Thank you @jhs67, this looks great!  I have ran it through the other architectures and see no new build failures.

Why is this not enabled by default?


Have problem detecting newlines in prompt

tagcomplete works perfectly everywhere in prompt in one line, for example cat, dog, girl
But with newlines (which is valid for webui), it has problem handling it
For example in prompt:
cat, dog,⛔
⛔girl

tagcomplete is not working in position of ⛔ mark, while it's working in position of ✅ mark
cat, dog,✅girl

demo:

Good catch, the regex didn't match anything in that case because newlines weren't trimmed out of the search word.
As long as the tag is on the same line, it should work now.


x/tools/cmd/godoc: list types that satisfy an interface within its package

Forked from https://github.com/golang/go/issues/19412#issuecomment-296766847, to continue discussion with @jimmyfrasche and any others without taking over that proposal thread.
The pattern of having an interface with an unexported method and types that implement it is a fairly common pattern in Go as we don't have sum types. A good example is in go/ast: https://golang.org/pkg/go/ast/#Spec
For a user reading the godoc, it's very useful to them to know what are the types that can go in that interface. The actual information is hidden in the code, so most packages like go/ast above list them manually: The Spec type stands for any of *ImportSpec, *ValueSpec, and *TypeSpec.
This works OK, but the issue is that these names aren't linked to the types in the same page. I propose that this happen automatically, much like https://github.com/golang/go/issues/4953 for packages. Linking to types (and potentially other exported names like funcs and consts) could be useful for other purposes.
This is the conservative solution. A more aggressive solution would be to automatically generate the list of types that can fit into the interface. If we had sum types that could be limited to those kinds of types and be trivial to implement.
As long as we don't have sum types, @jimmyfrasche was suggesting to just list all the types that satisfy the interface in its package. I'm not sure if that's a good idea for all interfaces, but would certainly be useful for those that follow the pattern of an unexported method to mimic sum types. Not sure how safe/desired such a change would be.
Manually listing the types in the godoc isn't a huge pain, but not having links is a problem.
CC @griesemer who wrote the go/ast godoc and might have some input

For context, this is what users currently see on the package I'm working on: https://godoc.org/github.com/mvdan/sh/syntax#Command
The types are there, and you can select and do a search within the page, but that's just inconvenient for no reason.

In #18342, starting here, automatic linking is discussed and accepted.
That will be very useful in general but I don't think it's optimal for this case.
Especially in AST code, there's going to be many types involved and the links could be automatically generated without any user intervention automatically improving docs that do not list the types manually avoiding manual lists going out of sync.
The questions are how to link the types, where, and when.
In any case, it should only be limited to the types in a given package or godoc would have to check everything against everything and the lists generated could be quite long, even if it were practical to compute them in a reasonable amount of time.
Empty interfaces should always be skipped because there's no information gained and much noise produced.
Unexported interfaces would only make sense when ?m=all (or if #7823 is implemented and the unexported interface matches the definition of "accessible" given in that thread).
In the go/ast example essentially every type in that package implements ast.Node so listing the implementing types on ast.Node could be quite noisy, though it would be very useful when constructing type switches as you could see all the possible cases at a glance. But it also raises the question of whether it should list compatible interfaces such as ast.Spec. Maybe it could be in a collapsed-by-default fieldset, as examples are, if it exceeds more than a handful of entries.
Listing the local, non-empty interfaces a non-interface type implements would be brief and useful. A line below the doc string for, say, *ast.TypeSpec that says "implements: ast.Node, ast.Spec" (properly linked) is short and easy to follow.
This could be further limited to only interface types with unexported methods as those are the major pain point, but it seems generally useful.

I wasn't aware that automatic linking had already been proposed and accepted, thanks. I didn't find it because that issue doesn't mention any of this in the title.
That means that the first part of my proposal has already been proposed and acepted, so I'll retitle the issue to be more clear.
What you suggest - doing it for any interface within a package - seems OK, but I'm worried about it having unwanted effects or being too verbose. Like you say, some interface types may be very broad and you might end up with very long lists. Or some interfaces might not be of this "sum type" kind, and the list would not be appropriate.
Limiting it to interfaces with unexported methods would perhaps improve the situation, but I wonder if that would make the logic too convoluted. And perhaps there are other ways to represent sum types in current Go that I'm not aware of.

yeah, I had a vague recollection that automatic linking had come up at some point, but it took me forever to find it since it didn't have its own issue.
To be clear, since re-reading it seems somewhat ambiguous, I don't mean grouping anything in the table of contents, like listing implementing types that implement an interface under the interface the way constructors are listed under a type—that would get quite messy very quickly. I mean adding a note under https://golang.org/pkg/go/ast/#TypeSpec saying which interfaces TypeSpec implements that are declared in the same package and a collapsed-by-default list under https://golang.org/pkg/go/ast/#Node so it doesn't take up too much room but's there if you need it.
I think every interface should be considered because it's a natural expansion—same logic minus one proposition—and I can't think of a reason it would be harmful or unhelpful to make note of that information. Maybe there's some extant package out there that makes it obvious why doing so would be a bad idea, but I can't think of any.
(re sum types: *T is the sum 1 + T and const/iota can be 1 + 1 + ⋯ + 1 sum types, technically)

@jimmyfrasche perhaps you're right and doing it for all interfaces would be a good idea. This could be similar to how types list their constructors. You could make the same argument that a constructor could be a false positive, but it's still OK to list it there.
Let's see if there are any counter-arguments to doing it for all interfaces.

Here's a fancy mock up of the presentation I imagine:

@jimmyfrasche that looks good - we should have that implemented and ready in a CL by the time the 1.10 tree opens in August. For now I'd wait a few more weeks to see if there are any objections.
I also just realised I didn't write this as a proposal. Perhaps I should re-open as a formal proposal so that the weekly proposal review meeting can catch it.

For now, I've made it a proposal. Hopefully the proposal review meetings will catch it at some point soon.

This seems OK to surface, and not just for pseudo-sum types but any interface. Please do send a CL for Go 1.10.

Thank you, Russ. @jimmyfrasche would you like to collaborate on this?

@mvdan I'd be happy to

@mvdan I played with this a little tonight.
I couldn't figure out a way to get the source importer to interface with godoc's vfs. I rigged a fake importer that just always returned an incomplete and empty types.Package. That works surprisingly well, but it means it only works for interfaces that don't refer to types in other packages. So go/ast's out :-1:
I looked at the source for the source importer. It's not that big, about 200 lines (and another 150 of tests), but it would still be a bit of a hassle to bolt it onto godoc and if looking at package A can load packages B through Z there might have to be caching and cache invalidation baked into it. No matter what the two copies would be somewhat divergent. That might be fine, but it has a lot of TODOs and bugs already.
. . .
golang.org/x/tools/go/gcexportdata looks like it could work but that requires things be built
Another option would be to rig an entirely source based mini-typechecker to figure it out. The big issues with that would be dealing with all the edge cases of different import names in different files.
At that point it would probably be easier to take the mostly filled in type info from the first approach and do some extra tests for interfaces that don't have full type info. That might be pretty simple, but I haven't had a chance to try it out yet and I've only been using the types package for 5 hours now so I am winging all of this

I am not familiar with godoc's vfs, nor with how it currently loads the packages from disk. I was not aware it had this layer of abstraction.
I do have some experience with go/types and package loading, but almost every single time I've ended up just using go/loader. I would imagine that's not an option here. It always loads from source too, working out the type info from scratch, so it would also make godoc noticeably slower, which I understand would be considered a regression.
I believe that the state of Go importers is a bit confusing at the moment. Some only load from cached build artifacts, and some only load from source. I do not know if a hybrid would be possible, and if so if one exists at the moment. But I think that is what we would want here.
Perhaps we should get some input from @rsc and @griesemer before we try to go down any of these routes.

yeah, go/loader looks like it's the only one with an option for a source importer that I could find but it always hits the real file system and there's not a mechanism to change that currently. But even if it did there'd be the issue with it having to recheck all deps all the time.
After sleeping on it though, I think the best way to do this would be to write a custom version of the code to see whether a concrete type satisfies an interface using the type info I've pulled out so far. It shouldn't be too complicated since it only needs to answer a very specific question in a very specific case.
There would be some false negatives in some edge cases (type aliases defined in external packages and interfaces that embed interfaces from other packages (unless the concrete type is a struct which also embeds that same interface)), but it looks like even with only type checking the package in isolation there's enough information to say "well I don't know what a token.Pos is but you both agree that you return whatever that is and the rest of it lines up . . .".
While that would have false negatives, like I said, I can't think of that having any false positives, which would be the unforgivable thing.
Worth a shot, at any rate.
Hopefully I'll have some time to play with that today, but will definitely have time to do so tomorrow. I'll try to throw what I have in a DO NOT REVIEW CL later, regardless of whether I make any progress, so you can take a look.

go/types sets all types that don't resolve to the same invalid type sentinel. We can get back to the original ast definition from the token.Pos and find the nth param/ret and see the type. As long as it's not from a dot import we can look up what package it came from in that ast.File and treat all (package, type) pairs as distinct and use that information to compute most of the interface satisfaction relation for the package, but at that point we might as well write our own purpose-built typechecker.
It seems like it would be less effort to have a custom source importer that works with godoc's vfs but it's not clear to me that that's desirable. That would also involve factoring out how godoc generates go/build contexts into its own package since that logic would be needed multiple places.

@mvdan I've updated the CL to use go/loader. It probably does too much work but it has the benefit that it works, or at least appears to work so far.
In typecheck.go there's a commented out config param. That's needed to integrate into the godoc vfs. Not exactly sure what needs to go into it yet, though.

This would be fantastic for a pattern similar to functional options but using interfaces.
See https://news.ycombinator.com/item?id=16503839
Right now, the option interface and the types that implement it are not at linked in the godoc which makes the package docs hard to navigate.

Wait, isn't this already implemented?
Just needs https://github.com/golang/go/issues/11251 to become enabled by default.

This is a documentation generation tool, so there's no reason to intrinsically limit it to just "within the package."  It's fine if that is the default scope, but it should accept the scope at the command line so that APIs from different packages and modules may be properly documented.

This is a documentation generation tool, so there's no reason to intrinsically limit it to just "within the package."  It's fine if that is the default scope, but it should accept the scope at the command line so that APIs from different packages and modules may be properly documented.


enable notification expand on clink

prevent notification body overlapping DIV, expand on click
@kgrgreer

Has conflicts.


Is webpack 5 supported?

This loader hasn't been updated since last year and doesn't seem to support webpack 5.
For example, I could not find a solution for my problem of using ejs-loader and html-loader at the same time.
My current config with webpack 4 is something like:
{
    test: /\.ejs$/i,
    use: [
        {
            loader: 'ejs-loader',
            options: {
                variable: 'data',
            }
        },
        'extract-loader',
        'html-loader',
    ]
}

First, I process the ejs files through html-loader so that the webpack knows about static files (img src="/something.jpg", etc.). Then I pass output to extract-loader, which extracts the module back to html/ejs strings. Then the processed .ejs passed into ejs-loader.
html-loader >= 2.0 exports HTML as modules, added new URL syntax and uses parse5 for parsing ejs files.
Next, extract-loader is not supported since May 2020 and is therefore not compatible with webpack 5. html-loader has an idea to add an option for similar functionality, this will partially solve the problem of extract-loader.
But even after that, it will not be possible to use html-loader anymore, since now it checks html tags more strictly and it will not allow to use ejs templates as before.
A simple example of how it is used now (data comes from the backend):
Hello, <%- data.username %>

import template from "templates/sample.ejs";

// process response from backend
let output = template({ username: response.username });

Therefore, the question is how to similarly use webpack 5 with compiled ejs templates, while pre-processing the source templates to process them to the webpack (which is what the html-loader is doing now). Developers of html-loader says that other loaders like ejs-loader should do this, and html-loader loader will only support correct html tags.

@StudioMaX
You can try template-ejs-loader, it is a loader which support webpack 5.
And you can also use it with html-loader and htmlWebpackPlugin.
I am now using it in my project, it actually works fine !


Deprecate execution of "uncomponentizable" WAGI modules

My module has been deprecated! What can I do?
This deprecation most likely impacts you only if:

you are using the WAGI executor, and
you are not using wit-bindgen, and
you are using a module compiled with a version of clang < 15.0.7, indicating likely usage of wasi-sdk <19

If you have access to the relevant source code, updating wasi-sdk to at least version 19 can avoid this deprecation.
The Problem
Wasm modules compiled with old versions of wasi-sdk <18 have a bug that makes them incompatible with the wasi-preview1-adapter, which in turn means we cannot convert these modules into components. Maintaining support for executing these uncomponentizable modules represents a significant ongoing maintenance burden, but - as far as we can tell - has been used by very few users, especially recently.
Deprecation Details
We can heuristically detect these modules:

If a module exports cabi_realloc, it should be safe to componentize, regardless of the version of clang / wasi-sdk
If a module has a producers section indicating that it was compiled with clang < 15.0.7, it was probably compiled with a buggy version of wasi-sdk

Implementation of this deprecation would include:

Immediately using the above algorithm to implement a deprecation warning in Spin 2.6 (#2571)
Actually drop support for these modules when #2519 is merged, possibly motivating a major version bump to Spin 3.0

@lann For 3.0 - is the action item here mainly documentation at this point or are there other action items?

We'll also want to remove any templates for WAGI apps and templates referencing WAGI including:

http-php
http-grain
http-zig

There is an error in place: https://github.com/fermyon/spin/blob/967fdf368612478cef176bccc491faffad680050/crates/componentize/src/bugs.rs#L46-L48
The current Grain template has been fixed but our language docs need to be updated to reflect changes; really we probably ought to validate all of our less-common language docs against 3.0.

Talked about this at the latest Spin project meeting:
Let's make sure this deprecation issue is reflected in documentation before closing this issue.

Doesn't appear to include any more information, alas:
$ spin up -e WASMTIME_BACKTRACE_DETAILS=1
Logging component stdio to ".spin/logs/"

Serving http://<IP_ADDRESS>:3000
Available Routes:
  php-template: http://<IP_ADDRESS>:3000 (wildcard)
2024-10-30T21:25:35.791411Z ERROR spin_trigger_http::server: Error processing request: error while executing at wasm backtrace:
    0: 0x6031ea - wit-component:adapter:wasi_snapshot_preview1!wasi_snapshot_preview1::bindings::wasi::cli::exit::exit::h22bf787c004762b4
    1: 0x601aeb - wit-component:adapter:wasi_snapshot_preview1!proc_exit
    2: 0x607f20 - wit-component:shim!adapt-wasi_snapshot_preview1-proc_exit
    3: 0x4f5b15 - <unknown>!<wasm function 5275>
    4: 0x9fe9 - <unknown>!<wasm function 36>
    5: 0x5fa85c -<EMAIL_ADDRESS>
Caused by:
    Exited with i32 exit status 1

Ah sorry, the env var should actually be in spin's environment, e.g. just WASMTIME_BACKTRACE_DETAILS=1 spin up

No luck :(
$ WASMTIME_BACKTRACE_DETAILS=1 spin up
Logging component stdio to ".spin/logs/"

Serving http://<IP_ADDRESS>:3000
Available Routes:
  php-template: http://<IP_ADDRESS>:3000 (wildcard)
2024-10-30T21:40:21.868509Z ERROR spin_trigger_http::server: Error processing request: error while executing at wasm backtrace:
    0: 0x6031ea - wit-component:adapter:wasi_snapshot_preview1!wasi_snapshot_preview1::bindings::wasi::cli::exit::exit::h22bf787c004762b4
    1: 0x601aeb - wit-component:adapter:wasi_snapshot_preview1!proc_exit
    2: 0x607f20 - wit-component:shim!adapt-wasi_snapshot_preview1-proc_exit
    3: 0x4f5b15 - <unknown>!<wasm function 5275>
    4: 0x9fe9 - <unknown>!<wasm function 36>
    5: 0x5fa85c -<EMAIL_ADDRESS>
Caused by:
    Exited with i32 exit status 1

Ok not too surprising; thanks for trying. I can try something else but we might need to drop php.

Was preparing to remove the php template when I noticed that we have test coverage for this one -- and it appears to be passing:
test integration_tests::http_php_template_smoke_test ... ok from the most recent CI run https://github.com/fermyon/spin/actions/runs/11603532469/job/32486378143
Thoughts on how/why?

Turns out we were holding it wrong; you have to include the php file in the URL, e.g. http://localhost:3000/index.php. Not a good UX both in terms of not supporting an empty path and in terms of the completely opaque error message, but I don't think this is a regression.

D'oh! Thanks @lann.
What's our plan with this issue?  Keep open for tracking?  Close out now that the implementation work is in?

This issue is linked by a Spin error message if we detect these modules but I think we can close and I'll just add a note to the top.