[DRAFT] Added Lightbulb service to Fanv2

I added Lightbulb service to Fanv2 and it almost works. The only issue is that with every consequent change of Lightbulb in HomeKit the number of requests to Tuya doubles and it starts to fail with an error:
This callback function has already been called by someone else; it can only be called one time.

Full log for the second change (two requests instead of one for light and brightness):
TuyaOpenAPI request: method = post, endpoint = https://openapi.tuyaus.com, path = /v1.0/devices/850007548caab5ebd0bc/commands, params = null, body = {"commands":[{"code":"bright_value","value":326}]}, headers = {"t":"1628100416778","client_id":"***","nonce":"***","Signature-Headers":"client_id","sign":"***","sign_method":"HMAC-SHA256","access_token":"***","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.3.1"}
TuyaOpenAPI request: method = post, endpoint = https://openapi.tuyaus.com, path = /v1.0/devices/850007548caab5ebd0bc/commands, params = null, body = {"commands":[{"code":"bright_value","value":326}]}, headers = {"t":"1628100416779","client_id":"***","nonce":"***","Signature-Headers":"client_id","sign":"***","sign_method":"HMAC-SHA256","access_token":"***","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.3.1"}
TuyaOpenAPI request: method = post, endpoint = https://openapi.tuyaus.com, path = /v1.0/devices/850007548caab5ebd0bc/commands, params = null, body = {"commands":[{"code":"light","value":true}]}, headers = {"t":"1628100416779","client_id":"***","nonce":"***","Signature-Headers":"client_id","sign":"***","sign_method":"HMAC-SHA256","access_token":"***","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.3.1"}
TuyaOpenAPI request: method = post, endpoint = https://openapi.tuyaus.com, path = /v1.0/devices/850007548caab5ebd0bc/commands, params = null, body = {"commands":[{"code":"light","value":true}]}, headers = {"t":"1628100416780","client_id":"***","nonce":"***","Signature-Headers":"client_id","sign":"***","sign_method":"HMAC-SHA256","access_token":"***","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.3.1"}
TuyaOpenAPI response: {"result":true,"success":true,"t":1628100417076} path = /v1.0/devices/850007548caab5ebd0bc/commands
TuyaOpenAPI response: {"result":true,"success":true,"t":1628100417078} path = /v1.0/devices/850007548caab5ebd0bc/commands
TuyaOpenAPI response: {"result":true,"success":true,"t":1628100417080} path = /v1.0/devices/850007548caab5ebd0bc/commands
[SET][Master Bedroom Lights & Fan] Characteristic Error: Error: This callback function has already been called by someone else; it can only be called one time.
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:6:13
    at /Users/sviatoslavmankivskyi/Projects/tuya-homebridge/lib/fanv2_accessory.js:155:11
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:23763) UnhandledPromiseRejectionWarning: Error: This callback function has already been called by someone else; it can only be called one time.
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:6:13
    at /Users/sviatoslavmankivskyi/Projects/tuya-homebridge/lib/fanv2_accessory.js:159:11
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:23763) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:23763) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
TuyaOpenAPI response: {"result":true,"success":true,"t":1628100417098} path = /v1.0/devices/850007548caab5ebd0bc/commands
[SET][Master Bedroom Lights & Fan] Characteristic Error: Error: This callback function has already been called by someone else; it can only be called one time.
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:6:13
    at /Users/sviatoslavmankivskyi/Projects/tuya-homebridge/lib/fanv2_accessory.js:155:11
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:23763) UnhandledPromiseRejectionWarning: Error: This callback function has already been called by someone else; it can only be called one time.
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:6:13
    at /Users/sviatoslavmankivskyi/Projects/tuya-homebridge/lib/fanv2_accessory.js:159:11
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:23763) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
TuyaOpenMQ onMessage: topic = cloud/token/in/fcc6352002be94a08fe364b7f5ab439b, message = {"data":{"dataId":"6deafac7-2916-47cc-bcab-13ec573f39ed","devId":"850007548caab5ebd0bc","productKey":"ipyqwvhvzzjezv35","status":[{"9":true,"code":"light","t":"1628100416","value":true}]},"protocol":4,"pv":"2.0","sign":"***","t":1628100416}
TuyaOpenMQ onMessage: topic = cloud/token/in/fcc6352002be94a08fe364b7f5ab439b, message = {"data":{"dataId":"1411a283-56b4-4628-9e0b-abff359a12e0","devId":"850007548caab5ebd0bc","productKey":"ipyqwvhvzzjezv35","status":[{"10":326,"code":"bright_value","t":"1628100416","value":326}]},"protocol":4,"pv":"2.0","sign":"***","t":1628100416}
TuyaOpenMQ onMessage: topic = cloud/token/in/fcc6352002be94a08fe364b7f5ab439b, message = {"data":{"dataId":"133a5692-88df-4c6a-b899-33cff32995b2","devId":"850007548caab5ebd0bc","productKey":"ipyqwvhvzzjezv35","status":[{"9":true,"code":"light","t":"1628100416","value":true}]},"protocol":4,"pv":"2.0","sign":"***","t":1628100416}
TuyaOpenMQ onMessage: topic = cloud/token/in/fcc6352002be94a08fe364b7f5ab439b, message = {"data":{"dataId":"f5ce9721-2e94-41cd-82af-0f913ad87344","devId":"850007548caab5ebd0bc","productKey":"ipyqwvhvzzjezv35","status":[{"10":326,"code":"bright_value","t":"1628100416","value":326}]},"protocol":4,"pv":"2.0","sign":"***","t":1628100416}

I have no ideas left what could be the reason. Please help!

@Hanh94 Could you please take a look at the approach here? Also you may have an idea what's wrong with it?


-XX:+CMSClassUnloadingEnabled Breaks Service

