Cannot make "setKeywords" work.

What were you trying to do?
I was trying to change the metadata in a pdf.  I successfully changed Title, Author, and Subject.
Keywords kept crashing the environment with errors suspiciously like a bug.
How did you attempt to do it?
I am using a low code environment called Node-Red, based on Node.js
Data is transmitted as message blocks which are processed by nodes, one of which can be a JS function node.
The function node allows me to import pdf-lib in its setup:

As part of my test, I read a pdf as a single buffer object and send it to the function as msg.payload.
The function is based on one of your examples with the removal of the fetch routine, and is as follows:
var existingPdfBytes =[]
existingPdfBytes = msg.payload

readDocumentMetadata()
return msg;
async function readDocumentMetadata() {

    const pdfDoc = await pdfLib.PDFDocument.load(existingPdfBytes, {
        updateMetadata: true
    })

    console.log('Title:', pdfDoc.getTitle())
    console.log('Author:', pdfDoc.getAuthor())
    console.log('Subject:', pdfDoc.getSubject())
    console.log('Creator:', pdfDoc.getCreator())
    console.log('Keywords:', pdfDoc.getKeywords())
    console.log('Producer:', pdfDoc.getProducer())
    console.log('Creation Date:', pdfDoc.getCreationDate())
    console.log('Modification Date:', pdfDoc.getModificationDate())
}

I hand edited the document fields of a pdf, and the output is as follows:
Title: test1
Author: test2
Subject: test3
Creator:
Keywords: "hobbies, makers, electronics"
Producer:
Creation Date: 2022-11-05T06:47:48.000Z
Modification Date: 2023-04-01T12:50:36.000Z

Note the keywords content.
Next, I modified the routine to include some set commands; the following works:
(note that setKeywords is commented out)
async function readDocumentMetadata(keywords) {

    const pdfDoc = await pdfLib.PDFDocument.load(existingPdfBytes, {
        updateMetadata: true
    })
    pdfDoc.setTitle('Practical Electronics')
    pdfDoc.setAuthor('Mike Kenward')
    pdfDoc.setSubject('Electronics')
    //pdfDoc.setKeywords(["hobbies", "makers", "electronics"])

    keywords = pdfDoc.getKeywords()
    node.warn(keywords)
    const pdfBytes = await pdfDoc.save()

    console.log('Title:', pdfDoc.getTitle())
    console.log('Author:', pdfDoc.getAuthor())
    console.log('Subject:', pdfDoc.getSubject())
    console.log('Creator:', pdfDoc.getCreator())
    console.log('Keywords:', pdfDoc.getKeywords())
    console.log('Producer:', pdfDoc.getProducer())
    console.log('Creation Date:', pdfDoc.getCreationDate())
    console.log('Modification Date:', pdfDoc.getModificationDate())
}

The output looks fine.  (for some reason, the creator and producer fields have been updated too - pdfDoc.save?)
Title: Practical Electronics
Author: Mike Kenward
Subject: Electronics
Creator: pdf-lib (https://github.com/Hopding/pdf-lib)
Keywords: "hobbies, makers, electronics"
Producer: pdf-lib (https://github.com/Hopding/pdf-lib)
Creation Date: 2022-11-05T06:47:48.000Z
Modification Date: 2023-04-01T12:59:50.000Z

What actually happened?
When the line
pdfDoc.setKeywords(["hobbies", "makers", "electronics"])
is uncommented, this is the result:
1 Apr 14:08:04 - [red] Uncaught Exception:
1 Apr 14:08:04 - [error] TypeError: `keywords` must be of type `Array`, but was actually of type `NaN`
    at Object.exports.assertIs (C:\Users\williams_b\.node-red\node_modules\pdf-lib\cjs\utils\validators.js:140:11)
    at PDFDocument.setKeywords (C:\Users\williams_b\.node-red\node_modules\pdf-lib\cjs\api\PDFDocument.js:382:17)
    at readDocumentMetadata (Function node:4bfcc30399b5a64e [function 17]:17:12)

If I provide an empty array, It produces this curious error:
1 Apr 14:09:55 - [red] Uncaught Exception:
1 Apr 14:09:55 - [error] TypeError: `keywords` must be of type `Array`, but was actually of type `Array`
    at Object.exports.assertIs (C:\Users\williams_b\.node-red\node_modules\pdf-lib\cjs\utils\validators.js:140:11)
    at PDFDocument.setKeywords (C:\Users\williams_b\.node-red\node_modules\pdf-lib\cjs\api\PDFDocument.js:382:17)
    at readDocumentMetadata (Function node:4bfcc30399b5a64e [function 17]:17:12)

Finally, I used a  new Array declaration as follows
    const keywords = new Array('hobbies', 'makers', 'electronics')
but got the same NaN error...
1 Apr 14:22:57 - [red] Uncaught Exception:
1 Apr 14:22:57 - [error] TypeError: `keywords` must be of type `Array`, but was actually of type `NaN`
    at Object.exports.assertIs (C:\Users\williams_b\.node-red\node_modules\pdf-lib\cjs\utils\validators.js:140:11)
    at PDFDocument.setKeywords (C:\Users\williams_b\.node-red\node_modules\pdf-lib\cjs\api\PDFDocument.js:382:17)
    at readDocumentMetadata (Function node:4bfcc30399b5a64e [function 17]:18:12)

What did you expect to happen?
I simply expected the setKeywords routine to work as described.
How can we reproduce the issue?
There is no need to share any PDF, because all the code is doing is change metadata, so should "work" on any sample PDF
Here is the failing piece of code.  Unless you run Node-Red, I'm not sure how to send you a working example, as I don't have any other environment, but since most of it is based on your examples, it would probably be easier for you to cut and paste?
Let me know what else you need.
var existingPdfBytes =[]

existingPdfBytes = msg.payload

readDocumentMetadata()

return msg;
async function readDocumentMetadata() {
    const keywords = new Array('hobbies', 'makers', 'electronics')
    const pdfDoc = await pdfLib.PDFDocument.load(existingPdfBytes, {
        updateMetadata: true
    })
    pdfDoc.setTitle('Practical Electronics')
    pdfDoc.setAuthor('Mike Kenward')
    pdfDoc.setSubject('Electronics')

    pdfDoc.setKeywords(keywords)

    const pdfBytes = await pdfDoc.save()

    console.log('Title:', pdfDoc.getTitle())
    console.log('Author:', pdfDoc.getAuthor())
    console.log('Subject:', pdfDoc.getSubject())
    console.log('Creator:', pdfDoc.getCreator())
    console.log('Keywords:', pdfDoc.getKeywords())
    console.log('Producer:', pdfDoc.getProducer())
    console.log('Creation Date:', pdfDoc.getCreationDate())
    console.log('Modification Date:', pdfDoc.getModificationDate())
}

Version
1.17.1
What environment are you running pdf-lib in?
Node
Checklist

[X] My report includes a Short, Self Contained, Correct (Compilable) Example.
[X] I have attached all PDFs, images, and other files needed to run my SSCCE.

Additional Notes
No response

Well this is depressing.  I was hoping it would be something simple.


Update to Bazel 4.0.0 and latest releases of rules_apple, rules_swift, and apple_support

I've started to attempt this, and I've encountered a few issues:

This project depends on a fork of rules_swift, that fork will need to be updated too: https://github.com/bazel-ios/rules_swift/tree/rules_ios/HEAD
precompiled_apple_resource_bundle.bzl uses some internal rules_apple APIs, it will need to be updated. Keith shared his version here, which I imagine can be mostly copied, but does need some additional changes.

Thanks for theissue @jschear , agree we should get this on 4.0!  I think rules_ios  pulls in a default version of rules_swift, but you should be able to point that at HEAD - we should be getting off of a fork soon, if not by the time a 4.0 PR is ready we should be able to rebase the fork quite simply.
I haven't looked into precompiled_apple_resource_bundle - from what it looks like, there is a WIP PR, perhaps one option is to wait until that fix lands to bump rules_ios? You could always point to that PR to test BTW
Please let us know you've got any other questions!


Dependencies errors

I run the run_script.sh with a GPU machine, but get the error message below
It seems the cuda version is not suitable. So which cuda version should be used?
Using Theano backend.
WARNING (theano.sandbox.cuda): The cuda backend is deprecated and will be removed in the next release (v0.10).  Please switch to the gpuarray backend. You can get more information about how to switch at this URL:
 https://github.com/Theano/Theano/wiki/Converting-to-the-new-gpu-back-end%28gpuarray%29

2018-05-30 01:28:42,026 WARNING The cuda backend is deprecated and will be removed in the next release (v0.10).  Please switch to the gpuarray backend. You can get more information about how to switch at this URL:
 https://github.com/Theano/Theano/wiki/Converting-to-the-new-gpu-back-end%28gpuarray%29

Using gpu device 0: GRID K520 (CNMeM is disabled, cuDNN not available)
Traceback (most recent call last):
  File "train.py", line 50, in <module>
    from keras.preprocessing import sequence
  File "/home/ubuntu/miniconda3/envs/py27/lib/python2.7/site-packages/keras/__init__.py", line 2, in <module>
    from . import backend
  File "/home/ubuntu/miniconda3/envs/py27/lib/python2.7/site-packages/keras/backend/__init__.py", line 64, in <module>
    from .theano_backend import *
  File "/home/ubuntu/miniconda3/envs/py27/lib/python2.7/site-packages/keras/backend/theano_backend.py", line 1, in <module>
    import theano
  File "/home/ubuntu/miniconda3/envs/py27/lib/python2.7/site-packages/theano/__init__.py", line 116, in <module>
    theano.sandbox.cuda.tests.test_driver.test_nvidia_driver1()
  File "/home/ubuntu/miniconda3/envs/py27/lib/python2.7/site-packages/theano/sandbox/cuda/tests/test_driver.py", line 41, in test_nvidia_driver1
    raise Exception("The nvidia driver version installed with this OS "
Exception: The nvidia driver version installed with this OS does not give good results for reduction.Installing the nvidia driver available on the same download page as the cuda package will fix the problem: http://developer.nvidia.com/cuda-downloads

And if I use the CPU to train, there are also some log info:
2018-05-30 10:43:44,656 INFO Pattern library is not installed, lemmatization won't be available.
2018-05-30 10:43:44,892 INFO 'pattern' package not found; tag filters are not available for English

What is the Pattern library. And I can not find where these log info are writen in the python file. It seems in the utils.py.
Beside this, I also got errors that tell me there are no module named pygpu and h5py.
What are the version of pygpu and h5py?

In my experiments I used cudnn 5.1. You can also change the backend to theano 1.0.1, which is compatible with cuda 8.0 and cudnn 6.0

@ruidan Thanks for the information. During the train, two log information showed up. Did you know want is the pattern library? It seems related with lemmatization and tag filters.
2018-05-30 10:43:44,656 INFO Pattern library is not installed, lemmatization won't be available.
2018-05-30 10:43:44,892 INFO 'pattern' package not found; tag filters are not available for English

@hustlrr gensim version is 0.12.4, you can find it here

@BrambleXu Is that just a warning? Can you run the script successfully?

@ruidan  Yes, it is just a warning. The script runs successfully.

@BrambleXu I think that doesn't affect the results. You can just ignore it.

@ruidan Gotcha. Thanks.


Undocumented feature restic cat index

Output of restic version
restic 0.3.3 (v0.3.3-0-g4d93da9)
compiled with go1.7.4 on linux/386
Expected behavior
restic cat index works as expected, but is not included in documentation.
Actual behavior
# restic -r repo cat --help
The "cat" command is used to print internal objects to stdout.

Usage:
  restic cat [flags] [pack|blob|tree|snapshot|key|masterkey|config|lock] ID

Thanks for pointing this out!


Formatter: heredoc + comma produces invalid code

Running this is correctly formatted code through the formatter produces invalid code:
hash = {
  "foo" => <<-'HERE',
    bar
    HERE
  }

crystal tool format moves the comma to a new line after the closing heredoc delimiter:
hash = {
  "foo" => <<-HERE
    bar
    HERE
,
  }

This results in a syntax error:
Syntax error in foo.cr:5: expecting token '}', not ','

This is probably a regression introduced by #5578 ff.
/cc @asterite @MakeNowJust

@RX14 Why is this not tagged for 0.25.1?


Passing a parameter from a Custom Validator directive to errorMessages doesn't work unless you make errorMessages dash-case.

It looks like the attribute on the input must match with dash-case for the "errorMessages" in the Error Message Resolver. Angular-auto-validate doesn't convert it to camel case even though the example for the "Error Message Resolver" documentation on the angular-auto-validate website shows it this way.
Using dash-case as the key for the "errorMessages" allows the value of "2" to be included where {0} is referenced in the errorMessages string.
The following works:
<input type="hidden" class="form-control" ng-model="cc.bundleData.items" min-required-items-in-bundle="2" />
errorMessages['min-required-items-in-bundle'] = 'Please include at least {0} items';
This doesn't work:
(The camel case for "anotherErrorMessage" won't work because it doesn't match the case of the attribute name on the input element which would be "another-error-message"):
errorMessages['anotherErrorMessage'] = 'An error message with the attribute value {0}';
Please update the code to support errorMessages with camel cases. Or update the documentation on the website for the "Error Message Resolver".
By the way this is a great module!

Issue is on line 814:
parameter = el.attr('data-ng-' + errorType) || el.attr(errorType);
If errorType is not snake case then jQuerys .attr method will not be able to find the attribute.


Problem with 16 bit and /rfx

If the local X server is started with 16 bit and /rfx is used then the resulting session is distorted (artifacts and half of the screen is black). This happens with sw and hw GDI.
Steps to reproduce:

start a X server with 16 bit (e.g. Xephyr :200 -screen 1024x768x16)
launch xfreerdp on this xserver with /rfx

Fixed /gdi:sw RFX decoding, with /gdi:hw there are distortions left, but they seem to originate from some other callback.


@conda-forge-admin, please add bot automerge

[ ] I read the conda-forge documentation and could not find the solution for my problem there.

Issue:

Environment (conda list):

$ conda list

Details about  conda and system ( conda info ):

$ conda info

Hi! This is the friendly automated conda-forge-webservice.
I just wanted to let you know that I added bot automerge in conda-forge/area-detector-handlers-feedstock#2.


how to make camera view before start recording in slow motion?

how to make camera view before start recording in slow motion?
i tried to adjust
video.maxframerate and _recorder.framework but none work!
help plz

if u put _recorder.setframerate=10; the preview will go slow motion but in a very bad resolution !!
i can't figure it out please help thank you


Fallback datastore to use when loading real datastore fails.

This way PEX is still enabled and can provide at least some form of permissions resolution. What needs to be decided is what to do when the fallback backend is used:

Lock down the server and grant no permissions to anybody
Kick everyone on join
Send a message to anyone who joins giving information about the error (while taking one of the above actions)

Pex can use two different data stores at the same time yet e.g. For migration of permissions storage.
Wouldn't it be nice to have a configuration switch to enable fallback from database to file based data store if the DB connection breaks. This would need to have a valid and mostly up to date replication of the permissions.yml extracted from the pex DB schema in a regular base or another external tool would be needed to realize those extraction via cronjob for example.
If this seems to be too complex is there a chance to get native MySQL reconnection within pex realized ?


Change MSIDset.filter_bad() to apply to individual MSIDs by default

Description
The MSIDset.filter_bad() method was previously trying to be too clever and doing correlated union-based filtering on MSIDs within each content type. This is strongly tied to the concept of content types in the cxc dataset, but with increasing use of MAUDE as the backend this idea is less applicable.
Although it is an API change that might have an impact, this PR is to change the default behavior of filtering bad data in a set to simply filter each MSID in the set individually.
A small tag-along here is ensuring that MAUDE-dependent tests in test_fetch.py are skipped if MAUDE is not available.

Fixes #234
Interface impacts

This changes the default behavior of MSIDset.filter_bad(), and therefore the default behavior of Msidset() which calls filter_bad(). This API change should not impact much code in practice:

Msidset() is not a good way to get correlated MSIDs so hopefully it is not used that much (instead MSIDset() is better).
Actual incidence of bad values is extremely low due.

Testing

Unit tests

[x] Mac with new unit test

Independent check of unit tests by [REVIEWER NAME]

[ ] [PLATFORM]:

Functional tests

No functional testing.

The agasc supplement update code uses Msidset but it doesn't look like it is used in a way that would rely on the previous bad handling.


A general system error occurred: Operation was canceled

I sometime get this error in the log file (the metrics collection fails).
I use vmware_exporter-0.11.0.dist-info
and pyvmomi-<IP_ADDRESS>8.12-py3.7.egg-info
2019-12-03 10:21:11,670 INFO:FIN: _vmware_get_host_perf_manager_metrics
2019-12-03 10:21:24,279 ERROR:Traceback (most recent call last):
  File "d:\python\python37-32\lib\site-packages\vmware_exporter\vmware_exporter.py", line 997, in _async_render_GET
    yield self.generate_latest_metrics(request)
twisted.internet.defer.FirstError: FirstError[#1, [Failure instance: Traceback: <class 'twisted.internet.defer.FirstError'>: FirstError[#0, [Failure instance: Traceback: <class 'pyVmomi.VmomiSupport.vmodl.fault.SystemError'>: (vmodl.fault.SystemError) {
   dynamicType = <unset>,
   dynamicProperty = (vmodl.DynamicProperty) [],
   msg = 'A general system error occurred: Operation was canceled',
   faultCause = <unset>,
   faultMessage = (vmodl.LocalizableMessage) [],
   reason = 'Operation was canceled'
}
d:\python\python37-32\lib\threading.py:917:_bootstrap_inner
d:\python\python37-32\lib\threading.py:865:run
d:\python\python37-32\lib\site-packages\twisted\_threads\_threadworker.py:46:work
d:\python\python37-32\lib\site-packages\twisted\_threads\_team.py:190:doWork
--- <exception caught here> ---
d:\python\python37-32\lib\site-packages\twisted\python\threadpool.py:250:inContext
d:\python\python37-32\lib\site-packages\twisted\python\threadpool.py:266:<lambda>
d:\python\python37-32\lib\site-packages\twisted\python\context.py:122:callWithContext
d:\python\python37-32\lib\site-packages\twisted\python\context.py:85:callWithContext
d:\python\python37-32\lib\site-packages\pyVmomi\VmomiSupport.py:706:<lambda>
d:\python\python37-32\lib\site-packages\pyVmomi\VmomiSupport.py:512:_InvokeMethod
d:\python\python37-32\lib\site-packages\pyVmomi\SoapAdapter.py:1374:InvokeMethod
]]
--- <exception caught here> ---
d:\python\python37-32\lib\site-packages\vmware_exporter\vmware_exporter.py:644:_vmware_get_vm_perf_manager_metrics
d:\python\python37-32\lib\site-packages\vmware_exporter\defer.py:99:parallelize
]]

