Dynamic http request module

XMLHTTPRequest is defined only in browsers. HTTP is defined in node. Dynamically switch between the two if either is undefined.

Pending tests. It's the weekend, will pick up on monday.

Switched to using fetch API instead of using XMLHttp and Node https modules. Support is increasing among platforms. Including polyfill for compatibility.


Remove duplicate CGM values in a single Tandem X2 upload

See attached Trello card for more details.

 Tandem X2 importing duplicate CGM values


Use new gRPC default port

Which problem is this PR solving?
New Default gRPC OTEL Default port.
Short description of the changes
Use new gRPC Otel default port => https://github.com/open-telemetry/opentelemetry-specification/pull/1221

@vmarchaud I used examples/collector-exporter-node to test my modification and I update collector version (0.16.0):

I modified tracing.js and metrics.js to use grpc exporter
I modified in node_modules (@opentelemetry/exporter-collector-grpc ) exporter with new default port (4317)
After launch docker, metrics.js and tracing.js, I verified in prometheus and zipkin.

And everything is OK.

@obecny It's done.

@jufab if you fix the lint I can merge this

@jufab if you fix the lint I can merge this

I have a problem with the linter.
Example
this error :

I fix it manually

I run npm run lint:fix, and after that, I have

What's wrong with linter? I have no idea.
Can you help me?

You probably have an out-of-date version of the linting dependencies. I would do lerna clean -y and lerna bootstrap again and see if that fixes it.

I tried without success so I reinstalled all.
😊


getPicture heic to jpeg support on Samsung Android phones

Issue Type

[x] Bug Report
[x] Feature Request
[ ] Support Question

Description
heic format is used by default by many Samsung camera.
But this format is not compatible with webview component.
The 'encodingType: Camera.EncodingType.JPEG' param in the navigator.camera.getPicture method does not convert heic image to jpeg.
Information

Command or Code
navigator.camera.getPicture(image_lib.onPhotoURISuccess,image_lib.onFailPhoto,
{ quality: 100,
targetWidth: width,
targetHeight: height,
encodingType: Camera.EncodingType.JPEG,
destinationType: Camera.DestinationType.FILE_URI,
correctOrientation : true,
sourceType: Camera.PictureSourceType.PHOTOLIBRARY });
Environment, Platform, Device
Android 10 , SM-A307FN
Version information
Cordova v10 Android v9
Camera plugin version 5.0.1
Checklist

[x] I searched for already existing GitHub issues about this
[x] I updated all Cordova tooling to their most recent version
[x] I included all the necessary information above

@CGS38 do you currently have any workarounds for this?

Unfortunately not...

I am also looking for a workarround... any suggestions??