This service fails to start if -XX:+CMSClassUnloadingEnabled is part of the Java arguments. I'm guessing this is related to the new Java 16 requirement but I don't really know much about Java. I figured this out (after using a completely different java command line to run this service - https://linuxconfig.org/how-to-setup-minecraft-server-on-ubuntu-18-04-bionic-beaver-linux) by selectively removing arguments until I figured out that particular one broke execution.

This is for memory optimization, So if it breaks in a newer version of Java it is good to know about this.
What version of Java are you using exactly?

These are the ones I have installed though I'm pretty confident it's the Java 16 ones that are at issue. BTW I'm running Ubuntu 20.04.2.
ii  openjdk-11-jre-headless:amd64        11.0.11+9-0ubuntu2~20.04          amd64        OpenJDK Java runtime, using Hotspot JIT (headless)
ii  openjdk-16-jdk-headless:amd64        16.0.1+9-1~20.04                  amd64        OpenJDK Development Kit (JDK) (headless)
ii  openjdk-16-jre-headless:amd64        16.0.1+9-1~20.04                  amd64        OpenJDK Java runtime, using Hotspot JIT (headless)
ii  openjdk-8-jre-headless:amd64         8u292-b10-0ubuntu1~20.04          amd64        OpenJDK Java runtime, using Hotspot JIT (headless)

On https://wiki.openjdk.java.net/display/zgc/Main#Main-JDK16 it is stated:
JDK 11
Initial version of ZGC
Does not support class unloading (using -XX:+ClassUnloading has no effect)
JDK 12
Support for concurrent class unloading
Further pause time reductions
On https://docs.oracle.com/en/java/javase/11/tools/java.html is stated:
Enables class unloading when using the concurrent mark-sweep (CMS) garbage collector. This option is enabled by default. To disable class unloading for the CMS garbage collector, specify -XX:-CMSClassUnloadingEnabled.
In conclusion the argument -XX:+CMSClassUnloadingEnabled seems to be for version 10 or lower as well as for the CMS garbage collector only.. At version 11 and above the ZGC garbage collector is used. So using this argument should result in a error message and process termination.
Admittedly I myself don't know the reason why it is included in the first place. But I am sure a pull request would be welcome for future peeps.

I'm happy to help here but I'm not very experienced in Github. Can you point me to what I need to do?

There probably need to be a lot of changes in order to make this repo jdk 16 compatible. I rather suggest, use jdk 8 or 11. Since this seem to be the supported versions. You seem to have 8 installed. Otherwise, check out https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request. Though admittedly it is going to be a lot of work that way (community driven projects and all.)

Thank you! I thought that Minecraft 1.17+ required Java 16 at a minimum, though? From what I understand anything less won't be an option.

From: Blenderpony @.>
Sent: Thursday, June 17, 2021 1:33 PM
To: agowa338/MinecraftSystemdUnit @.>
Cc: JdeFalconr @.>; Author @.>
Subject: Re: [agowa338/MinecraftSystemdUnit] -XX:+CMSClassUnloadingEnabled Breaks Service (#30)
There probably need to be a lot of changes in order to make this repo jdk 16 compatible. I rather suggest, use jdk 8 or 11. Since this seem to be the supported versions. You seem to have 8 installed. Otherwise, check out https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-requesthttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.github.com%2Fen%2Fgithub%2Fcollaborating-with-pull-requests%2Fproposing-changes-to-your-work-with-pull-requests%2Fcreating-a-pull-request&data=04|01||5cf0a385152a4ebba57408d931cf3355|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637595588249030196|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=I3fw5hNnPCJlUT8%2FR3GgPWjsT0cfxo7NYnn5ZZKA82E%3D&reserved=0. Though admittedly it is going to be a lot of work that way (community driven projects and all.)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fagowa338%2FMinecraftSystemdUnit%2Fissues%2F30%23issuecomment-863545805&data=04|01||5cf0a385152a4ebba57408d931cf3355|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637595588249040194|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=j%2FncPJ2ZdzXyMnatgxQbL61xDtGboUlegNaNpTP2FPk%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAG2WHI6XEZG5Q7AYJ2VQBP3TTJL2PANCNFSM46R3SZZA&data=04|01||5cf0a385152a4ebba57408d931cf3355|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637595588249050187|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=sdUuWlahQpaA9j6p0T9c5mh3EXsPSqKPMG7%2BagCslEY%3D&reserved=0.


Add PyPi Metadata

from distutils.core import setup
setup(
  name = 'YOURPACKAGENAME',         # How you named your package folder (MyLib)
  packages = ['YOURPACKAGENAME'],   # Chose the same as "name"
  version = '0.1',      # Start with a small number and increase it with every change you make
  license='MIT',        # Chose a license from here: https://help.github.com/articles/licensing-a-repository
  description = 'TYPE YOUR DESCRIPTION HERE',   # Give a short description about your library
  author = 'YOUR NAME',                   # Type in your name
  author_email =<EMAIL_ADDRESS>     # Type in your E-Mail
  url = 'https://github.com/user/reponame',   # Provide either the link to your github or to your website
  download_url = 'https://github.com/user/reponame/archive/v_01.tar.gz',    # I explain this later on
  keywords = ['SOME', 'MEANINGFULL', 'KEYWORDS'],   # Keywords that define your package best
  install_requires=[            # I get to this in a second
          'validators',
          'beautifulsoup4',
      ],
  classifiers=[
    'Development Status :: 3 - Alpha',      # Chose either "3 - Alpha", "4 - Beta" or "5 - Production/Stable" as the current state of your package
    'Intended Audience :: Developers',      # Define that your audience are developers
    'Topic :: Software Development :: Build Tools',
    'License :: OSI Approved :: MIT License',   # Again, pick a license
    'Programming Language :: Python :: 3',      #Specify which pyhton versions that you want to support
    'Programming Language :: Python :: 3.4',
    'Programming Language :: Python :: 3.5',
    'Programming Language :: Python :: 3.6',
  ],
)

You should add readme field to Cargo.toml, maturin will take care it then.

@messense , it has been fixed now(https://pypi.org/project/robyn/). Thank you! 😄

BTW, maturin will support PEP 621 in the next version so that you can specify metadata in pyproject.toml.


New account process incorrectly populates codeowners file

Expected Behavior
From our guidance on creating new accounts for customers the codeowners key has a value of [""] which should result in the previous behaviour before this field was introduced being followed. EG. For every github-team in the application environments, these teams should be represented in the CODEOWNERS file.
Actual Behavior
When we set codeowners: [""] as defined in our example, instead of ignoring this field the CODEOWNERS file is populated like so:
/terraform/environments/$example-application @ministryofjustice/ @ministryofjustice/modernisation-platform

Steps to Reproduce the Problem
See this application json: https://github.com/ministryofjustice/modernisation-platform/blob/54474cf47a198b0029882e23cc55a69d37e99727/environments/genesys-call-centre-data.json
And this version of the modernisation-platform-environments CODEOWNERS file: https://github.com/ministryofjustice/modernisation-platform-environments/blob/aebfcdb8b292819d415988d3b1e239dd375ffd6d/.github/CODEOWNERS
The relevant script should be this: https://github.com/ministryofjustice/modernisation-platform/blob/36e3d9185ae2bfd39c17c94f337e40b7ccfae0cf/scripts/provision-member-directories.sh#L138
Version
No response
Modules
No response
Account
No response

I've had a quick look at the code and it looks like this may be the issue. If there's no codeowners it looks like it defaults to the modernisation-platform ID.
if [ -n "$codeowners" ]; then
echo "Adding $directory $codeowners@ministryofjustice/modernisation-platform  to codeowners"
echo "$directory $codeowners@ministryofjustice/modernisation-platform" >> $codeowners_file
# otherwise, use the github_slugs array
else
echo "Adding $directory $github_slugs@ministryofjustice/modernisation-platform to codeowners"
echo "$directory $github_slugs@ministryofjustice/modernisation-platform" >> $codeowners_file
fi
Going to seek clarification on the channel.

Based on my chatgpt information I can find the missing codeowners using this code
Read the CODEOWNERS file, filter out comments and empty lines
codeowners_entries=$(grep -v -e '^#' -e '^$' ${codeowners_file})
Find entries with missing or blank owners
missing_codeowners=$(echo "${codeowners_entries}" | awk '$2 == "" {print $1}')
awk '$2 == "" {print $1}' identifies entries where the owner field is empty.
These entries are printed as paths with missing code owners.
All of the above may be helpful but will need to be tested.

Raised a PR but the team aren't willing to approve. I will remove it and see if I can correct with another change - Ewa has suggested "Instead why don’t you flip the logic (don’t check if the string is populated, but check if the string is empty or unset)? " but I have a feeling the code "if [ -n "$codeowners" ]; then" already does that, sort of.

I put a PR up with proposed changes #7496
After chatting to person who raised it I found it was only in one place so I raised a call to amend the documentation #7500

@SteveLinden - I've had a look today and added a comment to the PR. I'll repeat it here though...
When I tried running https://github.com/ministryofjustice/modernisation-platform/pull/7496 locally it made more changes to the CODEOWNERS file than expected. In my view the ideal scenario is that we update the script and re-run it so that the only change it would make is to the error on the /terraform/environments/genesys-call-centre-data line.
I've found a more succinct way of altering the if statement here
if [ -n "$codeowners" ] && [ "$codeowners" != "@ministryofjustice/ " ]; then
I found that on this line where $codeowners is defined, the JQ is appending @ministryofjustice/ to any values in .codeowners[] which means that rather than $codeowners being a null value it is actually given a value of @ministryofjustice/ and so the logic was adding that to the file.
I tested it locally and it worked as expected. I can show you that and help you to try running it locally.

I just tried this suggestion from @ASTRobinson https://mojdt.slack.com/archives/C013RM6MFFW/p1720713676525369?thread_ts=1720710968.252469&cid=C013RM6MFFW
codeowners=$(jq -r 'try (.codeowners[] | select(length > 0) | "@ministryofjustice/" + .)' ${environment_json_dir}/${application_name}.json | sort | uniq | tr '\n' ' ')
It's better than my suggestion above as it sorts the issue at it's root cause e.g. doesn't populate the value of codeowners with a spurious value and saves having to alter the logic in the if statement.

After discussing with Rich this will only update one record - the one with the issue.
Based on this it appears to amended code will work correctly.
I have updated the PR (above) with the amended code.

Made the change listed above and the PR was successfully merged.
Now I will amend the documentation to make it clearer what should be used. It will not cause an impact if the "codeowners": [""], is used


Fix for typescript errors during build

Leaving this here for anyone else trying to get this to build in 2020. I'm an npm newbie, so it took me a while to figure it out.

The code directory needs to be explicitly renamed to keymapceditor rather than keymapceditor-vsc.

vscode must be explicitly installed into the project directory, e.g. npm install vscode (unusual for me, coming from typical gcc compilation experience).

Lastly, to get it to build without code errors, had to force downgrade typescript from v4.0.2 and node from latest (iirc v14.0.2) to get it to compile:

npm install --save<EMAIL_ADDRESS>npm install --save<EMAIL_ADDRESS>
as the typescript run (tsc -p ./) was throwing these errors:
node_modules/@types/node/index.d.ts:164:11 - error TS2300: Duplicate identifier 'IteratorResult'.

164 interface IteratorResult<T> { }
              ~~~~~~~~~~~~~~

  ../../../../usr/local/lib/node_modules/typescript/lib/lib.es2015.iterable.d.ts:41:6
    41 type IteratorResult<T, TReturn = any> = IteratorYieldResult<T> | IteratorReturnResult<TReturn>;
            ~~~~~~~~~~~~~~
    'IteratorResult' was also declared here.

Build environment: macOS 10.14.6 and npm v6.14.7, installed from homebrew.
I found the solution here after some digging: Stackoverflow

Great! Have you done some changes I should integrate?

Unfortunately, this type of thing is well beyond my programming skill level. I was hoping to use this help me learn to use QMK for my first QMK-driven keyboard.
After trying to use the extension, I discovered it's expecting the web assets from the original web-based version: stack trace: Error: ENOENT: no such file or directory, open '/Users/redvraptor/.vscode/extensions/ciantic.keymapceditor-vsc-0.7.6/out/keymapceditor/index.html'.
I will see if I can resolve these issues and write up some further steps on how I did so.

@redvelociraptor what would you like the extension to do? Why would you want to develop it. Maybe I can add the feature you want.


unable to login to members login page

kindly create a new member account by clicking on "register here" button on order page


Remove unused mergify

Summary of the changes / Why this is an improvement
There is a deprecation warning from mergify, and we don't use it anyway in crate-howtos/crate-tutorials, do we?

Checklist

[X] CLA is signed

I think we use mergify here as well, or at least it is nice to use it. Why not fix the config instead? See e.g. https://github.com/crate/crate/commit/48fcd71a9d0cfea9d118987430c6f262694b8b18.

Looking at past pull requests, the Mergify label was used just once last year, and twice the year before. I can see how Mergify is very useful when dealing with multiple version branches (backports, etc). In simple repository setups like this one, with only a single master branch, what value is Mergify adding?

I also think Mergify can be safely removed on this repository. We just don't use it here.

I just wanna note that mergify is not only useful for backports but also, and this is the biggest reason for us at the crate/crate repo, it automates the rebase and merge cycle which is specially useful if multiple PR's on the same repository are opened. This avoids that a developer spent time on rebasing again and again cause some other commits were merged in the mean time.

I just updated the Mergify configurations at two other spots. At this place, given the low traffic and criticality about resolving overlapping patches, I think it was safe to remove Mergify here.
Otherwise, on the matter you are outlining, Mergify indeed does a great job.

https://github.com/crate/crate/pull/13484
https://github.com/crate/crash/pull/377


Dynamically picking version of ActiveRecord won't work as expected

https://github.com/gocardless/hutch/commit/814c1e852c044e9d7278490115841f5870886efc sets the ActiveRecord version at Gem build time, so will pick dependency depending which RUBY_VERSION it was built on, not what RUBY_VERSION it is installed on. :/
I'm not sure what the best way to actually solve this issue is. I'll try to catch @olleolleolle and send in a proper.

An extension like the following 'works', except if you use Bundler which won't pick up the dependency.
require 'rubygems/dependency_installer.rb'

begin
  activesupport_version = (RUBY_VERSION >= '2.3' ? '>= 4.0' : '~> 4.0')

  installer = Gem::DependencyInstaller.new
  installer.install 'activesupport', activesupport_version
rescue
  exit(1)
end

f = File.open(File.join(File.dirname(__FILE__), "Rakefile"), "w")
f.write("task :default\n")
f.close

This Ruby version dependency stuff is depressing.

Let me express it with a :-| neutral emoji face.
We're all in this together.

https://github.com/bundler/bundler/issues/4960 is maybe relevant?

I hope this was addressed by a bunch of PRs in master that uses separate Gemfiles for CI and drops the version constraint from Active Support (which should be fine, this gem's needs are small).

Yes.


Keyerror exception on 'timeRemainingForExpiration'

INFO:****Collecting Preliminary Data
ERROR:'timeRemainingForExpiration'
Traceback (most recent call last):
File "sure.py", line 2499, in
controllers_info = controllersInfo(controllers)
File "sure.py", line 327, in controllersInfo
controllers_info[(device['host-name'])] = [(device['deviceType']),(device['deviceIP']),(device['version']) ,(device['reachability']),(device['globalState']),(device['timeRemainingForExpiration']), (device['state_vedgeList']) ]
KeyError: 'timeRemainingForExpiration'

Hi Rugvedi,
Regarding - "https://github.com/CiscoDevNet/sure/issues/29", I had a chat with Arnab and ManiT on Friday and I also did further analysis. Based on the findings so far we can use one of the below show commands to fetch certificate validity date-time.

show control local-properties certificate-not-valid-after
show certificate validity

However, when we try to calculate the time difference in seconds in python it does not match exactly with the "timeRemainingForExpiration" value that is returned by API. But, we can still use the value calculated in python as approximate value.

Regarding this issue, I think since "timeRemainingForExpiration" is related to the controller certificate it should be present in all the versions unless there is no certificate installed in a particular controller device. So, we may just have to add an exception-handling code to take care of this scenario.

Since we are checking the Expiration dates for all the controllers in the network. It wont be possible to execute show commands on them in cases where the certificate is not installed.

Jira for internal discussions is CEADETT-134

Jira ticket
https://jira-eng-sjc4.cisco.com/jira/browse/SDWANAURA-42

No, it won’t be needed. Simple: if user has ! In their password, that user won’t work in the first place

This is a controller check, but since show commands cannot be remotely executed on the controllers, this check has to be moved vManage check.

Replace the API with show commands to get the timeRemainingforExpiration

      show control local-properties certificate-not-valid-after

      show certificate validity


Java sdk batchCheck does not do a batch check

Checklist

[x] I have looked into the README and have not found a suitable solution or answer.
[x] I have looked into the documentation and have not found a suitable solution or answer.
[x] I have searched the issues and have not found a suitable solution or answer.
[x] I have upgraded to the latest version of OpenFGA and the issue still persists.
[x] I have searched the Slack community and have not found a suitable solution or answer.
[x] I agree to the terms within the OpenFGA Code of Conduct.

Description
Not sure if this is a bug per se, but the batchCheck function is not hitting the batch check endpoint on FGA. Rather, it's making several individual requests in parallel. If we make 30 checks in a batch check, with the default settings, it makes up to 10 parallel requests of single batch checks at a time until all 30 are checked.
We were having performance issues and noticed that this is happening, with context timeouts being hit after the 14th or 15th tuple check and the rest coming back null. We were able to mitigate this by increasing our db memory.
Is the way this works intentional? I'm planning to try hitting the actual batch endpoint in openfga manually to see if the performance is improved at all, but wanted to check here as well.
https://github.com/openfga/java-sdk/blob/5713a50276b5e7c273388dd65c1641c6bca5d16b/src/main/java/dev/openfga/sdk/api/client/OpenFgaClient.java#L582-L621
Expectation
batchCheck should hit the batch endpoint in openfga.
Reproduction

Make a batch check
Observe that the URL being hit by the package is not the batch check endpoint, but is multiple requests to the single check endpoint

OpenFGA SDK version
0.4.x
OpenFGA version
1.5.9
SDK Configuration
i'm not sure what this means
Logs
No response
References
No response

Hey @lucasmarcelli,
We're currently in the process of working to update the SDKs to use the BatchCheck API endpoint. So, the BatchCheck method is currently still the SDK wrapper method that makes multiple Check calls in parallel.

Thanks. Is there a task/issue?

I ask because I may have capacity to make this change in the java SDK if nobody has picked it up yet.

@lucasmarcelli thanks for that offer!
We don't currently have this work broken down yet as we're finalizing our plans for it (we plan to maintain the same API interface and map the request/response internally). But I've raised your interest to the team so that we can be sure to let you know when we have that issue filed.


chartjs-chart-financial example doesn't work with chart.js version 3.8.0 and above

Expected behavior
chartjs-chart-financial example should work with the latest Chart.js version.
Current behavior
The following error message is displayed:
TypeError
String.prototype.toString requires that 'this' be a String
isPatternOrGradient
https://ejif5i.csb.app/node_modules/chart.js/dist/chunks/helpers.segment.js:1851:24
color
https://ejif5i.csb.app/node_modules/chart.js/dist/chunks/helpers.segment.js:1857:10
Animation.color [as _fn]
https://ejif5i.csb.app/node_modules/chart.js/dist/chart.esm.js:472:39
Animation.tick
https://ejif5i.csb.app/node_modules/chart.js/dist/chart.esm.js:542:31
eval
https://ejif5i.csb.app/node_modules/chart.js/dist/chart.esm.js:376:16
Animator._update
https://ejif5i.csb.app/node_modules/chart.js/dist/chart.esm.js:362:18
eval
https://ejif5i.csb.app/node_modules/chart.js/dist/chart.esm.js:353:12
This screen is visible only in development. It will not appear if the app crashes in production.
Open your browser’s developer console to further inspect this error.
This error overlay is powered by `react-error-overlay` used in `create-react-app`.

Reproducible sample
https://codesandbox.io/s/elegant-cache-ejif5i?file=/src/index.js
Optional extra steps/info to reproduce
No response
Possible solution
Looks like isPatternOrGradient helper function has been changed in v3.8.0 as the example works just fine with v3.7.1.
Error is thrown when a Proxy object is passed to isPatternOrGradient so updating isPatternOrGradient to handle this use case should solve the issue.
Context
No response
chart.js version
v3.9.1
Browser name and version
No response
Link to your project
No response

This issue should probably be moved to https://github.com/chartjs/chartjs-chart-financial/issues

There is already an open issue for this: https://github.com/chartjs/chartjs-chart-financial/issues/128

Oh, I see. Thank you, I'll close this issue then.


Windows username with space breaks linking

My Windows username contains a space, resulting in this profile directory: "C:\Users\Marco Brieden".
Trying to compile my code results in this error:
❯ cargo zigbuild --release --target x86_64-unknown-linux-gnu
   Compiling rust-resolver v0.1.0 (D:\Development\vp360\rust)
error: linking with `C:\Users\Marco Brieden\AppData\Local\cargo-zigbuild\0.16.3\zigcc-x86_64-unknown-linux-gnu.bat` failed: exit code: 1
  |
  = note: "cmd" "/c" "C:\\Users\\Marco Brieden\\AppData\\Local\\cargo-zigbuild\\0.16.3\\zigcc-x86_64-unknown-linux-gnu.bat" "-m64" "D:\\Temp\\rustcEc453k\\symbols.o" "D:\\Development\\vp360\\rust\\target\\x86_64-unknown-linux-gnu\\release\\deps\\rust_resolver-f8bda55ce059fbe0.rust_resolver.ff2b47e7-cgu.0.rcgu.o" "-Wl,--as-needed" "-L" "D:\\Development\\vp360\\rust\\target\\x86_64-unknown-linux-gnu\\release\\deps" "-L" "D:\\Development\\vp360\\rust\\target\\release\\deps" "-L" "C:\\Users\\Marco Brieden\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-unknown-linux-gnu\\lib" "-Wl,-Bstatic" "C:\\Users\\Marco Brieden\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-unknown-linux-gnu\\lib\\libcompiler_builtins-87185c5e58e44fea.rlib" "-Wl,-Bdynamic" "-llibpq" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "C:\\Users\\Marco Brieden\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-unknown-linux-gnu\\lib" "-o" "D:\\Development\\vp360\\rust\\target\\x86_64-unknown-linux-gnu\\release\\deps\\rust_resolver-f8bda55ce059fbe0" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro,-znow" "-Wl,--strip-all" "-nodefaultlibs"
  = note: 'C:\Users\Marco' is not recognized as an internal or external command,
          operable program or batch file.

error: could not compile `rust-resolver` due to previous error

I don't personally use Windows, so help appreciated.

The zigcc-x86_64-unknown-linux-gnu.bat that is failing contains this:
C:\Users\Marco Brieden\.cargo\bin\cargo-zigbuild.exe zig cc -- -target x86_64-linux-gnu  -g -Wl,--version-script=C:\Users\Marco Brieden\AppData\Local\cargo-zigbuild\0.16.3\fcntl.map -include C:\Users\Marco Brieden\AppData\Local\cargo-zigbuild\0.16.3\fcntl.h %*

Surrounding all paths with spaces might fix it:
"C:\Users\Marco Brieden\.cargo\bin\cargo-zigbuild.exe" zig cc -- -target x86_64-linux-gnu  -g -Wl,--version-script="C:\Users\Marco Brieden\AppData\Local\cargo-zigbuild\0.16.3\fcntl.map" -include "C:\Users\Marco Brieden\AppData\Local\cargo-zigbuild\0.16.3\fcntl.h" %*

I tried editing it, but it gets newly generated every run. Write protecting it causes zigbuild to complain and error out.
The same folder has two more files that have the same issue: "zigcxx-x86_64-unknown-linux-gnu.bat" and "zigranlib.bat".

You can change it here https://github.com/rust-cross/cargo-zigbuild/blob/fb64c6578cd5e94be74d654dc272b8af539ea414/src/zig.rs#L868-L874
And run cargo run zigbuild instead of cargo zigbuild to test it.

I think it fails to execute the .bat file in the first place, because of the path.
Any idea where that happens?

I think it's https://github.com/rust-lang/rust/issues/29494, unfortunate it's out of our control because we didn't use cmd /c, something else did.

Since that bug is more than 7 years old I won't hold my breath on it getting fixed any time soon.
I'll mess around with the code some more to see if I can find a workaround if I'll find the time.

That bug has been fixed a year ago though, right?

They just added a new API which needs to be adopted.

Are you saying the batch file isn't executed from within cargo-zigbuild?
Where is it executed from then?

Probably cargo or cc-rs.

Actually, it's rust: https://github.com/rust-lang/rust/blob/6dc3999c2699461aa930b8c1e00f99e73dcc0174/compiler/rustc_codegen_ssa/src/back/linker.rs#L49-L58

Thanks for finding this!

I think you can workaround it by setting the CARGO_ZIGBUILD_CACHE_DIR env var to a directory that doesn't contain whitespace.


Use last byte of HMAC output for truncating

This is to use the least significant byte of the HMAC regardless of size. RFC 6328 (TOTP) Section 1.2 says you can use SHA-1 SHA-256 or SHA-512 with the same algorithm of RFC 4226 (HTOP). This seems ok until you realize that all the new HMACs have different output sizes and HTOP only expects a 20 byte fixed MAC. It is not completely clear if RFC 4226 Section 5.3 means "get the bottom 4 bits from byte at offset 19" or "get the 4 least significant bits". Other implementations and Wikipedia read the "Dynamic Truncation" algorithm to be the last 4 bits of the MAC, so I think this implementation should follow the others.

Hi! First off, sorry for the very late response. Since SHA256 and SHA512 are virtually not in use anywhere, I haven't been able to test if my test values were indeed correct. Several other implementation seem to use the last byte dynamically, so I think you are correct!
Merging right now


Device Delete

There should be a DELETE for devices, I guess the serial_number should be specified to identify the device.

This was a rather large one and included a lot of refactoring and other issues fixed.


Create integrations tests for all MeiliSearch http routes

Summary

[x] Client tests  #32
[x] Indexes tests #32
[x] Documents tests #32
[x] add Settings integrations tests

[x] attributes for faceting tests
[x] displayed attributes tests
[x] distinct attributes tests (FAILING)
[x] ranking rules tests
[x] searchable attributes tests
[x] settings route tests
[x] stop words tests
[x] synonyms tests

[x] update route tests
[X] search route tests

[X] limit tests
[X] offset tests
[X] attributes to crop tests (FAILING)
[X] cropLength tests (FAILING)
[X] matches tests
[X] attributesToHighlight tests
[X] attributesToRetrieve tests
[X] filters tests
[ ] facetsDistribution tests (FAILING)
[ ] facetFilters tests (FAILING)

Reasons why the tests are failing
On the test testGetDistinctAttribute and testUpdateDistinctAttribute:
- The attribute that returns from the server contains a double "", causing the error: XCTAssertEqual failed: ("product_id") is not equal to (""product_id"")
On the test testGetSettings and testUpdateSettings:

Probably due to the acceptNewFields, this has been removed.

@curquiza Please review the tests, I am not sure what to do with the failed tests. Please bear that this PR is still a draft.

@curquiza Waiting for the merge of #51 This will sort the settings test failure.

Hello @ppamorim! Thanks for this awesome PR!
The #51 is removed!
You can now rebase your branch 🙂

@curquiza Just did this.

awesome @ppamorim. If your PR is ready for review, can you remove the draft status of this PR? 🙂
We will review it asap!

Waiting for PR #30 be rebased and merged.

@curquiza It's not clear why the test testSearchLimitEmptySearch is failing in the CI. It's working locally and in the Dockerfile.

@ppamorim is it possible to print the error message returned by MeiliSearch or by Swift ? It is hard to understand why a test fails without a error handler.
/Users/runner/work/meilisearch-swift/meilisearch-swift/Tests/MeiliSearchIntegrationTests/SearchTests.swift:222: error: -[MeiliSearchIntegrationTests.SearchTests testSearchLimitEmptySearch] : XCTAssertTrue failed

It's possible by replacing XCTAssertTrue(documents.hits.count == 0) with XCTAssertEqual(0, documents.hits). In the test documents.hits is returning 5. When running the very same test locally it returns 0 and the test passes.

@bidoubiwa It doesn't make sense. I am running Meili on macOS.

Issue has been found, it was my local version of Meili, it was outdated. The behaviour of empty searches has been changed on version v0.15.

Oh! So sorry, it was my next task on my TODO to update these tests (of an empty query)! Sorry that it wastes your time!

@curquiza No problem. All tests are passing, just waiting for the review.

@curquiza Sorry I had to rebase it since Github informed that it was out of sync with the master.

@curquiza Sorry I had to rebase it since Github informed that it was out of sync with the master.

Yes, GitHub will inform you, but Bors will do it at your place before merging 🙂 (except if you have merge conflicts. In this case you would have to rebase yourself)
So no worries about this GitHub warning.

@curquiza @bidoubiwa Just waiting for the review now. :)

Hello @ppamorim!
Huge work!
This is the review part I 😁 I will review the test files tomorrow!
One change asked 😇

[ ]  If I'm not wrong, there is no test about the facetsDistribution of SearchResult. I mean, doing a test with facetsDistribution as a search parameter and check that the facetsDistribution in the serach *result are accessible. See the issue requirement (#58).

There is a test related to this, it's named testSearchFacetsDistribution. It checks for the genres of books.

There is a test related to this, it's named testSearchFacetsDistribution. It checks for the genres of books and compares the dictionary that returns from Meilisearch.

My bad! I've seen it!

bors try

bors merge


Rename countNode and mergeNode to countPhase and mergePhase respectively

Current coverage is 81.47% (diff: 91.30%)

Merging #4650 into master will decrease coverage by 0.19%

@@             master      #4650   diff @@
==========================================
  Files          1303       1303
  Lines         44895      44895
  Methods           0          0
  Messages          0          0
  Branches       7071       7071
==========================================
- Hits          36666      36577    -89
- Misses         5538       5615    +77
- Partials       2691       2703    +12

Powered by Codecov. Last update 378f05d...40fe984


AVL Tree #123 completed

🛠 Issue (Number)

Closes #90
👨💻 Changes proposed
AVL Tree code

✔ Check List (Check all the applicable boxes)

[✔] My code follows the code style of this project.
[✔ ] This PR does not contain plagiarized content.
[✔ ] The title of my pull request is a short description of the requested changes.

📄 Note to reviewers

📷 Screenshots

@Kumar-laxmi I have completed the issue in java , please check it


Please remove peerDependencies from package.json

The current peerDependencies entry for package.json reads:
"peerDependencies": {
    "react-native": ">=0.4.0 || 0.5.0-rc1 || 0.6.0-rc || 0.7.0-rc || 0.7.0-rc.2 || 0.8.0-rc || 0.8.0-rc.2 || 0.9.0-rc || 0.10.0-rc || 0.11.0-rc || 0.12.0-rc || 0.13.0-rc || 0.14.0-rc || 0.15.0-rc || 0.16.0-rc || 0.17.0-rc"
  },

With that dependency list I am currently unable to install react-native-vector-icons with react-native-carousel and react-native version 0.16.0, because of https://github.com/npm/npm/issues/8854.
react-native-carousel declares in its package.json these peerDependencies:
"peerDependencies": {
    "react-native": ">=0.4 <1.0"
  }

The issue reported in https://github.com/npm/npm/issues/8854 correctly complains about 0.16.0-rc not being matched by >=0.4 <1.0
There is also https://github.com/oblador/react-native-vector-icons/pull/69, which asks for migrating from peerDependencies to dependencies. But I wonder: Is this dependency list necessary at all?
What does the author of this package want to express with a dependency list that spells out every rc version of react-native?
My wild guesses:

that it is ok to use react-native 0.16.0-rc but not ok to use 0.16.0?
that 0.18.0-rc is not yet supported?
that future versions of react-native may not work with react-native-vector-icons?

It looks like >=0.4.0 is the only meaningful requirement in this list and even that one can be dropped if you are willing to assume that nobody uses react-native versions before 4/20/2015 any longer.
If you feel strongly about keeping this dependency list I kindly ask you to spell out every available react-native version that is supported by react-native-vector-icons, i.e.
...0.15.0-rc || 0.15.0 || 0.16.0-rc || 0.16.0 || 0.17.0-rc...
Or at least 0.16.0. That's the version I need.
Thank you in advance.
See also https://github.com/nick/react-native-carousel/issues/29

This is a pain point for the whole RN community. At some point I heard they were going to stop releasing RC:s, but obviously that didn't happen. It wouldn't be such a big problem unless everybody wanted to jump the gun to use pre-release versions in their apps. The peerDependency list actually means anything that's 0.4 or newer is OK in addition to all the prereleases listed. So if you're using a stable version or RN like 0.16.0 it's not this package stopping you, and I can confirm I'm currently using it with said version without problems.
That said I'm inclined to agree that it's time to be pragmatic, save me some work every other week and remove it.

@oblador Thanks man, I appreciate it!


Not showing on small screen

All toasted messages disappear when screen width is > 600px and reappears when > 992px.

its fixed please update to latest version via npm.
Thanks


Does data-tip support jsx?

Am I missing a setting, or does data-tip not support JSX? I've tried the following, wth html set as true, and not:

  <div data-tip={<Text>Published!</Text>} data-for='tooltip'><Icon iconName="user" /

  <ReactTooltip html id='tooltip' />

&

  <div data-tip={<Text>Published!</Text>} data-for='tooltip'><Icon iconName="user" /

  <ReactTooltip id='tooltip' />

And when I hover both, I get [ object Object ].
And to clarify, I know if I do the following, it does work:
<ReactTooltip id='tooltip'>
  <Text>Published!</Text>
</ReactTooltip>

But because of the issue with using tooltip's in a modal (Troubleshooting  - Using tooltip within the modal), I was hoping to use the data-tip to send the jsx to the tooltip.
Let me know if that makes sense, if you need any other info, or if there is a way to send the jsx through the data-tip. Thanks so much! :)

Haha was there, colleague pointed me to the tutorial website again. It's the first example ->
you can use it this style

                            <ReactTooltip                 className={css.tooltip}                 place="top"                 type="light"                 effect="float"                 id="meeting"                 delayHide={2000}>  I am actually solving that right now :)

@dankonino I don't think what you are suggesting will work. As pointed out in my 2nd part, it does work if you add the JSX in the ReactTooltip, but I'm trying to put the JSX in the element that has the tip. In the data-tip. That, I don't think, works.
Hoping I can get an answer or not, may not be able to use this library if that's the case. Any chance you could chime in, @wwayne? Or maybe @huumanoid?

@bluetidepro data-tip it actually makes use of the dangerouslySetInnerHTML https://github.com/wwayne/react-tooltip/blob/master/src/index.js#L455
So, yes, JSX doesn't work for data-tip

Ah, okay. Thanks for the reply @wwayne!

If you just want to write html in jsx format, you can wrap it in ReactDOMServer.renderToStaticMarkup() to convert your jsx to an html string.

@srgraham Sounds a good idea, closing the issue

Hey so I know the renderToStaticMarkup is a valid solution but was just curious if there was a reason to not support JSX via data-tip given the use case originally mentioned?

@augbog I just thought put JSX inside the ReactTooltip component would be more readable, writing JSX as attribute is kind of confused to me

My use case involves lots of data points, so the tooltip needs to know information about which data point was hovered on. Supporting JSX or passing through a data object without the string conversation would be appreciated, but here is my workaround:
Pass the data through as text by JSON-stringifying it, and then use getContent to create the JSX:
For example, each data point can pass its data object through using:
let dataPoints = R.compose(
  R.map(d =>
    <circle
      cx={d.x}
      cy={d.y}
      r={radius}
      key={d.id}
      fill={d.color}
      data-for="my-tooltip"
      **data-tip={JSON.stringify(d)}**
    />
  )
)(data);

<ReactTooltip id={"my-tooltip"} place="bottom" getContent={datumAsText => {
if (datumAsText == null) {
return;
}
let d = JSON.parse(datumAsText);
return (
ID: {d.id}
Category: {d.category}
);
}} />
```
Without using the JSON.stringify, the data object would get converted to a string that is only [ object Object ], but this way we can preserve the information from the original data point.

@srgraham : So I had the same issue and used your solution to convert jsx into string, however now when I render the tooltip, it comes with html tags. on hover I want to display:

Hellow
<How are you>

 , it renders with tag. how to avoid this?

You can use getContent prop to render any content according to your data-tip prop
also you can JSON.stringify to pass any serializable data to getContent


chore: increasing limits for invoices creation

@krtk6160 I don't think it's overrided in prod but maybe something to check

@krtk6160 I don't think it's overrided in prod but maybe something to check

Yes it's not overridden.


Mobile browser address bar and tools do not hide when scrolling down page

When scrolling down a page on mobile safari or other browser, the address bar should automatically minimize and revert when user scrolls up.
When using HalfMoon, the address bar never minimizes, taking up valuable viewport space. This probably has something to do with absolute positioning.

Desired/expected addressbar behavior

i'd assume duplicate of https://github.com/halfmoonui/halfmoon/issues/49

The underlying issue might be the same, but perhaps/hopefully there might be a magic workaround that I had missed.


[ADD] README_zh.md

[ADD] README_zh.md, which is the Chinese translation of README.md.

Apologies, but after discussing this MR with our team, we do not believe it will be easy to maintain moving forward. We appreciate your contributions and encourage you to continue submitting MR's.


Can long cli commands be shown as multiple lines?

Can long cli commands be shown as multlines.
It is not convenient to scroll to the right to see command like the following
az container create --resource-group myResourceGroup --name aci-tutorial-app --image /aci-tutorial-app:v1 --cpu 1 --memory 1 --registry-login-server  --registry-username  --registry-password  --dns-name-label  --ports 80

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

ID: a27b22e3-437d-04f2-a542-b20facee238b
Version Independent ID: e4b43d9c-3dc8-3ed0-9b3e-2972e8788bea
Content: Tutorial - Deploy container app to container instance - Azure Container Instances
Content Source: articles/container-instances/container-instances-tutorial-deploy-app.md
Service: container-instances
GitHub Login: @macolso
Microsoft Alias: macolso

Thanks for the feedback @MNF! I have assigned the issue to the content author to investigate further and update the document as appropriate.

Thanks for your dedication to our documentation. Unfortunately, at this time we have been unable to review your issue in a timely manner and we sincerely apologize for the delayed response. Though the scope of our feedback channel here on GitHub covers specific documentation fixes, we can help redirect you to the right support channel to get an answer to your question: [reference to alternative product/service or community endpoint]. Because this issue does not relate to documentation, we are closing this issue. #please-close

@tomvcassidy the suggestion is directly related to the documentation page. Format of showing long cli commands in the page is not convenient for reader.
The fix to improve the documentation (show long lines in code examples as multiple lines) is not completed yet.


Simple Updates to Keep Dice Rolling

I like your little program so I dusted off the bit rot and I figured I'd share it back to you. Thanks for writing this nifty little tool. I use it for doing raffle drawings or other tasks where there are no physically fair dice for the number like 27 or 23 sided dice.

Very cool. :-D Thanks for this!


glitches with no_email workflow

The email variables are not interpolated...I got this:

Confirmation e-mail:    https://someplace.example.com//login/autoregistration?verification-token=NOT_A_REAL_TOKEN

_____________________________________
${dspace.name},
WWW: ${dspace.url}
Email: ${lr.help.mail}
Tel.: ${lr.help.phone}

note the footer/signature
2. Seems there's an issue with the email regexp (I was not able to use<EMAIL_ADDRESS>the plus sign seems to be an issue; but needs to be verified)
3. Welcome login page contains fillers that should be replaced by real values (I think I saw some Lorem Ipsum on another page).

When I click the link in email, I get a something went wrong red bubble.
https://github.com/ufal/clarin-dspace/assets/1842385/2ec9b326-1a89-4838-858a-fdce3d00f294
When I tested this the first time today, I got the red bubble as well as the agreement/welcome -  I could confirm that and continue. When recording in an anonymous window the agreement/welcome was not shown
P.S. The email template is still not interpolated correctly; but that's also tracked in #1099

https://github.com/ufal/clarin-dspace/issues/1060#issuecomment-2066447424 (red bubble) still valid
the email is better; but:

DSpace repository account at {params[5]},
...
or call us at 0000
...
Tel.: 0000

works 👍

Tested with:
BE
Git hash:  https://github.com/ufal/clarin-dspace/commit/3486d2da1c304f1d1c374cd100fae42d21f01698 Date of commit: 2024-11-29 11:08:36 +0100
FE
Git hash:
https://github.com/ufal/dspace-angular/commit/e7e15778a8a7f4fe93f392afe49288698f3148ce
Date of commit:
2024-11-29 11:08:02 +0100


Textmate grammar support for indexed properties

For property keys that contain symbols like [ and #, the properties textmate grammar displays incorrect highlighting.
For example, for openshift.config-map-volumes[0].config-map-name, the property key is not highlighted in blue:

For properties that contain #:

Currently, the TextMate grammar assumes that property keys are only composed of: \/a-zA-Z0-9%_.-https://github.com/redhat-developer/vscode-quarkus/blob/7036c9dbe90e2dae8596d84318e6faff0f85bdad/language-support/properties-support/java-properties.tmLanguage.json#L41

WIP:

Should I keep the highlighting for the index, or change it back to the same colour as the rest of the property name (since this will be in vscode-microprofile).

Here is what I settled on. I used the default VSCode theme (Dark+) in this screenshot to avoid confusion regarding the colours:

Properties with square braces in their names have no special meaning in most implementations of MicroProfile Config as far I can tell, so it doesn't make sense to do specific highlighting. If this feature is helpful for Quarkus, we could maybe do it in vscode-quarkus.


Certification fixes: round 2

Resolves the last few lingering certification issues that were identified.

@dkemlage, I have good news: all but one certification issue have been fixed. This small PR includes the following changes:

fixes an issue where the UI was difficult to use for a sample on Xamarin.Forms UWP
improves the UI on Find Place so that any user-placed callout disappears when a new search starts
improves WMS layer URL to add the map to the map view after its initial viewpoint has been set (it doesn't make sense to set an initial viewpoint after the map is displayed).
fixes an issue that prevented Xamarin.Forms projects from loading

Can you please do a quick code review for me?

Thanks for the review!


Fix occasional AttributeError in XMP{Meta,Iterator} del (#55)

Coverage decreased (-0.5%) to 97.919% when pulling 9f8723560166604c6e30da8ce29a21c5500f5a21 on Louis-Kenzo:master into 80ea7728b21db4fa48b68f0a0066d78a06a35577 on python-xmp-toolkit:master.

Coverage decreased (-0.8%) to 97.561% when pulling 79b9202e5692d6a1f537bf478d555d424c8e4dae on Louis-Kenzo:master into 80ea7728b21db4fa48b68f0a0066d78a06a35577 on python-xmp-toolkit:master.


BUG: multiple level unstack with nulls

closes https://github.com/pydata/pandas/issues/9497
>>> mi
                        jim    joe
1st 2nd        3rd
1   2014-02-01 -1 days  100 -20.87
2   NaT        NaT      101   5.76
1   2014-02-03 1 days   102  -4.94
2   NaT        2 days   103  -0.79
1   2014-02-05 NaT      104 -12.51
2   2014-02-06 4 days   105  -9.89

>>> mi.unstack(['2nd', '3rd']).fillna('.')
           jim                                                     joe
2nd 2014-02-01  NaT 2014-02-03    NaT 2014-02-05 2014-02-06 2014-02-01   NaT 2014-02-03    NaT 2014-02-05 2014-02-06
3rd    -1 days  NaT     1 days 2 days        NaT     4 days    -1 days   NaT     1 days 2 days        NaT     4 days
1st
1          100    .        102      .        104          .     -20.87     .      -4.94      .     -12.51          .
2            .  101          .    103          .        105          .  5.76          .  -0.79          .      -9.89

thanks @behzadnouri


Update HistogramView.swift

Smoothed Histrgram

nice, the smoothing made the histogram look a lot better. good stuff


Determine how to use jacoco plugin to get coverage for integration tests

For unit tests it is straight forward and just works out of the box with the JaCoCo plugin (id 'jacoco'). Integration tests are more likely to be used to flex the execution, so coverage is important to have.

Hi - could you provide info on how to add jacoco code coverage to unit tests? I've tried but no success. Thanks.

Hey @markguckian can you add what you have tried here? It might help find the right path to get this figured out.
I'd like to get this working using Gradle's built in JaCoCo support, but I haven't figured it out yet. I think part of the issue is that general usage with JaCoCo/Gradle is that the input is compiled code and exec data and it will generate reports for that. With Jenkins Pipelines, the input is source code that gets compiled in a different fashion, so the out-of-the-box usage of JaCoCo does not work. I just get 0 coverage for the integration tests.
Here is what I tried in my example project at commit 8e7dbde714b33254c5faf1fb6dd2408e4f08d2d2:
import com.gradle.scan.plugin.BuildScanPlugin
import org.gradle.kotlin.dsl.version
import java.io.ByteArrayOutputStream

plugins {
  `jacoco`
  id("com.gradle.build-scan") version "1.11"
  id("com.mkobit.jenkins.pipelines.shared-library") version "0.4.0"
  id("com.github.ben-manes.versions") version "0.17.0"
}

jacoco {
  toolVersion = "0.8.0"
}

val commitSha: String by lazy {
  ByteArrayOutputStream().use {
    project.exec {
      commandLine("git", "rev-parse", "HEAD")
      standardOutput = it
    }
    it.toString(Charsets.UTF_8.name()).trim()
  }
}

buildScan {
  setLicenseAgree("yes")
  setLicenseAgreementUrl("https://gradle.com/terms-of-service")
  link("GitHub", "https://github.com/mkobit/jenkins-pipeline-shared-library-example")
  value("Revision", commitSha)
}

tasks {
  "wrapper"(Wrapper::class) {
    gradleVersion = "4.4.1"
  }
  "jacocoIntegrationTestReport"(JacocoReport::class) {
    reports {
      csv.setEnabled(true)
      xml.setEnabled(true)
    }
    executionData(tasks["integrationTest"])
    val main by java.sourceSets
    sourceSets(main)
  }
}

java {
  sourceCompatibility = JavaVersion.VERSION_1_8
}

dependencies {
  testImplementation("org.spockframework:spock-core:1.1-groovy-2.4")
  testImplementation("org.assertj:assertj-core:3.9.0")
}

sharedLibrary {
  coreVersion = "2.95"
  groovyVersion = "2.4.12"
  pluginDependencies(Action {
    dependency("org.jenkinsci.plugins", "pipeline-model-api", "1.2.5")
    dependency("org.jenkinsci.plugins", "pipeline-model-declarative-agent", "1.1.1")
    dependency("org.jenkinsci.plugins", "pipeline-model-definition", "1.2.5")
    dependency("org.jenkinsci.plugins", "pipeline-model-extensions", "1.2.5")
  })
}

Running the jacocoIntegrationTestReport task results in a 0 coverage report:

I think the first step is to figure out what kind of instrumentation data is output by JaCoCo and then see if that can be mapped to the existing Gradle task. If you have any other suggestions please let me now!

Another possibility is the forked @JenkinsRule process (if it is forked) does not have instrumentation.

I just got *.exec files created but no reports.
Would it be useful to provide the sourceDirectories & classDirectories values in the jacocoIntegrationTestReport task?
e.g. classDirectories = files(java.sourceSets["main"].output)
(Only just started looking at Jenkins pipeline testing/gradle so excuse my lack of knowledge!)

Don't worry about it @markguckian , glad to have some more eyes on this. Questions will hopefully help drive some better documentation.
In the example above that I tried  I did create the report task with "jacocoIntegrationTestReport"(JacocoReport::class) and sourceSets(main). I think that sets up the task dependencies, source code directories, and output classes directories, but I could be wrong. It is worth trying your proposal to see if I'm missing something. Another thing worth noting is that the main classes are not available on the integrationTest runtime classpath on purpose. I don't think that would change anything.
Changing the above example from:
    val main by java.sourceSets
    sourceSets(main)

to
    val main by java.sourceSets
    val integrationTest by java.sourceSets
    sourceSets(main)

And the report is:

Which shows that there is at least sort of coverage for some classes.
My belief here is that JaCoCo isn't mapping the runtime compiled Groovy classes to the source code, either because Jenkins is doing something different or the interaction with Jacoco isn't right.
I think some of what needs to happen for me or whoever wants to investigate this is:

Determine if @JenkinsRule forks a process that isn't getting a javaagent set. I don't think it is due to what I looked at above.
See what is in the *.exec data, and find out if anything captured contains references to the source (specifically the com.mkobit.libraryexample.ExampleSrc class in the example). There might be some differently named class or it might not even be present at all, I have no idea.
Determine if there is a way to map the coverage data to the generated class. This will probably need to be handled by reaching out on the JaCoCo user's forum at https://groups.google.com/forum/#!forum/jacoco
Get the JacocoReport task to work with that data

I think the cloning https://github.com/mkobit/jenkins-pipeline-shared-library-example would be the best place to start. Any help here would be greatly appreciated!

Some further investigation:

Using example's integrationTest.exec

wget http://central.maven.org/maven2/org/jacoco/org.jacoco.cli/0.8.0/org.jacoco.cli-0.8.0-nodeps.jar

java -jar org.jacoco.cli-0.8.0-nodeps.jar execinfo integrationTest.exec | awk 'NR < 3 || /ExampleSrc/'
[INFO] Loading exec file integrationTest.exec.
CLASS ID         HITS/PROBES   CLASS NAME
1c7075038cbf406d   30 of  43   com/mkobit/libraryexample/ExampleSrcSpockSpec
58eba6c3f775908a    9 of  17   com/mkobit/libraryexample/ExampleSrc$_nonCpsDouble_closure1
e5813609ff177775   15 of  27   com/mkobit/libraryexample/ExampleSrc
95fc19ee2451d6a7   15 of  27   com/mkobit/libraryexample/ExampleSrc
```451d6a7   15 of  27   com/mkobit/libraryexample/ExampleSrc

But, I don't really know if that is useful. There are multiple class id in side of the report, so that could be the reason why the association isn't there. http://www.jacoco.org/jacoco/trunk/doc/classids.html might help figure this out.

I think that is useful, and I think I'm getting closer.
Adding in class dumping:
tasks {
  "wrapper"(Wrapper::class) {
    gradleVersion = "4.4.1"
  }
  "integrationTest" {
    extensions.findByType(JacocoTaskExtension::class.java)?.apply {
      classDumpDir = file("$buildDir/jacoco/classpathdumps")
    }
  }
  "jacocoIntegrationTestReport"(JacocoReport::class) {
    reports {
      csv.setEnabled(true)
      xml.setEnabled(true)
    }
    executionData(tasks["integrationTest"])
    val main by java.sourceSets
    sourceDirectories = main.allSource
    classDirectories = fileTree("$buildDir/jacoco/classpathdumps")
  }
}

And running ./gradlew integrationTest jacocoIntegrationTestReport -s gets me:
Caused by: java.io.IOException: Error while analyzing ExampleSrc.d35369e182b13604.class.
        at org.jacoco.core.analysis.Analyzer.analyzerError(Analyzer.java:157)
        at org.jacoco.core.analysis.Analyzer.analyzeClass(Analyzer.java:129)
        at org.jacoco.core.analysis.Analyzer.analyzeClass(Analyzer.java:152)
        at org.jacoco.core.analysis.Analyzer.analyzeAll(Analyzer.java:188)
        at org.jacoco.ant.ReportTask.createBundle(ReportTask.java:570)
        at org.jacoco.ant.ReportTask.createReport(ReportTask.java:542)
        at org.jacoco.ant.ReportTask.execute(ReportTask.java:495)
        ... 63 more
Caused by: java.lang.IllegalStateException: Can't add different class with same name: com/mkobit/libraryexample/ExampleSrc
        at org.jacoco.core.analysis.CoverageBuilder.visitCoverage(CoverageBuilder.java:107)
        at org.jacoco.core.analysis.Analyzer$1.visitEnd(Analyzer.java:96)
        at org.objectweb.asm.ClassVisitor.visitEnd(ClassVisitor.java:339)
        at org.jacoco.core.internal.flow.ClassProbesAdapter.visitEnd(ClassProbesAdapter.java:98)
        at org.objectweb.asm.ClassReader.accept(ClassReader.java:702)
        at org.objectweb.asm.ClassReader.accept(ClassReader.java:500)
        at org.jacoco.core.analysis.Analyzer.analyzeClass(Analyzer.java:111)
        at org.jacoco.core.analysis.Analyzer.analyzeClass(Analyzer.java:127)
        ... 68 more

Looking at the dumped classes, there is a WorkflowScript created for each test and a class of each pipeline class in each test.
 find . -type f | grep -E 'WorkflowScript.*|evenOrOdd.*|ExampleSrc.*'
./WorkflowScript.41c8590264cdca54.class
./com/mkobit/libraryexample/ExampleSrc.4efa3fc888e78d12.class
./com/mkobit/libraryexample/ExampleSrc.d35369e182b13604.class
./com/mkobit/libraryexample/ExampleSrcSpockSpec.1c7075038cbf406d.class
./com/mkobit/libraryexample/ExampleSrc$_nonCpsDouble_closure1.58eba6c3f775908a.class
./evenOrOdd.67a9f0a3fa479d86.class
./WorkflowScript.dce4ff5df8779161.class
./WorkflowScript.1d2a368ecc6fffc0.class
./evenOrOdd.f9410339e9178dae.class
./WorkflowScript.0864c6a0b6b9e4ea.class
./WorkflowScript.89d6e909e66ff771.class
./WorkflowScript.596644e67515fe69.class

So, I think we need some way to "merge" those classes.
If I delete the duplicates of each one change the tasks block to:
tasks {
  "wrapper"(Wrapper::class) {
    gradleVersion = "4.4.1"
  }
  "integrationTest" {
    extensions.findByType(JacocoTaskExtension::class.java)?.apply {
      classDumpDir = file("$buildDir/jacoco/classpathdumps")
    }
  }
  "jacocoIntegrationTestReport"(JacocoReport::class) {
    reports {
      csv.isEnabled = true
      xml.isEnabled = true
    }
    executionData(tasks["integrationTest"])
    val main by java.sourceSets
    sourceDirectories = main.allSource
    classDirectories = fileTree("$buildDir/jacoco/classpathdumps").apply {
      include("evenOrOdd.*")
      include("doStuff.*")
      include("**/*ExampleSrc.*")
    }
  }
}

I finally get some coverage data!

I think I'm really close to cracking the shell here. I still need to figure out how to handle the duplicate classes and what not. I don't think http://www.eclemma.org/jacoco/trunk/doc/offline.html will help, because these are compiled by Jenkins itself.

Very promising, thanks for the hard work @mkobit

I opened a question on the forum at https://groups.google.com/forum/#!msg/jacoco/-zTg9Bt5964/dUliK8OsAwAJ

After getting some feedback on the forum post, I think that some work would need to be done to support getting coverage of library code. Here is a summary of what I think would need to happen based on the information I have right now:

The pipeline classes are compiled "basically the same" except for some constants. This seems to come from some of the internals of Jenkins pipeline.

Because the constants are different, different class Ids are generated but the classnames are the same. JaCoCo does not like that and the JacocoReport task fails inside of Gradle with:
  Caused by: : Error while creating report
          at org.jacoco.ant.ReportTask.execute(ReportTask.java:501)
          at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
          at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
          at org.gradle.api.internal.project.ant.BasicAntBuilder.nodeCompleted(BasicAntBuilder.java:78)
          at org.gradle.internal.metaobject.BeanDynamicObject$MetaClassAdapter.invokeMethod(BeanDynamicObject.java:479)
          at org.gradle.internal.metaobject.BeanDynamicObject.tryInvokeMethod(BeanDynamicObject.java:191)
          at org.gradle.internal.metaobject.AbstractDynamicObject.invokeMethod(AbstractDynamicObject.java:160)
          at org.gradle.api.internal.project.antbuilder.AntBuilderDelegate.nodeCompleted(AntBuilderDelegate.java:118)
          at org.gradle.internal.jacoco.AbstractAntJacocoReport.invokeJacocoReport(AbstractAntJacocoReport.java:56)
          at org.gradle.internal.jacoco.AntJacocoReport$1.execute(AntJacocoReport.java:38)
          at org.gradle.internal.jacoco.AntJacocoReport$1.execute(AntJacocoReport.java:35)
          at org.gradle.internal.jacoco.AbstractAntJacocoReport$1.doCall(AbstractAntJacocoReport.java:46)
          at org.gradle.api.internal.ClosureBackedAction.execute(ClosureBackedAction.java:71)
          at org.gradle.api.internal.ClosureBackedAction.execute(ClosureBackedAction.java:53)
          at org.gradle.api.internal.project.antbuilder.DefaultIsolatedAntBuilder$2.execute(DefaultIsolatedAntBuilder.java:152)
          at org.gradle.api.internal.project.antbuilder.DefaultIsolatedAntBuilder$2.execute(DefaultIsolatedAntBuilder.java:134)
          at org.gradle.api.internal.project.antbuilder.ClassPathToClassLoaderCache.withCachedClassLoader(ClassPathToClassLoaderCache.java:134)
          at org.gradle.api.internal.project.antbuilder.DefaultIsolatedAntBuilder.execute(DefaultIsolatedAntBuilder.java:128)
          at org.gradle.internal.jacoco.AbstractAntJacocoReport.configureAntReportTask(AbstractAntJacocoReport.java:38)
          at org.gradle.internal.jacoco.AntJacocoReport.execute(AntJacocoReport.java:35)
          at org.gradle.testing.jacoco.tasks.JacocoReport.generate(JacocoReport.java:78)
          at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
          at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:46)
          at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39)
          at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26)
          at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:780)
          at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:747)
          at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:121)
          at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
          at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
          at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
          at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
          at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:110)
          at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
          ... 30 more
  Caused by: java.io.IOException: Error while analyzing ExampleSrc.0711a1bac2269780.class.
          at org.jacoco.core.analysis.Analyzer.analyzerError(Analyzer.java:157)
          at org.jacoco.core.analysis.Analyzer.analyzeClass(Analyzer.java:129)
          at org.jacoco.core.analysis.Analyzer.analyzeClass(Analyzer.java:152)
          at org.jacoco.core.analysis.Analyzer.analyzeAll(Analyzer.java:188)
          at org.jacoco.ant.ReportTask.createBundle(ReportTask.java:570)
          at org.jacoco.ant.ReportTask.createReport(ReportTask.java:542)
          at org.jacoco.ant.ReportTask.execute(ReportTask.java:495)
          ... 63 more
  Caused by: java.lang.IllegalStateException: Can't add different class with same name: com/mkobit/libraryexample/ExampleSrc
          at org.jacoco.core.analysis.CoverageBuilder.visitCoverage(CoverageBuilder.java:107)
          at org.jacoco.core.analysis.Analyzer$1.visitEnd(Analyzer.java:96)
          at org.objectweb.asm.ClassVisitor.visitEnd(ClassVisitor.java:339)
          at org.jacoco.core.internal.flow.ClassProbesAdapter.visitEnd(ClassProbesAdapter.java:98)
          at org.objectweb.asm.ClassReader.accept(ClassReader.java:702)
          at org.objectweb.asm.ClassReader.accept(ClassReader.java:500)
          at org.jacoco.core.analysis.Analyzer.analyzeClass(Analyzer.java:111)
          at org.jacoco.core.analysis.Analyzer.analyzeClass(Analyzer.java:127)
          ... 68 more