Unhandled Error
Traceback (most recent call last):
  File "D:\Python\Python37-32\Scripts\vmware_exporter.exe\__main__.py", line 7, in <module>

  File "d:\python\python37-32\lib\site-packages\vmware_exporter\vmware_exporter.py", line 1112, in main
    reactor.run()
  File "d:\python\python37-32\lib\site-packages\twisted\internet\base.py", line 1272, in run
    self.mainLoop()
  File "d:\python\python37-32\lib\site-packages\twisted\internet\base.py", line 1281, in mainLoop
    self.runUntilCurrent()
--- <exception caught here> ---
  File "d:\python\python37-32\lib\site-packages\twisted\internet\base.py", line 875, in runUntilCurrent
    f(*a, **kw)
  File "d:\python\python37-32\lib\site-packages\twisted\internet\defer.py", line 501, in errback
    self._startRunCallbacks(fail)
  File "d:\python\python37-32\lib\site-packages\twisted\internet\defer.py", line 568, in _startRunCallbacks
    self._runCallbacks()
  File "d:\python\python37-32\lib\site-packages\twisted\internet\defer.py", line 699, in _runCallbacks
    current.result.cleanFailure()
  File "d:\python\python37-32\lib\site-packages\twisted\python\failure.py", line 627, in cleanFailure
    self.value.__traceback__ = None
  File "d:\python\python37-32\lib\site-packages\pyVmomi\VmomiSupport.py", line 663, in __setattr__
    CheckField(self._GetPropertyInfo(name), val)
  File "d:\python\python37-32\lib\site-packages\pyVmomi\VmomiSupport.py", line 468, in GetPropertyInfo
    raise AttributeError(name)
builtins.AttributeError: __traceback__

Extend the straight duration and time out on Prometheus side.

The expiration is 2minutes, the usual collection time is 30s.
The operation seems to abort after 60s (no precise log)


Staging env set up

Staging env set up with GH actions

@jord1e will you be able to modify this so that the checks pass?


Filter does not work properly (several emails with same subject)

Scenario :
I receive in the same mailbox, everyday, sales reports for several locations (1 email per location)
Email subject is always the same
I created aliases to be able to filter the mails
Symptoms :
The filters are not considered properly, all messages with the same subject name are processed
Example :
I have in my inbox 3 emails with sales report :

1 sent to<EMAIL_ADDRESS>1 sent to<EMAIL_ADDRESS>1 sent to<EMAIL_ADDRESS>All 3 emails have the same subject "Your sales report"

I have for testing purpose only one rule for which the filter is
"filter"<EMAIL_ADDRESS>But when I execute the program, the 3 emails are processed
I guess this could be because all emails have the same subject?
I tried to apply different labels (before processing gmail2gdrive) but still the same issue.
Any idea how I could fix this?
Thanks
Thomas

It seems like I understood the issue here but don't know how to fix it(
In Gmail even if you turned of threaded view, all emails are still being treated by gmail to join them into threads. So when you start the script it checkes the first message in the thread. If that message had not been labelled yet the script process all the emails under that thread even if they were sent to different address like<EMAIL_ADDRESS>and<EMAIL_ADDRESS>Even if they were already processed.
Can anyone suggest a fix for that?

I think the main problem is, that the default Gmail Service always returns threads and not messages as a search result, thus also processing other mails that should not have been:
https://developers.google.com/apps-script/reference/gmail/gmail-app#search(String)
Fortunately there seems to be a way using the Advanced Gmail Service:
https://developers.google.com/apps-script/advanced/gmail
Here is some more information that may be of help:
https://stackoverflow.com/questions/53183973/google-apps-script-gmail-return-message-not-thread-via-filter

I'm closing this issue since GMail2GDrive is discontinued and has been superseded by the much improved Gmail Processor.
It allows processing of multiple emails within the same thread which should solve your problem.
See the Getting Started Guide as well as the Reference Docs for more information.


Please add requirements.txt or setup.py

Hello, Zach!
I tried to use your tool and it seems to work fine. One problem that I had was detecting which version of xmlschema I need to get installed. At the moment it's
xmlschema==0.9.14

Can you please add it to requirements.txt or to a setup.py?

As the validators was updated recently, try changing  'xmlschema.components' to  'xmlschema.validators' and it should work

xmlschema.validators'

Wow, thanks!