Only way i was able to achieve / make heic file type to convert jpeg is modifying CameraLauncher.java
Line 718:
if (this.mediaType == VIDEO || !(JPEG_MIME_TYPE.equalsIgnoreCase(mimeType) || PNG_MIME_TYPE.equalsIgnoreCase(mimeType))) {
To
if (this.mediaType == VIDEO && !(JPEG_MIME_TYPE.equalsIgnoreCase(mimeType))) {
There should be a better way... for me this helped..

@SnpDeveloper with the change of code in the CameraLauncher, the plugin will convert the Heic photo to a JPEG?
What happens when the Heic photo is not converted? Does the app crash, or it the photo just not shown?

In my local testing with Samsung device uploaded image size got compressed didnt give me any error or crash.

You could try my branche for testing purposes.
npx cordova plugin add https://github.com/PieterVanPoyer/cordova-plugin-camera/#feature/issue-711-heif-format

Please test it and give feedback.

Thanks @PieterVanPoyer looks much cleaner code.
I havent seen the full changes yet. But one thing noticed in old code when mimeType was video or png it used return as filepath rather than file:///... i shall give a full check again and confirm all works expected.
Thanks again for quick turn arround.

Thanks @PieterVanPoyer I have tested heic conversion, all seems to work fine.
But here are some of my observations, feel free to comment my thoughts

bitmap conversion does a very excellent job.
It converts GIF, BMP, JPG, PNG, HEIC to desired format (JPG in mycase)
It doesnt convert TIF, HEIF formats.

While failing to convert on bitmap I am getting a clear exception (App is not crashing, again as i would except and a good thing) so easy for me to show File format not support error message in my app.

New changes you have made make sense preseving the encoding mimeType (JPG) extension.. a nice touch.
What i dont understand is why we are restricting support only to JPG, PNG and HEIC, as mentioned before GIF, BMP, JPG, PNG, HEIC formats are all working.
Correct me if I have missed anything.

Hey @SnpDeveloper
So, the heic works just fine with the PR.
About your observations and thoughts. I agree with it mostly. But for this issue, I'd just like to fix and focus on the heic case. Fix and focus on the original issue.
For the other types, the behaviour is the same as before. (The original image and type is returned for Android) So it's a small improvement now.
If we decide to convert the other types to the encodingType too, it's more a breaking change. And I am not willing to take that risk now, it needs a little more discussion with other people I think. I suggest you make another issue for that. And I agree/assume that should be the purpose of the encodingType.
Hey @CGS38
Are you able to test this PR?


Refactor GenerateKey to make it more robust

Overview
Resolves #1492

Checklist

[ ] New and updated code has appropriate documentation
[ ] New and updated code has new and/or updated testing
[ ] Required CI checks are passing
[ ] Visual proof for any user facing features like CLI or documentation updates
[ ] Linked issues closed with keywords

Summary by CodeRabbit

Refactor

Enhanced type safety and clarity in key generation processes across various components by transitioning from interface slices to string slices and incorporating strconv.FormatInt for integer to string conversion.
Simplified the key generation logic by refactoring the GenerateKey function to accept a slice of strings and using strings.Join for string manipulation.
Removed outdated logic related to height conditions in query processing for a cleaner and more efficient approach.

minor updates based on updating from main.

I've pushed the new changes :D


fix: Update Windows build instructions to enable the BUILD_WITH_QT6 flag

Reported by @Leppunen - thanks!

@Nerixyz could you sanity-check that I haven't missed something obvious here?

I ended up adding this as a "shared step" instead of updating every single build method section

For future reference:
Using Qt Creator, using Qt 6.5.[] and 6.6.[] (the only two versions available)
Cmake (auto-)executed inside Qt Creator.
No extra flags changed.
Issue 1:
conan just failed setting up openssl 1.1.1

error that did not make much sense - settings.compiler.runtime missing value
(yet in conan profile show, the value was there)
(Temp. fix - setting skip conan variable inside cmakelists.txt)

Issue 2:
It tried searching for Qt 5
(Temp. fix - using Qt 5 kit, it worked)
Issue 3:
After skipping conan, tries using vcpkg.
Vcpkg building qt_base_everywhere fails (might just be oom kill, though i still had plenty of free ram, plus swap space)
(Temp. fix - setting skip vcpkg variable inside cmakelists.txt)

Yeah I think we only support Qt6 on Windows now, so if you're doing a Qt5 build on Windows you're a bit on your own
Maybe it's time to split up each build method into its own file & have an owner/maintainer of each method.

Yeah I think we only support Qt6 on Windows now, so if you're doing a Qt5 build on Windows you're a bit on your own
Maybe it's time to split up each build method into its own file & have an owner/maintainer of each method.

Yeah, but it's not an issue of Qt 5, it's an issue of Qt 6. The cmake file is not properly set up to use Qt 6.

Yeah, but it's not an issue of Qt 5, it's an issue of Qt 6. The cmake file is not properly set up to use Qt 6.

Things build in CI, which uses conan & qt6 so it should still work

Yeah, but it's not an issue of Qt 5, it's an issue of Qt 6. The cmake file is not properly set up to use Qt 6.

Things build in CI, which uses conan & qt6 so it should still work

The issue is not that the build does not work (it seemed to work fine using command line), the issue is that the configuration step inside Qt Creator does not work. The cmake script is defaulting to wrong values. Hopefully it's clear what I mean now.

aaaaaaaaaaaaah ok yeah, issue 2 will be solved by this PR at least

I guess the conanfile should also be updated to include the latest (and I've heard, it's the last) patch to openssl1.1.1

If the Qt 5 is not in support, the PR checks for it could be removed.

For developers it's not supported at least, we can keep it around as artifacts & in CI as long as it doesn't use up any of our time


docs(storage): fix unstorage links

🔗 Linked issue

❓ Type of change

[x] 📖 Documentation (updates to the documentation, readme, or JSdoc annotations)
[ ] 🐞 Bug fix (a non-breaking change that fixes an issue)
[ ] 👌 Enhancement (improving an existing functionality like performance)
[ ] ✨ New feature (a non-breaking change that adds functionality)
[ ] 🧹 Chore (updates to the build process or auxiliary tools and libraries)
[ ] ⚠ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

I know there is already a PR with storage docs changes (#2086), but I could see that it did not contain fixes for the "dead" links to unstorage, so I went ahead and fixes them in this PR.
📝 Checklist

[ ] I have linked an issue or discussion.
[x] I have updated the documentation accordingly.

Redirects are added but still good to update links :)


cedar#745 for RequestValidationError

Description of changes
Was previously returned but un-exported.  I added an exported type with the same name.
Issue #, if available
#745
Checklist for requesting a review
The change in this PR is (choose one, and delete the other options):

[x] A bug fix or other functionality change requiring a patch to cedar-policy.

I confirm that this PR (choose one, and delete the other options):

[x] Does not update the CHANGELOG because my change does not significantly impact released code.

I confirm that cedar-spec (choose one, and delete the other options):

[x] Does not require updates because my change does not impact the Cedar formal model or DRT infrastructure.

Blocked on #993


Clean up UI error logging.

Right now we get something like:
{"level":"error","message":"[ui] Unhandled rejection:","timestamp":"2016-10-03T18:50:59.338Z"}

Totally unusable. Actually log ‘em errors!

https://www.youtube.com/watch?v=DxxR8JFsvlc
On Mon, Oct 3, 2016 at 11:56 AM, Cory Reed<EMAIL_ADDRESS>wrote:

Right now we get something like:
{"level":"error","message":"[ui] Unhandled rejection:","timestamp":"2016-10-03T18:50:59.338Z"}
Totally unusable. Actually log ‘em errors!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/MRN-Code/coinstac/issues/60, or mute the thread
https://github.com/notifications/unsubscribe-auth/AA9O_a1eAVIUKEz6rQ9QmztCjlyEGasVks5qwU_7gaJpZM4KM6nj
.


Update screenshot-components.png file.

Description:
This PR update a screenshot with components list showed in README.rst file.
Related issue (if applicable): fixes #
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#<home-assistant.github.io PR number goes here>
Example entry for configuration.yaml (if applicable):

Checklist:
If user exposed functionality or configuration variables are added/changed:

[] Documentation added/updated in home-assistant.github.io

If the code communicates with devices, web services, or third-party tools:

[ ] Local tests with tox run successfully. Your PR cannot be merged unless tests pass
[ ] New dependencies have been added to the REQUIREMENTS variable (example).
[ ] New dependencies are only imported inside functions that use them (example).
[ ] New dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
[ ] New files were added to .coveragerc.

If the code does not interact with devices:

[ ] Local tests with tox run successfully. Your PR cannot be merged unless tests pass
[ ] Tests have been added to verify that the new code works.

Hi @quamilek,
It seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
Thanks!


Excellibrary Installation failing

I am trying to install excel library using command "pip install robotframework-excellibrary", installation is failing with below error
C:\Users\SESA672171>pip install robotframework-excellibrary
Collecting robotframework-excellibrary
  Using cached robotframework-excellibrary-0.0.2.zip (61 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [17 lines of output]
      Traceback (most recent call last):
        File "C:\Users\SESA672171\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
        File "C:\Users\SESA672171\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "C:\Users\SESA672171\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
        File "C:\Users\SESA672171\AppData\Local\Temp\pip-build-env-ruf9qzhx\overlay\Lib\site-packages\setuptools\build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "C:\Users\SESA672171\AppData\Local\Temp\pip-build-env-ruf9qzhx\overlay\Lib\site-packages\setuptools\build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "C:\Users\SESA672171\AppData\Local\Temp\pip-build-env-ruf9qzhx\overlay\Lib\site-packages\setuptools\build_meta.py", line 487, in run_setup
          super().run_setup(setup_script=setup_script)
        File "C:\Users\SESA672171\AppData\Local\Temp\pip-build-env-ruf9qzhx\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 23, in <module>
      NameError: name 'execfile' is not defined
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

I am using below version of python and robot
Python 3.10.11
Robot Framework 6.1.1 (Python 3.10.11 on win32)

I got the same output with this package (works ok with py2.7) on Python 3.11.3 64bit and robotframework 7.1


Data validation before closing EntryActivity

Currently, the data of an entry within the EntryActivity is not being validated. Therefore, users can create entries without any name, which is not allowed and can result in problems with serialization.

Entries are automatically created with a placeholder name as of e499483. Therefore, it is no longer possible to save accounts without any name.


Delete core.js script

I noticed this was causing a 404 and was outside the body.  I tested locally and I can get to the survey without it.  Not sure why the gh-pages build is not working.
Feel free to ignore this if the file is supposed to be there.

Build path I think, will look into it tonight.

I checked and it seems to generate with the build anyway. Will merge for now as it doesn't seem to affect the build.


tweaks to MesosUtils + Resources

Return a empty Ranges instance instead of null in getRanges()
Fix off-by-one error in getNumRanges()
Add convenience methods for creating a port range resource (useful for unittests)
Add buildResourcesFromMesosResourceList(), which converts List<Resource> into Resources (useful for unittests)
add equals() and hashCode() to Resources

@wsorenson

Fix a bug, how about adding a test?

^ MesosUtilsTest.assertFound() was re-implementing MesosUtils.getNumPorts(), so I updated the test to use the latter.


Typo, Toogle -> Toggle

"In the app, you may notice the Diagnostics profiler, you can toggle it's visibility using the speech command Toogle Diagnostics."
Speech command should be Toggle Diagnostics
https://github.com/MicrosoftDocs/mixed-reality/blob/master/mixed-reality-docs/mrlearning-base-ch1.md

This has been fixed and pushed live.


SystemCheckError: System check identified some issues error. Prevents develop branch from starting.

Built the latest netbox version in the develop branch. Received the following error on bootup
netbox             | ERRORS:
netbox             | ?: debug_toolbar.middleware.DebugToolbarMiddleware is missing from MIDDLEWARE.
netbox             | 	HINT: Add debug_toolbar.middleware.DebugToolbarMiddleware to MIDDLEWARE.
netbox             | SystemCheckError: System check identified some issues:
netbox

Added 'debug_toolbar.middleware.DebugToolbarMiddleware to netbox/netbox/settings.py MIDDLEWARE variable, and this resolved the issue.
Not sure if its a bug. Not a Django expert.

Easy fix. Thanks for the report!


1.4.0 release

We have a great new feature in #7. Totally warrants a new release.

Rasterio checks out with snuggs 1.4.0. I'm uploading to PyPI.

Done.


Occasional error when ending a session

  diff =  75
  diff =  0
  diff =  1505
  image size differs 'captures/1468405708.342661.png' @ error/compare.c/IsImagesEqual/1598 (Magick::ImageMagickError)
  ./features/step_definitions/lion_steps.rb:183:in '/^I will see the Live simulcast playback$/'
  features/scenarios/lion/lion.feature:64:in 'Then I will see the Live simulcast playback'

The above is displayed when ending a session after capturing frames

Reported by Jaya


Async wrap update - destroy hook and uid

This documents the changes made in https://github.com/nodejs/node/pull/3461
/cc @trevnorris

Thanks for the docs update. LGTM.


Use one command line for an entire folder

It is possible use the serialize command for all the files inside a folder?

I'd recommend using a batch script to do this, it's not something I plan on adding.
The CLI is mostly just to test the functionality and maybe debug some issues, the libraries are the main point of this repository.


New package: qBittorrent.qBittorrent.Qt6 version 5.0.0

Checklist for Pull Requests

[x] Have you signed the Contributor License Agreement?
[x] Resolve #177048

Manifests

[x] Have you checked that there aren't other open pull requests for the same manifest update/change?
[x] This PR only modifies one (1) manifest
[x] Have you validated your manifest locally with winget validate --manifest <path>?

[x] Does your manifest conform to the 1.6 schema?

Note: <path> is the directory's name containing the manifest you're submitting.

Microsoft Reviewers: Open in CodeFlow

Manually verified in Windows Sandbox.

Verify:


Memory consumption

Implement dynamic data loading (DICOM) + patching + scaling to be processed in mini-batch training
Have a look at the current loading, patching and scaling functions and modify them accordingly.

solved with TFrecords integration


⚠ SolarOscp has degraded performance

In 8e70f71, SolarOscp ($SOLAROSCP_URL) experienced degraded performance:

HTTP code: 200
Response time: 158 ms

Resolved: SolarOscp performance has improved in 89ac7bc after 10 minutes.


kernelPackages.rtl8821cu: bump to add support for 5.19.2

Description of changes
Add support for kernel 5.19.2+
Things done

Built on platform(s)

[X] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[X] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[X] Tested basic functionality of all binary files (usually in ./result/bin/)
22.11 Release Notes (or backporting 22.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[X] Fits CONTRIBUTING.md.

I'm going to merge this early, as the kernel module fails to compile with recent kernels.

Version label was not bumped.

Good catch, will fix.


Add author specific RSS feeds for tags

Feature request:
It would be great is you could add author and tag specific rss feeds to your theme.
Why:
I'm the project lead of the Eclipse IDE Open Source project and would like to have an RSS feed for "eclipse" under my name "vogella". Another colleague @jnerlich you also like to blog sometimes under "eclipse" and sometimes under something else.
And we would like to aggregate our person "eclipse" based blogs on https://planeteclipse.org/planet/
Thanks for considering.

Sounds like a good idea, @vogella


Upgrade SonarQube platform version to 5.1.2

Should we upgrade SonarQube platform version to 5.1.2 (as per latest blueprint)? If yes, also upgrade plugin versions to those documented in blueprint.

Is that an LTS version? I do want to upgrade at some point as they added
some REST API functionality after 4.5.x.
On 16 Feb 2016 15:30, "Jorge Hidalgo"<EMAIL_ADDRESS>wrote:

Should we upgrade SonarQube platform version to 5.1.2 (as per latest
blueprint)? If yes, also upgrade plugin versions to those documented in
blueprint.
—
Reply to this email directly or view it on GitHub
https://github.com/Accenture/adop-sonar/issues/1.

Is not an LTS, but has proven to be very stable and with significant functionality improvements as to consider the upgrade. for 5.2 and 5.3 we are still testing. possible better to wait for 5.4/5.5 for the next jump ahead, but I feel positive about the move to 5.1.2

Re REST API improvements, it is really cool. Now we are capable of, for example, configure quality profiles and set up rules, gates, all from the API, so we don't need to rely on a pre-populated database to infuse that configuration in an environment.

Yeah, those are the features I'm interested in for cartridges to be able to
bring their own profiles and quality gates.
On Tue, Feb 16, 2016 at 7:36 PM, Jorge Hidalgo<EMAIL_ADDRESS>wrote:

Re REST API improvements, it is really cool. Now we are capable of, for
example, configure quality profiles and set up rules, gates, all from the
API, so we don't need to rely on a pre-populated database to infuse that
configuration in an environment.
—
Reply to this email directly or view it on GitHub
https://github.com/Accenture/adop-sonar/issues/1#issuecomment-184846019.

Hi guys, I'm working in this issue but I'm facing an unexpected problem.
If I clone repository from github and, without any changes, execute docker build command output is:
$ docker build -t accenture/adop-sonar:0.1.1 .
Sending build context to Docker daemon 284.7 kB
Step 1 : FROM sonarqube:4.5.6
 ---> ca8eff1783fe
Step 2 : MAINTAINER Robert Northard, <robert.a.northard>
 ---> Using cache
 ---> 025831c744f9
Step 3 : ENV SONARQUBE_PLUGINS_DIR /opt/sonarqube/default/extensions/plugins SONARQUBE_SERVER_BASE "http://localhost:9000" SONARQUBE_WEB_CONTEXT "/sonar" SONARQUBE_FORCE_AUTHENTICATION true ADOP_LDAP_ENABLED true
 ---> Using cache
 ---> fbe4aa2341b4
Step 4 : COPY resources/plugins.txt ${SONARQUBE_PLUGINS_DIR}/
 ---> Using cache
 ---> 6628d03ee876
Step 5 : COPY resources/sonar.sh resources/plugins.sh /usr/local/bin/
 ---> Using cache
 ---> 969e35fcc9f5
Step 6 : RUN chmod +x /usr/local/bin/*
 ---> Using cache
 ---> 8773c6ad42d8
Step 7 : RUN /usr/local/bin/plugins.sh ${SONARQUBE_PLUGINS_DIR}/plugins.txt
 ---> Running in 7cd1b9c7bfe6
/bin/sh: 1: /usr/local/bin/plugins.sh: not found
The command '/bin/sh -c /usr/local/bin/plugins.sh ${SONARQUBE_PLUGINS_DIR}/plugins.txt' returned a non-zero code: 127

I really don't understand where is the problem because if I add a ls -la command I see this file with execution permissions into the folder:
julio.palma.vazquez@CPX-9WQL96B07OF MINGW64 /c/Data/ADOP/adop-sonar (master)
$ docker build -t accenture/adop-sonar:0.1.1 .
Sending build context to Docker daemon 284.7 kB
Step 1 : FROM sonarqube:4.5.6
 ---> ca8eff1783fe
Step 2 : MAINTAINER Robert Northard, <robert.a.northard>
 ---> Using cache
 ---> 025831c744f9
Step 3 : ENV SONARQUBE_PLUGINS_DIR /opt/sonarqube/default/extensions/plugins SONARQUBE_SERVER_BASE "http://localhost:9000" SONARQUBE_WEB_CONTEXT "/sonar" SONARQUBE_FORCE_AUTHENTICATION true ADOP_LDAP_ENABLED true
 ---> Using cache
 ---> fbe4aa2341b4
Step 4 : COPY resources/plugins.txt ${SONARQUBE_PLUGINS_DIR}/
 ---> Using cache
 ---> 6628d03ee876
Step 5 : COPY resources/sonar.sh resources/plugins.sh /usr/local/bin/
 ---> Using cache
 ---> 969e35fcc9f5
Step 6 : RUN chmod +x /usr/local/bin/*
 ---> Using cache
 ---> 8773c6ad42d8
Step 7 : RUN ls -la /usr/local/bin/
 ---> Running in 19abee3f1f44
total 16
drwxrwsr-x  2 root staff 4096 May  5 08:04 .
drwxrwsr-x 15 root staff 4096 May  5 08:04 ..
-rwxr-xr-x  1 root root   343 May  5 07:39 plugins.sh
-rwxr-xr-x  1 root root  2123 May  5 07:39 sonar.sh
 ---> 1a532774a87f
Removing intermediate container 19abee3f1f44
Step 8 : RUN /usr/local/bin/plugins.sh ${SONARQUBE_PLUGINS_DIR}/plugins.txt
 ---> Running in 92c76b25e56f
/bin/sh: 1: /usr/local/bin/plugins.sh: not found
The command '/bin/sh -c /usr/local/bin/plugins.sh ${SONARQUBE_PLUGINS_DIR}/plugins.txt' returned a non-zero code: 127

Any ideas?

Hi guys,
I've done a minor change in Dockerfile and apparently process ends without errors, I've changed line 15 into the file from:
RUN /usr/local/bin/plugins.sh ${SONARQUBE_PLUGINS_DIR}/plugins.txt
to:
CMD ["/usr/local/bin/plugins.sh", "${SONARQUBE_PLUGINS_DIR}/plugins.txt"]
And now when I execute $ docker build -t accenture/adop-sonar:0.1.1 . output is:

Sending build context to Docker daemon 286.7 kB
Step 1 : FROM sonarqube:4.5.6
---> ca8eff1783fe
Step 2 : MAINTAINER Robert Northard, <robert.a.northard>
---> Using cache
---> 3b5331f74ffd
Step 3 : ENV SONARQUBE_PLUGINS_DIR /opt/sonarqube/default/extensions/plugins SONARQUBE_SERVER_BASE "http://localhost:9000" SONARQUBE_WEB_CONTEXT "/sonar" SONARQUBE_FORCE_AUTHENTICATION true ADOP_LDAP_ENABLED true
---> Using cache
---> 91098b31aa5d
Step 4 : COPY resources/plugins.txt ${SONARQUBE_PLUGINS_DIR}/
---> Using cache
---> 577382269b07
Step 5 : COPY resources/sonar.sh resources/plugins.sh /usr/local/bin/
---> ffab5e056c0d
Removing intermediate container 59493f2dbf43
Step 6 : RUN chmod +x /usr/local/bin/*
---> Running in 6a901d1a71ef
---> c6b7cbb1d80a
Removing intermediate container 6a901d1a71ef
Step 7 : CMD /usr/local/bin/plugins.sh ${SONARQUBE_PLUGINS_DIR}/plugins.txt
---> Running in 877a63610f1b
---> 4889e8528e1f
Removing intermediate container 877a63610f1b
Step 8 : VOLUME /opt/sonarqube/logs/
---> Running in 1dfe579fb5a5
---> caed341a2383
Removing intermediate container 1dfe579fb5a5
Step 9 : ENTRYPOINT /usr/local/bin/sonar.sh
---> Running in 97755a90532e
---> 33f09b14bcc9
Removing intermediate container 97755a90532e
Successfully built 33f09b14bcc9
SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to build context will have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions for sensitive files and directories.

The point here is that I didn't see the plugins downloading and if I add a ls -la command to explore the content of SONARQUBE_PLUGINS_DIR it only contains plugins.txt file:

Step 8 : RUN ls -la ${SONARQUBE_PLUGINS_DIR}
---> Running in 37d9b5edd4b0
total 12
drwxr-xr-x 2 root root 4096 May  9 09:14 .
drwxr-xr-x 3 root root 4096 May  9 09:14 ..
-rwxr-xr-x 1 root root  696 May  5 07:39 plugins.txt

Yes, that makes sense - CMD is used to tell the image what to run when the container is launched and has no effect on the build process. There should only be one CMD in an image and that should be the script that starts the process inside the container (if not the binary itself), so changing from a RUN command is not a solution.
I think each URL in that plugins.txt needs to be checked to see if it is still valid - I expect one of them will have an issue or some part of the plugins.sh script is failing.

hi @nickdgriffin, I've seen that PR updating version of SonarQube to 5.1.2 is merged. but, have you generated a new image version based on that? I have updated my ADOP instance and image is still 0.1.1 running on SonarQube 4.5.6. thanks!

Hi @deors,
Creating a release in any of our image repositories results in that version appearing as a tag in Docker Hub however it won't appear in the stack until a PR has been submitted to adop-docker-compose.
This was done a week ago in https://github.com/Accenture/adop-docker-compose/pull/113 in case you've not seen the update yet.


Gather information about read-queries

Today we collect operational (Prometheus) metrics about read-queries, histogram latencies, and similar. We show this in our operational dashboard, which is quite useful.
But I feel we're missing something extra: visibility in outliers.
Once in a while, I see spikes in the 95-th latency in the /query endpoint, which is the result of sometimes a user sending complex/big queries.
It would be useful to know:

Which are these queries?
Who is sending these queries, and see if it's worth taking some appropriate action of "banning" per user/IP-address.
Looking again at our timeouts for read-query execution to put some hard bounds.

Additionally, it might be interesting to simply collect all the read-queries (or do some sampling, but I don't think the volume is that big) so we can understand better how people are using the network to improve their experience or have better focus points. This can be an optional feature to enable in the validator since it has some storage overhead.
cc @sanderpick @brunocalza @carsonfarmer @dtbuchholz

@jsign picking this for development
Planning to create a new metric and collect it in both REST and JSON-RPC endpoints (later this one will be gone). Should be straightforward

@jsign picking this for development
Planning to create a new metric and collect it in both REST and JSON-RPC endpoints (later this one will be gone). Should be straightforward

Cool. Do you have some ideas on what "attributes" will be collected?, like ChainID and TableID.
Regarding the SQL statement per se, I think it might be too heavy to be sent as a metric (or not for a while?), but somehow I think it may be nice to persist them locally so at least they are accessible to the validator? I'm thinking about this if it might be useful to inspect later; not sure.

Cool. Do you have some ideas on what "attributes" will be collected?, like ChainID and TableID.

Haven't thought too much. The SQL statement already contains ChainID and TableID, not sure if it is worth the effort to extract them. It can be done at the analysis level, I think. The IP address could be good as you mentioned in your first comment.

Regarding the SQL statement per se, I think it might be too heavy to be sent as a metric (or not for a while?), but somehow I think it may be nice to persist them locally so at least they are accessible to the validator? I'm thinking about this if it might be useful to inspect later; not sure.

I think we could send them to the metrics server, it shouldn't be a problem. Regarding the local storage, we could start deleting old metrics to avoid the db getting too big.

Cool. Do you have some ideas on what "attributes" will be collected?, like ChainID and TableID.

Haven't thought too much. The SQL statement already contains ChainID and TableID, not sure if it is worth the effort to extract them. It can be done at the analysis level, I think. The IP address could be good as you mentioned in your first comment.

Sounds good. Actually the ChainID and TableID are more complicated to extract than I originally thought, since these are read-queries and there might be convoluted situations with JOINS and similar. Sounds good to figure out that at the analysis level (probably we'd need a parser for that, or try some smart ~regexp to get good-enough results).

Regarding the SQL statement per se, I think it might be too heavy to be sent as a metric (or not for a while?), but somehow I think it may be nice to persist them locally so at least they are accessible to the validator? I'm thinking about this if it might be useful to inspect later; not sure.

I think we could send them to the metrics server, it shouldn't be a problem. Regarding the local storage, we could start deleting old metrics to avoid the db getting too big.

SGTM!


Insecure dependency<EMAIL_ADDRESS>

Please update dependencies if patched versions are available:

This is getting brought in by<EMAIL_ADDRESS>- @ murgatroid99 is there a release on the way with an updated protobuf?

Any updates on this one? Looks like https://github.com/dcodeIO/protobuf.js/pull/1030 has been merged.
Can we update the dependencies to point to<EMAIL_ADDRESS>?

This seems to be resolved.  Please do let me know if you're still getting the error!


[Improvement Suggestion] replace SHT31 with BME280

I've tinkered a bit with the code to replace the SHT30/SHT31 with a BME280 (I prefer those sensors as they are a bit more reliable, and also because they provide atmospheric pressure data along with the Temperature/Humidity).
BME280 can work on I²C bus, hence it's almost a drop in replacement for the SHT30/SHT31 in terms of wiring, but as the board is a bit bigger, an external enclosure will be needed for said sensor (it's almost perfect as it also brings the temperature sensor away from the PM2.5/CO² sensor that do generate a couple of °C of heat, making the temp reading false.
My code is available at https://github.com/Thelvaen/airgradient-prometheus/tree/BME280 for those interested in :)

I've tinkered a bit with the code to replace the SHT30/SHT31 with a BME280 (I prefer those sensors as they are a bit more reliable, and also because they provide atmospheric pressure data along with the Temperature/Humidity).
BME280 can work on I²C bus, hence it's almost a drop in replacement for the SHT30/SHT31 in terms of wiring, but as the board is a bit bigger, an external enclosure will be needed for said sensor (it's almost perfect as it also brings the temperature sensor away from the PM2.5/CO² sensor that do generate a couple of °C of heat, making the temp reading false.
My code is available at https://github.com/Thelvaen/airgradient-prometheus/tree/BME280 for those interested in :)

I tried your code and works almost with a BME280. But the temperature didn´t show up. It says: NaNC. any ideas what goes wrong?


Add Typanion Resolver

I believe I covered everything except adding it to the Bug Report template which seems to be lacking a few other resolvers currently as well.
Fixes https://github.com/react-hook-form/react-hook-form/discussions/6099

Feel free to merge whenever you guys are happy with it 👍🏼

@jorisre i will merge it next week if you are busy. 🙏

@jorisre did this break something?

Nope. I just forgot to rewrite the commit message to match with semantic release. @bluebill1049 will trigger the release manually :)


Vue 3 typescript

How can I use vite with vue 3 and typescript? I'm trying to create vue 3 ts app and add vite there, but it doesn't work, it shows blank page and <%= htmlWebpackPlugin.options.title %> in title

There are some vue+ts+vite starter templates that you can find them in https://github.com/vitejs/awesome-vite#vue-3

Could this be reopened as a documentation issue? For someone just starting with vue3 and vite, with limited vue2 experience, wanting typescript, it's not at all clear how to get started. I don't want to use someone else's starter template with who knows what else installed. I want an official template, and complete instructions how to get started with typescript. I muddled through it, but it was confusing and I spent a ton of time on setup experimentation instead of actually working on my project.

Please keep track on https://github.com/vitejs/create-vite-app/pull/17


fix for #324

Even if the user menu was created it was not being dispaly. Now it is.

LGTM Tested locally works perfect


Update tools.py

Explicitly return the dict, if not we get JSON parsing error
Thank you for contributing to LangChain!

[ ] PR title: "core: tools.py should return dict, but it was not explicitly converted, hence was throwing the JSON parsing"

[ ] PR message:

Description: Explicitly return the dict, if not we get JSON parsing error
Issue: TypeError('Object of type CallbackManagerForToolRun is not JSON serializable') on Coder agent
Dependencies: No dependencies
Twitter handle: @karthikseeyes

[ ] Add tests and docs: If you're adding a new integration, please include

a test for the integration, preferably unit tests that do not rely on network access,
Unit test doc: https://github.com/karthikcs/langchain/blob/master/Unit test tools.py.pdf

If no one reviews your PR within a few days, please @-mention one of baskaryan, efriis, eyurtsev, ccurme, vbarda, hwchase17.

@baskaryan tagging you in case its obvious why this is needed

@eyurtsev I was facing an issue mentioned in the https://github.com/langchain-ai/langchain/issues/24621 and the solution worked out for me was https://github.com/langchain-ai/langchain/issues/24621#issuecomment-2249409492. I think it should be merged so that root cause is resolved.

Hi @karthikcs,
Thanks for the change!
Could you add a unit test that shows what test case is fixed by this?

OK I will add a UT

Hi @karthikcs,
Thanks for the change!
Could you add a unit test that shows what test case is fixed by this?

@eyurtsev I have added a UT file. Please review and approve

hi @karthikcs, i don't follow what the issue here is. what type other than dict or string are we trying to pass to tools, and why?

the unit test is not in the right format and I also dont realy understand the motivation. I would suggest opening an issue and we can proceed from there

hi @karthikcs, i don't follow what the issue here is. what type other than dict or string are we trying to pass to tools, and why?

@baskaryan Sorry for delayed response. I am not explicitly passing anything to this function. I am instantiating PythonREPL tool and it is failing consistently. When I debug I found following
FILE: langchain_openai/chat_models/base.py
function _lc_tool_call_to_openai_tool_call
The parameter tool_call["args"] is causing the issue while converting the python code to JSON in the line
json.dumps(tool_call["args"]),
When I debugged I found the value in tool_call["args"] was
{'query': 'product = 889384 * 77734\nproduct', 'run_manager': <langchain_core.callbacks.manager.CallbackManagerForToolRun object at 0x000001CD53DBAA80>}

Expected value is only the code, without the run_manager element.
{'query': 'product = 889384 * 77734\nproduct'}

When I add dict(tool_input) in the function _to_args_and_kwargs in (langchain_core/tools/base.py) the unnecessary element run_manager is not added to tool_calls. So, please consider this suggestion.

hi @karthikcs, i don't follow what the issue here is. what type other than dict or string are we trying to pass to tools, and why?

Dear Harrison, is there any guide I can follow?


Error in Storybook - LinearScaleBase is not defined

Expected behavior
No bug of not used features.
Current behavior
Hey guys,
After updating from 3.9.1 to 4.0.1 I receive error in our builded Storybook (runtime not on build):
Uncaught ReferenceError: LinearScaleBase is not defined
    at ./node_modules/chart.js/dist/chart.js (5827.4a9359bf.iframe.bundle.js:2:4868810)
    at __webpack_require__ (runtime~main.bfd8d355.iframe.bundle.js:1:387)
    at ./src/components/common/DoughnutChart.js (main.ee1fcde1.iframe.bundle.js:1:1188558)

Running locally I don't have such error.
LinearScaleBase is not something I use anywhere in the codebase

Any suggestions?
Reproducible sample
None
Optional extra steps/info to reproduce
No response
Possible solution
No response
Context
No response
chart.js version
v4.0.1
Browser name and version
No response
Link to your project
No response

Please add a reproducable sample as being required by the issue template

When I try to deploy my vuejs app vercel or netlify, I get same error.
Uncaught ReferenceError: LinearScaleBase is not defined
at 4403 (chart.js:10124:27)
at e (bootstrap:19:32)
at 2564 (app.815610c6.js:1:2359)
at e (bootstrap:19:32)
at startup:4:87
at e.O (chunk loaded:25:12)
at startup:5:43
at app.815610c6.js:1:6368

Same here, using Vue 3 + Laravel + Mix with chart.js 4.0.1. and vue-chart 5.0.1.
It only happens in production build, not in dev build.
Unfortunately I currently don't have a reproducible sample, and I'm not sure how to provide one, since it happens in production build only - maybe it's webpack related?

I had this same issue when I only had a Doughnut chart in my project but later added a Line Chart, which required registering LinearScale (along with CategoryScale, PointElement, and LineElement) and it worked thereafter. Try registering LinearScale first to see if that addresses your problem and add some of these other Line Chart components if it's still not working for you.

thank you @duyn-stanford for this suggestion. I imported LinearScale, and also had to register it with Chart.js, but now the production build works. Not exactly a "clean" solution, but certainly works, so much appreciated!
import { Chart as ChartJS, ArcElement, Tooltip, LinearScale } from 'chart.js';
ChartJS.register(ArcElement, Tooltip, LinearScale);

I had this same issue when I only had a Doughnut chart in my project but later added a Line Chart, which required registering LinearScale (along with CategoryScale, PointElement, and LineElement) and it worked thereafter. Try registering LinearScale first to see if that addresses your problem and add some of these other Line Chart components if it's still not working for you.

Perfect answer.

Had the same issue but the trick suggested from @duyn-stanford didnt solved it for me. Its not working when I call the domain directly (example.com) but it's working when I call the domain with a path (example.com/something). I'm using vue-router.
Also i tried to move the import and register statement from the component into my main.js file but it gives me the same error.

I got the same problem,
I solved this issue by registering the LinearScale
import { Chart as ChartJS, ArcElement, Tooltip, Legend, LinearScale } from 'chart.js'
ChartJS.register(ArcElement, Tooltip, Legend, LinearScale);

I think this has something to do with webpack tree-shaking. In my environment, 'run build' would create code that fails with this error, but 'run watch' would create code that works. I suspect the difference is that the 'build' (prod) version is configured to try and do more aggresive tree shaking.
My setup (symfony with vuejs being built with encore) is too complex for a simple test case here though. But does doughnut declare its dependency on linearScale properly?


AWS: delay less when creating tags

This is important because tag creation isn't atomic, and we want to minimize
the window in which we can leave 'dangling' resources around.

LGTM


Update frontend dependencies to latest versions season

Duck season

Failed Test
Failure Summary
Logs

Test_BadRequest
failure_message: Failedfailure_text: === RUN   Test_BadRequest    api_test.go:53: Bad request sent to API--- FAIL: Test_BadRequest (0.00s)
Logs ↗

Test_ForbiddenAccess
failure_message: Failedfailure_text: === RUN   Test_ForbiddenAccess    api_test.go:46: Forbidden access to resource--- FAIL: Test_ForbiddenAcc...
Logs ↗

Flaky Test
Failure Summary
Logs

[chromium] should return list of users correctly.

Logs ↗

[chromium] should display error message for invalid login correctly.
The expected HTTP status code 401 was not received, instead a function was returned.
Logs ↗

[chromium] should login with credentials correctly correctly.

Logs ↗

[chromium] should show the privacy policy correctly.
The test timed out waiting for the privacy policy to be displayed correctly.
Logs ↗

View Full Report ↗ ⋅ Docs


Cert issue

Hello,
First, thanks for this repository and documentation is really well.
I initiatialize the operator in subchart and then i launch another subchart which aims to create a VarnishCluster but this message occures when i install my repo with this two subcharts.
"Internal error occurred: failed calling webhook "mvarnishcluster.kb.io": could not get REST client: unable to load root certificates: unable to parse bytes as PEM block"
My VarnishCluster is consisted by the backend, vanish and service options.
What have I done wrong ?
Thank you in advance for helping me.

Sorry for the delay. I recall something similar to this happening w/Kubernetes 1.16 changes. Are you running an old version of Kubernetes by chance? What Kubernetes platform are you running this on? Maybe web hooks are disabled?

No problem !
i check my version of kubernetes is 1.25 and helm 3. It is OVH that manage the kubernetes plateform. I check the ValidatingWebhookConfiguration of the varnish operator. This is given passing describe:
"Name:         varnish-operator-webhook-configuration
Namespace:
Labels:       app.kubernetes.io/managed-by=Helm
Annotations:  meta.helm.sh/release-name: $$$$$$$$$$$
meta.helm.sh/release-namespace: ******************
API Version:  admissionregistration.k8s.io/v1
Kind:         ValidatingWebhookConfiguration
Metadata:
Creation Timestamp:  2023-02-08T16:40:59Z
Generation:          1
Managed Fields:
API Version:  admissionregistration.k8s.io/v1
Fields Type:  FieldsV1
fieldsV1:
f:metadata:
f:annotations:
.:
f:meta.helm.sh/release-name:
f:meta.helm.sh/release-namespace:
f:labels:
.:
f:app.kubernetes.io/managed-by:
f:webhooks:
.:
k:{"name":"vvarnishcluster.kb.io"}:
.:
f:admissionReviewVersions:
f:clientConfig:
.:
f:caBundle:
f:service:
.:
f:name:
f:namespace:
f:path:
f:port:
f:failurePolicy:
f:matchPolicy:
f:name:
f:namespaceSelector:
f:objectSelector:
f:rules:
f:sideEffects:
f:timeoutSeconds:
Manager:         helm
Operation:       Update
Time:            2023-02-08T16:40:59Z
Resource Version:<PHONE_NUMBER>
UID:               70aa4cdf-9779-44c8-a696-02f9634c4d4c
Webhooks:
Admission Review Versions:
v1
v1beta1
Client Config:
Ca Bundle:  Cg==
Service:
Name:        varnish-operator-service
Namespace:   ********************
Path:        /validate-caching-ibm-com-v1alpha1-varnishcluster
Port:        443
Failure Policy:  Fail
Match Policy:    Equivalent
Name:            vvarnishcluster.kb.io
Namespace Selector:
Object Selector:
Rules:
API Groups:
caching.ibm.com
API Versions:
v1alpha1
Operations:
CREATE
UPDATE
Resources:
varnishclusters
Scope:          *
Side Effects:     None
Timeout Seconds:  10
Events:             "
It seems to be good for me.
After all i am working on a private cluster which is behind a gateway .. If it can be useful.

I do not know what do you need to solve this issue so if you have any intuition i can provide you what you need.

Yeah, sadly I'm not sure offhand either. :( Is the operator even starting? What is the output of kubectl describe mutatingwebhookconfigurations.admissionregistration.k8s.io? Are there any events associated with the webhook? What about kubectl get events --sort-by='.lastTimestamp'? Anything interesting there? Beyond that, checking logs for any obvious errors may be necessary. I'm not familiar with OVH, so maybe there's an issue we need to iron out with that platform.

I solve the issue but i just change the way i create my object. It seems that you cannot set the operator in subchart at the same time you create the cluster in another subchart. It could be due to the order that helm create object.
Clearly the PEM isn't set when you do that in this order. Now it works perfectly !

Ah, that makes sense! I'm glad you were able to work it out. Given the nature of how subcharts are rendered down in Helm, I don't think there's much we could from the operator side to avoid this type of behavior. Maybe we could add init-containers to each object or more extensive, overridable health checks but that seems to be overkill. Thanks for the update!


[storage] Confusing behavior when using a custom endpoint

Does this issue affect the google-cloud-cpp project?
I believe so.
What component of google-cloud-cpp is this related to?
GCS/storage/CURL client.
Describe the bug

TL;DR: Tried to use a custom endpoint, some requests properly go to the endpoint, and some go to storage.googleapis.com instead. This is because CURL client 1) automatically switches to XML API unless certain headers are provided 2) ignores the custom endpoint for XML requests in favor of CLOUD_STORAGE_TESTBENCH_ENDPOINT.

Long version: I am trying to add GCS support in apache/arrow. I've built and installed the google-cloud-cpp project as described in doc/packaging.md (on Ubuntu 18.04), except that I made shared libs.

Then, I wrote some C++ code implementing a filesystem interface for Arrow, using google::cloud::storage client.

Then, I wrote a test using fsouza/fake-gcs-server. The test setup creates a bucket, creates a file, and reads the file back.

To be able to use fake-gcs-server, I launch the server like this:

docker run -i --rm -p 4443:4443 fsouza/fake-gcs-server:latest -scheme http

and provide a custom endpoint like this:
namespace gcs = google::cloud::storage;

StatusOr<gcs::ClientOptions> client_config_;
std::unique_ptr<gcs::Client> client_;

client_config_ = gcs::ClientOptions::CreateDefaultClientOptions();
std::string endpoint = "http://<IP_ADDRESS>:4443";
client_config_->set_endpoint(endpoint);
auto creds = gcs::oauth2::CreateAnonymousCredentials();
client_config_->set_credentials(creds);
client_.reset(new gcs::Client(*client_config_));

Then, using gcs::Client, I create a bucket bucket, insert an object somefile, and read an object with client_->ReadObject("bucket", "somefile");. The resulting gcs::ObjectReadStream has a badbit, and the status just says Permanent error in Read():  [PERMISSION_DENIED].
It turns out, the google-cloud-cpp's CURL client

automatically switches to XML API unless certain headers are provided: https://github.com/googleapis/google-cloud-cpp/blob/v1.17.0/google/cloud/storage/internal/curl_client.cc#L566
ignores the custom-provided endpoint for XML requests in favor of CLOUD_STORAGE_TESTBENCH_ENDPOINT: https://github.com/googleapis/google-cloud-cpp/blob/v1.17.0/google/cloud/storage/internal/curl_client.cc#L242
as a result, the upload request went to my custom endpoint, but the download request went to the real Google Storage API endpoint, resulting in a cryptic "PERMISSION_DENIED" error.

Expected behavior

I'm actually not sure how serious this is and what I would expect 😅. In my usecase, fake-gcs-server doesn't support XML API. I guess the expected behavior here would be to stick to custom endpoint even if switched to XML API, and then I could see the unsupported web server route error. Or at least I'd like the error message to be informative enough that I can understand that the wrong endpoint is being used.

Operating system:
Ubuntu 18.04.2 LTS
Linux 4.15.0-54-generic #58-Ubuntu SMP Mon Jun 24 10:55:24 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
What compiler and version are you using?
c++ (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
What version of google-cloud-cpp are you using?
Git tag v1.17.0.

nI'm actually not sure how serious this is and what I would expect 😅. In my usecase, fake-gcs-server doesn't support XML API. I guess the expected behavior here would be to stick to custom endpoint even if switched to XML API,

Or maybe disable switching to the XML API if any custom endpoint is being used.

and then I could see the unsupported web server route error. Or at least I'd like the error message to be informative enough that I can understand that the wrong endpoint is being used.

I agree, but I think disabling the switch is cleaner.  What do you think?
As a workaround, can you use the testbench included in google/cloud/storage/testbench ?

Yes, disabling the switch will work too. I shall try the testbench!

Or maybe disable switching to the XML API if any custom endpoint is being used.

Yes, disabling the switch will work too.

That, unfortunately, will not work.  Some folks override the endpoint to use private interconnects, and we would want to keep XML enabled in that case.  I see that fsouza/fake-gcs-server has at least partial support for XML, maybe we can use that.

Hmm why do you think it has partial XML support? I didn't find anything in code or HTTP routes.

This looks like fsouza/fake-gcs-server setting an XML handler to me:
https://github.com/fsouza/fake-gcs-server/blob/bb30ba529ac5a206f8a9fa3bf77b15cf12c2a840/fakestorage/server.go#L221
But I have not looked further to see if operations to PUT/POST/GET objects behave as the service does, e.g., they parse and return the right HTTP headers.

Okay, I looked further, definitely no support for XML, filed fsouza/fake-gcs-server#331

And also fsouza/fake-gcs-server#332

I have setup things to automatically close this issue via #5100.  Once that change is in there are no actionable things for us to do, there are some problems using the fake-gcs-server, but those are not fixable (or should not be fixed) in the library.


Nodes may get stuck due to parent availability issue with transition block

Problem
Suppose, the merge fork has happened and beacon chain network produces blocks with empty payloads waiting for TTD to hit the reality. Malicious proposer builds a block with non-empty payload with a random sequence set to its parent_hash field, i.e. producing a payload atop of a block that is unavailable. According to current spec EL must turn into SYNCING upon receiving such a payload which would turn all nodes in the network into syncing mode and prevent them from attesting to and proposing new blocks.
This edge case was attempted to be solved in the Interop spec (see no 5. in Engine API spec here) and has been brought up in discord by @g11tech (thanks a lot!) as Kintsugi spec seems to miss the handling of this case.
Potential Solution
Interop spec proposes for EL to turn into SYNCING only after parent block is pulled from the network and is proved to be a PoS block. If the parent yet not pulled or it appeared to be a PoW block, EL should keep silence and try to pull missing blocks from the wire and execute them. If the parent block is indeed unavailable then EL would try to resolve the dependency forever and never respond to CL, and CL wouldn't treat the beacon block containing this payload as fully validated, thus, would orphan this block and move on. Additionally, it requires EL to properly handle the case when it's forced to sync with unavailable chain -- this assumed to be resolved already as it may happen on the Mainnet (by receiving NewBlock with unavailable parent) -- but there could be implications in the new context of CL/EL communications.
Note, when a node syncs from scratch and EL starts syncing before hearing from CL (regular sync in the PoW network) it will respond with SYNCING to any executePayload call. Suppose CL sends executePayload with unavailable parent block before EL starts its sync process, EL following the Interop spec would wait until it pulls and executes the parent block and all its ancestors -- this would keep CL in limbo for a few hours in case of the Mainnet. Being in this state CL can't attest to or propose new blocks.
A solution that seems working but not always:

Add isMergeBlock: bool to executePayload to clearly distinguish transition block from the others (EL could hijack forkchoiceUpdated -- if there were no forkchoiceUpdated calls before and executePayload call then this must be a transition block).
Add UNKNOWN_PARENT response status to executePayload. EL returns UNKNOWN_PARENT when isMergeBlock: True, the parent is unknown and EL isn't already SYNCING. Additionally, EL initiates the sync process in attempt to sync up to (and including) the parent block
CL handles UNKNOWN_PARENT as SYNCING during the optimistic sync, and as if there was a missing slot in the case when no sync process is happening -- it allows CL to attest to the previous block and propose yet another block on top of the previous one
In case when the parent is truly unavailable honest nodes will orphan the block
In case when the parent PoW block exists but a node didn't receive it in time due to synchrony issues the things get worse. CL will have to pull the parent beacon block and try to re-import it once again with potentially the same UNKNOWN_PARENT result if the sync process on EL side hasn't resolved the dependency yet.

which would turn all nodes in the network into syncing mode and prevent them from attesting to and proposing new blocks.

I don't see why this is true? A CL node would not incorporate this block into their non-optimistic block-tree and would build upon an avaialble TTD block as long as this isn't resolved

I don't see why this is true?

This is true if SYNCING status in the response turns CL from the online into the syncing mode where it can't propose and attest understanding that it's yet not caught up with the head of observable chain. If this switch doesn't happen then we're safe in this edge case. Indeed, if EL responds with SYNCING in this case then the next proposer may still build yet another transition block with its own terminal PoW block and validators will be able to attest to it if in this case the parent is available.
SYNCING status in the response signals that EL is missing (at least) parent and post-Merge this must never happen with online node as block trees of CL and EL are tightly coupled and no data availability issue may occur between the layers. CL adding a beacon block into its optimistic tree upon processing, and then moving it to the fully verified state once it hears from EL that the payload is VALID sounds fine. But doing the same when EL signalling that some data is missing does't feel right. Deciding on what CL should do when it receives SYNCING post-Merge is out of the scope of this issue and probably worth discussion.
IMO, the right behaviour of a node in this edge case is similar to what it would be if the payload execution took forever. Missing data is a different kind of thing and we might want avoid mixing it into this case. I am not saying that this is entirely wrong though -- definitely worth discussion

Right, SYNCING from EL on chains with an unknown PoW source at the transition cannot block CL from making decisions. Doing so would allow for trivially stopping the transition process.

IMO, the right behaviour of a node in this edge case is similar to what it would be if the payload execution took forever.

For simplicity sake (not changing APIs or anything), I think that we should not go into a place where EL can hang forever (just attempting to fill in the unavailable PoW parent) nor should we specify new return values. CL can discern between SYNCING on chains where some PoS ancestor is validated and chains where they are rooted in an unknown PoW parent. Thus they have enough information to act accordingly (not halt block and attestation production).
I think the correct thing is to just note that SYNCING return value on transition chains MUST NOT  halt block and attestation production.
We can discuss other "halt" conditions in optimistic sync discussions/specs elsewhere.

CL can discern between SYNCING on chains where some PoS ancestor is validated and chains where they are rooted in an unknown PoW parent. Thus they have enough information to act accordingly (not halt block and attestation production).

This distinction by CL at the transition time should resolve and get the right/available/popular pow in the chain by allowing to use the local PoW to build the new merge block. Once the new terminal PoW is out there in network, validators should be able to vote on it.

I think the correct thing is to just note that SYNCING return value on transition chains MUST NOT halt block and attestation production.

I tend to agree. We need a proper place for this statement. I guess it should be in the optimistic sync document.

We can discuss other "halt" conditions in optimistic sync discussions/specs elsewhere

I've created a separate issue https://github.com/ethereum/consensus-specs/issues/2735

I think we can elevate that as a note into the CL specs

Chains with transition blocks with unavailable PoW parents MUST be queued until the source PoW chain becomes available. Block and attestation production MUST NOT be halted due to anything in that queue

What's the limit on that though? For example if I'm following a chain and get a transition block that I can't yet verify, it makes sense to not have that block me.  But if I can optimistically follow the chain past that transition block for another 100 epochs then it seems wrong to produce a block that would create a fork.

An easy limit is if an unavailable chain (wrt PoW source) finalizes. This clearly looks like a networking/EL failure and should probably be bubbled up to the user

An easy limit is if an unavailable chain (wrt PoW source) finalizes. This clearly looks like a networking/EL failure and should probably be bubbled up to the user

But we'd expect that to happen if we're initially syncing the chain so it wouldn't be an error we'd report to the user.  Not performing duties if our finalized checkpoint is only optimistically synced probably does make sense - though I'd be tempted to base it on the justified checkpoint instead since attesting with an invalid justified checkpoint can be very problematic and it's still a very strong signal that a lot of validators think that's the real chain and the execution block should turn up eventually.

+1 for justified as it will signal early on that User needs to followup/escalate for the social consensus to kickin, hopefully before chain finalizes.

Addressed in https://github.com/ethereum/consensus-specs/pull/2770:

The current slot (as per the system clock) is at least SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY ahead of the slot of the block being imported.

A node will not optimistically import a merge transition block until it's safe enough to do so. This prevents system from getting stuck due to all nodes being kicked out by a transition block atop of unavailable terminal block. If a terminal block is available but haven't been disseminated in time it will eventually be disseminated and picked up by one of the next proposers to build another transition block atop of it, and this block will likely be accepted by the network.
If a block is indeed unavailable an honest chain built during SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY will be long enough to outperform a malicious chain built atop of unavailable terminal block. Most likely an honest chain segment will have justified and finalized checkpoints produced during this period of time.


Gas used for delegatecall

On L21 in Proxy, the fallback function executes this inline assembly delegatecall:
let result := delegatecall(sub(gas, 10000), _impl, add(data, 0x20), mload(data), 0, 0)
Does gas need to be subtracted from the currently available gas - couldn't all the gas be sent after EIP150 (https://github.com/ethereum/EIPs/blob/master/EIPS/eip-150.md)? My understanding is that before EIP150 you had to subtract enough gas for the opcode (i.e. DELEGATECALL), but after EIP150, 1/64 of the available gas is automatically reserved for the opcode and 63/64 of the available gas is used in the actual call.

Perhaps its pre EIP-150, I would like to know the answer to this as well.

@yondonfu good catch and sorry for the delay!
We've been looking into the EIP-150 details and testing to see how the available gas works on delegatecalls. You are definitely right, 1/64 parts of the available gas is automatically reserved on a delegate call.
Thanks for your collaboration and bringing it up!

Fixed in bdb558d


TypeError: tabText(self, int) when moving plugin tabs

Description
What steps will reproduce the problem?

What is the expected output? What do you see instead?
Please provide any additional information below
  File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\plugins\__init__.py", line 110, in eventFilter
    self.tab_moved(event)
  File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\plugins\__init__.py", line 146, in tab_moved
    self.move_tab(from_index, to_index)
  File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\plugins\__init__.py", line 158, in move_tab
    from_plugin = self._get_plugin(from_index)
  File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\plugins\__init__.py", line 62, in _get_plugin
    tab_text = self.dock_tabbar.tabText(index).replace('&', '')
TypeError: tabText(self, int): argument 1 has unexpected type 'NoneType'

Version and main components

Spyder Version: 3.2.4
Python Version: 3.6.3
Qt Versions: 5.6.2, PyQt5 5.6 on Windows

Dependencies
pyflakes >=0.6.0 :  1.6.0 (OK)
pycodestyle >=2.3:  2.3.1 (OK)
pygments >=2.0   :  2.2.0 (OK)
pandas >=0.13.1  :  0.20.3 (OK)
numpy >=1.7      :  1.13.3 (OK)
sphinx >=0.6.6   :  1.6.3 (OK)
rope >=0.9.4     :  0.10.5 (OK)
jedi >=0.9.0     :  0.10.2 (OK)
nbconvert >=4.0  :  5.3.1 (OK)
sympy >=0

Something related to naming and moving around tabs somewhere in the UI, it seems. Others may know more specifically, but you describe what you were doing around the time the problem occurred?

This happens when moving plugin tabs to reorganize them (e.g. moving the IPython console to be next to the History Log).
I really don't understand why this error happens, but we can catch it and simply pass if it shows up.

@ccordoba12  Is the help wanted tag for just catching the error, or tracing it more thoroughly?


ckpt_path is not defined ERROR

what exactly is this path?
path_name=back_04502514044521042540+cls_211000022+reg_100000111_ops_32
On running:  bash tracking/reproduce_vot2019.sh
===> init Siamese <====
load pretrained model from snapshot/LightTrackM/LightTrackM.pth
Traceback (most recent call last):
File "tracking/test_lighttrack.py", line 181, in
main()
File "tracking/test_lighttrack.py", line 165, in main
siam_net = load_pretrain(siam_net, args.resume)
File "/home/nishat/adasi/tracking/LightTrack/tracking/../lib/utils/utils.py", line 702, in load_pretrain
ckpt = torch.load(ckpt_path, map_location=lambda storage, loc: storage(device))
NameError: name 'ckpt_path' is not defined
VOT2019
loading VOT2019: 100%|██████████████████████████████████| 60/60 [00:00<00:00, 61.31it/s, zebrafish1]
eval ar: 100%|████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 15.58it/s]
eval eao:   0%|                                                               | 0/1 [00:00<?, ?it/s]
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/home/nishat/miniconda3/envs/lighttrack/lib/python3.6/multiprocessing/pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "/home/nishat/adasi/tracking/LightTrack/lib/eval_toolkit/bin/../../eval_toolkit/pysot/evaluation/eao_benchmark.py", line 47, in eval
eao = self._calculate_eao(tracker_name, self.tags)
File "/home/nishat/adasi/tracking/LightTrack/lib/eval_toolkit/bin/../../eval_toolkit/pysot/evaluation/eao_benchmark.py", line 110, in _calculate_eao
max_len = max([len(x) for x in all_overlaps])
ValueError: max() arg is an empty sequence
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "lib/eval_toolkit/bin/eval.py", line 148, in
trackers), desc='eval eao', total=len(trackers), ncols=100):
File "/home/nishat/miniconda3/envs/lighttrack/lib/python3.6/site-packages/tqdm/std.py", line 1178, in iter
for obj in iterable:
File "/home/nishat/miniconda3/envs/lighttrack/lib/python3.6/multiprocessing/pool.py", line 735, in next
raise value
ValueError: max() arg is an empty sequence

While changing from CUDA to CPU, I did some mistake in utils.py,

@nishathussain  i met the same problem,  do u solve it?

@nishathussain  i met the same problem,  do u solver it?


Input only reaching half of the text area

Hi,
My issue is that the text is only filling up half of the text area.
Any ideas on whats happening?

Thanks
Laura

Hi! Can you provide a sample application that reproduces the error?

https://github.com/lksevans12/sample_app

Fixed it.

Yeah, I just cloned it, the problem was the misusage of BS grid system.

Do you know why its like that? I extended the grid, but it still doesn't go the whole way.

Oh I see, its already bootstrap compatible, I dont need to add any classes?

It really depends on what you want to achieve. By default Bootsy works fine when you want it rendered on a full line. However, if you want to have responsive columns you can rely on the grid system, but you want to make sure that you're using the proper classes to have enough spacein all screen sizes. More info: http://getbootstrap.com/css/#grid

Thanks, I appreciate all your help. Love bootsy :)

:heart:


support parallel sync big file

Close #1431

Codecov Report

Merging #2326 (ee23c95) into main (8311f97) will decrease coverage by 0.03%.
The diff coverage is 63.47%.

:exclamation: Current head ee23c95 differs from pull request most recent head 16b0b5c. Consider uploading reports for the commit 16b0b5c to get more accurate results

@@            Coverage Diff             @@
##             main    #2326      +/-   ##
==========================================
- Coverage   61.68%   61.65%   -0.04%
==========================================
  Files         137      137
  Lines       25398    25515     +117
==========================================
+ Hits        15667    15730      +63
- Misses       7903     7948      +45
- Partials     1828     1837       +9

Impacted Files
Coverage Δ

pkg/sync/sync.go
49.28% <63.47%> (+2.81%)
:arrow_up:

pkg/fuse/context.go
66.66% <0.00%> (-6.31%)
:arrow_down:

pkg/fs/fs.go
76.44% <0.00%> (-1.80%)
:arrow_down:

pkg/vfs/writer.go
78.64% <0.00%> (-1.02%)
:arrow_down:

pkg/meta/redis.go
71.83% <0.00%> (-0.05%)
:arrow_down:

pkg/meta/sql.go
65.76% <0.00%> (ø)

pkg/meta/sql_lock.go
72.84% <0.00%> (+1.32%)
:arrow_up:

pkg/meta/tkv_lock.go
83.91% <0.00%> (+1.39%)
:arrow_up:

pkg/meta/redis_lock.go
76.33% <0.00%> (+1.52%)
:arrow_up:

pkg/chunk/utils_unix.go
93.33% <0.00%> (+20.00%)
:arrow_up:

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 8311f97...16b0b5c. Read the comment docs.


Search aliases added for 404, 500 and 503 pages

You can preview this change here:
Built with commit abe70c8a317007a08c74df0f1ce8ac12ba06f1b2
https://deploy-preview-946--govuk-design-system-preview.netlify.com

Nice work Adam, thanks for this.

Thank you @DebsDee @36degrees @nickcolley and @joelanman for helping to get this in so quickly.


Add ReactiveDateRangePicker (or add it to the existing DateTimePicker)

Flutter recently came out and supported a DateTime range picker which would save me and others some fields (merging start and end dates for example).

ReactiveDateRangePicker released in 0.3.9


Is the augment function appropriately Data augmentation?

It seems that data does not increase at first glance, but what does this processing mean?

The author of EDSR-PyTorch responded. https://github.com/thstkdgus35/EDSR-PyTorch/issues/38


Virtual hub Connections failed to deploy new connection with remote vnet by using lz-key/key attributes

I have designed my solution to collect all connections to hub deployments in one pipeline in level3 and that helps me to have full control over these spoke connections for every new lanadng zone. but I got a bug that the vhub connections failed when I use lz-key/key attributes:
/home/vsts_azpcontainer/prod/rover_jobs/20220301122227437105712/modules/solution/networking_virtual_hub_connection.tf line 20, in resource "azurerm_virtual_hub_connection" "vhub_connection":
20:   remote_virtual_network_id = coalesce(
21:     try(local.combined_objects_networking[try(each.value.vnet.lz_key, local.client_config.landingzone_key)][each.value.vnet.vnet_key].id, ""),
22:     try(each.value.vnet.resource_id, "")
23:   )
├────────────────
│ each.value.vnet is object with 2 attributes
│ each.value.vnet.lz_key is "infoblox_lz"
│ each.value.vnet.vnet_key is "vnet_infoblox"
│ local.client_config.landingzone_key is "hub_connections"
│ local.combined_objects_networking is object with 4 attributes
Call to function "coalesce" failed: no non-null, non-empty-string arguments.
and as a workaround, I have used a resource_id.
this config works dosent't work:
virtual_hub_connections = {
infoblox_spoke_TO_hub_con = {
name = "infoblox_spoke_TO_hub_con"
virtual_hub = {
lz_key = "connectivity_virtual_hub1"
key    = "hub1"
}
vnet = {
lz_key ="xxxx"
vnet_key = "xxxxx"
}
}
}
the level that has this vnet is the current level3, but another config folder. and it is included in the landingzone block.

hi @anasmohana can you try with branch patch.5.5.4, it changes the association pattern and should resolve your issue. please let me know!

I have tested now and both firewall and express router circuits working fine now with resource group = lz-key/key.
another thing want to share with you is I have written a new add-ons module to deploy Infoblox to azure by using templet and think to open a new pull request for that is that ok

thanks for your quick confirmation @anasmohana! on the add-on, i think that would definitely be a good addition for azurelz (https://github.com/Azure/caf-terraform-landingzones/tree/main/caf_solution/add-ons) !


🐛 BUG: update Miniflare's bundling to use new esbuild watch API

Which Cloudflare product(s) does this pertain to?
Miniflare
What version(s) of the tool(s) are you using?
3.2.x
What version of Node are you using?
No response
What operating system and version are you using?
All
Describe the Bug
We are bumping the esbuild version for Miniflare but this has a different watching API.
See https://github.com/cloudflare/workers-sdk/pull/6029/files#diff-9f96a6362cf0d9b300410bf0fe90a486661f2837acf0aebe24cc4e50a201e797
Please provide a link to a minimal reproduction
No response
Please provide any relevant error logs
No response

I'll do this early next week


chore(charts/brigade): update chart per changes in Azure/brigade

ref https://github.com/Azure/brigade/pull/727

bit late, LGTM in any case 👍


Accessory distance of zero for outlier samples

I'm working with a group that is doing some benchmarking of microbial GWAS tools, and one of the datasets we're working with is Peptoclostridium difficile, downloaded from PATRIC.  I did a preliminary run of PopPUNK and saw some outliers with high core distance and accessory distance of zero, shown below.

I ran poppunk_extract_distances.py to inspect things a bit further, and found that three accessions were responsible for these outlier distances.  I ran Mash with default settings on these three samples and five other random ones, and found pretty strong clustering.  So, probably they are a misidentified species or have some sort of technical issue going on and should be removed from the dataset.  In fact two out of the three no longer seem to be on PATRIC, although I can share the FASTA files with you if it would be helpful for debugging.
Regardless of the fact that I'm discarding these samples, why would the accessory distance be zero?  It seems very odd.

If there are very few matching k-mers between divergent samples, then stochasticity in the observed data points may result in the inference of a relatively rapid drop off in k-mer matching with increasing k-mer length (although the absolute numbers may be low) - this is interpreted by PopPUNK as high core divergence (high gradient), and low accessory divergence (because the intercept is close to 1, which is the limit). To avoid this, shorter k-mer lengths can be included in the studied range (to give greater power to detect the actual gradient), or the diversity of the collection can be reduced (as you have done). Hope that's helpful.

Just to add a bit on how to diagnose this further if you wish: If you add --plot-fit you can see some of the regressions between k-mer length and matches. For those with a = 0 you'd see a bad fit to the model across the current k-mer range. We don't have a way of directly extracting specific plots here (just a random subset is chosen to get an overall picture). If you wanted to look in more detail you can use pp-sketchlib (our mash equivalent) directly with the --jaccard option to see the actual values being fit across the k-mer range for all sample pairs.
As @nickjcroucher says, reducing --min-k or removing samples is the way to fix this

Thanks!  I was using --min-k 14 as any lower than that was giving an error.  I'll just go forward with removing those samples.


Implement Model Downloader

Start with the why:
When we started out we went ahead and put the neural models directly in the repository for ease-of-use, but this was a (my) bad call because it makes the repo huge over time.
So to make the repository small.  See this issue https://github.com/luxonis/depthai/issues/36 which details that if we do this (among with other cleanup) the repo will go down to under 1MB instead of the 700+MB it is now.
Move to the how:
Open model zoo uses a downloader + yml description for models:
https://github.com/openvinotoolkit/open_model_zoo/blob/master/models/public/mobilenet-ssd/model.yml
So we could create a similar repo for our models & use this as a tool for model downloading.
Move to the what:
Move the NN models out of this repository, making a model-zoo repo instead, and use the open_model_zoo technique for downloading these models.

Merged into develop and on way to <IP_ADDRESS> release now.


Praise: Very excited for the ti branch!

Hey @brian6091,
Awesome work! Best SD Colab notebooks out there are yours! Been playing around with them for a couple of weeks with LoRA.
Can't wait for the ti branch with config Colab to be ready :)
Let me know how I can help out.

@amerkay
Glad you can follow given the rather uninformative commit messages!
Lots of changes coming up. I should have it ready for testing in a couple of days. Inference part still requires some work given the number of possibilities that have to be taken into account...

I can help with that. I had to modify the main branch notebook to "monkey patch" LoRA for inference.
Still wrapping my head around the embedding resizing for the TI method. Got a bunch of errors, but that might be because I was trying to speed things up with Flax/JAX code at the same time.
No rush! Great work, mate!

Cool, I'll ping you when I get the training part finished. I'm waiting for the safetensors pull request to get merged into LoRA to decide exactly how to go about saving model bits.

@amerkay

I can help with that. I had to modify the main branch notebook to "monkey patch" LoRA for inference.

Ah yes, I forgot to do that. I've tucked away the current main branch in v0.0.1 branch. If you want to make a pull request on that branch I'd appreciate that.

Ah yes, I forgot to do that. I've tucked away the current main branch in v0.0.1 branch. If you want to make a pull request on that branch I'd appreciate that.

You lost me :) Not much going on in v0.0.1 branch:

Sorry, I just meant for the inference part that you had to add to the notebook on main

No worries - done, pull request at https://github.com/brian6091/Dreambooth/pull/18


Please provide an Angular Unit-Test generator

Is this a bug report or a feature request?

[ ] Bug Report
[X] Feature Request

Please provide the steps to reproduce the issue [Bug Report only]
No response
Please provide the expected behavior vs the actual behavior you encountered [Bug Report only]
No response
Please provide a screenshot if possible [Bug Report only]
No response
Please provide the exception or error you saw [Bug Report only]
No response
Is this a browser-specific issue? If so, please specify the device, browser, and version. [Bug Report only]
No response
Description [Feature Request only]
It would be really, really, really nice to have a unit-test generator.  Something that looks at the code component, directive, service, etc., creates the spec file with everything you need to get started.  All we need to do is add the tests, but the setup is done.
Proposed solution [Feature Request only]
It should be smart enough to parse your file and provide that it can so that the unit-tests are super simple to hydrate by adding the it statements.
Alternatives considered [Feature Request only]
No response

This topic has been previous discussed at #7727.

As mentioned this has been discussed in #7727.
Please find the latest response from the Angular Team here: https://github.com/angular/angular-cli/issues/7727#issuecomment-580424412
If this is a feature you are interesting in pursuing, contributions are welcome.


Installation fails on Python 3.9: "Untyped decorator" issues during install.

Right now, the installation of coredis in a fresh Python 3.9.13 environment fails:
$ pip install coredis
Collecting coredis
  Using cached coredis-4.10.2.tar.gz (193 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [104 lines of output]
      coredis/typing.py:56: error: Cannot find implementation or library stub for module named "beartype"  [import]
      coredis/typing.py:56: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
      coredis/commands/function.py:143: error: Untyped decorator makes function "wraps" untyped  [misc]
      coredis/commands/function.py:411: error: Returning Any from function declared to return "Union[Union[Union[str, bytes], int, float, bool, None], List[ResponseType], MutableSet[Union[Union[Union[str, bytes], int, float, bool, None], Tuple[Union[Union[str, bytes], int, float, bool, None], ...]]], Dict[Union[Union[str, bytes], int, float, bool, None], Response
Type], RedisError]"  [no-any-return]
      coredis/commands/function.py:413: error: Returning Any from function declared to return "Union[Union[Union[str, bytes], int, float, bool, None], List[ResponseType], MutableSet[Union[Union[Union[str, bytes], int, float, bool, None], Tuple[Union[Union[str, bytes], int, float, bool, None], ...]]], Dict[Union[Union[str, bytes], int, float, bool, None], Response
Type], RedisError]"  [no-any-return]
      coredis/commands/script.py:139: error: Untyped decorator makes function "wraps" untyped  [misc]
      coredis/commands/core.py:404: error: Untyped decorator makes function "lcs" untyped  [misc]
      coredis/commands/core.py:745: error: Untyped decorator makes function "cluster_addslotsrange" untyped  [misc]
      coredis/commands/core.py:764: error: Untyped decorator makes function "asking" untyped  [misc]
      coredis/commands/core.py:775: error: Untyped decorator makes function "cluster_bumpepoch" untyped  [misc]
      coredis/commands/core.py:845: error: Untyped decorator makes function "cluster_delslotsrange" untyped  [misc]
      coredis/commands/core.py:891: error: Untyped decorator makes function "cluster_flushslots" untyped  [misc]
      coredis/commands/core.py:919: error: Untyped decorator makes function "cluster_getkeysinslot" untyped  [misc]
      coredis/commands/core.py:969: error: Untyped decorator makes function "cluster_links" untyped  [misc]
      coredis/commands/core.py:1007: error: Untyped decorator makes function "cluster_myid" untyped  [misc]
...
      coredis/client/basic.py:858: error: Untyped decorator makes function "decoding" untyped  [misc]
      coredis/client/cluster.py:926: error: Untyped decorator makes function "decoding" untyped  [misc]
      coredis/client/cluster.py:976: error: Untyped decorator makes function "sharded_pubsub" untyped  [misc]
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

On Python 3.10.8 however, it seems to install without any issues. Any ideas why this could be happening?

Update: after some testing, it seems to happen only on Python 3.9, and only if mypy was already installed at the point that we install coredis.

This does fix the issue.
It's an arm64 Linux environment. (VM on Apple Silicon).
I tested in the Python environment where 4.10.2 failed. In there, the installation of 4.10.3 succeeds. I did not manage to reproduce the issue in a new env from scratch, but in any case, it's working. Let me know if there's anything you'd like me to try.
Thank you for the quick response!

Thanks for verifying!
Though this does solve the error, ideally you shouldn't have to depend on mypy being available to get the compiled optimizations. For the next release (4.11) I'm going to try and provide pre-built wheels for linux+arm64, so let's keep this open till that is done.

4.11.1 has pre built wheels for linux + arm64.

Closing as this seems sufficiently resolved.


Roots rebuild: discussion and ideas

It's time for Roots to be rebuilt using proper PHP and OOP practices. The goals behind Roots won't change: implementing HTML5 (specifically HTML5 Boilerplate) properly, cleaning up WordPress' output, and making it easier to develop sites among others. We just want go about those goals in a better way for users of the theme and push forward WordPress themes.
A few things definitely need to happen:

Roots will only support PHP 5.3 (it was released in 2009) to use features such as anonymous functions.
Roots will be rewritten in an object-oriented way.
Templates shouldn't have duplication and HTML elements shouldn't be spanned across files.
In general, better template handling. I'd personally like all moved into a separate folder to allow for the possibility of separating out presentation logic (see #222).

Some resources I've come across about templates:

http://scribu.net/wordpress/theme-wrappers.html
template_include_filter: http://www.jaredatchison.com/2011/10/02/taking-advantage-of-the-template_include-filter/
Modular themes: https://core.trac.wordpress.org/ticket/12877, http://wp.me/pS0xt-1f, http://wp.me/pS0xt-30

I'm sure a lot of Roots users have thoughts on this and what we could do better so let's use this issue as a place of discussion. And don't worry, we know Roots isn't the pinnacle of PHP so we won't be offended by your comments.
Also, feel free to dump links in here for references.

Great initiative! I think this is one of the things that can really push the boundaries and make wordpress theme users and designers happier and more productive.
Template access, organisation and clarity is I believe the most important aspect, and perhaps the most neglected and confusing parts of wordpress currently. I always find myself pondering which template is used on a current page, and what impact it will have if I change it. Code and HTML duplication is also commonplace. That said, one of the strengths of wordpress is in its popularity, which means you're expecting certain things to be at a specific place when you look at any existing wordpress setup.
Looks like Roots is primarily geared towards people developing new sites from scratch, so that might not be such a huge problem. As long as things make sense and the learning-curve is short. I don't have any particular preference, and I'm not even sure I fully understand that subtleties of each of those suggestions. My gut feeling is to follow something that works well in other frameworks. Be it rails, django or anything that makes it clear and easy to work and extend. Naturally, I would prefer something that will fit with Ginger Roots and allow easy Mustache integration, or perhaps even a pluggable template engine (I guess I am going too far with this now...).
As for your specific points

Agree, and I'm definitely for it. Although it's surprising how many hosting providers still provide PHP 5.2 by default (most cases you can upgrade, but it requires manual intervention). With Roots targeting more serious developers, I guess that's not a problem and they'd know how to upgrade and make sure the environment is running fine.

Not sure I fully agree on this.  Whilst there are some plugins and extensions which are, I don't think it gives any particular advantage. My experience with php and wordpress is still rather limited though, so I don't feel I can speak with much authority on this.

3,4 - totally agree and as said, I think that's the key to making a real positive impact.

Regarding #2:
Roots shouldn't be object oriented just for the sake of it. The way I envision it, it will make it much easier to extend Roots. Child theme's are confusing in WordPress, and adding hooks/filters in every function is really messy. The only way to "overwrite" functions in PHP is using classes.
So a child theme could include the base Roots class, then extend it with their own and overwrite whatever methods they want and even call parent::function() calls. I'd rather people understand how to properly extend Roots via a class rather than trying to figure out some WordPress magic.

That makes more sense. I'm still not convinced though, especially if wordpress itself isn't built this way and you are still pretty much stuck with the existing mechanisms. Some are not that bad to be fair.
As far as child themes. Perhaps again I'm showing lack of experience, as I didn't use it extensively, but I find it hard to buy into the whole concept. On the few occasions that I did modify a theme, eventually it was almost unrecognizable from the parent. Even with the best OO practices, I'd be very hesitant to upgrade the parent theme as it would be very likely to break things badly on the child theme. That's why I think overriding a theme is actually more practical, and with capabilities such as git merge, it's safer to merge changes into your theme than rely on classes and inheritance. Just my view.
But that's just my view, and it's not something I'm too bothered about either way. Generally speaking I am in favour of any structured change that would make things easier, clearer and more organised.

Using child themes the way Wordpress provides them is okay really – as long as it is just that, a child theme. Which means changing way less than half of the original in my opinion (I'd say maybe around 1/3). Otherwise doing what you suggested is actually more feasible I suppose. If you are worried about breaking the child when updating the parent, using a child isn't the correct choice anymore.

Enforcing PHP 5.3 – essentially a good step. However proper information (and where feasible/necessary support) for then legacy versions should be provided. Just to not upset users who can't / won't update but still would like to use roots.

The OOP approach is interesting. I'd really wonder how it would mesh with Wordpress though. Especially considering people using Wordpress (and modifying/creating themes) aren't always the most versatile and well read given its popularity.

Why yes, this sounds awesome!

Separating out logic (MVC-like approach I guess?) sounds good to me. Would make it easier for non devs to change the looks without having to worry too much about messing up the code.

OOP code has no inherent issues integrating with non OOP code. WordPress is also becoming increasingly object-oriented. I doubt it will ever get all the way there, but there's definitely been a shift. Lots of themes and plugins have been object-oriented for a while as well.
Here's an example of recent OOP improvements in WP core: http://scribu.net/wordpress/the-magic-of-wp_user.html

Just to clarify, I'm not against OO code in general or with Wordpress, but I feel it is far less important than, say, much sexier things like simply making sure you don't use echo (or use functions that echo stuff out) in your functions. If you do that, and lots of stuff in WP does, then it's nearly impossible to extend this code, OO or not. You're pretty much stuck with output buffering or overwriting it. In which case, it's easier to hack the code directly and then deal with merges upstream.
@swalkinshaw - can you suggest how to resolve, say, some of the issues with W3TC mentioned on #112 using OO techniques? W3TC is an object-oriented plugin as far as I'm aware. I'm not just asking to prove a point. I'm genuinely interested to learn how this can be used more effectively within wordpress.
As for child-themes, the whole concept is wrong in my opinion.  If you're slightly more experienced, you'd be better off using diff/merge since you would hack it more than a little anyway. For a theme developer, and particularly if trying to make some conceptual leaps, child-theme support seems more like a burden than a feature that gives you any real value.

@gingerlime I took a quick look at modifying W3TC. Here's what you could do:

Download W3TC plugin but don't activate it
Create your own W3TC plugin
load/require W3TC just like it does in w3-total-cache.php
Create a new class that extends W3_Plugin_TotalCache (found in lib/W3/Plugin/TotalCache.php)
Define the function ob_callback() that's the same as W3TC.
Modify your new ob_callback to remove that string from the $buffer.
Or you could just do $buffer = parent::ob_callback() and then strip out that specific string to avoid duplicating the entire function.

There's a few caveats to this:

I haven't actually tried this
I'm not even that familiar with PHP OOP or the internals of the W3TC plugin

However, this is how classes work in general. Extend, then overwrite the function. Yeah, it's a lot harder than just modifying the W3TC source code. But the benefit is the plugin stays intact as is, and you can easily follow this pattern to extend/modify other functionality.
It's almost like a child plugin! Although if you don't like child themes I'm not sure you'll like this solution either.

Thanks @swalkinshaw. Much appreciated. I'd like to give it a try some time. I wonder however if you can extend a plugin (W3TC in this case) after it's already installed. Otherwise, the first item (installing without activating) makes such use-case very limited and then it's much easier and more practical to patch the code and merge in any updates. Also, what happens when the core plugin gets updated by its author? There's still a risk that the upstream changes will break things. The plugin author does not care or even know about other code that depends on it.
In any case, I don't want to drag this discussion into how to adapt other plugins, or into the merits of OOP since this is not what the thread was about. As I said, I'm not opposed to using OOP in general or for Roots. I still have my doubts whether it's that important or useful (particularly compared to other aspects you mentioned, which in my view make a much bigger impact)

chiming in real quick to say that i originally wanted to use the options framework (see #5) but it just came down to that i didn't want people to have to install an additional plugin just to use the theme options.
and on google analytics.. my biggest goal with roots is to have 100% of h5bp in wordpress (including the build script one day). that means the google analytics snippet from h5bp is included.. i've yet to see a plugin that implements GA using the same h5bp method.
on hooks.. should we be adding more or just figuring out a way to not have to use them at all?

On GA: OK it's more acceptable if it's part of h5bp.
On theme options: you can bundle the plugin with the theme. Or you can check if the plugin is installed andu

@gingerlime I actually mostly agree with you. If I was personally managing a WordPress site, I'd just modify W3TC or Roots source and manually merge in wanted updates. Most people in the WordPress community don't seem to share that opinion though.

The Chicago Tribune News Apps Team turned WordPress into an MVC framework a la Django.
Not saying this is where Roots should go, but it's an interesting look at how WP devs are trying to extend WP's functionality and modular use.
(https://github.com/newsapps/wordpress-mtv)[https://github.com/newsapps/wordpress-mtv]

@aboutaaron that's really interesting. Some of their choices are a bit strange to me but overall it's a cool project.

I just wanted to add a vote for ensuring that Roots DOES support WordPress Child themes. Although Child Themes are not perfect, they are powerful and very efficient.
You can have a single copy of Roots in WordPress MultiSite installation that powers 100 or 1000 websites that are all child themes of Roots. And when Roots rolls out a new version, you only update the single Roots parent folder.
Updating the already-built sites becomes virtually impossible with @swalkinshaw's [proposal] (https://github.com/retlehs/roots/issues/230#issuecomment-3641526).

@TheLoneCuber It wouldn't really change the upgrade path at all actually. You'd still have the base Roots theme and then a bunch of "child" themes that extend it. The only difference is the technical details of how it extends it.

I'll +1 for WP standard child theme implementation. I'm also a fan of hooks and filters, but agree that it does tend to make the parent theme less boilerplate/delete-key friendly.

There's a reason WordPress uses hooks/filters extensively internally. The best solution will most likely involve using extendable/replaceable classes in combination with hooks/filters, depending on what you're trying to do.

Great ideas!
@swalkinshaw could you elaborate your thoughts on your initial points (3) and (4)? There is a discussion on the Roots mailing list about how best to keep the core Roots files up to date when using it as a base theme. Yes, we could use child themes, but my feeling is that Roots is a base or starter theme. I've not delved much into the delights of child themes yet, so perhaps I am missing something, but I use Roots primarily as a starter theme and then develop from that. The problem is, after developing a dozen or so sites based on Roots is that they'll all potentially be using different versions of Roots and so be difficult to manage and keep up to date with latest developments. If there is a way to make Roots more "upgradable" by separating out the "Roots" bits from the content then I'd be definitely in favour!