This error will occur both library classes and pipeline scripts (WorkflowScript). A WorkflowScript appears to be generated for each pipeline/WorkflowJob

I think the implementation, as based on the suggestion from Marc Hoffman, will have to implement coverage merging using the JaCoCo APIs. Cloning the branch at https://github.com/mkobit/jenkins-pipeline-shared-library-example/tree/mk/coverage-investigation , running ./gradlew build, inspecting the classes in build/jacoco/classpathdumps, and trying to implement some of the suggested JaCoCo APIs (ICoverageVisitor and IClassCoverage visitor mentioned in post) on those classes and source code seems like a good starting point.
This is a bit more work than I originally hoped for with this issue, so I don't think I'll get to it anytime soon.

Side Note: OpenClover might be another option (possibly attempted with https://github.com/bmuschko/gradle-clover-plugin) but I think the same problems will be encountered.

I have code under vars/(nothing under src/) in my pipeline librarys, and using the gradle Jacoco plugin, this seemed to work for me:
test {
    systemProperty "pipeline.stack.write", project.getProperty("pipeline.stack.write")
    useJUnitPlatform()
    testLogging {
        events "passed", "skipped", "failed"
    }
    jacoco {
        classDumpDir = file("$buildDir/jacoco/classpathdumps")
    }
    finalizedBy jacocoTestReport
}

jacocoTestReport {
    afterEvaluate {
        classDirectories.from = fileTree(dir: "$buildDir/jacoco/classpathdumps",
                includes: [
                        'helm.*',
                        'aws.*'
                ]
        )
    }
    reports {
        csv.enabled false
        xml {
            enabled true
            destination file("${buildDir}/test-results/jacoco.xml")
        }
        html.destination file("${buildDir}/reports/jacoco")
    }
}

(notice that the list of classes is filtered with includes:)
This might help others get a bit further with some tweaking.

I have code under vars/(nothing under src/) in my pipeline librarys, and using the gradle Jacoco plugin, this seemed to work for me:
test {
    systemProperty "pipeline.stack.write", project.getProperty("pipeline.stack.write")
    useJUnitPlatform()
    testLogging {
        events "passed", "skipped", "failed"
    }
    jacoco {
        classDumpDir = file("$buildDir/jacoco/classpathdumps")
    }
    finalizedBy jacocoTestReport
}

jacocoTestReport {
    afterEvaluate {
        classDirectories.from = fileTree(dir: "$buildDir/jacoco/classpathdumps",
                includes: [
                        'helm.*',
                        'aws.*'
                ]
        )
    }
    reports {
        csv.enabled false
        xml {
            enabled true
            destination file("${buildDir}/test-results/jacoco.xml")
        }
        html.destination file("${buildDir}/reports/jacoco")
    }
}

(notice that the list of classes is filtered with includes:)
This might help others get a bit further with some tweaking.

@js-timbirkett, can you please give full example of your build.gradle script and the command you run to run the tests and collect the coverage? In my case, I have some scripts in vars and in src but I care more about the coverage of the vars scripts. I tried adding the 2 tasks as you have and ran a gradle test with IntelliJ with jacoco coverage but end up getting tons of exceptions like following:
> Task :compileJava NO-SOURCE
> Task :compileGroovy UP-TO-DATE
> Task :processResources NO-SOURCE
> Task :classes UP-TO-DATE
> Task :compileTestJava NO-SOURCE
> Task :compileTestGroovy UP-TO-DATE
> Task :processTestResources NO-SOURCE
> Task :testClasses UP-TO-DATE
> Task :test
Exception in thread "main" java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:513)
	at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:525)