Hello Zach,
I am trying to use your tool in windows with python 3.7 and everytime i compile the code it throws
from xmlschema.components import (
ModuleNotFoundError: No module named 'xmlschema.components'
-:1: parser error : Document is empty
^
-:1: parser error : Start tag expected, '<' not found
^
Can u plz help me..

For future readers - from my experience, yes - you can import the types, but no - it will not work for newer versions of xmlschema (I think there are breaking changes, as I was debugging it and seeing there are sometimes missing attributes and so on, especially related to XMLSchema11).

Ported code for python3
https://github.com/seregagl/xsd2xml
Tested only with XMLSchema10

@seregagl 's fork has a pull request ( https://github.com/seregagl/xsd2xml/pull/1 ) to be compatible with version 2.1.1 of the module.


Editor: reduce number of fields in API responses

Context

While some fields like content need to be saved, we don't need them in the API responses.
Summary

By using the _fields param, we can massively reduce number of bytes sent over the wire and avoid preloading unneeded data.
For instance, when saving a story, we only want to return the fields actually used by useSaveStory().
Relevant Technical Choices

To-do

N/A
User-facing changes

N/A
Testing Instructions

QA

[x] This is a non-user-facing change and requires no QA

This PR can be tested by following these steps:

UAT

[x] UAT should use the same steps as above.

This PR can be tested by following these steps:

Reviews
Does this PR have a security-related impact?

No
Does this PR change what data or activity we track or use?

No
Does this PR have a legal-related impact?

No
Checklist

[ ] This PR addresses an existing issue and I have linked this PR to it in ZenHub
[x] I have tested this code to the best of my abilities
[x] I have verified accessibility to the best of my abilities (docs)
[x] I have verified i18n and l10n (translation, right-to-left layout) to the best of my abilities
[x] This PR contains automated tests (unit, integration, and/or e2e) to verify the code works as intended (docs)
[x] I have added documentation where necessary
[x] I have added a matching Type: XYZ label to the PR

Fixes #

Am a little worried this makes it harder to expend our editor and getting data from the api. It makes preloading easy to get out of sync harder for none WordPress devs to get data from the api.
What is the benefit of doing this? Having a couple of bytes down the wire? Complexity this adds may not be worth it.

Am a little worried this makes it harder to expend our editor and getting data from the api.

I think this can be prevented with some good documentation.

What is the benefit of doing this? Having a couple of bytes down the wire? Complexity this adds may not be worth it.

Currently we load/preload all data for a story in the editor. Including the content field (the whole story HTML).
Especially when loading a large story with lots of SVG stickers in it, the whole JSON response can be up to 10 MB (!) in size. That is definitely a lot and just wasteful.


Manually constructed content-type headers with quotes are not processed correctly

I was attempting to create a MTOM SOAP payload using SAAJ to send through Karate, and encountered an issue because the Content-Type header that SAAJ generated was being adjusted by Karate. While debugging, I was able to narrow down the location where the issue was introduced to the ApacheHttpUtils class, and I can replicate the issue with the following code:
package karate;

import java.nio.charset.StandardCharsets;

import org.apache.http.HttpEntity;

import com.intuit.karate.http.apache.ApacheHttpUtils;

public class ApacheHttpUtilsTest {
    public static void main(String[] args) {
        final String originalContentType = "multipart/related; charset=UTF-8; boundary=\"----=_Part_19_1913847857.1592612068756\"; type=\"application/xop+xml\"; start-info=\"text/xml\"";

        HttpEntity httpEntity = ApacheHttpUtils.getEntity("content is not important",
                originalContentType, StandardCharsets.UTF_8);

        System.out.println("Original: " + originalContentType);
        System.out.println("Updated:  " + httpEntity.getContentType().getValue());
        System.out.println("They are " +
                (originalContentType.equals(httpEntity.getContentType().getValue()) ? "equal" : "not equal"));
    }
}

The output from running this is:
Original: multipart/related; charset=UTF-8; boundary="----=_Part_19_1913847857.1592612068756"; type="application/xop+xml"; start-info="text/xml"
Updated:  multipart/related; charset=UTF-8; boundary="\"----=_Part_19_1913847857.1592612068756\""; type="\"application/xop+xml\""; start-info="\"text/xml\""
They are not equal

The problem is that the Content-Type header is split at semi-colons and then broken into name-value pairs, but quotes around values are not removed. Then the names and values are passed to code that escapes the quotes that were not removed, leading to the appearance above.
To workaround this I had to remove quotes manually from the Content-Type value coming from SAAJ, which seems less than ideal since these values could in theory contain spaces or other characters that would cause problems for the string splitting algorithm.

@wrosenuance thanks for the details, since you have all the details, do you think you can submit a PR, also see if karate-jersey works. am tagging as help wanted

@ptrthomas I will check with my company - I need to get approval for contributions, which can take a while. Assuming that comes through I can definitely work on a PR!

moving to project board: https://github.com/intuit/karate/projects/3#card-41317156

@ptrthomas can you assign this issue  to me?

@ptrthomas  Have done initial analysis.
https://github.com/intuit/karate/blob/3322d55a30b06b3cc5f16d2c2e00562d3d0eea54/karate-core/src/main/java/com/intuit/karate/http/HttpUtils.java#L118
Double Quotes if present in front or in end are not removed in above class and it end up escaping the quotes while creating ContentType object.
Will be adding a new method in StringUtils.trimDoubleQuotes to trim the double quotes from starting and end so if any double quotes are present in front and last it will be removed.
Is this approach looks fine?
Should we also remove all the double quotes from front or end or only the first quote.
Example:
"abc" -> abc
""abc"" -> should it be "abc" or should it also be abc
""""abc"""" -> should it be abc  ?

this may need research but if we are only trying to get the Charset - we should use the HttpUtils from Netty which has a public static Charset getCharset(CharSequence contentTypeValue, Charset defaultCharset) method.

Till here everything works fine. https://github.com/intuit/karate/blob/master/karate-apache/src/main/java/com/intuit/karate/http/apache/ApacheHttpUtils.java#L89
But when we are trying to withParameters with key,value this is the place where double quotes are getting escaped.

@Nishant-sehgal let me try again, I'm saying we need to rewrite the karate httputils to use this method: https://netty.io/4.1/api/io/netty/handler/codec/http/HttpUtil.html#getCharset-java.lang.CharSequence-java.nio.charset.Charset-

@ptrthomas I am trying to understand how will using HttpUtil.getCharset of netty help.
If we use netty Implementation or existing karate httputils both are behaving the same way and returning the same Charset object with same data.
Issue is when we are setting parameter in content type.
ct = ct.withParameters(new BasicNameValuePair(entry.getKey(), entry.getValue()));

Since we are creating HttpEntity object that requires ContentType.
I also found ContentType.parse(mediaType) correctly populate mimeType,charset and parameters and internally handles quotes as well.
But we are calling ContentType ct = ContentType.parse(mediaType).withCharset(charset); where withCharset reset the parameters object as it creates a new object and now if we call withParameters it adds the parameters but that does not handles the quotes.
I think there are 2 options:

handle double quotes while populating parameters or Similar to what i initial [thought].(https://github.com/intuit/karate/pull/1296/files) while reading value from content-type.
call ContentType.parse(mediaType) only once and make sure if mediaType does not have charset, we set it before calling parse method.

Please suggest how shall i take it forward.

@Nishant-sehgal thanks for the analysis, this helps ! option 2 sounds like less of a hack to me

@ptrthomas Have raised a initial PR share your thoughts for the same. PR

Meanwhile i also though of an other implementation
final CharArrayBuffer buf = new CharArrayBuffer(mediaType.length());
        buf.append(mediaType);

        final HeaderElement[] elements =
        		BasicHeaderValueParser.INSTANCE.parseElements(buf, new ParserCursor(0, mediaType.length()));

        HeaderElement headerElement = null;

        if(null != elements && elements.length == 1) {
        	headerElement = elements[0];
        }

        ContentType ct = ContentType.create(headerElement.getName(), HttpUtil.getCharset(mediaType, charset));

        if(headerElement.getParameters() != null) {
        	for (NameValuePair nameValuePair : headerElement.getParameters()) {
        		ct = ct.withParameters(nameValuePair);
        	}
        }

        return ct;

1.0 released


Move mobile footer into menu

In response to Feedback button mobile #1904
Apologies as this pattern never made it to handoff until now. This update moves the mobile footer in it's entirety to sit within the mobile menu. (see screenshot)
*The Report a Bug sentry button stays in place
In Figma

@adamgall it looks like we'll need to keep the "Report a Bug" button where it is now based on comments from https://github.com/decentdao/decent-interface/issues/1874.
Please confirm and I will update

@xraystyle1980 yes, I implemented some changes already to fix the "shit covers other shit" problem, which have been signed off by @decentdao/product and @decentdao/engineering and merged into develop.
check it out here: https://github.com/decentdao/decent-interface/pull/1904

@xraystyle1980 yes, I implemented some changes already to fix the "shit covers other shit" problem, which have been signed off by @decentdao/product and @decentdao/engineering and merged into develop.
check it out here: #1904
Recommend you undo the "Report a Bug in menu" changes in Figma, cause we won't be implementing that any time soon imo.
If you're ok with all of the above, then plz close this issue. Otherwise, let's talk about it!

@adamgall I updated my description and image above to NOT include the report a bug button. Can we meet in the middle and just move the audit, build, and endorsement into the mobile menu?

I think we can do that @xraystyle1980 yes


Replace qiskit.algorithms with qiskit_algorithms

Summary
Replace qiskit.algorithms with qiskit_algorithms except QAOAClient and VQEClient because they are deprecated.
Details and comments
Since qiskit-algorithms does not support python 3.7, unit tests fail with Python 3.7.
I made #538 to drop Python 3.7 support.

We should add qiskit_algorithms to the requirements file.

Once 0.2.0 of qiskit_algorithms in released we can also switch here from qiskit.utils import algorithm_globals over to the equivalent class in qiskit_algorithms i.e.  from qiskit_algorithms.utils import algorithm_globals and make that the min version in the requirements file. Similar to noted here /qiskit-community/qiskit-finance#291 qiskst_algorithms works with either but that file in utils in Qiskit, along with another that's only used by algorithms. I expect to be deprecated and removed when the algorithms are removed from Qiskit so its better to switch now.

Yes, I added qiskit-algorithms in requirements.txt.
OK. I will switch to from qiskit_algorithms.utils import algorithm_globals. When is qiskit-algorithms 0.2.0 planned? Is it soon?

When is qiskit-algorithms 0.2.0 planned? Is it soon?

Should be very soon now.

It's ready to review because qiskit-algorithms 0.2.0 was released on Aug 24.

@t-imamichi My take is that I think the logic ought to be able to take a qiskit.algorithms instance or a qiskit_algorithms one. The instance checks there I think will prevent the former. That may end up being a tradeoff in what sort of upfront checks can be made and how much we want to switch to just using qiskit_algorithms and no longer refer to qiskit.algorithms at this point. Did you see the post in the thread in the internal algorithms related discussion channel - where you mentioned this PR it was a response to that - it includes some thoughts about this and more.

@woodsp-ibm Thanks. I tried to remove all imports of qiskit.algorithms 63474dc. It would work fine with qiskit.algorithms implicitly. But, it requires #542 to pass the unit tests because some legacy tests uses qiskit.algorithms that need to be removed first.

@t-imamichi When can we expect this to be released?


Compression for Tensorflow

looks good. please add test for it and fix pipeline error

Would you mind telling me why FPGM Pruner is removed? Is former version not work or you guys are work on a new version now? I may have to use filter pruning for CNN while there is almost no tensorflow related toolkit for it. Is there a stable version here?(no need to be latest) Much thanks!

Would you mind telling me why FPGM Pruner is removed? Is former version not work or you guys are work on a new version now? I may have to use filter pruning for CNN while there is almost no tensorflow related toolkit for it. Is there a stable version here?(no need to be latest) Much thanks!

@tu1258 As model compression framework on NNI has been refactored, we will re-implement the algorithms on the new framework for tensorflow. also, highly recommend external contributors to contribute the compression algorithms.


How to use the boundingRect?

How to use the boundingRect option?

Please see this issue https://github.com/IsraelZablianov/draggable-vue-directive/issues/1
And here is a full example https://github.com/IsraelZablianov/draggable-demo/blob/master/src/components/app/app.vue
Please let me know if you need more help or I can close this issue


Garbage from RPI command after update

What happened?
Hi,
Thanks for the nice work the project is amazing.
After updating to the firmware 0011 and the 002D driver after booting into ProDOS RPI command does not work and just puts garbage on the screen.
I've pull the project build the a2driver and assemble the commands.
Regards
Hardware Version
Fifth Prototype (classic hardware without jumper)
Firmware Version
0010 (classic hardware)
Driver Version
002D (add support for RPi Pico hardware)
Shell Version
000D (added version info)
Where are you seeing this problem?
RPI Command
What computer is this running on?
Other

Have you rebuilt the RPI.COMMAND and SHELL since upgrading?
cd ~/Apple2-IO-RPi/Apple2
./assemble.sh
The RPI.COMMAND is likely failing to detect the card as the firmware ID bytes changed.

Oh, and after you reassemble the binaries, you need to refresh the dynamic drive image... Normally I'd suggest using the RPI command to regenerate the drive image but since that's not working for you, maybe on the Linux side, restart the service.
sudo systemctl restart apple2driver
Then reboot the Apple II.

Have you rebuilt the RPI.COMMAND and SHELL since upgrading?
cd ~/Apple2-IO-RPi/Apple2 ./assemble.sh
The RPI.COMMAND is likely failing to detect the card as the firmware ID bytes changed.
Oh, and after you reassemble the binaries, you need to refresh the dynamic drive image... Normally I'd suggest using the RPI command to regenerate the drive image but since that's not working for you, maybe on the Linux side, restart the service.
sudo systemctl restart apple2driver
Then reboot the Apple II.

Yes. Just for a sanity check did it again, same result.
Running 'rpi ls' from prompt, for example, I got this:

Let me know if I can assist you or if more info is needed
Tks

Oh, 'rpi.command' is executed fine and find the card. The problem arise with the execution of 'rpi' command.

Regards

I haven't been able to reproduce the issue the way you're seeing it. I did however find a bug that if you -rpi.command after it's already loaded, it echos back in an infinite loop when you try and use rpi ls after. I assume it's only loaded once (by the startup.bas)?

I haven't been able to reproduce the issue the way you're seeing it. I did however find a bug that if you -rpi.command after it's already loaded, it echos back in an infinite loop when you try and use rpi ls after. I assume it's only loaded once (by the startup.bas)?

Yes. Letting my tests to bare bone. Only the IO-RPi on slot 6 and using de default drive image from the project.

Okay, put everything exactly the way you have it in slot 6 with no other cards other an extended 80 column card and I see the problem. I'll try and make a fix as soon as possible.

Okay, put everything exactly the way you have it in slot 6 with no other cards other an extended 80 column card and I see the problem. I'll try and make a fix as soon as possible.

Tks! Let me know if i can help in some way.
With IO-RPi in another slot the problem persist? I can try this weekend.
Regards

Side note... It was working in slot 7 as that is the default... The code that was setting the slot number on detection was off by 256 bytes because the detection code got bigger and pushing into the next page. I had to fix the offset by one.


docker ip is not generated in the /etc/nginx/conf.d/default.conf file

I started the proxy container using the following command
 docker run -d -p 80:80 --net=node_default --name proxy -v /var/run/docker.sock:/tmp/docker.sock -t jwilder/nginx-proxy
I started a simple node container
FROM node:4.2
WORKDIR /srv
ADD ./package.json /srv/package.json
RUN npm install
ADD . /srv
EXPOSE 3000
CMD node app.js

my docker-compose file
version: "2"

services:
  worker:
    image: docker-node-meetup9
    build:
      context: .
      dockerfile: Dockerfile
    ports:
      - "3000:3000"
    command: node app.js
    hostname: docker-node-meetup9
    environment:
      - VIRTUAL_HOST=myapp1.dev

here is what was generated in the /etc/nginx/conf.d/default.conf file
upstream myapp1.dev { 			# node_worker_1 			server :3000; } server { 	server_name myapp1.dev; 	listen 80 ; 	access_log /var/log/nginx/access.log vhost; 	location / { 		proxy_pass http://myapp1.dev; 	} }
the container ip is missing.
any idea why?
➜  node git:(master) ✗ docker version
Client:
 Version:      1.10.1
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   9e83765
 Built:        Fri Feb 12 22:11:40 UTC 2016
 OS/Arch:      darwin/amd64

Server:
 Version:      1.10.2
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   c3959b1
 Built:        Mon Feb 22 22:37:33 2016
 OS/Arch:      linux/amd64

➜  node git:(master) ✗ docker-compose version
docker-compose version 1.6.0, build unknown
docker-py version: 1.7.0
CPython version: 2.7.10
OpenSSL version: OpenSSL 0.9.8zg 14 July 2015

nginx-proxy doesn't support overlay-networks yet (which are used by docker-compose v1.6.0), there is the ongoing PR #337 which tries to solve this issue.
For the time being, you will have to use docker-compose with version-spec 1.

But shouldn't it work if both proxy and containers are running in the same network ?
Sent from my iPhone

On 8 במרץ 2016, at 11:00, Pit<EMAIL_ADDRESS>wrote:
nginx-proxy doesn't support overlay-networks yet (which are used by docker-compose v1.6.0), there is the ongoing PR #337 which tries to solve this issue.
For the time being, you will have to use docker-compose with version-spec 1.
—
Reply to this email directly or view it on GitHub.

Unfortunately not. #337 has to be merged for user-defined networks to work.

I'm getting the same result when not using overlay like so
starting the nginx container
docker run -d -p 80:80 --name=nginxg-rproxy --net=bridge -v /var/run/docker.sock:/tmp/docker.sock:ro jwilder/nginx-proxy
starting a jenkins container
docker run -d  -p 8080:8080 -p 50000:50000 --net=bridge --name jenkins -e VIRTUAL_HOST=jenkins.dev -v plugins:/var/jenkins_home/plugins jenkins
docker exec  nginxg-rproxy cat /etc/nginx/conf.d/default.conf
>> docker logs nginxg-rproxy
forego     | starting nginx.1 on port 5000
forego     | starting dockergen.1 on port 5100
dockergen.1 | 2016/03/14 06:52:43 Generated '/etc/nginx/conf.d/default.conf' from 2 containers
dockergen.1 | 2016/03/14 06:52:44 Watching docker events
dockergen.1 | 2016/03/14 06:52:55 Received event die for container 12cbaf338a79
dockergen.1 | 2016/03/14 06:52:56 Generated '/etc/nginx/conf.d/default.conf' from 1 containers
dockergen.1 | 2016/03/14 06:52:56 Running 'nginx -s reload'
dockergen.1 | 2016/03/14 06:57:04 Received event start for container d3c08ae53245
dockergen.1 | 2016/03/14 06:57:04 Generated '/etc/nginx/conf.d/default.conf' from 2 containers
dockergen.1 | 2016/03/14 06:57:04 Running 'nginx -s reload'

>> docker exec  nginxg-rproxy cat /etc/nginx/conf.d/default.conf
upstream jenkins.dev {
		# jenkins
		server <IP_ADDRESS> down;
}
server {
	server_name jenkins.dev;
	listen 80 ;
	access_log /var/log/nginx/access.log vhost;
	location / {
		proxy_pass http://jenkins.dev;
	}
}

Any idea why?

This:
upstream jenkins.dev {
        # jenkins
        server <IP_ADDRESS> down;
}

is not the same result as this:
upstream myapp1.dev {
        # node_worker_1
        server :3000;
}

Your issue now is that you have published ports 8080 and 50000 on your Jenkins container, and nginx-proxy doesn't know which one to use. You need to specifiy this in the environment variable VIRTUAL_PORT:
docker run -d -p 8080:8080 -p 50000:50000 --net=brdige --name jenkins -e VIRTUAL_HOST=jenkins.dev -e VIRTUAL_PORT=8080 -v plugins:/var/jenkins_home/plugins jenkins

See Multiple Ports for more information.

Resolved by previous comment, closing.


Anchor links in HTML5 mode go to 'base url' and trigger a navigation event

I have an app with $locationProvider.html5Mode(true), so no hashes in the URLs; I figured I could use anchors like they used to again, but unfortunately that doesn't seem to be the case.
I made a plunkr to try and highlight the problem:
http://plnkr.co/edit/Upc89hCMMVbAhJaV2XYd?p=preview
full-screen with visible path version: http://run.plnkr.co/IA9Gwp52MzFpE1O6/
Issue 1 is that an  will link to http://host/#anchor, instead of http://host/currenPath/#anchor.
Issue 2 is that when I create an url  and click it, a navigation event is triggered - highlighted in the plunkr by a page transition animation.
StackOverflow questions offer answers like this work around the limitation by calling $location.hash() and $anchorScroll, but those will also trigger a navigation event. The second solution there is to reset $location.hash to the old value - i.e. none - to avoid the navigation event from triggering, but that removes the option to link directly to anchors from other pages and removes bookmarkability.
I came across issue #648 which seems to outline the same issue (two years ago), but it seems it stopped working sometime since then.
tl;dr: I'd like to do  that links to an anchor at the current route, but it links to the base URL and triggers a navigation event.

Any updates on this?

I had the same issue. I found that it's because I had <base href="/">. Changing it to <base href=""> fixes the problem. I tested on Chrome, Firefox, and Safari.

That's interesting; <base href=""> does not work for me at all. I'm getting some HTML5 provider errors.

@vojtajina Thanks ! I had the same issue and you explanations made me double check my base href. Removing the front slash did it for me.

I had a similar problem, I wanted to create links with Hash
Without that it will be removed by html5 mode, in the first time the page load
So :
$ LocationProvider.hashPrefix ( '#');
And it works !
That way you can create links with Hashes
even when html5 is enabled

I had a similar problem, I wanted to create links with Hash
Without it will be removed by html5 mode, in the first time the page load
So :
$LocationProvider.hashPrefix ( '#');
And it works !
That way you can create links with Hashes
even when html5 is enabled

@vojtajina The plunker doesn't seem to work for me. I added a log statement to the router controller so you can see that the controller is being re-instantiated every time you click. Is this expected?
http://plnkr.co/edit/a36L65c3vo8bFS0Bfszl?p=preview

I think this boils down to a configuration issue. Also, I couldn't reproduce any flickering. See here http://plnkr.co/edit/rwct8raZ4xCpYfxImg9B?p=preview

@Narretz Did you see my plnkr? Controller is getting reinstantiated every click.
http://plnkr.co/edit/a36L65c3vo8bFS0Bfszl?p=preview

@bennlich strange, I thought my plunker didn't show the problem anymore. But it does now.


fix(zipkin-exporter): round duration for zipkin

Which problem is this PR solving?
exporter-zipkin export traces correctly to zipkin.
Fixes #4056
Short description of the changes
Round the duration for zipkin.
Type of change
Please delete options that are not relevant.

[x] Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

[x] Unit tests for zipkin-exporter
[x] Tested in a project by using a patch

Checklist:

[x] Followed the style guidelines of this project
[x] Unit tests have been added
[ ] Documentation has been updated

Please update the changelog. I suggest something like fix(exporter-zipkin): round span durations to the nearest millisecond to be compliant with zipkin protocol

@dyladan thank you for the suggestion. I've updated the changelog

Any expected release date for this fix ?


proposal: x/sys/execabs: deprecate the package

x/sys/execabs was introduced after we introduced the internal/execabs package in 2021 in order to fix a security issue, so that the same functionality could be used in external packages. In 1.19 we changed the default behavior of os/exec to match internal/execabs, and removed that package.
At this point it seems reasonable to deprecate x/sys/execabs, and point people at os/exec again.

This seems like it would be a great use-case for //go:fix inlining (#32816) once we have that. 🙃

just deprecate or tag/isolate/delete?

It probably has enough existing usage that we shouldn't tag-and-delete yet. (Most of the other tag-and-delete packages were unmaintained and virtually unused for many years prior to deletion.)
But I wonder if we should put this on hold until we have a //go:fix tool available, to minimize the amount of work needed for users to resolve the deprecation notices. Given that it is such a thin wrapper around os/exec, the maintenance cost of keeping it around in the meantime doesn't seem particularly high.

I think postponing until we have //go:fix support is reasonable, we're not really in a rush.


Project Haxall

Hi,
I'm trying to connect to the Haxall project (https://haxall.io/) but without success. I get different types of errors like 404 or . Have you ever tried connecting to Haxall?
Thanks

The Haxall documentation is not the best for connecting to a server with the Haystack API.  I haven't used pyhaystack to connect to Haxall yet, but I have used other tools.
You have to use the following as the url to connect:  http://ipaddress:port/api/
For example:  http://localhost:8081/api/
You can test accessing this from a browser by using some of the operations:
http://localhost:8081/api/about
http://localhost:8081/api/read?filter=site


lispPackages_new: change the api to just mkLisp

Makes it more in line with e.g. python.pkgs, python.withPackages etc.
Now to use it:
sbcl.pkgs.alexandria
sbcl.withPackages (ps: [ ps.alexandria ])

@ofborg eval

got another idea, see https://github.com/Uthar/nix-cl/blob/9ae7592d56e05d7f5a231b3d961aef927cbdec70/doc/api.md


Add sharing links for the posts

Medium has a way to share post to Twitter, Facebook

It would be great to put such links in hugo blogs too. And we can also let people choose what platforms links they want to show and let them embed their usernames too in the post sharing the blog post.
Some of the platforms / buttons that I have thought is - Twitter, Facebook, WhatsApp, Copy URL
If this looks cool, I would like to raise a PR for this 😄

Hi @karuppiah7890 I'd certainly be happy to have a PR on this. I think the main requirement is to have it all local (i.e. no outside resources).

You mean no putting links to Twitter's js resource? Is it okay to then copy
it and put it in the code?

Hey @karuppiah7890 - are you still working on this? If not, I'll try my hand at it.

I worked on the twitter part. Then got caught up with other things. Didn't check facebook and whatsapp. You can go ahead and do it 😄
I just have one doubt. For twitter, I used the twitter site and noticed they asked me to use their Js code using a link. Instead it would be downloaded and kept locally in the repo is it? Same for Facebook and WhatsApp ?

The Twitter part should be fairly straight forward with:
http://twitter.com/share?text=we_love_hugo&url=http://gohugo.io&hashtags=hashtag1,hashtag2,hashtag3
(taken from: https://stackoverflow.com/a/20832477/2595410)

I think we should have a param to disable the share on individual pages. To disable on all, user will use cascade.
Let's limit this to post first.


Master System on Krikzz Mega Everdrive Using Wireless Controller

BlueRetro firmware version
24.04
BlueRetro firmware specification
HW1
BlueRetro firmware variant
Universal
BlueRetro hardware type
Internal install DIY
Manufacturer
esp32
System used
SEGA MegaDrive Genesis
Bluetooth controller brand & name
8bitdo M30
What is problem? (only list ONE problem per report)
When I start a master system game, the buttons do not work. On the other hand, if I connect the original controller, they do.
What did you expect to happen?
That it works
Attach files like logs or Bluetooth traces here
No response

I'm not sure this will address your issue how you hope, but a work around to this behavior I found is to boot the MasterSystem game, reboot the BlueRetro, change the hardware type to Parallel 2P (MasterSystem) reboot BlueRetro again, and pair your controller. I found the same situation with an external HW1 AIO adapter.

I'm not sure this will address your issue how you hope, but a work around to this behavior I found is to boot the MasterSystem game, reboot the BlueRetro, change the hardware type to Parallel 2P (MasterSystem) reboot BlueRetro again, and pair your controller. I found the same situation with an external HW1 AIO adapter. My testing was done with a MegaSD.

Thank you very much, changing to Parallel 2P now the controller is working :)
Is there any way to implement pressing the home button to change the controller mode?

I'm not sure this will address your issue how you hope, but a work around to this behavior I found is to boot the MasterSystem game, reboot the BlueRetro, change the hardware type to Parallel 2P (MasterSystem) reboot BlueRetro again, and pair your controller. I found the same situation with an external HW1 AIO adapter. My testing was done with a MegaSD.

Thank you very much, changing to Parallel 2P now the controller is working :) Is there any way to implement pressing the home button to change the controller mode?

I'm no developer. Just another user. I second that as a feature request though. Switching could be useful in backwards compatibility scenarios. I think even the Saturn has some degree of controller backward compatibility with the previous consoles, despite the connect change. There might be some scenarios where SNES or NES users would want to do something similar since those controller types are very similar as well.


Running in a single window

Originally submitted to Google Code by radekw13 on 17 Jun 2009

Selenium server supports '-singleWindow' option that allows running test
cases in a single window.
It would be useful to be able to start the server with that option.
I used to have an extra library to start the server before 'Start Selenium
Server' keyword was made available where I would pass an extra parameter to
init to run in a single window mode.
I attach my now obsolete module.

Originally submitted to Google Code by @yanne on 18 Aug 2009

Please note that the current implementation of Start Server allows giving command
line options. You should be able to use single window mode like this:
Start Server | -singleWindow

Originally submitted to Google Code by @yanne on 18 Aug 2009

I tested the solution, and it worked for me.
Closing this issue for now.


Fixed coverage after changing to non-editable mode

No review needed.

coverage: 25.088% (+25.1%) from 0.0%
when pulling ecc4a377c64e7659f32ac5f58f0a6994be4a3dd1 on andy/fix-coverage
into 208e75f10655ad258d1b60d4db13c93e716c471d on master.


v0.11.0 images pull had ErrImagePull error

  Type     Reason            Age                     From               Message
  ----     ------            ----                    ----               -------
  Warning  FailedScheduling  7m25s                   default-scheduler  0/3 nodes are available: 3 node(s) had untolerated taint {node.kubernetes.io/not-ready: }. preemption: 0/3 nodes are available: 3 Preemption is not helpful for scheduling..
  Normal   Scheduled         7m23s                   default-scheduler  Successfully assigned default/wasm-lunatic-764c4f46d4-5b4zt to k3d-wasm-cluster-agent-1
  Normal   Pulling           5m51s (x4 over 7m22s)   kubelet            Pulling image "ghcr.io/deislabs/containerd-wasm-shims/examples/lunatic-submillisecond:v0.11.0"
  Warning  Failed            5m51s (x4 over 7m22s)   kubelet            Failed to pull image "ghcr.io/deislabs/containerd-wasm-shims/examples/lunatic-submillisecond:v0.11.0": rpc error: code = NotFound desc = failed to pull and unpack image "ghcr.io/deislabs/containerd-wasm-shims/examples/lunatic-submillisecond:v0.11.0": no match for platform in manifest: not found
  Warning  Failed            5m51s (x4 over 7m22s)   kubelet            Error: ErrImagePull
  Warning  Failed            5m38s (x6 over 7m21s)   kubelet            Error: ImagePullBackOff
  Normal   BackOff           2m15s (x20 over 7m21s)  kubelet            Back-off pulling image "ghcr.io/deislabs/containerd-wasm-shims/examples/lunatic-submillisecond:v0.11.0"

I think I would have to change the platform back to amd64 and arm64 for images that we publish.
https://github.com/deislabs/containerd-wasm-shims/blob/main/.github/workflows/docker-build-push.yaml#L79
What do you think? @devigned , @jsturtevant

It looks like this is because it is build as an image index by buildx
 regctl manifest get ghcr.io/deislabs/containerd-wasm-shims/examples/lunatic-submillisecond:v0.11.0
Name:                            ghcr.io/deislabs/containerd-wasm-shims/examples/lunatic-submillisecond:v0.11.0
MediaType:                       application/vnd.oci.image.index.v1+json
Digest:                          sha256:40c27dda0433770fb84cf8404a0904288e557db74dda2e42d6f70efd09aba82f

Manifests:

  Name:                          ghcr.io/deislabs/containerd-wasm-shims/examples/lunatic-submillisecond:v0.11.0@sha256:cd20f3be0de911ad8eb7551ef4ccdfc16040ad35a47f7633786b80d3a6b76598
  Digest:                        sha256:cd20f3be0de911ad8eb7551ef4ccdfc16040ad35a47f7633786b80d3a6b76598
  MediaType:                     application/vnd.oci.image.manifest.v1+json
  Platform:                      wasi/wasm

  Name:                          ghcr.io/deislabs/containerd-wasm-shims/examples/lunatic-submillisecond:v0.11.0@sha256:f587a7a300a7ec1b7f0c404bca38c337dfb79e6f2b93238daac25f963e5008c6
  Digest:                        sha256:f587a7a300a7ec1b7f0c404bca38c337dfb79e6f2b93238daac25f963e5008c6
  MediaType:                     application/vnd.oci.image.manifest.v1+json
  Platform:                      unknown/unknown
  Annotations:
    vnd.docker.reference.digest: sha256:cd20f3be0de911ad8eb7551ef4ccdfc16040ad35a47f7633786b80d3a6b76598
    vnd.docker.reference.type:   attestation-manifest

Switching it back to amd64 for the platform arch would allow this to be pulled as an index, otherwise I believe disabling attestation in buildx would produce a single image manifest instead of an index and it would pull properly.
The other option would be to use the digest directly like: ghcr.io/deislabs/containerd-wasm-shims/examples/lunatic-submillisecond:v0.11.0@sha256:cd20f3be0de911ad8eb7551ef4ccdfc16040ad35a47f7633786b80d3a6b76598

Can I ask that in the future, if there are problems with a release, you follow convention and issue a new minor release?
There are excellent reasons for not replacing an existing release in-line, even if it's completely broken. For example: this PR which passed initially but began failing just before merge once v0.11.0 suddenly meant something different:
https://github.com/kubernetes-sigs/image-builder/pull/1405
I'll update it now to match the new SHAs, but TBH I have low confidence that will work, and my incentive to keep up with releases is reduced. (This isn't the first time a wasm-shims release has been updated inline with new binaries.)

Also it appears the v0.11.0 release is incomplete now: it only has three of the expected eight binary packages.

Can I ask that in the future, if there are problems with a release, we follow convention and issue a new patch release?

My bad. Yes, of course.

Is there an additional test or release gate we could add to make sure this doesn't happen in the future? I'd love to help!

I think in the future given the high probability that a release would probably fail, I am going to do the release candidates and verify they work and then push the main tag. Does this sound like a plausible approach?

Does this sound like a plausible approach?

It does indeed, sorry there's so much manual work involved.
(I'm also planning to write an end-to-end test to verify that the wasm-shims are working in the real world--Cluster API for Azure--but that wouldn't catch problems until much later.)

Just released v0.11.1


Fail to remove second deleted org from list

Steps..

Delete an org from the orgs list by using the org's action menu
.. the org is removed from the list
Delete a second org in the same way
.. org is not removed from the list
Refresh page and the org has been removed

Something strange is going on.

We delete the org... then call clear of pages of type which resets the pagination object
The pagination object has changed, so we run through the code that decides to if it should re-fetch
However we have already flicked a flag which means the list isn't updated...
... however there's a second rogue subscription that hasn't set this flag to re-fetched the list
There's no other rogue subscription so this only happens once
See src/frontend/app/store/reducers/pagination-reducer/pagination-reducer.helper.ts fetchPagination$

There's also a subscription leak, if you flick between the create org and orgs list pages the count will increase. This happens up to a point then stops(!). Also it seems worse if we clear the list (add an org instead of cancel). The additional spam makes this a bit harder to debug

I fixed this by work around (orgs were local lists so we could make use of IRequestAction removeEntityOnDelete... which only removed the entity). This is still an issue when not using removeEntityOnDelete. Will change the issue name to reflect


We should have a page linking to ....

[x] affiliated student orgs at OSU
[ ] organizations we endorse

And yes, the content of this page is going to be political.

good idea

@Nefari0uss Could you supply me with a list affilated student organizations and/pr organizations that the club endorses?

Do you still need this?

@Nefari0uss can you think of any other student orgs that we should link to. This is the file is question.


Commit cabal file to the repo to get rid of stack warning

Don't merge
This is just temporal branch to get rid of this stack warning before serverless-haskell switches to amazonka 2 and releases a new version to hackage.
Fixing the following warning:
DEPRECATED: The package at Archive from https://github.com/jhrcek/serverless-haskell/archive/bdd5f9ebed171fe23bbdec65392931ba0cbbc896.tar.gz does not include a cabal file.
Instead, it includes an hpack package.yaml file for generating a cabal file.
This usage is deprecated; please see https://github.com/commercialhaskell/stack/issues/5210.
Support for this workflow will be removed in the future.

Chances from this PR included in upstream PR https://github.com/seek-oss/serverless-haskell/pull/189


Envoy main thread can deadlock itself

void DispatcherImpl::runPostCallbacks() {
  std::function<void()> callback;
  while (true) {
    {
      Thread::LockGuard lock(post_lock_);
      if (post_callbacks_.empty()) {
        return;
      }
      callback = post_callbacks_.front();
      post_callbacks_.pop_front();
    }
    callback();
  }
}

In DispatcherImpl::runPostCallbacks(), callback is declared outside the loop and assigned to on each iteration. Then we release the lock and call the callback, then repeat.
The problem is on the next iteration. We assign callback again. This causes the previous iteration callback to get destructed. If that lambda holds an object that gets destructed, the destructor is run while holding the post_lock_. If running the destructor causes some chain of events that result in post()ing back to the same thread, the thread will deadlock itself.
Callstack showing this:
#7  0x000000000092427d in absl::Mutex::Lock() ()
#8  0x0000000000678fa3 in Envoy::Thread::MutexBasicLockable::lock (this=0x38b6070) at bazel-out/k8-opt/bin/source/common/common/_virtual_includes/thread_lib/common/common/thread.h:45
#9  Envoy::Thread::LockGuard::LockGuard (lock=..., this=<synthetic pointer>) at bazel-out/k8-opt/bin/source/common/common/_virtual_includes/lock_guard_lib/common/common/lock_guard.h:103
#10 Envoy::Event::DispatcherImpl::post(std::function<void ()>) (this=0x38b6000, callback=...) at source/common/event/dispatcher_impl.cc:142
#11 0x000000000069f72e in Envoy::Stats::ThreadLocalStoreImpl::releaseScopeCrossThread (this=0x380a420, scope=scope@entry=0xcd876c0) at source/common/stats/thread_local_store.cc:139
#12 0x00000000006a09dd in Envoy::Stats::ThreadLocalStoreImpl::ScopeImpl::~ScopeImpl (this=0xcd876c0, __in_chrg=<optimized out>) at source/common/stats/thread_local_store.cc:173
#13 0x00000000006a0b41 in Envoy::Stats::ThreadLocalStoreImpl::ScopeImpl::~ScopeImpl (this=0xcd876c0, __in_chrg=<optimized out>) at source/common/stats/thread_local_store.cc:173
#14 0x00000000006eff83 in std::default_delete<Envoy::Stats::Scope>::operator() (this=<optimized out>, __ptr=<optimized out>) at /usr/include/c++/5/bits/unique_ptr.h:76
#15 std::unique_ptr<Envoy::Stats::Scope, std::default_delete<Envoy::Stats::Scope> >::~unique_ptr (this=0x6988068, __in_chrg=<optimized out>) at /usr/include/c++/5/bits/unique_ptr.h:236
#16 Envoy::Upstream::ClusterInfoImpl::~ClusterInfoImpl (this=0x6988000, __in_chrg=<optimized out>)
    at bazel-out/k8-opt/bin/source/common/upstream/_virtual_includes/upstream_includes/common/upstream/upstream_impl.h:309
#17 0x00000000006efff1 in Envoy::Upstream::ClusterInfoImpl::~ClusterInfoImpl (this=0x6988000, __in_chrg=<optimized out>)
    at bazel-out/k8-opt/bin/source/common/upstream/_virtual_includes/upstream_includes/common/upstream/upstream_impl.h:309
#18 0x00000000006efbea in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x1195bf80) at /usr/include/c++/5/bits/shared_ptr_base.h:150
#19 std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count (this=0x7650310, __in_chrg=<optimized out>) at /usr/include/c++/5/bits/shared_ptr_base.h:659
#20 std::__shared_ptr<Envoy::Upstream::ClusterInfo const, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr (this=0x7650308, __in_chrg=<optimized out>) at /usr/include/c++/5/bits/shared_ptr_base.h:925
#21 std::shared_ptr<Envoy::Upstream::ClusterInfo const>::~shared_ptr (this=0x7650308, __in_chrg=<optimized out>) at /usr/include/c++/5/bits/shared_ptr.h:93
#22 Envoy::Upstream::HostDescriptionImpl::~HostDescriptionImpl (__vtt_parm=0xc314e0 <VTT for Envoy::Upstream::HostImpl+8>, this=0x7650300, __in_chrg=<optimized out>)
    at bazel-out/k8-opt/bin/source/common/upstream/_virtual_includes/upstream_includes/common/upstream/upstream_impl.h:55
#23 Envoy::Upstream::HostImpl::~HostImpl (this=0x7650300, __in_chrg=<optimized out>, __vtt_parm=<optimized out>)
    at bazel-out/k8-opt/bin/source/common/upstream/_virtual_includes/upstream_includes/common/upstream/upstream_impl.h:122
#24 Envoy::Upstream::HostImpl::~HostImpl (this=0x7650300, __in_chrg=<optimized out>, __vtt_parm=<optimized out>)
    at bazel-out/k8-opt/bin/source/common/upstream/_virtual_includes/upstream_includes/common/upstream/upstream_impl.h:122
#25 0x0000000000462a72 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0xdb93d80) at /usr/include/c++/5/bits/shared_ptr_base.h:150
#26 0x0000000000734189 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count (this=0x10451e48, __in_chrg=<optimized out>) at /usr/include/c++/5/bits/shared_ptr_base.h:659
#27 std::__shared_ptr<Envoy::Upstream::Host, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr (this=0x10451e40, __in_chrg=<optimized out>) at /usr/include/c++/5/bits/shared_ptr_base.h:925
#28 std::shared_ptr<Envoy::Upstream::Host>::~shared_ptr (this=0x10451e40, __in_chrg=<optimized out>) at /usr/include/c++/5/bits/shared_ptr.h:93
#29 Envoy::Upstream::Outlier::DetectorImpl::<lambda()>::~<lambda> (this=0x10451e30, __in_chrg=<optimized out>) at source/common/upstream/outlier_detection_impl.cc:304
#30 std::_Function_base::_Base_manager<Envoy::Upstream::Outlier::DetectorImpl::notifyMainThreadConsecutiveError(Envoy::Upstream::HostSharedPtr, Envoy::Upstream::Outlier::EjectionType)::<lambda()> >::_M_destroy (__victim=...) at /usr/include/c++/5/functional:1726
#31 std::_Function_base::_Base_manager<Envoy::Upstream::Outlier::DetectorImpl::notifyMainThreadConsecutiveError(Envoy::Upstream::HostSharedPtr, Envoy::Upstream::Outlier::EjectionType)::<lambda()> >::_M_manager(std::_Any_data &, const std::_Any_data &, std::_Manager_operation) (__dest=..., __source=..., __op=<optimized out>) at /usr/include/c++/5/functional:1750
#32 0x0000000000678e50 in std::_Function_base::~_Function_base (this=0x7ffee8fbf070, __in_chrg=<optimized out>) at /usr/include/c++/5/functional:1830
#33 std::function<void ()>::~function() (this=0x7ffee8fbf070, __in_chrg=<optimized out>) at /usr/include/c++/5/functional:1974
#34 std::function<void ()>::operator=(std::function<void ()> const&) (__x=..., this=0x7ffee8fbf050) at /usr/include/c++/5/functional:2071
#35 Envoy::Event::DispatcherImpl::runPostCallbacks (this=0x38b6000) at source/common/event/dispatcher_impl.cc:172
#36 0x00000000008d9128 in event_process_active_single_queue (base=base@entry=0x38602c0, max_to_process=max_to_process@entry=2147483647, endtime=endtime@entry=0x0, activeq=<optimized out>) at event.c:1646
#37 0x00000000008d968f in event_process_active (base=0x38602c0) at event.c:1738
#38 event_base_loop (base=0x38602c0, flags=0) at event.c:1961
#39 0x0000000000643d1e in Envoy::Server::InstanceImpl::run (this=0x383e500) at source/server/server.cc:403
#40 0x000000000046bdf1 in Envoy::MainCommonBase::run (this=this@entry=0x3888168) at source/exe/main_common.cc:83

The fix is to put callback inside the loop so that it gets destructed at the end of every iteration, while we're not holding the lock.

Mea culpa -- I didn't think about taking locks during closure destruction when I refactored the loop that way. Thanks for tracking that down.


[SPARK-46976][PS] Implement DataFrameGroupBy.corr

What changes were proposed in this pull request?
Implement DataFrameGroupBy.corr
Why are the changes needed?
for pandas parity
https://pandas.pydata.org/docs/reference/api/pandas.core.groupby.DataFrameGroupBy.corr.html
Does this PR introduce any user-facing change?
yes
In [5]: pdf = pd.DataFrame({'A': [0, 0, 0, 1, 1, 2], 'B': [-1, 2, 3, 5, 6, 0], 'C': [4, 6, 5, 1, 3, 0]}, columns=['A', 'B', 'C'])

In [6]: pdf.groupby("A").corr()
Out[6]:
            B         C
A
0 B  1.000000  0.720577
  C  0.720577  1.000000
1 B  1.000000  1.000000
  C  1.000000  1.000000
2 B       NaN       NaN
  C       NaN       NaN

In [7]: psdf = ps.from_pandas(pdf)

In [8]: psdf.groupby("A").corr()

            B         C
A
0 B  1.000000  0.720577
  C  0.720577  1.000000
1 B  1.000000  1.000000
  C  1.000000  1.000000
2 B       NaN       NaN
  C       NaN       NaN

How was this patch tested?
added tests
Was this patch authored or co-authored using generative AI tooling?
no

LGTM after fixing the typo in doctest, thanks!

thanks for the reviews
merged to master


D403 not being automatically fixed

According to the pydocstyle section code D403 is fixable, but it does not get fixed for me using the vs code extension or command line
code
    @abstractproperty
    def features(self) -> Dict[str, Any]:
        """get features required for model inference and wrap in a dictionary"""

expected
I expected the first word in the docstring to be capitalized.
When I run flake8 it flags D403 on this line. when I run ruff either with the VS Code extension or on the command line via ruff check it does not flag this line and it does not auto fix it
ruff version
vs code extension v2023.16.0
ruff settings
"ruff.args": [
        "--line-length=100",
],

The D rules aren't enabled by default, is it possible that the D rules haven't been enabled at all for your project?
For example, if I run with --isolated, I can get Ruff to fix that violation:
❯ ruff check foo.py --isolated --select D403 --fix
Found 1 error (1 fixed, 0 remaining).

@charliermarsh oh I see I was misunderstanding the flags. select is what I should have been looking at instead of fixable. I was able to achieve the autofix with vs code by setting --extend-select=D403. If that looks right to you then I'll close this issue

Ahhh yes, sorry about that! It does sound right.


@trivial - remove unused logger

Description
Remove unused logger from product teaser impl.
Types of changes

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

Checklist:

[x] I have signed the Adobe Open Source CLA.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[x] I have read the CONTRIBUTING document.
[ ] I have added tests to cover my changes and the overall coverage did not decrease.
[x] All unit tests pass on CircleCi.
[x] I ran all tests locally and they pass.

Codecov Report

Merging #93 into master will decrease coverage by 0.02%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master      #93      +/-   ##
============================================
- Coverage     65.86%   65.83%   -0.03%
+ Complexity      215      214       -1
============================================
  Files            34       34
  Lines          1204     1203       -1
  Branches         84       84
============================================
- Hits            793      792       -1
  Misses          366      366
  Partials         45       45

Flag
Coverage Δ
Complexity Δ

#karma
93.61% <ø> (ø)
0 <ø> (ø)
:arrow_down:

#unittests
57.32% <ø> (-0.05%)
214 <ø> (-1)

Impacted Files
Coverage Δ
Complexity Δ

...nal/models/v1/productteaser/ProductTeaserImpl.java
10.41% <ø> (-1.83%)
6 <0> (-1)

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 19be6f1...b488a41. Read the comment docs.


Verify that EIP was actually associated.

Add functionality to check that the EIP was actually associated with the
desired instance. This is important because the EC2 API is eventually
consistent and receiving an HTTP 200 response from the association API call is
not a guarantee that the association will actually happen.
This verification is enabled by default but can be disabled with
--skip-verify.
By default, it will retry up to 10 times, sleeping 0.1 seconds after
each attempt, in order to give the EC2 API plenty of time to achieve
a result.
This allows aws-ec2-assign-elastic-ip to exit nonzero when there is a
race condition that causes EIP association to fail, for example because another
instance ran the script at the same time and won the race to assign the EIP.
Fixes: #24

Actually I am still encountering a race condition here, even with this patch.
My current hypothesis is that this is a boto bug. It appears that boto doesn't pass an AllowReassociation param even when it is set to false. This is problematic because in a VPC only account, AWS will automatically allow reassociation by default unless that param is provided and set to false.
https://github.com/boto/boto/blob/6c5b98861d726fdd5e05702972b14692e73e84f4/boto/ec2/connection.py#L1909-L1910
http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_AssociateAddress.html

AllowReassociation
[EC2-VPC] For a VPC in an EC2-Classic account, specify true to allow an Elastic IP address that is already associated with an instance or network interface to be reassociated with the specified instance or network interface. Otherwise, the operation fails. In a VPC in an EC2-VPC-only account, reassociation is automatic, therefore you can specify false to ensure the operation fails if the Elastic IP address is already associated with another resource.
Type: Boolean
Required: No

Hmm, yeah, that's annoying. Have you raised / found a bug / question to boto about this? I'm thinking we hold off mergning this until the boto issue is resolved. What do you think?

I don't use this script anymore but was having my own race and other verification problems so checked in to see how this script handles them.
Personally I believe that this PR doesn't actually solve anything.
AllowReassociation=False does work
The Boto source is the way it is because the AWS API defaults to false. If two instances race for the same Elastic IP and reassociation isn't allowed then a ClientError with a code of Resource.AlreadyAssociated will be raised.
Thus because this script doesn't allow reassociations (#13) there is no benefit to verifying with get_all_addresses / describe_addresses as done in this PR.
An association is not a remap
This is the real problem (for me at least): just because you've successfully associated with an Elastic IP doesn't mean it has been remapped and is your public IP yet.
You can verify this with the following code:
import boto3
import requests

md = requests.get('http://<IP_ADDRESS>/latest/dynamic/instance-identity/document').json()
ec2 = boto3.client('ec2', region_name=md['region'])
ec2.associate_address(InstanceId=md['instanceId'], AllocationId='YOUR-ALLOCATION-ID', AllowReassociation=True)
print(requests.get('https://api.ipify.org').text)

This will output your current IP and not the Elastic IP you just associated with.
This is a problem if you need a whitelisted IP to access a third party. There's no way to truly verify your public IP with the AWS API so you have to use a third party like ipify.org, whatismyip.com, etc. None of them seem to be backed by large companies so I don't know who to choose for the best privacy and reliability. Does anyone have any recommendations?

Sorry, I just realised that there probably is a bug in regards to AllowReassociation in Boto 2 but since I use Boto 3 I didn't run into it.
Also it would be prudent to explicitly set AllowReassociation to False for any EC2-VPC-only account holders. This is because while the EC2 pricing page says you're billed per remap a warning in the Boto 3 docs point out you're actually billed per successful association even if no remap takes place: https://boto3.readthedocs.io/en/latest/reference/services/ec2.html#EC2.Client.associate_address
So if there happened to be a bug in this script (there's not currently one that I am aware of) and someone was using this script  in a 1 minute cronjob they could be charged of $6 per hour per instance.

The Boto source is the way it is because the AWS API defaults to false.

The AWS API defaults to AllowReassociation=True if it's not provided in the API call.

Sorry, I just realised that there probably is a bug in regards to AllowReassociation in Boto 2 but since I use Boto 3 I didn't run into it.

Right, this is a bug in Boto 2. Boto 3 does not have this problem since it explicitly sets AllowReassociation=True by default.
I made a fix for boto2 but never got around to writing tests and submitting it. https://github.com/ab/boto/commit/239013bfef349763ac9ef73cc67bba0e0eb4adda
It might be easier to just upgrade this script to use boto3 instead.
In any case, the post hoc verification done in this PR isn't a good way to handle it, so I'm closing this.
For the problem of the actual mapping of the EIP being eventually consistent and taking a while, I personally just add a sleep ~20s to hopefully give EC2 enough time to map the EIP before making network requests.

The AWS API defaults to AllowReassociation=True if it's not provided in the API call.

It seems to be true for new AWS accounts and false for pre-2014 accounts even if you're actually using a VPC.
So this script will behave differently depending on the age of your AWS account. Upgrading to boto3 and explicitly setting AllowReassociation to false is probably the only fix.

@brodygov I discovered that there actually is https://checkip.amazonaws.com which you can poll instead of blindly sleeping for 20s.

Ah thanks for that, I didn't know about checkip.amazonaws.com.


[WebView] Is addJavascriptInterface supported?

Description
Trying to implement addJavascriptInterface currently.  Thought I'd ask if this is supported as i'm not seeing any activity and spotted https://github.com/google/accompanist/issues/1150
Steps to reproduce
Expected behavior
Additional context

It's meant to be a simple wrapper so I think if you need something super custom you will have more luck forking this wrapper and adding any functionality you need yourself but just a javascript interface should work I would think. It's not tested but if you just add it in onCreated I would think it would work.
WebView(
   onCreated = { it.addJavascriptInterface(MyInterface()) }
)


Fix jekyll to listen to any interface so it works in container

currently the web pages won't work without podman --net host option. I was wondering why is that. It seems that by default the jekyll listens to localhost, <IP_ADDRESS>, and thus doesn't get the incoming traffic. I changed the makefile so it listens to any interface. Now it works as proper container without the host networking.
I wanted to fix this as I spent some time troubleshooting jekyll for this reason. Should not break anything if run outside of container either. I also removed the ssh line, as I don't see any need for it.

Thanks @ikke-t!


Update release date for v0.11.1

What this PR does / why we need it:
Originally, we have planned to release v0.11.1 yesterday, but we have decided to move it for today. This PR updates the release date in the changelog.
Does this PR introduce a user-facing change?:
NONE

/assign @kron4eg

/cherrypick release/v0.11


H7121 Air Purifier Modes Broken

Govee Device SKU
H7121
Govee2MQTT Version
2024.01.14-3c7b22d4
Describe the issue
After a recent update to govee2mqtt (unclear which one, but within the last few days), my two H7121 air purifiers are no longer responding to mode calls via Home Assistant.  I notice that there recently was a "Mode" control added for this device, which previously only had number-based "Parameter" controls for the 4 modes (Sleep, Low, Medium, High).  Previously, I simply had to make a service call with any number to the Parameter for a given mode in order to switch to that mode.  Now, neither that path, nor the new Mode dropdown will actually change the mode.  Interestingly, the Power Switch can still be called successfully.  govee2mqtt log shows the following error for any attempt at a mode change:
...ERROR govee::service::hass] While dispatching Message { topic: "gv2mqtt/76A29C04A0A68B69/set-work-mode", payload: "Sleep", qos: AtMostOnce, retain: false, mid: 0 }: sku H7121 has no codec for type TypeId { t:<PHONE_NUMBER>73804379596961912979558902708 }
Startup Diagnostics
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
GOVEE_API_KEY=REDACTED
GOVEE_MQTT_HOST=core-mosquitto
GOVEE_EMAIL=REDACTED
GOVEE_PASSWORD=REDACTED
GOVEE_MQTT_PASSWORD=REDACTED
GOVEE_MQTT_USER=addons
GOVEE_MQTT_PORT=1883
++ cd /app
++ exec /app/govee serve
[2024-01-15T11:13:43 INFO  govee::commands::serve] Starting service. version 2024.01.14-3c7b22d4
[2024-01-15T11:13:43 INFO  govee::commands::serve] Querying platform API for device list
[2024-01-15T11:13:44 INFO  govee::commands::serve] Querying undocumented API for device + room list
[2024-01-15T11:13:44 INFO  govee::service::iot] Connected to IoT: CONNACK code 0: Connection Accepted.
[2024-01-15T11:13:44 INFO  govee::service::iot] IoT (re)connected with status CONNACK code 0: Connection Accepted.
[2024-01-15T11:13:44 INFO  govee::commands::serve] Starting LAN discovery
[2024-01-15T11:13:44 INFO  govee::commands::serve] Waiting 10 seconds for LAN API discovery
[2024-01-15T11:13:54 INFO  govee::commands::serve] Devices returned from Govee's APIs
[2024-01-15T11:13:54 INFO  govee::commands::serve] Under Bed Lights (82:CF:A4:C1:38:AC:7F:CA H6144)
[2024-01-15T11:13:54 INFO  govee::commands::serve]   Platform API: devices.types.light. supports_rgb=true supports_brightness=true
[2024-01-15T11:13:54 INFO  govee::commands::serve]                 color_temp=Some((2000, 9000)) segment_rgb=Some(0..15)
[2024-01-15T11:13:54 INFO  govee::commands::serve]   Undoc: room=None supports_iot=true ble_only=false
[2024-01-15T11:13:54 INFO  govee::commands::serve]
[2024-01-15T11:13:54 INFO  govee::commands::serve] Wall Bar (7A:F7:C8:39:37:39:4C:53 H6062)
[2024-01-15T11:13:54 INFO  govee::commands::serve]   LAN API: ip=<IP_ADDRESS>
[2024-01-15T11:13:54 INFO  govee::commands::serve]   Platform API: devices.types.light. supports_rgb=true supports_brightness=true
[2024-01-15T11:13:54 INFO  govee::commands::serve]                 color_temp=Some((2000, 9000)) segment_rgb=Some(0..28)
[2024-01-15T11:13:54 INFO  govee::commands::serve]   Undoc: room=None supports_iot=true ble_only=false
[2024-01-15T11:13:54 INFO  govee::commands::serve]   Quirk { sku: "H6062", icon: "mdi:led-strip-variant", supports_rgb: true, supports_brightness: true, color_temp_range: Some((2000, 9000)), avoid_platform_api: false, ble_only: false, lan_api_capable: true, device_type: Light, platform_temperature_sensor_units: None, platform_humidity_sensor_units: None, iot_api_supported: true }
[2024-01-15T11:13:54 INFO  govee::commands::serve]
[2024-01-15T11:13:54 INFO  govee::commands::serve] TV Lights (82:67:A4:C1:38:41:33:2B H6199)
[2024-01-15T11:13:54 INFO  govee::commands::serve]   Platform API: devices.types.light. supports_rgb=true supports_brightness=true
[2024-01-15T11:13:54 INFO  govee::commands::serve]                 color_temp=Some((2000, 9000)) segment_rgb=Some(0..15)
[2024-01-15T11:13:54 INFO  govee::commands::serve]   Undoc: room=None supports_iot=true ble_only=false
[2024-01-15T11:13:54 INFO  govee::commands::serve]
[2024-01-15T11:13:54 INFO  govee::commands::serve] Bedroom Ceiling Light (9c:81:7c:a6:b0:14:4f:c7 H6003)
[2024-01-15T11:13:54 INFO  govee::commands::serve]   Platform API: devices.types.light. supports_rgb=true supports_brightness=true
[2024-01-15T11:13:54 INFO  govee::commands::serve]                 color_temp=Some((2000, 9000)) segment_rgb=None
[2024-01-15T11:13:54 INFO  govee::commands::serve]   Undoc: room=None supports_iot=true ble_only=false
[2024-01-15T11:13:54 INFO  govee::commands::serve]
[2024-01-15T11:13:54 INFO  govee::commands::serve] Downstairs Purifier (76:A2:9C:04:A0:A6:8B:69 H7121)
[2024-01-15T11:13:54 INFO  govee::commands::serve]   Platform API: devices.types.air_purifier. supports_rgb=false supports_brightness=false
[2024-01-15T11:13:54 INFO  govee::commands::serve]                 color_temp=None segment_rgb=None
[2024-01-15T11:13:54 INFO  govee::commands::serve]   Undoc: room=None supports_iot=true ble_only=false
[2024-01-15T11:13:54 INFO  govee::commands::serve]
[2024-01-15T11:13:54 INFO  govee::commands::serve] Upstairs Purifier (28:43:9C:04:A0:A4:83:5D H7121)
[2024-01-15T11:13:54 INFO  govee::commands::serve]   Platform API: devices.types.air_purifier. supports_rgb=false supports_brightness=false
[2024-01-15T11:13:54 INFO  govee::commands::serve]                 color_temp=None segment_rgb=None
[2024-01-15T11:13:54 INFO  govee::commands::serve]   Undoc: room=None supports_iot=true ble_only=false
[2024-01-15T11:13:54 INFO  govee::commands::serve]
[2024-01-15T11:13:54 INFO  govee::service::http] http server addr is <IP_ADDRESS>:8056
[2024-01-15T11:14:00 INFO  govee::service::hass] Wait 4.6s for hass to settle on 92 entity configs
[2024-01-15T11:14:04 INFO  govee::service::hass] MQTT connected with status=CONNACK code 0: Connection Accepted.
Additional Logs
...ERROR govee::service::hass] While dispatching Message { topic: "gv2mqtt/76A29C04A0A68B69/set-work-mode", payload: "Sleep", qos: AtMostOnce, retain: false, mid: 0 }: sku H7121 has no codec for type TypeId { t:<PHONE_NUMBER>73804379596961912979558902708 }
Home Assistant Logs
No response
Anything else?
No response

Should now be fixed in latest version!

Thanks, can confirm it's working once again (now using select.select_option to set the mode)!


fix: do not consider provisioners without a provider

Fixes #N/A
Description
If none of the provisioners in the cluster had a nodePool defined, users could see the following message when a pod fails to schedule, when Karpenter should either log or return here.
Similarly, we should be able to opt these provisioners out of any scheduling simulations, since we know that the GetInstanceTypes() call will fail.
ERROR	controller.provisioner	Could not schedule pod, all available instance types exceed limits for provisioner: "default"

How was this change tested?

make presubmit and local application

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

4 of 10 (40.0%)  changed or added relevant lines in 2 files are covered.
10 unchanged lines in 3 files lost coverage.
Overall coverage decreased (-0.1%) to 78.963%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

pkg/cloudprovider/fake/cloudprovider.go
4
6
66.67%

pkg/controllers/provisioning/provisioner.go
0
4
0.0%

Files with Coverage Reduction
New Missed Lines
%

pkg/controllers/provisioning/scheduling/topology.go
2
86.49%

pkg/controllers/provisioning/scheduling/topologygroup.go
2
96.75%

pkg/controllers/deprovisioning/pdblimits.go
6
76.47%

Totals

Change from base Build<PHONE_NUMBER>:
-0.1%