Caused by: java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.jacoco.agent.rt.internal_f3994fa.core.runtime.InjectedClassRuntime$Lookup.defineClass(InjectedClassRuntime.java:134)
	at org.jacoco.agent.rt.internal_f3994fa.core.runtime.InjectedClassRuntime.startup(InjectedClassRuntime.java:54)
	at org.jacoco.agent.rt.internal_f3994fa.PreMain.premain(PreMain.java:53)
	... 6 more
Caused by: java.lang.LinkageError: loader 'bootstrap' attempted duplicate class definition for java.lang.$JaCoCo. (java.lang.$JaCoCo is in module java.base of loader 'bootstrap')
	at java.base/java.lang.ClassLoader.defineClass1(Native Method)
	at java.base/java.lang.System$2.defineClass(System.java:2131)
FATAL ERROR in native method: processing of -javaagent failed, processJavaStart failed
	at java.base/java.lang.invoke.MethodHandles$Lookup.defineClass(MethodHandles.java:962)
	... 13 more
*** java.lang.instrument ASSERTION FAILED ***: "result" with message agent load/premain call failed at src/java.instrument/share/native/libinstrument/JPLISAgent.c line: 422
Exception in thread "main" java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:513)
	at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:525)
Caused by: java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.jacoco.agent.rt.internal_f3994fa.core.runtime.InjectedClassRuntime$Lookup.defineClass(InjectedClassRuntime.java:134)
	at org.jacoco.agent.rt.internal_f3994fa.core.runtime.InjectedClassRuntime.startup(InjectedClassRuntime.java:54)
	at org.jacoco.agent.rt.internal_f3994fa.PreMain.premain(PreMain.java:53)
	... 6 more