Covered Lines:
8303

Relevant Lines:
10515

💛  - Coveralls


Add icons in Footer to show Build with tech stacks

Description
Add icons on the footer for the following technologies with their respective links:

React
Gatsby
Github
Graphql

Add a text Made with followed by icons.
Acceptance criteria

The icons should be visible in both dark and light themes
The layout should have proper design. (Explore some examples)

I want to work on this but can you describe footer of which page? @subeshb1

The footer is as single react component. If you change it it will appear in every page

Okay got it. Can you assign this to me?

ok

If it doesn't get done please assign it to me!

Sure @xdebbie . Meanwhile if you havent done you can contribute to #74

Hi @Kritimakaushal any updates on this?

Hey @subeshb1 Yes I am doing it. Just some more time.

Yes sure @Kritimakaushal. Take as much time as you like. Be sure to post updates on any challenges you come across or any help you require.

Sure @subeshb1 Thank you for willing to help

I don't manage to deploy it though, when I run gatsby develop I run into several errors

@subeshb1 Can you please tell more about the layout. What all to add?

@xdebbie Did you run npm install ? What issues did you face?

@Kritimakaushal Any design would do. It's your choice. Make it attractive 😉

@xdebbie It looks like you need to install Xcode from app store first

@subeshb1 I am not able to resolve this

Hi @Kritimakaushal it's ok if you find it difficult to address this issue. You can always delegate it to someone else or me. If you want to continue please let me know or I'll assign it to someone else.

Okay @subeshb1 please assign it to others. I think I need more practice. Thanks for the opportunity well😊.

@Kritimakaushal No problem. Keep up the good work!

@xdebbie The issue is up for a new assignee if you are looking to do it


Operator won't work in 0.2.1

With the new 0.2.1 release of the Great Expectations Operator we've been getting the below error. We reverted to 0.2.0 and the error went away.
Error:
[2022-11-17, 01:58:38 UTC] {{abstractoperator.py:175}} ERROR - Failed to resolve template field 'data_context_root_dir'
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/airflow/models/abstractoperator.py", line 173, in resolve_template_files
    setattr(self, field, env.loader.get_source(env, content)[0])  # type: ignore
  File "/usr/local/lib/python3.9/site-packages/jinja2/loaders.py", line 218, in get_source
    raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound: /usr/src/app/great_expectations

Code:
    ge_data_unit_test_op = GreatExpectationsOperator(
        task_id="test_package",
        data_context_root_dir=ge_root_dir,
        checkpoint_name=test_package,
        checkpoint_kwargs={
            "batch_request": {
                "datasource_name": TARGET_PROJECT_ID,
                "data_asset_name": data_asset_name,
            }
        },
    )