Appreciate your help!

@mkobit based in your research and comments I extended it to something that works really good for me. I got around the duplicated classes error by creating several Jacoco xml reports and then merging them. For this SonarQube was really useful since it accepts several Jacoco xml reports. See https://github.com/jenkinsci/JenkinsPipelineUnit/issues/103#issuecomment-1041910233 for more information


Fenwick tree Algo added

Fenwick Tree (also known as BIT) algorithm added

[x] Added code in C++
[x] Proper documentation and examples added
[x] Sample test cases added

@Vishal1003 sorry I just updated the README.md with a short description of the Fenwick Tree.


Update project wiki tab

Update the wiki to point to the new docs at https://turbinia.readthedocs.io/

Fixed.


bug: turnstone-evm readme events section is not up to date

What is happening?

Section description
Provide as much context as you can. Provide relevant software versions, screenshots, copy & paste error messages and so on.
Give as much context as you can to make it easier for the developers to figure what is happening.

Turnstone-evm readme is not showing real events that it's emitting.
How to reproduce?

Section description
Please write detailed steps of what you were doing for this bug to appear.

https://github.com/palomachain/turnstone-evm#events
Check the events heading. It doesn't match what the code does.
What is the expected behaviour?

Section description
If you know, please write down what is the expected behaviour. If you don't know, that's ok. We can have a discussion in comments.