Try with the following, we will fix it in 0.2.2
class CustomGreatExpectationsOperator:
      template_fields = (
        "run_name",
        "conn_id",
        "checkpoint_name",
        "checkpoint_kwargs",
        "query_to_validate"
    )

    ge_data_unit_test_op = CustomGreatExpectationsOperator(
        task_id="test_package",
        data_context_root_dir=ge_root_dir,
        checkpoint_name=test_package,
        checkpoint_kwargs={
            "batch_request": {
                "datasource_name": TARGET_PROJECT_ID,
                "data_asset_name": data_asset_name,
            }
        },
    )


Dragging does not work correctly with new data which are added after initial initialization

Hi.
First of all thank you for this library and your work.
Unfortunately I have one thing, which does not work.
In your demos and in my code below we have initial data, which works ok from the beginning, but I have a problem when data changes dynamically.
In the demo below there are 2 playlists (one empty - Electro and Slow - with 3 nested tracks).
I need to copy these 3 tracks to the empty playlist. Once tracks are copied to the empty playlist (Electro), there is no smooth 'sliding' effect when you drag any track in this Electro playlist and tracks not always change its position, however dragging continues to be ok in the Slow playlist.
Demo\Sandbox
https://codesandbox.io/s/zqv9m19v8l
I found that the problem is with the first :key (for playlists). If replace :key="playlistObj.playlistTitle" by :key="Math.floor(Math.random() * (100 - 1)) + 1" it starts to work. Any ideas?
Thanks a lot!