It should document events that turnstone-evm is actually emitting.

@Vizualni @webelf101 should this be closed? I see status is done

Yep. @webelf101 feel free to close the github issue once you are done with it :)


listener "purchaseUpdatedListener" is saved many times in my database LOOP?

Version of react-native-iap  ^5.1.1
Version of react-native  0.63.2
Platforms you faced the error (IOS or Android or both?) IOS,
Expected behavior
After viewing the list of products to the options that a person can subscribe.
When I click on subscribe. Show the apple-Store buy window.
after accepting, it is saved in my backend only once. Later I will do other things like validate received etc.
thereafter. Redirect to another screen as the case may be.
Actual behavior
After subscribing to a product, the first time it is saved to my back-end, once it is successful
if I exit the application and enter again but now I subscribe to another product
is saved many times
up to 10-20-30 times is too many times, that's the first time.
If I wait like 30 minutes and do it again. (Save once) but if I do it it repeats and saves many times
When I do that after 10 minutes, I really don't know the time, because it does strange things.
When I go to the products view, I still do not subscribe and it is automatically saved in my backend 10-20-30 times
"The funny thing is that the receipt I don't know how it still exists"
The purchaseUpdatedListener listener seems to repeat many times
I don't know if something is being saved in the phone's memory, or something is not making NULL that listener
Tested environment (Emulator? Real Device?) Real Device Iphone 8
Steps to reproduce the behavior
Ignore the titles of the purchases, I fix it later
these are two products that are to subscribe.

when is the first time. Do this.

My code
`
useEffect(() => {
IAP.initConnection().then(()=>{
        IAP.getProducts(productIds).then(res => {
            setProducts(res)
        });

        purchaseUpdateSubscription =  purchaseUpdatedListener(async(purchase :InAppPurchase | SubscriptionPurchase) => {

                const  receipt = purchase.transactionReceipt

                if(receipt) {

                    try {

                        console.log('entra')

                        if(Platform.OS === 'ios') {
                           await  finishTransactionIOS(purchase.transactionId)
                        }

                        await finishTransaction(purchase)

                    }catch(error){
                        //console.log(error)
                    }

                    }
                },
            );

        })

    return () => {
        purchaseUpdateSubscription.remove()
        purchaseUpdateSubscription = null
    };

}, []);
`

When you make your first purchase. It is not saved many times (just once) sometimes up to 2 times.

When you close the app and do another test. Saved many times 20-30 times

When you just access the products view, it is saved in automatic (I do not understand this behavior, because I have not yet clicked buy)

How does it continue to enter the condition of the receipt, how does it continue to exist?

this is my log

ignore the time with my log, I still don't configure my Backend
this happens many times. How do I fix this?

 You should take a look at the apple doc and this issue.
I think that if you're using multiple Sandbox account to make different purchases, when you reload the app, each transaction will be fired up to 5 times.
Don't forget to clearTransactionIOS.