It was necessary to add
<div class="draggable-item">
  ...
</div>

Hi @TitanFighter,
It is fixed in v 0.1.6.
You can check it here. I forked your linked and updated the version.
https://codesandbox.io/s/nwyzv6qv2p
Can you please verify?

Thanks a lot! Works perfect!


AssetCanisterApiClient.GetAsync - (Download Asset) is only returning first chunk

When using the Download Asset as shown in the /samples/Sample.CLI project (which is using the GetAsync(string key, List<string> acceptEncodings) of the AssetCanister) I only get the bytes of the first chunk.
How can I download the whole file?
I noticed there is a GetChunkAsync method, but I don't know how many chunks are there in total for each file. Also I don't think that the user of this package should need to do this by himself.

Hmm. Not super familiar with the API itself. I auto generated the client with the ICP.NET generator, then threw in the upload via chunks.
Based on the docs it seems that if there are multiple chunks, youll have to use the get_chunk for the additional chunks.
Ill try to create a single method that will detect if there are multiple chunks and pull them down
get: (record {
    key: Key;
    accept_encodings: vec text;
  }) -> (record {
    content: blob; // may be the entirety of the content, or just chunk index 0
    content_type: text;
    content_encoding: text;
    sha256: opt blob; // sha256 of entire asset encoding, calculated by dfx and passed in SetAssetContentArguments
    total_length: nat; // all chunks except last have size == content.size()
  }) query;

  // if get() returned chunks > 1, call this to retrieve them.
  // chunks may or may not be split up at the same boundaries as presented to create_chunk().
  get_chunk: (record {
    key: Key;
    content_encoding: text;
    index: nat;
    sha256: opt blob;  // sha256 of entire asset encoding, calculated by dfx and passed in SetAssetContentArguments
  }) -> (record { content: blob }) query;

Im adding a new helper method DownloadAssetAsync that will get all the chunks if there are multiple

Fixed in 6.1.0

@Gekctek I tested with new version and got the following exception when trying to download a text file (encoding=UTF-8) from AssetCanister
EdjCase.ICP.Agent.QueryRejectedException: Query was rejected. Code: CanisterError, Message: IC0503: Canister yaku6-4iaaa-aaaab-qacfa-cai trapped explicitly: no such encoding, ErrorCode: IC0503
   at EdjCase.ICP.Agent.Responses.QueryResponse.ThrowOrGetReply()
   at EdjCase.ICP.Agent.Standards.AssetCanister.AssetCanisterApiClient.GetAsync(String key, List`1 acceptEncodings)
   at EdjCase.ICP.Agent.Standards.AssetCanister.AssetCanisterApiClient.DownloadAssetAsync(String key, Int32 maxConcurrency)
   at AssetContainerClient.ICPConnector.DownloadDocument(String identifier) in D:\Code\Dfinity\AssetContainerClient\ICPConnector.cs:line 31
   at AssetContainerClient.Program.DownloadDocument(IICPConnector connector) in D:\Code\Dfinity\AssetContainerClient\Program.cs:line 99
   at AssetContainerClient.Program.Main(String[] args) in D:\Code\Dfinity\AssetContainerClient\Program.cs:line 57

@stefan-adna hmmm. Your content encoding is set to UTF-8?
I believe it should be one of these: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding
I changed up the method to allow for overriding the Accept-Encoding if needed in
https://github.com/BoomDAO/ICP.NET/pull/127
And you will be able to see what encoding was returned
But i think you should probably use on of the default encodings vs UTF-8

try https://github.com/BoomDAO/ICP.NET/releases/tag/6.1.1