Try to check if your component which renders purchaseUpdatedListener from re-rendering. Try to prevent that with useCallback in that case.

Hi all, any update for this?

Faced with same issue, but with self implemented module (not using react-native-iap)
This happens randomly after restart the app, updatedTransactions triggers it self as many times as the purchases were made before. All purchases were finished with SKPaymentQueue.default().finishTransaction before this
Looks like this is a bug within sandbox. Also random errors when trying to purchase product

Faced with same issue, but with self implemented module (not using react-native-iap)
This happens randomly after restart the app, updatedTransactions triggers it self as many times as the purchases were made before. All purchases were finished with SKPaymentQueue.default().finishTransaction before this
Looks like this is a bug within sandbox. Also random errors when trying to purchase product

@cocoa-rum does the same thing happens on prod?

I'm also facing this issue and I'm using React hook version of react-native-iap, currently it happened at sandbox but not happened at production. but I'm afraid that iOS App Reviewers will reject the app if they found this issue.
@hyochan Thanks for your great work, but how could I use  clearTransactionIOS() correctly?
Thanks.

This is likely a bug with sandbox. Nothing happens in prod. You can safely release your app @pct. The iOS App Reviewers never rejected mine even if the bug existed in sandbox mode.

This is likely a bug with sandbox. Nothing happens in prod. You can safely release your app @pct. The iOS App Reviewers never rejected mine even if the bug existed in sandbox mode.

Thank you for your reply, which comforted me. I hope what you said is true, for many days this question drives me crazy.

This is likely a bug with sandbox. Nothing happens in prod. You can safely release your app @pct. The iOS App Reviewers never rejected mine even if the bug existed in sandbox mode.

This issue also happens on prod.  Hope it gets fixed ASAP.

Can you please help us check if this is still an issue on 8.x.x for iOS?
I have found the following as something that is expected from the native SDK: https://stackoverflow.com/a/3633571/570612
If it still happens on 8.x.x and the above doesn't fix. We'll reopen. Thank you
Note: I'm not trying to minimize the issue. I see there are multiple posts about it in various forms and I'm trying to make sense of it but with no help and it being reported on such an old version of the library is close to impossible. Thank you for understanding

+1


AppCompatCheckBox checked method

Thanks for all the hard work you put in, the library is great.
Today I run into a problem. It might just be me misunderstanding something, but I have the following code:
    AppCompatv7DSL.appCompatCheckBox {
        /* other stuff */
        checked(item.selected)
    }

This is not working The checkbox doesn't change it's state. The way I found to get it to work and set the checkbox to its correct state is:
    AppCompatv7DSL.appCompatCheckBox {
        /* other stuff */
        val checkbox = Anvil.currentView<AppCompatCheckBox>()
        checkbox.isChecked = item.selected
    }

@gnardini We have rewritten our attribute dispatch mechanism, now name clashes (such as checked() in support DSL and checked() in normal SDK DSL) get resolved nicely. I've tried the following view code and got it working with the Anvil from master branch:
    private class TestCheckBox extends RenderableView {
        private boolean selected;
        public TestCheckBox(Context c) { super(c); }
        public void view() {
            linearLayout(() -> {
                button(() -> {
                    onClick(v -> selected = !selected);
                });
                appCompatCheckBox(() -> {
                    checked(selected);
                });
            });
        }
    }

Thanks for looking into it!


Upcheck sometimes blocked by Pruning

...resulting in the service getting killed by k8s.
Reported by Yorick on Consensys Discord https://discord.com/channels/697535391594446898/725135157652226060/1145966681236193371

It gets killed ... by k8s?
Normal   Killing    2m23s                  kubelet  Container web3signer failed liveness probe, will be restarted
So there's a liveness probe running, and when web3signer prunes, that's ... blocked? Prune can take over 2 mins

2 min 6 secs for manual prune. OK for now I will change web3signer: Prune every 6 hours, keep 100, prune on start. That should keep the pruning runs fast enough that the liveness probe block isn't an issue

       livenessProbe:
            httpGet:
              path: /upcheck
              port: http
            initialDelaySeconds: 900
            timeoutSeconds: 3
            periodSeconds: 30
            failureThreshold: 3
            successThreshold: 1

So that sounds like after 90 secs of no /upcheck it gets killed. Prune takes longer than that and then it can never finish.
Which suggests /upcheck is blocked during prune, and it's usually so fast that's not seen - but Gnosis Chain with 10k validators and a restart of web3signer which restarts the 24 hour clock and well 😅
Prune on start and every 6 hours should help with this, even if /upcheck remains blocked
Particularly with that initialDelaySeconds, if it prunes on start it should always be able to finish, and then the runs after that will be faster

11 minutes ... maybe there are bits where it blocks and bits where it doesn't?

2023-08-29 07:21:40.445+00:00 | pool-3-thread-1 | INFO  | DBSlashingProtectionPruner | Pruning slashing protection database for 9879 validators
2023-08-29 07:32:54.310+00:00 | pool-3-thread-1 | INFO  | DBSlashingProtectionPruner | Pruning slashing protection database complete

This is Gnosis2, much faster there

2023-08-29 07:39:26.056+00:00 | pool-3-thread-1 | INFO  | DBSlashingProtectionPruner | Pruning slashing protection database for 4971 validators
2023-08-29 07:40:23.991+00:00 | pool-3-thread-1 | INFO  | DBSlashingProtectionPruner | Pruning slashing protection database complete

It's possible the block happens during a SQL query, and lasts for as long as that single query lasts. Certainly pruning can go >90 secs and be successful:
2023-08-29 13:21:40.442+00:00 | pool-3-thread-1 | INFO  | DBSlashingProtectionPruner | Pruning slashing protection database for 9879 validators
2023-08-29 13:28:49.156+00:00 | pool-3-thread-1 | INFO  | DBSlashingProtectionPruner | Pruning slashing protection database complete

Hi @yorickdowne, are there logs around that time W3S got killed? If you could share those that would be great. We're looking for possible Thread blocked logs or anything that looks like a possible error. We also found a small regression(which is already fixed in the main branch) where the upcheck was not returning or returning a 406 depending on the header sent by the request. It probably didn't affect you since this would normally result in the upcheck failing constantly.

Unfortunately I didn't capture those logs, and adding this environment to our promtail/Loki is somewhere in the "we will get to it ... eventually" backlog. Sorry!