Add slots: infiltration_1 / infiltration_2 / infiltration_notes

infiltration_1
infiltration time 1
Description: Amount of time it takes to accomplish the first infiltration activity
infiltration_2
infiltration time 2
Description: Amount of time it takes to accomplish the second infiltration activity
infiltration_notes
infiltration notes
Description: Provide any details, issues, or context needed to understand the infiltration activity
These are EMSL metadata fields, adding to the schema to support EMSL users in the submission portal.
All new slots or expanded extension associations will be communicated back to GSC.

Would it be OK to use the following names:

infiltration_time_1
infiltration_time_2
infiltration_notes

The EMSL preferred names could be aliases
These terms should have see_also assertions that point to documentation bout why there would be a first and second infiltration

Also, could we model with with a single multivalued inflitraions slot?

As far as we can tell from

submitting and retrieving a test biosample JSON with multivalued slots in the dev API
using the flag "list_elements_ordered: true"
discussing YAML, JSON, and Python data structure specifications with the team
multivalued slots will retain their order. Moving ahead with creating "infiltrations" as an ordered multivalued slot.

@bmeluch I'm not sure what syntax we landed on for these terms, but we'd like it to be HH:MM:SS

@ssarrafan I added this to the sprint. It's been in progress and was delayed waiting for a review on the PR.


adalight LightBerry APA102 - stops working when turned off for+- 10 seconds

[x] I confirm that this is an issue rather than a question.

Bug report
I have a adalight lightberry APA102 led strip that is connected through USB to the RPi 3B.
Yust updated to the latest hyperion ng (coming from old hyperion).
When I boot up the RPi3 everything works fine and the Ambilight works perfect.
When I turn off the APA102 strip through remote -> LED Device ->off  they turn off fine
If I then quickly (within +- 10seconds) turn them back ON, they come back on and everything works fine.
(can repeat On/Off a lot of times and just works)
BUT:
If I leave the APA102 LED strip off for longer than +-10 seconds, I cannot get them to come back on.
The only way to get it working again that I figured out is reboot the whole RPi3.
I also get some timeout error in the debug log when they refuse to turn back on.
Steps to reproduce

boot hyperion ng with adalight APA102 LED strip
turn led device off
wait 30 seconds
try to turn them back on

What is expected?
They schould just turn on, even if they have been off for a while
What is actually happening?
 Rolling back to 2.0.0-alpha8 and the problem disappears.

For me with 2.0.0-alpha9, it just doesn't work at all anymore with adalight (not even the startup effect)
Timeouts on the serial line. Rolling back to 2.0.0-alpha8 and the problem disappears.

@RomRider Do you use the "LightBerry APA102 Mode" or not?
(I do have the "LightBerry APA102 Mode" checked)

@RomRider Do you use the "LightBerry APA102 Mode" or not?
(I do have the "LightBerry APA102 Mode" checked)

Yes, I use it.

Yes, I use it.

Does the problem occur, if you set delayAfterConnect = 0?

Does the problem occur, if you set delayAfterConnect = 0?

@Lord-Grey The problem is there if:
delayAfterConnect = 0 and Refresh time = 1000ms
delayAfterConnect = 100 and Refresh time = 0ms
I did not test yet:
delayAfterConnect = 0 and Refresh time = 0ms

@Lord-Grey The problem is there if:
delayAfterConnect = 0 and Refresh time = 1000ms
delayAfterConnect = 100 and Refresh time = 0ms
I did not test yet:
delayAfterConnect = 0 and Refresh time = 0ms

@starkillerOG I did test with a standard image of
https://github.com/hyperion-project/hyperion.ng/tree/master/assets/firmware/arduino/adalight
and I cannot reproduce the issue.
Which image are you using, or is this a ready made device?
In the adalight_lightberry_apa102 image, I see that there is a switch-off by the device itself after 15s:
// If no serial data is received for a while, the LEDs are shut off
// automatically.  This avoids the annoying "stuck pixel" look when
// quitting LED display programs on the host computer.
static const unsigned long serialTimeout = 15000; // 15 seconds
https://github.com/hyperion-project/hyperion.ng/tree/master/assets/firmware/arduino/adalight_lightberry_apa102
It looks like that when hyperion reopens the session, here it does not catch-up.
Would you be able to test with the "classic" adalight image?

@starkillerOG I did test with a standard image of
https://github.com/hyperion-project/hyperion.ng/tree/master/assets/firmware/arduino/adalight
and I cannot reproduce the issue.
Which image are you using, or is this a ready made device?
In the adalight_lightberry_apa102 image, I see that there is a switch-off by the device itself after 15s:
// If no serial data is received for a while, the LEDs are shut off
// automatically.  This avoids the annoying "stuck pixel" look when
// quitting LED display programs on the host computer.
static const unsigned long serialTimeout = 15000; // 15 seconds
https://github.com/hyperion-project/hyperion.ng/tree/master/assets/firmware/arduino/adalight_lightberry_apa102
It looks like that when hyperion reopens the session, here it does not catch-up.
Would you be able to test with the "classic" adalight image?

@Lord-Grey This is a ready made device from lightberry: https://lightberry.eu/
although I think they stopped producing and selling.
Therefore I have never put firmware on the little USB to LED strip box...
I am experianced with flashing new firmware on ESP8266 chips but I don't really want to start flashing that USB to LED box since it just worked and was part of a kit I bought.
The 15 seconds switch off you mention sounds really like the issue I am experiancing!
It can verry well be 15 seconds (instead of the 10 seconds I mentioned, never actually timed it but just guessed).
If you want I can time it and see if it is indeed exactly 15 seconds?
Latch time is 30 ms.
What does Latch time do, I just left it at ist default....

@Lord-Grey This is a ready made device from lightberry: https://lightberry.eu/
although I think they stopped producing and selling.
Therefore I have never put firmware on the little USB to LED strip box...
I am experianced with flashing new firmware on ESP8266 chips but I don't really want to start flashing that USB to LED box since it just worked and was part of a kit I bought.
The 15 seconds switch off you mention sounds really like the issue I am experiancing!
It can verry well be 15 seconds (instead of the 10 seconds I mentioned, never actually timed it but just guessed).
If you want I can time it and see if it is indeed exactly 15 seconds?
Latch time is 30 ms.
What does Latch time do, I just left it at ist default....

This is my config at the moment, but I have been playing around with the settings to see if I could make it work, not sure what the correct settings actually are....

This is my config at the moment, but I have been playing around with the settings to see if I could make it work, not sure what the correct settings actually are....

@starkillerOG Thanks for providing feedback.

I don't really want to start flashing that USB to LED box since it just worked and was part of a kit I bought.

I am not asking you to flash a bought device. :-)
I only wanted to check, if it was a custom one. Seems I need to find another way reproducing it...

What does Latch time do, I just left it at ist default....

Latch time is the time-frame a device requires until the next update can be processed.
During that time-frame any updates done are skipped.

@starkillerOG Thanks for providing feedback.

I don't really want to start flashing that USB to LED box since it just worked and was part of a kit I bought.

I am not asking you to flash a bought device. :-)
I only wanted to check, if it was a custom one. Seems I need to find another way reproducing it...

What does Latch time do, I just left it at ist default....

Latch time is the time-frame a device requires until the next update can be processed.
During that time-frame any updates done are skipped.

Do you which lighberry firmware version you have?
In addition, could you set the delay after connect to 6000ms and test again?
It looks like that with later firmware versions there was delay introduced.
I assume that causes the problem that the writes by hyperion fail after reopening...

Do you which lighberry firmware version you have?
In addition, could you set the delay after connect to 6000ms and test again?
It looks like that with later firmware versions there was delay introduced.
I assume that causes the problem that the writes by hyperion fail after reopening...

@Lord-Grey Thank you so much for your help!
I actually do not know for sure which firmware version I have, but I think the updated one.
But for sure I can update my module with the latest firmware from http://update.lightberry.eu/ if you want?
I am going to test with the 6000ms delay now, will report in a bit!

@Lord-Grey Thank you so much for your help!
I actually do not know for sure which firmware version I have, but I think the updated one.
But for sure I can update my module with the latest firmware from http://update.lightberry.eu/ if you want?
I am going to test with the 6000ms delay now, will report in a bit!

@Lord-Grey I just tested with the delay after connect of 6000 ms, unfortunately that did not help.
It took 6 seconds for the device to respond to a turn on (obvious) but besides that the behaviour was the same, fast turn off/on works but if you keep it off to long it stops working.
I now took a timer and started measuring, started the timer when I turned it OFF and stopped it when I turned it back ON:
10 seconds --> works
11 seconds --> works
12 seconds --> works
13 seconds --> works
14 seconds --> works
15 seconds --> it failed
So you were exactly right, the problem indeed occurs when you turn it off for longer then 15 seconds.

@Lord-Grey I just tested with the delay after connect of 6000 ms, unfortunately that did not help.
It took 6 seconds for the device to respond to a turn on (obvious) but besides that the behaviour was the same, fast turn off/on works but if you keep it off to long it stops working.
I now took a timer and started measuring, started the timer when I turned it OFF and stopped it when I turned it back ON:
10 seconds --> works
11 seconds --> works
12 seconds --> works
13 seconds --> works
14 seconds --> works
15 seconds --> it failed
So you were exactly right, the problem indeed occurs when you turn it off for longer then 15 seconds.

@Lord-Grey I just updated the firmware of the little USB to LED converter box.
I updated to v1.1 APA102USB: http://update.lightberry.eu/download/LightberryHDUSBAPA1021.1_delay.zip
That fixed the problem for me :)
Now it just keeps working also when you turn it off for a longer time.
Not sure which firmware I was running, but probably some old one, I looked at my board and it is from 2015, so quite a while ago..
This is a picture of my board:

@Lord-Grey I just updated the firmware of the little USB to LED converter box.
I updated to v1.1 APA102USB: http://update.lightberry.eu/download/LightberryHDUSBAPA1021.1_delay.zip
That fixed the problem for me :)
Now it just keeps working also when you turn it off for a longer time.
Not sure which firmware I was running, but probably some old one, I looked at my board and it is from 2015, so quite a while ago..
This is a picture of my board:

@Lord-Grey Thank you for all your help, you are awesom!
Since the issue was resolved by updating the firmware, I will close this issue.

@Lord-Grey Thank you for all your help, you are awesom!
Since the issue was resolved by updating the firmware, I will close this issue.

@starkillerOG Great that it is working now!!!

@starkillerOG Great that it is working now!!!

@Lord-Grey Thank you for all your help, you are awesom!
Since the issue was resolved by updating the firmware, I will close this issue.

Hello Starkiller
Would wou mind to share your conf for the usb grabber. I didn’t succeed to have an equivalent of hyperion with hyperion.ng and my lightberry.
Tx
Antojne

@Tonio16 here is my config:

Thanks a lot.
Antoine

Great, I had the same kit... thanks for your investigation!

@Lord-Grey I just updated the firmware of the little USB to LED converter box. I updated to v1.1 APA102USB: http://update.lightberry.eu/download/LightberryHDUSBAPA1021.1_delay.zip
That fixed the problem for me :) Now it just keeps working also when you turn it off for a longer time. Not sure which firmware I was running, but probably some old one, I looked at my board and it is from 2015, so quite a while ago..
This is a picture of my board:

@starkillerOG sorry to Necro this thread but just upgraded to hyperion.ng and have the same issue. All the firmware upgrade info is now gone. Do you still have the file and brief explanation how to flash it? I will get the info posted to the forums for future users.

@durag5 This is the file that I used:
LightberryHDUSBAPA1021.1_delay.zip
No problem, hope everything is working for you again.

Hello
Is the adalight lightberry apa102 setup in hyperio  ln working for you?
I have no effect on my leds with it and no clue how to solve this.
I see the usb device, I chose adalight and lightberry. What should I try now?
I can see the grabber (a new one, not lightberry one) in the leds setup, so this part should be ok.
Regards
Antoine

Yes it works for me.
Unfortunately I am not an expert with the new hyperion NG.
Are you able to set static colors using the webbrowser?
When you reboot the hyperion device, do the LEDs flash red green blue during startup?

Yes it works for me. Unfortunately I am not an expert with the new hyperion NG. Are you able to set static colors using the webbrowser? When you reboot the hyperion device, do the LEDs flash red green blue during startup?

Hello
I have the red green blue flash at start.
If I look at the log I notice this point: Device disabled, device 'adalight' signals error: 'Permission error while locking the device'
I will investigate this point.
2023-12-06T16:46:55.245Z [LEDDEVICE] (DEBUG) (LedDevice.cpp:215:init()) deviceConfig: [{"autoStart":true,"colorOrder":"rgb","currentLedCount":90,"delayAfterConnect":0,"enableAttempts":6,"enableAttemptsInterval":15,"hardwareLedCount":90,"latchTime":30,"output":"ttyACM0","rate":115200,"rateList":"115200","rewriteTime":1000,"streamProtocol":"1","white_channel_blue":255,"white_channel_calibration":false,"white_channel_green":255,"white_channel_limit":100,"white_channel_red":255}] 2023-12-06T16:46:55.245Z [LEDDEVICE] (DEBUG) (LedDevice.cpp:565:setLedCount()) LedCount set to 90 2023-12-06T16:46:55.246Z [LEDDEVICE] (DEBUG) (LedDevice.cpp:571:setColorOrder()) ColorOrder set to RGB 2023-12-06T16:46:55.246Z [LEDDEVICE] (DEBUG) (LedDevice.cpp:578:setLatchTime()) LatchTime set to 30ms 2023-12-06T16:46:55.247Z [LEDDEVICE] (DEBUG) (LedDevice.cpp:602:setRewriteTime()) Refresh interval = 1000ms 2023-12-06T16:46:55.249Z [LEDDEVICE] (DEBUG) (LedDevice.cpp:247:startRefreshTimer()) Device is not ready to start a refresh timer 2023-12-06T16:46:55.250Z [LEDDEVICE] (DEBUG) (LedDevice.cpp:584:setAutoStart()) AutoStart enabled 2023-12-06T16:46:55.250Z [LEDDEVICE] (DEBUG) (LedDevice.cpp:621:setEnableAttempts()) Max enable retries: 6, enable retry interval = 15s 2023-12-06T16:46:55.251Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:66:init()) DeviceName   : ttyACM0 2023-12-06T16:46:55.252Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:68:init()) AutoDevice   : 0 2023-12-06T16:46:55.252Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:69:init()) baudRate_Hz  :<PHONE_NUMBER>-12-06T16:46:55.253Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:70:init()) delayAfCon ms: 0 2023-12-06T16:46:55.253Z [LEDDEVICE] (DEBUG) (LedDeviceAdalight.cpp:55:init()) Adalight driver uses LightBerry APA102 protocol 2023-12-06T16:46:55.254Z [LEDDEVICE] (DEBUG) (LedDeviceAdalight.cpp:122:prepareHeader()) Adalight header for 90 leds (size: 376): Ada 0x00 0x5a 0x0f 2023-12-06T16:46:55.254Z [LEDDEVICE] (INFO) Opening UART: ttyACM0 2023-12-06T16:46:55.255Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:167:tryOpen()) _rs232Port.open(QIODevice::ReadWrite): ttyACM0, Baud rate [115200]bps 2023-12-06T16:46:55.338Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:172:tryOpen()) portName:          ttyACM0 2023-12-06T16:46:55.338Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:173:tryOpen()) systemLocation:    /dev/ttyACM0 2023-12-06T16:46:55.339Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:174:tryOpen()) description:       Arduino Leonardo 2023-12-06T16:46:55.339Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:175:tryOpen()) manufacturer:      Arduino LLC 2023-12-06T16:46:55.340Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:176:tryOpen()) vendorIdentifier:  0x2341 2023-12-06T16:46:55.340Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:177:tryOpen()) productIdentifier: 0x8036 2023-12-06T16:46:55.341Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:178:tryOpen()) serialNumber:       2023-12-06T16:46:55.345Z [LEDDEVICE] (ERROR) Device disabled, device 'adalight' signals error: 'Permission error while locking the device'


FR: Exception list / Middle click

Is your feature request related to a problem? Please describe.
Sometimes I need to have duplicates, because of the design of a website; it's when information is spread over multiple pages through some clicks often, without the url changing. (Which actually is a bad trend on the web, but well...) What I did before was just press middle click for place I had to visit, navigated to it and left it there. This saves me time from constantly navigating to the same pages if I'll be using these certain pages of the same url for hours.
Btw, now middle click is obviously a pointless functionality, so I don't think it makes much sense to allow a page to be opened and close it right after - maybe the middle click event can be caught so it doesn't even open a page? But then, it may be less visible this extension was responsible for that. Just some thought.
Describe the solution you'd like
So it would be nice if we could blacklist certain domains or even urls from a page (if not with regex, but I'm fine with simple stuff).
Describe alternatives you've considered
Alternatively, you could allow user to fully use middle-click reload as an exception, if not as a preference in the extension.
Additional context
/
Disclaimer: I'm just started trying out your extension. If it turns out not to fit my workflow, I may as well not use it, but I felt it was useful reporting this limitation. To me, it seems useful for when I'm searching for a long time for a (solution to a) specific (programming) problem and end up opening the same page twice, from my bookmarks for example, or from a search page. Those would be sites/pages I'd maybe never visit again and having them not duplicate, would make it easier not to get too many tabs open, since I usually open every page in a new tab (again, with middle click :p) instead of clicking through.

Sometimes I need to have duplicates, because of the design of a website; it's when information is spread over multiple pages through some clicks often, without the url changing. (Which actually is a bad trend on the web, but well...) What I did before was just press middle click for place I had to visit, navigated to it and left it there. This saves me time from constantly navigating to the same pages if I'll be using these certain pages of the same url for hours.

You can ignore host or specific url:

Btw, now middle click is obviously a pointless functionality, so I don't think it makes much sense to allow a page to be opened and close it right after - maybe the middle click event can be caught so it doesn't even open a page? But then, it may be less visible this extension was responsible for that. Just some thought.

It's an interesting idea for the future, I'll add it to the backlog (to assess if in fact it won't conflict with different browsers, systems or configurations of different environments).


💡 RFC: Publish the VS code extension to Open VSX registry so it can be used in Gitpod.

Background & Motivation
I want to be able to use the Astro VS code Extension in Gitpod, but from their documentation... (https://www.gitpod.io/docs/vscode-extensions#where-do-i-find-extensions)

If you cannot find an extension by searching in Gitpod, it probably means that the extension hasn’t been added to the Open VSX registry yet. (https://open-vsx.org/)
In that case, please reach out to the extension author and politely ask them to publish their extension to the vendor-neutral, open source Open VSX registry. The ”How to Publish an Extension” docs provide step-by-step instructions.
Please note that .vsix files downloaded from the Visual Studio Marketplace should not be installed in Gitpod, because Microsoft prohibits the direct use of their marketplace by any non-Microsoft software, even though most extensions are actually open source and not developed or maintained by Microsoft.

Proposed Solution
Possible solutions
Follow the steps at https://github.com/eclipse/openvsx/wiki/Publishing-Extensions (listed below) to publish the Astro VS code extension to the Open VPX registry.
Alternatives considered
There seem to be no other alternatives if we want Gitpod users to be able to use the VS code extension.
Risks, downsides, and/or tradeoffs
???
Open Questions
Is there any downside to doing this?
Detailed Design
Detailled instructions are published at https://github.com/eclipse/openvsx/wiki/Publishing-Extensions, but the steps are:
How to Publish an Extension

Create an Eclipse account
Log in and sign the Publisher Agreement
Create an access token
Create the namespace
Package and upload

GitHub Action
You can find a GitHub action that allows publishing to Open VSX at HaaLeo/publish-vscode-extension.
Help make it happen!

[ ] I am willing to submit a PR to implement this change.
[ ] I am willing to submit a PR to implement this change, but would need some guidance.
[X] I am not willing to submit a PR to implement this change.

@sarah11918 It's already being discussed at #16

Closing, since it's at #16


Incorrect linter info msg

When we have a method like:
public someType someMethod() {
  synchronized (someObject) {
    doSomething();
    return something;
  }
}

we get an output like:
nnn    info     The method someMethod in class SomeClass is missing an explicit return  ImplicitReturnStatement
I think that's actually incorrect :)

@lowrider59 this is a CodeNarc issue, not a npm-groovy-lint one ^^
You may disable the rule in this file or on this specific piece of code using inline-disable comments :)
https://nvuillam.github.io/npm-groovy-lint/#disabling-rules-in-source

I believe it is complaining that your "synchronized" call is being used as the return value of the function.  The return that is there is returning from the closure (the nested block), not the function.
Try:
public someType someMethod() {
  return synchronized (someObject) {
    doSomething();
    return something;
  }
}


Improve log for transfer task validator (#4961)

What changed?

Why?

How did you test it?

Potential risks

Release notes

Documentation Changes

Pull Request Test Coverage Report for Build 0182c687-872b-47c6-88cb-7dcf62ef823b

50 of 66 (75.76%)  changed or added relevant lines in 7 files are covered.
154 unchanged lines in 18 files lost coverage.
Overall coverage decreased (-0.06%) to 57.689%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

service/history/queue/cross_cluster_queue_processor.go
0
1
0.0%

service/history/queue/transfer_queue_processor_base.go
1
2
50.0%

service/history/historyEngine.go
7
13
53.85%

service/history/execution/context.go
27
35
77.14%

Files with Coverage Reduction
New Missed Lines
%

service/history/queue/cross_cluster_queue_processor.go
1
51.76%

client/history/client.go
2
38.05%

client/history/metricClient.go
2
45.3%

common/task/parallelTaskProcessor.go
2
92.75%

common/util.go
2
51.77%

service/history/handler.go
2
47.6%

service/history/task/transfer_standby_task_executor.go
2
86.75%

service/matching/matcher.go
2
91.46%

common/persistence/statsComputer.go
3
94.64%

service/frontend/workflowHandler.go
4
60.31%

Totals

Change from base Build 0182ad0c-2efa-43a6-978f-8bc530d23bda:
-0.06%

Covered Lines:
83796

Relevant Lines:
145255

💛  - Coveralls


Should all issues be within the same repository?

Recently I have been working on www.cyberparliament.org, where people post mainly URLs of issues. I would like to have a comment area where readers can directly comment under the given issue without actually jumping to the issue page, but the homepage of Utterances suggests that it is not possible... 🤔

@neruthes, In what ways does the homepage suggest that your idea cannot be done?
Server:
app.get('/repo/:repo/issue/:issue', (req, res) => {
    let commentCode =
         '<script src="https://utteranc.es/client.js"
                 repo="' + req.params.repo + '"
                 issue-number="' + req.params.issue + '"
                 theme="github-light"
                 crossorigin="anonymous"
                 async>
         </script>'

    res.send(
         fs.readFileSync('issue.html')
         .split('<!--%COMMENTS%-->')
         .join(commentCode)
    )

});

Client:
<script src="https://utteranc.es/client.js"
        id="comments"
        theme="github-light"
        crossorigin="anonymous"
        async>
</script>

<script>
  const repo = // Your code to get the repo
  const issue = // Your code to get the issue number
  const script = document.getElementById('comments')

  script.setAttribute('repo', repo)
  script.setAttribute('issue-number', issue)
</script>

If you dynamically adjust the script tags attributes, you can do it.

@Gninoskcaj Thank you. I just figured it out. :)
However, now I am confused by a strange behavior — the script is not automatically executed upon rendering; I have to change its tagName to another value then change it back, in order to make the browser execute it.
Also, GitHub login does not work. I always get back to please-login status after a GitHub login operation.
It will be nice if you have any idea on this.
Example: https://www.cyberparliament.org/?rpr-13

Is it similar to this? https://github.com/utterance/utterances/issues/1#issuecomment-458319416
btw, It seems to work fine here: https://jsbin.com/tuzuriwiwe/edit?html,output

Issues can be posted to any repo with utterances installed.

@Gninoskcaj Yes, really similar. I am struggling with it pretty much.

Latest update: I noticed that execution failure is a general problem whenever I use .innerHTML = to add <script> tags. Then I tried...
parentNode.appendChild(document.createElement('script').setAttribute(...))

... and the script successfully executed.
Hope this may be helpful for those who might encounter the same problem in future.


file is showing infected even if the file is not infected

I am using the COMMAND mode to scan the files for virus.I have the following configuration in alfviral.properties file.
alfviral.mode=COMMAND
alfviral.command.exec=/usr/bin/clamscan
I have the following code in CommandScan.java class.
ProcessBuilder pb = new ProcessBuilder(this.command);
Process process = pb.start();
res = process.waitFor();
logger.debug(" ++++++the value of res is++++++++"+res);
when I have uploaded a file of mimetype application/x-dosexec,I got the following logs
2018-03-07 19:12:38,753 DEBUG com.fegor.alfresco.services.AntivirusServiceImpl: [Type: application/x-dosexec]
com.fegor.alfresco.services.AntivirusServiceImpl: [Mode: COMMAND]
2018-03-07 19:12:38,753 DEBUG  [security.antivirus.CommandScan] [http-apr-8080-exec-10] ++++++the value of res is++++++++127
So,when I have done a little bit of googling,I have understood that 127 is a special exit code which means that the command is not found.
I am surprised that logs are showing that the command is not found because when I have directly run the clamscan on a file,it is working perfectly and showing that the file is infected if the file is infected and clean if the file is not infected.
ayushi@ayushi-GA-78LMT-S2PT:~$ clamscan ~/Downloads/stepup.exe
/home/ayushi/Downloads/stepup.exe: OK
----------- SCAN SUMMARY -----------
Known viruses: 6431792
Engine version: 0.99.2
Scanned directories: 0
Scanned files: 1
Infected files: 0
Data scanned: 9.14 MB
Data read: 2.46 MB (ratio 3.72:1)
Time: 13.816 sec (0 m 13 s)
Also,when I have scanned the file with virustotal mode,it is working perfectly.

Hi!,
I tested and my response is in:
https://community.alfresco.com/message/830333-re-clamscan-command-from-the-java-program-gives-the-exit-code-127?commentID=830333#comment-830333
I copy same text:

Hi!
I tested Alfviral with:
Ubuntu Linux 14.04 Server (VirtualBox)
Alfresco 5.2.3
Alfviral 1.4.0-SNAPSHOT
ClamAV 0.99.4
I have this parameters in alfviral.properties (in subsystems/Security/alfviral):
alfviral.command.exec=/usr/bin/clamscan
alfviral.mode=COMMAND
And work fine!
The log:
2018-03-25 18:41:45,955 INFO [web.site.EditionInterceptor] [http-apr-8080-exec-1] Successfully retrieved license information from Alfresco.
2018-03-25 18:41:49,453 DEBUG [alfresco.behavior.OnUpdateReadScan] [http-apr-8080-exec-2] NodeRef Id: d6e590c9-63b8-478f-9980-fc66418baad2
2018-03-25 18:41:49,464 ERROR [alfresco.services.AntivirusServiceImpl] [http-apr-8080-exec-2] Property alfviral.file.only_or_exceptions not is 'only' or 'exceptions'
2018-03-25 18:42:22,778 INFO [web.scripts.SyncModeConfig] [http-apr-8080-exec-1] Successfully retrieved Sync Mode configuration from Alfresco: OFF
2018-03-25 18:43:49,742 DEBUG [alfresco.behavior.OnUpdateReadScan] [http-apr-8080-exec-4] NodeRef Id: 51f48a46-2bc4-4088-88d8-fdea52837466
2018-03-25 18:43:49,744 DEBUG [alfresco.services.AntivirusServiceImpl] [http-apr-8080-exec-4] com.fegor.alfresco.services.AntivirusServiceImpl: [NodeRef: 51f48a46-2bc4-4088-88d8-fdea52837466]
2018-03-25 18:43:49,745 DEBUG [alfresco.services.AntivirusServiceImpl] [http-apr-8080-exec-4] com.fegor.alfresco.services.AntivirusServiceImpl: [File: /opt/alfresco-content-services/alf_data/contentstore/2018/3/25/18/43/14af3c32-b92d-42c3-8bd8-b6fee7045a2e.bin]
2018-03-25 18:43:49,746 DEBUG [alfresco.services.AntivirusServiceImpl] [http-apr-8080-exec-4] com.fegor.alfresco.services.AntivirusServiceImpl: [Type: application/octet-stream]
2018-03-25 18:43:49,746 DEBUG [alfresco.services.AntivirusServiceImpl] [http-apr-8080-exec-4] com.fegor.alfresco.services.AntivirusServiceImpl: [Mode: COMMAND]
2018-03-25 18:43:49,747 DEBUG [security.antivirus.CommandScan] [http-apr-8080-exec-4] Command: [/usr/bin/clamscan, /opt/alfresco-content-services/alf_data/contentstore/2018/3/25/18/43/14af3c32-b92d-42c3-8bd8-b6fee7045a2e.bin]
2018-03-25 18:43:49,759 INFO [security.antivirus.CommandScan] [http-apr-8080-exec-4] com.fegor.alfresco.security.antivirus.CommandScan: [Aspect SCANNED_FROM_COMMAND assigned for 51f48a46-2bc4-4088-88d8-fdea52837466]
2018-03-25 18:43:49,760 INFO [alfresco.services.AntivirusServiceImpl] [http-apr-8080-exec-4] com.fegor.alfresco.services.AntivirusServiceImpl: [ALERT File: store://2018/3/25/18/43/14af3c32-b92d-42c3-8bd8-b6fee7045a2e.bin is infected!]
2018-03-25 18:43:51,295 INFO [alfresco.services.AntivirusServiceImpl] [http-apr-8080-exec-4] com.fegor.alfresco.services.AntivirusServiceImpl: [Sending notify mail notify of infected to<EMAIL_ADDRESS>Please, can you testing with a bash's script?
For example:
vim /usr/local/bin/custom-clamscan.sh
With:
/usr/bin/clamscan $1
chmod 744 /usr/local/bin/custom-clamscan.sh
And use this in:
alfviral.command.exec=/usr/local/bin/custom-clamscan.sh
Best regards,
Fegor

Hi all,
that's what I am saying,that alfviral is showing the file is infected even if it is not infected and this is beacuse it is not able to find the command and that's why it is giving the exit code 127.but I don't know why it is not able to find the command

I used the suggested custom-clamscan.sh but added the a log "2> /tmp/file"
The error was
/usr/bin/clamscan: relocation error: /usr/lib/libclamav.so.7: symbol SSL_load_error_strings, version OPENSSL_1.0.0 not defined in file libssl.so.1.0.0 with link time reference
My system has 2 libssl.so.1.0.0 files, one under /lib and one under my alfresco install folder.
I altered custom-clamscan.sh to be
LD_LIBRARY_PATH=/opt/alfresco/lib  /usr/bin/clamscan  $1
and ran the command manually - I got the same relocation error.
I altered custom-clamscan.sh to be
LD_LIBRARY_PATH=/lib/ /usr/bin/clamscan  $1
which is the system library path. The scanner then runs manally and under alfviral.
I think the SSL library that came with the alfresco installer isn't compatible (on my system) with clamav

Ok, but work fine now?
If is yes then, please, copy this solution in Alfresco forum too. :-)

@richardt3 plz try
export LD_LIBRARY_PATH="" in script to Reset LD_LIBRARY_PATH variable, as it is set by tomcat and plz let me know the results.

@fegorama
Hi fegor,
Thanks for testing this.I will test this with the script approach that u have told and let u know the results.can u also tell me why the clamscan is running on parameter $1 as I am new to scripting.
but can u also test it by uploading a file of mimetype application/x-dosexec which is not virus infected and putting the logs logger.debug("+++the value of res is+++"+res) and plz let me know the result as it is showing a non-infected file to be infected.
Best regards
Ayushi Agrahari

@fegorama @richardt3  it is working perfectly with the scripting approach that u have told
the logs for the  clean file is
2018-04-02 11:18:56,408 DEBUG [alfresco.behavior.OnUpdateReadScan] [http-apr-8080-exec-2] NodeRef Id: 1e5e74d0-e2d9-481f-a2ba-bfe296d2c0e5
2018-04-02 11:18:56,410  DEBUG [alfresco.services.AntivirusServiceImpl] [http-apr-8080-exec-2] com.fegor.alfresco.services.AntivirusServiceImpl: [NodeRef: 1e5e74d0-e2d9-481f-a2ba-bfe296d2c0e5]
2018-04-02 11:18:56,411  DEBUG [alfresco.services.AntivirusServiceImpl] [http-apr-8080-exec-2] com.fegor.alfresco.services.AntivirusServiceImpl: [File: /home/alfresco_installation/alfviral/alf_data/contentstore/2018/4/2/11/18/2792d4e9-884a-4b74-b693-d42d8b81d259.bin]
2018-04-02 11:18:56,411  DEBUG [alfresco.services.AntivirusServiceImpl] [http-apr-8080-exec-2] com.fegor.alfresco.services.AntivirusServiceImpl: [Type: image/tiff]
2018-04-02 11:18:56,411  DEBUG [alfresco.services.AntivirusServiceImpl] [http-apr-8080-exec-2] com.fegor.alfresco.services.AntivirusServiceImpl: [Mode: COMMAND]
2018-04-02 11:18:56,411  DEBUG [security.antivirus.CommandScan] [http-apr-8080-exec-2] Command: [/usr/local/bin/custom-clamscan.sh, /home/alfresco_installation/alfviral/alf_data/contentstore/2018/4/2/11/18/2792d4e9-884a-4b74-b693-d42d8b81d259.bin]
2018-04-02 11:19:09,853  DEBUG [security.antivirus.CommandScan] [http-apr-8080-exec-2] res is0
2018-04-02 11:19:09,853  DEBUG [alfresco.services.AntivirusServiceImpl] [http-apr-8080-exec-2] [File: store://2018/4/2/11/18/2792d4e9-884a-4b74-b693-d42d8b81d259.bin is clean
2018-04-02 11:19:10,832  DEBUG [alfresco.behavior.OnUpdateReadScan] [defaultAsyncAction1] NodeRef Id: da3c2af0-df6f-42c1-a4eb-c971b291299f
2018-04-02 11:19:10,833  DEBUG [alfresco.behavior.OnUpdateReadScan] [defaultAsyncAction1] NodeRef Id: da3c2af0-df6f-42c1-a4eb-c971b291299f has deleted (update event)
2018-04-02 11:19:10,833  DEBUG [alfresco.behavior.OnUpdateReadScan] [defaultAsyncAction1] NodeRef Id: 0892a7b3-b4a6-4524-a9eb-aa9fece54d0b
2018-04-02 11:19:10,835  ERROR [alfresco.services.AntivirusServiceImpl] [defaultAsyncAction1] Property alfviral.file.only_or_exceptions not is 'only' or 'exceptions'
The logs for the infected file is
2018-04-02 11:19:49,355  DEBUG [alfresco.behavior.OnUpdateReadScan] [http-apr-8080-exec-4] NodeRef Id: fed1e64c-4cbe-420d-9d4a-55e5d641aada
2018-04-02 11:19:49,356  DEBUG [alfresco.services.AntivirusServiceImpl] [http-apr-8080-exec-4] com.fegor.alfresco.services.AntivirusServiceImpl: [NodeRef: fed1e64c-4cbe-420d-9d4a-55e5d641aada]
2018-04-02 11:19:49,356  DEBUG [alfresco.services.AntivirusServiceImpl] [http-apr-8080-exec-4] com.fegor.alfresco.services.AntivirusServiceImpl: [File: /home/alfresco_installation/alfviral/alf_data/contentstore/2018/4/2/11/19/442f8677-6293-4e7f-aeb4-c31a26940a2d.bin]
2018-04-02 11:19:49,356  DEBUG [alfresco.services.AntivirusServiceImpl] [http-apr-8080-exec-4] com.fegor.alfresco.services.AntivirusServiceImpl: [Type: application/octet-stream]
2018-04-02 11:19:49,356  DEBUG [alfresco.services.AntivirusServiceImpl] [http-apr-8080-exec-4] com.fegor.alfresco.services.AntivirusServiceImpl: [Mode: COMMAND]
2018-04-02 11:19:49,356  DEBUG [security.antivirus.CommandScan] [http-apr-8080-exec-4] Command: [/usr/local/bin/custom-clamscan.sh, /home/alfresco_installation/alfviral/alf_data/contentstore/2018/4/2/11/19/442f8677-6293-4e7f-aeb4-c31a26940a2d.bin]
2018-04-02 11:20:02,497  DEBUG [security.antivirus.CommandScan] [http-apr-8080-exec-4] res is1
2018-04-02 11:20:02,542  INFO  [security.antivirus.CommandScan] [http-apr-8080-exec-4] com.fegor.alfresco.security.antivirus.CommandScan: [Aspect SCANNED_FROM_COMMAND assigned for fed1e64c-4cbe-420d-9d4a-55e5d641aada]
2018-04-02 11:20:02,542  INFO  [alfresco.services.AntivirusServiceImpl] [http-apr-8080-exec-4] com.fegor.alfresco.services.AntivirusServiceImpl: [ALERT File: store://2018/4/2/11/19/442f8677-6293-4e7f-aeb4-c31a26940a2d.bin is infected!]
2018-04-02 11:20:02,572  INFO  [alfresco.services.AntivirusServiceImpl] [http-apr-8080-exec-4] com.fegor.alfresco.services.AntivirusServiceImpl: [Sending notify mail notify of infected to<EMAIL_ADDRESS>Thankyou so much fegor.
Best Regards
Ayushi Agrahari

Perfect!
I close this incident but I verify the case of the assigned infected aspect if this call is failed.
Thank you!
Best Regards
Fegor


feat: look for credential helpers in common paths

The docker credential helpers might be present in a few common places besides the default /bin:/usr/bin:/usr/sbin one. Look for it in a few directories commonly used by package managers.
Looking for a binary if different places is not ideal in terms of reproductibility but it makes practical sense given the nature of the executable we're looking for (a credential helper specified in the user's configuration).

why wouldn't these paths be in PATH by default? I don't know any tool that does this kind of lookup.

Thanks, this... is a great question.
I stumbled upon a situation where the PATH was set to a minimal value such as /bin:/usr/bin:/usr/sbin in this very script (echoing the env var and exiting non-zero to check) which was the cause of a failure to pull an image with oci_pull, but I can't reproduce it anymore and haven't seen any bazel options or execution context that would explain that behaviour then.
I will close the PR for now and will reopen it with more information if I feel such a change still makes sense.


gzserver segmentation fault

I have followed the instructions and wanted to try the Gazebo example with
ros2 launch ros2_control_demo_robot rrbot_system_position_only_gazebo.launch.py
Versions as of issue creation time:

Kubuntu 20.04, Foxy apt packages up to date
_control, _controllers, _control_demos on a fresh master in colcon_ws
gazebo 11.3.0

The output:
[INFO] [launch]: All log files can be found below /home/cdf/.ros/log/2021-05-02-16-30-58-135425-xps15-15435
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [gzserver-1]: process started with pid [15437]
[INFO] [gzclient   -2]: process started with pid [15439]
[INFO] [robot_state_publisher-3]: process started with pid [15442]
[INFO] [spawn_entity.py-4]: process started with pid [15445]
[INFO] [spawner.py-5]: process started with pid [15447]
[robot_state_publisher-3] Parsing robot urdf xml string.
[robot_state_publisher-3] Link base_link had 1 children
[robot_state_publisher-3] Link link1 had 1 children
[robot_state_publisher-3] Link link2 had 3 children
[robot_state_publisher-3] Link camera_link had 1 children
[robot_state_publisher-3] Link camera_link_optical had 0 children
[robot_state_publisher-3] Link hokuyo_link had 0 children
[robot_state_publisher-3] Link tool_link had 0 children
[robot_state_publisher-3] [INFO] [1619965858.843488088] [robot_state_publisher]: got segment base_link
[robot_state_publisher-3] [INFO] [1619965858.843573769] [robot_state_publisher]: got segment camera_link
[robot_state_publisher-3] [INFO] [1619965858.843583449] [robot_state_publisher]: got segment camera_link_optical
[robot_state_publisher-3] [INFO] [1619965858.843589613] [robot_state_publisher]: got segment hokuyo_link
[robot_state_publisher-3] [INFO] [1619965858.843594700] [robot_state_publisher]: got segment link1
[robot_state_publisher-3] [INFO] [1619965858.843599554] [robot_state_publisher]: got segment link2
[robot_state_publisher-3] [INFO] [1619965858.843604367] [robot_state_publisher]: got segment tool_link
[robot_state_publisher-3] [INFO] [1619965858.843609273] [robot_state_publisher]: got segment world
[spawner.py-5] [INFO] [1619965859.050887463] [spawner_joint_state_broadcaster]: Waiting for /controller_manager services
[spawn_entity.py-4] [INFO] [1619965859.288095445] [spawn_entity]: Spawn Entity started
[spawn_entity.py-4] [INFO] [1619965859.288498049] [spawn_entity]: Loading entity published on topic robot_description
[spawn_entity.py-4] [INFO] [1619965859.290043114] [spawn_entity]: Waiting for entity xml on robot_description
[spawn_entity.py-4] [INFO] [1619965859.302540653] [spawn_entity]: Waiting for service /spawn_entity, timeout = 30
[spawn_entity.py-4] [INFO] [1619965859.302919486] [spawn_entity]: Waiting for service /spawn_entity
[spawn_entity.py-4] [INFO] [1619965859.808193191] [spawn_entity]: Calling service /spawn_entity
[gzserver-1] [INFO] [1619965860.352477460] [camera_controller]: Publishing camera info to [/camera1/camera_info]
[spawn_entity.py-4] [INFO] [1619965860.358004668] [spawn_entity]: Spawn status: SpawnEntity: Successfully spawned entity [rrbot_system_position]
[gzserver-1] [WARN] [1619965860.378583637] [gazebo_ros_head_hokuyo_controller]: missing <output_type>, defaults to sensor_msgs/PointCloud2
[INFO] [spawn_entity.py-4]: process has finished cleanly [pid 15445]
[gzserver-1] [INFO] [1619965860.483478340] [gazebo_ros2_control]: Loading gazebo_ros2_control plugin
[gzserver-1] [INFO] [1619965860.486060309] [gazebo_ros2_control]: Starting gazebo_ros2_control plugin in namespace: /
[gzserver-1] [INFO] [1619965860.486105794] [gazebo_ros2_control]: Starting gazebo_ros2_control plugin in ros 2 node: gazebo_ros2_control
[gzserver-1] [INFO] [1619965860.486136422] [gazebo_ros2_control]: Loading parameter file /home/cdf/ws/colcon_ws/install/ros2_control_demo_robot/share/ros2_control_demo_robot/config/rrbot_gazebo_forward_controller_position.yaml
[gzserver-1]
[gzserver-1] [INFO] [1619965860.488876630] [gazebo_ros2_control]: connected to service!! robot_state_publisher
[gzserver-1] [INFO] [1619965860.489500242] [gazebo_ros2_control]: Recieved urdf from param server, parsing...
[gzserver-1] [INFO] [1619965860.508523322] [gazebo_ros2_control]: Loading joint: joint1
[gzserver-1] [INFO] [1619965860.508580270] [gazebo_ros2_control]:       Command:
[gzserver-1] [INFO] [1619965860.508591721] [gazebo_ros2_control]:                position
[gzserver-1] [INFO] [1619965860.508600289] [gazebo_ros2_control]:       State:
[gzserver-1] [INFO] [1619965860.508607975] [gazebo_ros2_control]:                position
[gzserver-1] [INFO] [1619965860.508617356] [gazebo_ros2_control]: Loading joint: joint2
[gzserver-1] [INFO] [1619965860.508625250] [gazebo_ros2_control]:       Command:
[gzserver-1] [INFO] [1619965860.508632212] [gazebo_ros2_control]:                position
[gzserver-1] [INFO] [1619965860.508639787] [gazebo_ros2_control]:       State:
[gzserver-1] [INFO] [1619965860.508646536] [gazebo_ros2_control]:                position
[gzserver-1] [INFO] [1619965860.512728768] [gazebo_ros2_control]: Loading controller_manager
[gzserver-1] [WARN] [1619965860.545596888] [gazebo_ros2_control]:  Desired controller update period (0.01 s) is slower than the gazebo simulation period (0.001 s).
[gzserver-1] [INFO] [1619965860.545711655] [gazebo_ros2_control]: Loaded gazebo_ros2_control.
[gzserver-1] Segmentation fault (core dumped)
[ERROR] [gzserver-1]: process has died [pid 15437, exit code 139, cmd 'gzserver                                                                       -s libgazebo_ros_init.so   -s libgazebo_ros_factory.so   -s libgazebo_ros_force_system.so       '].

Could anyone help?

Can you launch your system with a verbose output of gazebo:
Turning this line to True: https://github.com/ros-controls/ros2_control_demos/blob/master/ros2_control_demo_robot/launch/rrbot_system_position_only_gazebo.launch.py#L36
do you also have gazebo_ros2_control packages built from source?

Hi, thanks for your inputs.
Here is some of the the output of a verbose gazebo run:
[gzclient --verbose  -2] [Msg] Waiting for master.
[gzclient --verbose  -2] [Msg] Connected to gazebo master @ http://<IP_ADDRESS>:11345
[gzclient --verbose  -2] [Msg] Publicized address: <IP_ADDRESS>
[gzclient --verbose  -2] [Err] [InsertModelWidget.cc:402] Missing model.config for model "/home/cdf/ws/colcon_ctrl_ws/install/ros2_control_demo_robot/share/ament_index"
[gzclient --verbose  -2] [Err] [InsertModelWidget.cc:402] Missing model.config for model "/home/cdf/ws/colcon_ctrl_ws/install/ros2_control_demo_robot/share/colcon-core"
[gzclient --verbose  -2] [Err] [InsertModelWidget.cc:402] Missing model.config for model "/home/cdf/ws/colcon_ctrl_ws/install/ros2_control_demo_robot/share/ros2_control_demo_robot"
[gzserver-1] [WARN] [1621055372.290500959] [gazebo_ros2_control]:  Desired controller update period (0.01 s) is slower than the gazebo simulation period (0.001 s).
[gzserver-1] [INFO] [1621055372.290712444] [gazebo_ros2_control]: Loaded gazebo_ros2_control.
[gzclient --verbose  -2] [Err] [Connection.cc:546] Connection[5] Closed during Read
[gzclient --verbose  -2] [Err] [TransportIface.cc:385] Unable to read from master
[gzclient --verbose  -2] [Err] [GLWidget.cc:896] Unable to connect to a running Gazebo master.
[gzserver-1] Segmentation fault (core dumped)
[ERROR] [gzserver-1]: process has died [pid 92701, exit code 139, cmd 'gzserver       --verbose                                                                -s libgazebo_ros_init.so   -s libgazebo_ros_factory.so   -s libgazebo_ros_force_system.so       '].
[gzclient --verbose  -2] [Wrn] [Publisher.cc:136] Queue limit reached for topic /gazebo/default/user_camera/pose, deleting message. This warning is printed only once.

Then I additionally cloned gazebo_ros2_control to the colcon workspace (previously I used system install), but got an error building it:
In file included from /usr/include/gazebo-11/gazebo/msgs/MessageTypes.hh:7,
                 from /usr/include/gazebo-11/gazebo/physics/Joint.hh:29,
                 from /home/cdf/ws/colcon_ctrl_ws/src/gazebo_ros2_control/gazebo_ros2_control/include/gazebo_ros2_control/gazebo_system_interface.hpp:23,
                 from /home/cdf/ws/colcon_ctrl_ws/src/gazebo_ros2_control/gazebo_ros2_control/include/gazebo_ros2_control/gazebo_system.hpp:25,
                 from /home/cdf/ws/colcon_ctrl_ws/src/gazebo_ros2_control/gazebo_ros2_control/src/gazebo_system.cpp:19:
/usr/include/gazebo-11/gazebo/msgs/altimeter.pb.h:17:2: error: #error This file was generated by an older version of protoc which is
   17 | #error This file was generated by an older version of protoc which is
      |  ^~~~~
/usr/include/gazebo-11/gazebo/msgs/altimeter.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please
   18 | #error incompatible with your Protocol Buffer headers.  Please
      |  ^~~~~
/usr/include/gazebo-11/gazebo/msgs/altimeter.pb.h:19:2: error: #error regenerate this file with a newer version of protoc.
   19 | #error regenerate this file with a newer version of protoc.
      |  ^~~~~

protoc --version returns libprotoc 3.14.0

I managed to build gazebo_ros2_control by following step 1. in https://github.com/AcutronicRobotics/gym-gazebo2/issues/13#issuecomment-482410238
The gazebo segmentation fault still persists however, producing the same exact verbose output.

Hello, having the same issue.

The compilation errors were solved by following the link referenced in my earlier reply https://github.com/ros-controls/ros2_control_demos/issues/91#issuecomment-841851095
The problem happens on runtime. It possibly still has to do with protobuf. Over the weekend I try to set up everything clean from scratch with a single version of protobuf on my system and report.

Closing the issue for lack of activity. Feel free to reopen it if needed.

Hi. I'm having the exactly same issue here... did anyone solve this problem?


planner

this pr aims to Implement the positionManager, position planner
this is a draft for the position manager, till completion

Summary by CodeRabbit
Release Notes

New Features

Introduced a new position_manager module for enhanced liquidity position management.
Added V4PositionPlanner struct with methods for minting, increasing, decreasing, and burning liquidity positions.
New utility functions for parsing calldata and managing permit details.

Bug Fixes

Improved error handling with new error types for better clarity during smart contract interactions.

Documentation

Updated dependency management and feature configurations for better package usability.

@shuhuiluo currently working on something, will resume this in the next 2 days


(chore) Set up coveralls

This will start passing once coveralls has been authorised in the schibsted org.


Update inscriptions.json

Hello @MEASBEATS , is this identical to #2275 ? please close or comment your issue. thank you


[ekg-forward]: Fix the contra-tracer mess

Part of https://github.com/input-output-hk/devx-aux/issues/42

Done!


add(scan): Run scans_for_new_key and scan_subscribe_results tests in CI

Motivation
We want to run these tests in CI.
Closes #8274.
Closes #8259.
PR Author Checklist
Check before marking the PR as ready for review:

[x] Will the PR name make sense to users?
[x] Does the PR have a priority label?
[x] Have you added or updated tests?
[x] Is the documentation up to date?

For significant changes:

[x] Is there a summary in the CHANGELOG?
[x] Can these changes be split into multiple PRs?

If a checkbox isn't relevant to the PR, mark it as done.
Solution

Add the tests to entrypoint.sh
Add the tests to GCP integration test workflow

Review
Anyone can review.
Reviewer Checklist
Check before approving the PR:

[ ] Does the PR scope match the ticket?
[ ] Are there enough tests to make sure it works? Do the tests cover the PR motivation?
[ ] Are all the PR blockers dealt with?
PR blockers can be dealt with in new tickets or PRs.

And check the PR Author checklist is complete.
Follow Up Work

#8236

The tests pass, but it's exiting with an exit code of 1 somehow: https://github.com/ZcashFoundation/zebra/actions/runs/7923158455/job/21632648787?pr=8275#step:15:261
It seems to emit an exit code of 0 locally.

I'll unify these tests for #8286 first and re-open this PR to add the new test to CI.


BigQuery schema management from a configuration file

In this comment the author used a YML file to pass to create_table to that specified the schema. It appears this feature was removed in preference for only programatic schema definitions. I'd really prefer to have a the schema defined in a configuration file and so I re-created that functionality myself.
I'm thinking of the interface being something like this:
table_schema = YAML.load_file(File.join(root, "config", "big_query", "schema.yml"))
dataset.create_table(table_id) do |table|
  table.schema_from(table_schema)
end

Or going back to the previous interface:
table_schema = YAML.load_file(File.join(root, "config", "big_query", "schema.yml"))
dataset.create_table(table_id, schema: table_schema)

Would this be a feature you'd be open to a PR for?

Any progress on a PR for this feature?

Not yet. It's on my list but we've been busy with other things and I haven't had time. I hope to get to it soon

FWIW this would be super useful for my team as well.

@jeremywadsack Any update on this one?

I've got a start on it with working code for loading and an acceptance test. I need to figure out how to write a doctest and then add unit tests. Then write the dump code and class methods and test those.
I noticed there aren't any unit tests for the Schema class. Are you ok if I add one? I think it's more "unit" and also makes it easier to write a test rather than having to put tests into table, table_reference, dataset, and dataset_reference. In fact, I didn't see very many tests covering schemas.

@jeremywadsack Sounds good!
The unit tests for the Schema class are in schema_test.rb. If all the logic is in Schema, then personally I think it's ok to just add tests there. The tests at the level of table, table_reference, dataset, and dataset_reference are more to specify the API contract than to verify the logic.

If you have any trouble with doctest, please ping me here.

Ah, I see that Mike added those schema unit tests last week, which is why I didn't see it. :) Great. I'll rebase and add to that. All the logic is in Schema.

@blowmage I just noticed, in the new test/google/cloud/bigquery/schema_test.rb you used  Google::Apis::BigqueryV2::TableSchema.from_json. I didn't know about that call.
I had written up something like you suggested (and similar to what we're using) to iterate through the fields and add them (diff here), but it seems like maybe I could just call that instead?
  def load source
    if source.respond_to?(:rewind) && source.respond_to?(:read)
      source.rewind
      source = source.read
      source_json = String source
    elsif source.is_a? Hash
      source_json = source.to_json
    else
      source_json = String source
    end
    Google::Apis::BigqueryV2::TableSchema.from_json source_json
  end

One differences is that in the code you suggested the schema.json content would look like this:
[
  {"name":"name","type":"STRING","mode":"REQUIRED"}
  ...
]

And in the implementation above it would look like this:
{
      "fields": [
        {"name":"name","type":"STRING","mode":"REQUIRED"},
        ...
      ]
    }

But I could write the method to read adapt to the first format.
Two questions:

Am I missing any reason why not to use from_json?
Do you have a preference on the schema file? I'm partial to the first format as it's simpler, but maybe there are other things that could go into the JSON in addition to fields so it would be important to include that in there?

We should use th same format as the CLI JSON File.

Oh, right. You said that before. :) And I did.
Can you think of any reason why I shouldn't use Google::Apis::BigqueryV2::TableSchema.from_json in place of more parsing code in this gem? (I can modify the JSON to match the expected format for that call.)

As long as the API is correct and the tests pass it doesn’t matter to me (much) how it is implemented. Using the private .from_json is fine for the implementation.


feat(hints): add NewHint#50

~Depends on: #1030~
Description
This PR adds the missing hint NewHint#50, now known as UINT256_GET_SQUARE_ROOT. Also, allow trailing commas in non_continuous_ids_data macro.

See comments

Comments addressed. They are part of the verbatim hint and need to be kept in.


cannot use proxy for gradle

thanks for your great job,
I want to request a feature if it's not exists already. I want to add http and https proxy for gradle when fetching dependencies but I can not find any option.

Hey, thanks for the compliment.
You mean provide a proxy because you can't access maven?

unfortunately some maven and gradle repositories have restrictions in my country.

Aw ok, so that will happen whenever you use Gradle, you should try to find an alternative solution like changing your DNS's to the google ones or openDNS so you can solve your problem forever ;)
Don't get me wrong but that's not quite dryrun's problem so to speak.
Best of luck and say something when you find a solution 👍

umm... ok I know but it would be much better if you could include a gradle.properties when you want to run gradle build command which includes:
systemProp.https.proxyHost=user entered host
systemProp.https.proxyPort=user entered port
systemProp.http.proxyHost=user entered host
systemProp.http.proxyPort=user entered port

I thought it would be easy. otherwise thanks again for your fast reply.

Didn't know about this, so you're saying that if I add a gradle.properties with this:
systemProp.http.proxyHost=www.somehost.org
systemProp.http.proxyPort=8080
systemProp.http.proxyUser=userid
systemProp.http.proxyPassword=password

it will work for you?

Yes sure, in my case I use polipo so i use it like this without username and pass
systemProp.https.proxyHost=localhost
systemProp.https.proxyPort=8123
systemProp.http.proxyHost=localhost
systemProp.http.proxyPort=8123

One for http and one for https. Also you can do it without creating a gradle.properties file, but also with cli
Like this
gradlew -Dhttp.proxyHost=localhost -Dhttp.proxyPort=8123 -Dhttps.proxyHost=localhost -Dhttps.proxyPort=8123
I think this one should be easier to implement for you as you don't need to creat a new file. So you can add it to dryrun cli for example like this too:
dryrun -Dhttp.proxyHost=localhost -Dhttp.proxyPort=8123 -Dhttps.proxyHost=localhost -Dhttps.proxyPort=8123
Hope these would help ;)


USB Network Not Being Polled for NTP

Hi,
I have a Chrony server running on <IP_ADDRESS>, but I can't see anywhere in the logs that the server is being polled. The only related NTP lines are failing to reach the iRobot pool because the network has no internet access:
Jun  8 15:25:29 iRobot-66C91A09E3FD4C11A11F9252BB06CF42 user.notice ntpd: Server 'ntpd' was stopped gracefully.
Jun  8 15:25:34 iRobot-66C91A09E3FD4C11A11F9252BB06CF42 user.notice ntpd: ntpd: bad address '0.irobot.pool.ntp.org'
Jun  8 15:25:39 iRobot-66C91A09E3FD4C11A11F9252BB06CF42 user.notice ntpd: ntpd: bad address '1.irobot.pool.ntp.org'
Jun  8 15:25:44 iRobot-66C91A09E3FD4C11A11F9252BB06CF42 user.notice ntpd: ntpd: bad address '2.irobot.pool.ntp.org'
Jun  8 15:25:49 iRobot-66C91A09E3FD4C11A11F9252BB06CF42 user.notice ntpd: ntpd: bad address '3.irobot.pool.ntp.org'
Jun  8 15:25:55 iRobot-66C91A09E3FD4C11A11F9252BB06CF42 user.notice ntpd: ntpd: bad address '3.irobot.pool.ntp.org'

The Create3 base also does not show up when running sudo chronyc clients. This server is able to sync time over the non-USB interface correctly, so I'm at a loss as to what to do here. I would expect there to be a similar line for the USB interface. I'm running version G.4.5.

To address this issue we currently have this band aid fix #327 on the webserver.

Step 1: Using web server set the create3 time manually using the "Set date and time" Menu to be really far into the past.
Step 2: Then use the restart ntpd and cross all your fingers and toes; hoping that the create3 accepts the time from the raspberry pi due to large the discrepancy

This fix would allow user to have more control over the chrony service. However, unfortunately is taking a considerable amount of time to implement: #333
"If only we had root access so we could fix issues ourselves. Without the overhead of building the framework into a webserver"

@Jayden-F thanks for sharing the band aid fix! I hope there is a better solution soon.
If the ntpd keeps timing out, I'm assuming I didn't set the date and time in the web server far enough in the past?
A lot of these for different addresses: user.notice ntpd: ntpd: timed out waiting for <IP_ADDRESS>, reach 0x00, next query in 65s
How do we know when the create3 accepts the time from the pi? Did you do an hour into the past, a day, a month?

I typically set it back a couple of years. Then check the about tab to see if it has successfully time synced.

We have just released G.5.1 / H.2.1 which allows you to directly edit ntp.conf; please feel free to reconfigure the daemon as you please, and let us know when you find a configuration which works in your particular use case. The Create 3 robot does not run chrony.

In case it helps: Clearpath has an example ntp.conf for the Turtlebot 4 use case; perhaps this can help with yours. https://github.com/turtlebot/turtlebot4/issues/216

@shamlian I finally got a chance to test out the new update and the ntp.conf modification works perfectly. Thanks!

That's great! Did you end up using the ntp.conf suggested by @roni-krenin ?

I just used my own NTP config. I'm running these on an air gapped network
so I didn't need to try and connect to the irobot pool
On Wed, Jul 19, 2023, 16:41 Steven Shamlian @.***>
wrote:

That's great! Did you end up using the ntp.conf suggested by @roni-krenin ?
—
Reply to this email directly, view it on GitHub
https://github.com/iRobotEducation/create3_docs/issues/401#issuecomment-1642727091,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACQZPZNTMTMHLYYAQX4E4Y3XRBA7VANCNFSM6AAAAAAY7XTNEM
.
You are receiving this because you modified the open/close state.Message
ID: @.***>


No way to add a custom bootstrap configuration in ingress gateway

Bug description
There's no way to add a custom bootstrap configuration to an ingress gateway.  The recommended way (for sidecars apparently) is by adding an annotation to a pod with key sidecar.istio.io/bootstrapOverride.  If you add try to add this to an ingress gateway, no bootstrap configuration is injected.  This annotation should either work or another interface for gateways should be exposed.
Affected product area (please put an X in all that apply)
[ x] Docs
[x ] Installation
[ ] Networking
[ ] Performance and Scalability
[x] Extensions and Telemetry
[ ] Security
[ ] Test and Release
[ ] User Experience
[ ] Developer Infrastructure
Affected features (please put an X in all that apply)
[ ] Multi Cluster
[ ] Virtual Machine
[ ] Multi Control Plane
Expected behavior
The bootstrap configuration should be built into a volume, mounted, and used by envoy.
Steps to reproduce the bug
Install Istio via Operator - two IstioOperator objects so I can control the ingressgateways in different IstioOperator objects.
apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
metadata:
  name: istiocontrolplane
spec:
  profile: default
  components:
    ingressGateways:
      - name: istio-ingressgateway
        enabled: false

apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
metadata:
  name: blah-ingressgateway
spec:
  profile: empty
  components:
    ingressGateways:
    - enabled: true
      name: blah-ingressgateway
      k8s:
        podAnnotations:
          sidecar.istio.io/bootstrapOverride: "blah-custom-bootstrap-config"

Then, make a bootstrap configuration with this configmap name:
apiVersion: v1
kind: ConfigMap
metadata:
  labels:
    component: istio
  name: blah-custom-bootstrap-config
  namespace: istio-system
data:
  custom_bootstrap.json: |
    {
       "overload_manager":{
          "refresh_interval":{
             "seconds":1
          },
          "actions":[
             {
                "name":"envoy.overload_actions.shrink_heap",
                "triggers":[
                   {
                      "threshold":{
                         "value":0.90
                      },
                      "name":"envoy.resource_monitors.fixed_heap"
                   }
                ]
             },
             {
                "name":"envoy.overload_actions.stop_accepting_requests",
                "triggers":[
                   {
                      "threshold":{
                         "value":0.99
                      },
                      "name":"envoy.resource_monitors.fixed_heap"
                   }
                ]
             }
          ],
          "resource_monitors":[
             {
                "config":{
                   "max_heap_size_bytes":2147483648
                },
                "name":"envoy.resource_monitors.fixed_heap"
             }
          ]
       }
    }

Then, either examine the deployment or run istioctl proxy-config bootstrap pod-asdf to examine the bootstrap configuration.  The bootstrap isn't injected in.
Version (include the output of istioctl version --remote and kubectl version --short and helm version if you used Helm)
$ istioctl version --remote
client version: 1.6.5
control plane version: 1.6.5
data plane version: 1.6.5 (12 proxies)
$ kubectl version --short
Client Version: v1.18.8
Server Version: v1.16.13-eks-2ba888
How was Istio installed?
IstioOperators as above
Environment where bug was observed (cloud vendor, OS, etc)
EKS v 1.16.13

Yeah i managed to get this working by doing something like this horrifying blob:
apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
metadata:
  name: blah-ingressgateway
spec:
  profile: empty
  components:
    ingressGateways:
    - enabled: true
      name: blah-ingressgateway
      k8s:
        podAnnotations:
          sidecar.istio.io/bootstrapOverride: "blah-custom-bootstrap-config"
        overlays:
          - apiVersion: apps/v1
            kind: Deployment
            name: blah-ingressgateway
            patches:
              - path: spec.template.spec.containers.[name:istio-proxy].volumeMounts
                value:
                  - name: istio-envoy
                    mountPath: /etc/istio/proxy
                  - name: config-volume
                    mountPath: /etc/istio/config
                  - name: istiod-ca-cert
                    mountPath: /var/run/secrets/istio
                  - name: istio-token
                    readOnly: true
                    mountPath: /var/run/secrets/tokens
                  - name: ingressgatewaysdsudspath
                    mountPath: /var/run/ingress_gateway
                  - name: podinfo
                    mountPath: /etc/istio/pod
                  - name: ingressgateway-certs
                    readOnly: true
                    mountPath: /etc/istio/ingressgateway-certs
                  - name: ingressgateway-ca-certs
                    readOnly: true
                    mountPath: /etc/istio/ingressgateway-ca-certs
                  - name: custom-bootstrap-volume
                    mountPath: /etc/istio/custom-bootstrap
              - path: spec.template.spec.volumes
                value:
                  - name: istiod-ca-cert
                    configMap:
                      name: istio-ca-root-cert
                      defaultMode: 420
                  - name: podinfo
                    downwardAPI:
                      items:
                        - path: labels
                          fieldRef:
                            apiVersion: v1
                            fieldPath: metadata.labels
                        - path: annotations
                          fieldRef:
                            apiVersion: v1
                            fieldPath: metadata.annotations
                      defaultMode: 420
                  - name: istio-envoy
                    emptyDir: {}
                  - name: ingressgatewaysdsudspath
                    emptyDir: {}
                  - name: istio-token
                    projected:
                      sources:
                        - serviceAccountToken:
                            audience: istio-ca
                            expirationSeconds: 43200
                            path: istio-token
                      defaultMode: 420
                  - name: config-volume
                    configMap:
                      name: istio
                      defaultMode: 420
                      optional: true
                  - name: ingressgateway-certs
                    secret:
                      secretName: istio-ingressgateway-certs
                      defaultMode: 420
                      optional: true
                  - name: ingressgateway-ca-certs
                    secret:
                      secretName: istio-ingressgateway-ca-certs
                      defaultMode: 420
                      optional: true
                  - name: custom-bootstrap-volume
                    configMap:
                      name: blah-custom-bootstrap-config
      label:
        app: blah-ingressgateway
  # Copy settings from istio-ingressgateway as needed.
  # these helm values are shared by all ingress/egress gateways
  values:
    gateways:
      istio-ingressgateway:
        env:
          ISTIO_BOOTSTRAP_OVERRIDE: /etc/istio/custom-bootstrap/custom_bootstrap.json
        podAnnotations:
          sidecar.istio.io/bootstrapOverride: "logstash-custom-bootstrap-config"

This might be improved by https://github.com/istio/istio/pull/26289?  Trying to upgrade to 1.7 soon to find out
https://github.com/istio/istio/issues/27188 says I can use -1 to append which is really what I want.
Honestly it would be nice if istio just provided first class support for this...

Should Istio support this via EnvoyFilter ?

That would really help my usecase!

I think this should be supported since https://github.com/istio/istio/pull/33456 got merged. There are examples on this page: https://istio.io/latest/docs/reference/config/networking/envoy-filter/

The issue should be reopened as the bootstrap config is not being updated when applying configuration with histogram buckets.
The applied Envoy Filter is: `apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
name: stats
namespace: istio-system
spec:
configPatches:

applyTo: BOOTSTRAP
patch:
operation: MERGE
value:
stats_config:
histogram_bucket_settings:
match:
contains: "xxx"
- buckets: [2,3,4,5,6,7,8,9]
`
Istioctl versions are:
client version: 1.12.2
control plane version: 1.13
data plane version: 1.13-dev (2 proxies)

I would like to know how it can be fixed? Thanks.


Add allowed header in nginx

also just so we have a little less chaos atm lets merge this later this afternoon rather than right now as I want to make sure we build this correctly into the image this time


How to use with a ics file, rather than a url

I have exported my protonmail calendar to a local ics file. I'd like to use this library with it. If I discover how, I'll post back, as this is surely a common use-case

Thanks!


Support arrow keys

Don't be that vi-centric

Oops this is the fault of commit https://github.com/betaveros/gridderface/commit/669eee1c57791f2892c9a6e16f221c6bff0e3bd4 specifically the key-filtering https://github.com/betaveros/gridderface/blob/d9ea61e0ddd9ebd580df18b231151b2efccb8c9c/src/main/scala/gridderface/Gridderface.scala#L72 where I failed to whitelist arrow keys


Solr version 9

Is it possible to add Solr version 9? Could you please explain how the Solr release cycles update are planned in ddev?

You can experiment and contribute.
Try a docker-compose.solr_extra.yaml with:
services:
  solr:
    image: solr:9

and see what happens.

https://github.com/ddev/ddev-solr/pull/32


v0.6.0

Update AR version
Add PostgresSQL test

Coverage decreased (-0.4%) to 94.73% when pulling d3330c1402c740301c0fe0cc8eafe5026cef76e5 on v0.6.0 into 5b75a946ed1798c098d793b032f240d151325291 on master.

Coverage decreased (-0.4%) to 94.73% when pulling d3330c1402c740301c0fe0cc8eafe5026cef76e5 on v0.6.0 into 5b75a946ed1798c098d793b032f240d151325291 on master.

Coverage decreased (-0.4%) to 94.73% when pulling d3330c1402c740301c0fe0cc8eafe5026cef76e5 on v0.6.0 into 5b75a946ed1798c098d793b032f240d151325291 on master.


Tools menu: Create Side Munge Folder

This is a button that would prompt the user to select a side's folder (or REQ file) and if a munge folder does not exist for it, one would be created with the appropriate munge.bat and clean.bat scripts and all.

Completed in fdd9bd6 - closing.


[FEATURE REQ] Improve Cadl SDK automation from spec repo

Relates to https://github.com/Azure/azure-sdk-for-java/issues/33263

Add common Cadl dependencies to eng/emitter-package.json (in addition to cadl-java), ref to the changes in PR for the list and version of common dependencies
When running the automation, directly copy eng/emitter-package.json to working directory, as package.json
In script, after copy, call npm install to install the dependencies in package.json

Step (1) is also helpful for automation/script from SDK repo, as most Cadl source depends on cadl-autorest, which is not in dependencies of cadl-java. Without these dependencies, cadl compile will fail (similar to Java when code uses a package but POM doesn't specify it).
Step (2), the package.json, root or not, from spec repo is never used. Is this expected?
@haolingdong-msft @srnagar

I guess 'the package.json, root or not, from spec repo is never used.' is expected. Micheal's doc also mentioned that:
emitter-package.json replaces the package.json checked into the spec repo and allows each language to fix the version of their emitter to be the same for all packages in their repo.
I also prefer we use our emitter-package.json.  Because service team's package.json contains more dependencies then we need, and they may also have private dependencies that we don't have permission to install. ADP's package.json is an example, they have private dependencies.


[Feature]  Optimize the return value of the shutdown interface

Search before asking

[X] I had searched in the feature and found no similar feature requirement.

Description
At present, shutdown response does not have any return value. I think we can add a return value, such as clusterid, to let the user know which clusterId has been killed
Usage Scenario
No response
Related issues
No response
Are you willing to submit a PR?

[X] Yes I am willing to submit a PR!

Code of Conduct

[X] I agree to follow this project's Code of Conduct

@wolfboys @Al-assad  I'll mention a pr later. I'll mention a pr later, so you can see if this feature is suitable


cmd/gofmt: reconsider making -d exit with a status of 1 if a non-empty diff is printed

First, I know that this has been asked many times before (https://github.com/golang/go/issues/24230 https://github.com/golang/go/issues/24427 https://github.com/golang/go/issues/38551), and I was even on the other side of this argument for a long time.
The argument usually goes that, if you want to know if any files aren't gofmt-ed, you check that gofmt -l is empty, for example:
test -z $(gofmt -l .)

And this works, if one can assume a POSIX-like shell.
However, in light of https://github.com/golang/go/issues/42119, I think we should make "verify that many files comply with gofmt" a trivial command, without extra machinery like checking for non-empty output.
In that issue, we suggest a number of commands that we'd encourage people to run on CI, from go test -race ./... to go mod verify and go vet ./.... You'll note that none of the commands require being wrapped with shell or extra commands to do their job, with two exceptions:

go mod tidy, where one needs to check if files like go.mod and go.sum were modified on disk. https://github.com/golang/go/issues/27005 will fix that.
gofmt, which needs testing for empty output, hence this issue.

Once go mod tidy -check is implemented, gofmt will stand alone in that list as being the only command that most people should run on their CI, but which is non-portable or just not easy to use directly.
--
So, as others have proposed before: I suggest a very simple fix, which is to make gofmt -d exit with a status code of 1 if any of the input files have a non-empty diff. Then, CI could simply run gofmt -d . and get a good result: CI would fail if any files don't comply, and the diff will show exactly which ones and why.
It's also arguably more consistent to behave this way, as the diff tool usually behaves this way too. For example, from GNU diffutils 3.7:

Exit status is 0 if inputs are the same, 1 if different, 2 if trouble.

If we think this change is too invasive, or could break too many users, we could also consider a separate flag like -exitcode, simialr to git diff --exit-code. It's really not a big deal if the command run on CI gets a bit longer.
I also don't think a solution should come from go fmt. I think gofmt is simply superior for use in CI; it allows formatting files which are not part of Go packages, formatting many modules at once, and printing diffs.
It's also worth noting I plan to expose this feature in gofumpt: https://github.com/mvdan/gofumpt/issues/114
cc @griesemer
cc @bcmills @jayconrod @stevetraut for "CI best practices"
cc @ryanm101 @stevenmatthewt @belm0 as previous posters

@griesemer for notifications on this issue.

It would be nice if we could make the flag's syntax and semantics match whatever flag we add for #27005 .

If we think this change is too invasive, or could break too many users,

I think changing the exit status of gofmt -d probably would break some fraction of users, especially for Playground-like servers, and non-gopls integrations, and perhaps CI systems. I have a mild preference for guarding it with a flag.

You could add the flag for now and put in a deprecation warning that in X releases the flag will be inverted and the default will be exit codes.
In terms of breakage of CI systems, that is the behaviour I want, If i am enforcing gofmt on my code and you don't do it I want the CI to fall over. IMHO not doing that is the same as a compiler exiting 0 when the code failed to compile.
(i do realise my feelings may be a tad towards the hardline side of this :) )

I don't think we can ever make the entire tool's default be using exit codes for "was the formating changed". It's entirely reasonable to use some-generator | gofmt to easily generate gofmt-formatted Go code, for example, and all those use cases where one wants to format Go code instead of checking for valid format can't be broken.
I'm also not sure that adding a deprecation or transition period will really help. Breaking a user's script in six months or in two years isn't much different, and I imagine most users will not even see the deprecation notices and remember all the scripts they need to update.

I think changing the exit status of gofmt -d probably would break some fraction of users, especially for Playground-like servers, and non-gopls integrations, and perhaps CI systems. I have a mild preference for guarding it with a flag.

At least from what I've seen, nearly all uses of gofmt -d fall under "check that Go code is correctly formatted", so I think nearly all users would want the exit status behavior. We could have them move to something like gofmt -d -check, but it would be a bit unfortunate to nearly always use both options at the same time.
My intuition is that most scripts using gofmt -d won't break, since what I've most commonly seen is in the form of:
DIFF="$(gofmt -d .)"
if [[ -n $DIFF ]]; then
    echo "$DIFF"
    echo "please run gofmt"
    exit 1
fi

In that kind of scenario, the exit code is by default discarded via the subshell. That's how I've seen many people use gofmt -l, too. The new form, actually using the exit code, could be like:
if ! gofmt -d .; then
    echo "please run gofmt"
    exit 1
fi

And for the cases where a script would break, I imagine it should be fairly easy to get the old behavior back, such as replacing gofmt -d . with gofmt -d . || true.
All that said, I don't have a strong opinion on new flag versus changing -d. I slightly lean towards not adding a flag, and seeing how many users report breakages during the beta and RC cycle.

In that kind of scenario, the exit code is by default discarded via the subshell.

By default, sure — but many shell style guides require explicit checks, and we probably don't want to break scripts that conform to that style either.

I slightly lean towards not adding a flag, and seeing how many users report breakages during the beta and RC cycle.

FWIW, in my experience changes outside the runtime and compiler receive comparatively little testing during the beta and RC. (I would expect most breakage to be reported after the release.)

I prefer an explicit flag that's orthogonal to -d for a different reason than compatibility: in CI we don't use -d, we use -l. We don't care about the diffs; only reporting which files aren't formatted.

I would agree with @cespare diffs are only really used for when a human is looking, in CI I would want ideally two returns 1) the file that is failing and 2) the line number of the fail would be nice in the case of a few lines but once you get about 10 lines or so this matters less as at that point it's likely the whole files that is wrong.
Still currently any implementation is preferable to none, so additional flag or not I'd just be happy for a non zero exit code.

I personally don't mind too much whether this happens with -d, or via a separate flag, but I definitely think we should do this.
I agree that we want to be consistent with whatever https://github.com/golang/go/issues/27005 ends up doing. At the same time, I don't particularly feel like waiting a few more years for a flag that's trivial to implement and very much needed for CI :)
If https://github.com/golang/go/issues/27005 is expected to land on a flag design soon, like -check, then we can follow suit. If not, I think we should go ahead with something that makes sense for gofmt, which could be -check or something akin to git diff --exit-code, such as -exit or -exitcode.
Either way, I want to help us reach a decision for 1.21. If we're sure we want a decision on https://github.com/golang/go/issues/27005 first, then I'll try to help push that forward.

Catching up on https://github.com/golang/go/issues/27005, it seems like it's landing on -diff which will print a diff, and exit with a non-zero code if the diff isn't empty. There wouldn't be any other flag or behavior change.
So, if we wanted to be consistent, we could make -d use exit codes, like I originally proposed. We could make exit codes useful for any mode that prints changes that would be made without actually making them. This would be gofmt -d and gofmt -l, but not gofmt (which writes to stdout) nor gofmt -w (which writes to disk). Presumably, this would satisfy https://github.com/golang/go/issues/46289#issuecomment-863400887 as well, even if it's a bit of magic.
If we prefer an explicit flag, like git diff --exit-code, which can be used in combination with any gofmt mode - that's also fine by me. It might also be the right idea in terms of not breaking existing users of the -d and -l flags. In that scenario, I'd attempt to copy git diff via -exitcode.

Retitled to reflect the above, and to better line up with other issues like https://github.com/golang/go/issues/27005.

https://github.com/golang/go/issues/27005 is giving up a -check flag in favor of -diff, so the consistency point in https://github.com/golang/go/issues/46289#issuecomment-862490917 unfortunately no longer applies.
More confusingly, I think the proposal there is for go mod tidy -diff to fail when the diff is non-empty, whereas gofmt -d does not behave like that - and we likely cannot change it at this point.
I still lean towards adding a -check flag as described above, given the existing diff flag and backwards compatibility concerns. It won't be consistent with go mod tidy, but gofmt is already pretty different from cmd/go commands in terms of flags and arguments today.

@mvdan says that we likely cannot change gofmt -d to exit non-zero when diffs exist.
We talked about this in proposal review and don't immediately see why we can't change the exit status.
Tool details like these are not as strictly regulated for compatibility as the main packages,
because there is no way that changing the exit status of gofmt -d breaks a Go program built with go build because of some detail in a dependency they didn't know about.

This proposal has been added to the active column of the proposals project
and will now be reviewed at the weekly proposal review meetings.
— rsc for the proposal review group

Based on the discussion above, this proposal seems like a likely accept.
— rsc for the proposal review group
The proposal is to change gofmt -d (which already exists) to exit 1 if it prints diffs. Gofmt should exit 2 for any other errors.

Changing gofmt -d in-place seems fine to me, and it also makes the flag consistent with the new go mod tidy -diff, which also fails if the diff is non-empty.
There are potentially some cases where a script may break or change behavior, particularly since CI scripts like GitHub Actions tend to stop at the first failing command via e.g. set -e on Bash, but I can't say how often that might happen.
I skimmed a few results from https://github.com/search?q="gofmt+-d"+path%3A**%2F.github%2Fworkflows%2F*.yml&type=code and I don't immediately see any that worries me. If anything, all the commands like diff <(echo -n) <(gofmt -d) should now just become gofmt -d, thankfully.

No change in consensus, so accepted. 🎉
This issue now tracks the work of implementing the proposal.
— rsc for the proposal review group
The proposal is to change gofmt -d (which already exists) to exit 1 if it prints diffs. Gofmt should exit 2 for any other errors.

👏This is good news for users of pre-commit.
Can x/tools/cmd/goimports also implement the same behavior?


⚠ Minecraft has degraded performance

In 8215aaf, Minecraft (https://www.minecraft.net) experienced degraded performance:

HTTP code: 200
Response time: 908 ms

Resolved: Minecraft performance has improved in 8c37fe6.


Creating duplicate keys in [ALL FIRST] on PersistentArrayMap duplicates keys in the map

For example:
(setval [ALL FIRST] :z {:a 1 :b 2})
;;=> {:z 1 :z 2}

Need a new method for doing ALL on PersistentArrayMap to avoid this. Note that MAP-VALS can continue using the optimized method since it doesn't change the keys.

Should use PersistentArrayMap/createAsIfByAssoc


Make error

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
THPP_LIBRARY
linked by target "crnn" in directory /home/ce/Documents/crnn/src/cpp
-- Configuring incomplete, errors occurred!
See also "/home/ce/Documents/crnn/src/cpp/build/CMakeFiles/CMakeOutput.log".
make: *** No targets specified and no makefile found.  Stop.
cp: cannot stat ‘*.so’: No such file or directory

@rremani have you solved this problem?

No , I stuck at that very point.

In a detailed way,
mkdir: cannot create directory ‘build’: File exists
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
THPP_LIBRARY
linked by target "crnn" in directory /home/ce/Documents/crnn/src/cpp
-- Configuring incomplete, errors occurred!
See also "/home/ce/Documents/crnn/src/cpp/build/CMakeFiles/CMakeOutput.log".
make: *** No targets specified and no makefile found. Stop.
cp: cannot stat ‘*.so’: No such file or directory
First I installed torch7 from the site then installed fblualib from the commits given in the issue #1 that you posted.
My torch is installed in Home directory (/home/ce/torch) and fblualib(/tmp/fblualib-build.YTz6tN)in temp pasting both the paths, I feel I need to change the Cmakellists.txt of crnn.
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.7 FATAL_ERROR)
PROJECT(crnn)
FIND_PACKAGE(OpenMP)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 ${OpenMP_CXX_FLAGS} -Wall")
Change this line if your Torch7 is installed elsewhere
SET(TORCH_ROOT "$ENV{HOME}/torch/install")
SET(SEARCH_PATHS
"/usr/local/lib"
"${TORCH_ROOT}/lib")
dependencies
FIND_LIBRARY(THPP_LIBRARY thpp
PATHS ${SEARCH_PATHS})
FIND_LIBRARY(LUAT_LIBRARY luaT
PATHS ${SEARCH_PATHS})
FIND_LIBRARY(TH_LIBRARY TH
PATHS ${SEARCH_PATHS})
FIND_LIBRARY(THC_LIBRARY THC
PATHS ${SEARCH_PATHS})
SET(EXT_LIBRARIES ${THPP_LIBRARY} ${LUAT_LIBRARY} ${TH_LIBRARY} ${THC_LIBRARY})
SET(EXT_INCLUDE_DIRS "${TORCH_ROOT}/include" "${TORCH_ROOT}/include/TH")
INCLUDE_DIRECTORIES(${EXT_INCLUDE_DIRS})
ADD_LIBRARY(crnn SHARED init.cpp ctc.cpp)
TARGET_LINK_LIBRARIES(crnn ${EXT_LIBRARIES})
Do I need to change the path for Torch and where it is searching the libraries for the below lines.
SET(TORCH_ROOT "$ENV{HOME}/torch/install")
SET(SEARCH_PATHS
"/usr/local/lib"
"${TORCH_ROOT}/lib")
Thanks

I have met some thing similar, like:
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
LUAT_LIBRARY
    linked by target "crnn" in directory /home/CRNN/crnn/src/cpp
THC_LIBRARY
    linked by target "crnn" in directory /home/CRNN/crnn/src/cpp
TH_LIBRARY
    linked by target "crnn" in directory /home/CRNN/crnn/src/cpp

Tried locating those library manually. I found that my THPP_LIB is actually in somewhere else rather than ../torchroot/lib,then I changed those search path from
SET(SEARCH_PATHS "${TORCH_ROOT}/lib")
FIND_LIBRARY(THPP_LIBRARY thpp
  PATHS ${SEARCH_PATHS})
FIND_LIBRARY(LUAT_LIBRARY luaT
  PATHS ${SEARCH_PATHS})
FIND_LIBRARY(TH_LIBRARY TH
  PATHS ${SEARCH_PATHS})
FIND_LIBRARY(THC_LIBRARY THC
  PATHS ${SEARCH_PATHS})

to
SET(SEARCH_PATHS "${TORCH_ROOT}/lib")
FIND_LIBRARY(THPP_LIBRARY thpp
  PATHS "usr/local/lib")
FIND_LIBRARY(LUAT_LIBRARY luaT
  PATHS ${SEARCH_PATHS})
FIND_LIBRARY(TH_LIBRARY TH
  PATHS ${SEARCH_PATHS})
FIND_LIBRARY(THC_LIBRARY THC
  PATHS ${SEARCH_PATHS})

And it all works !
P.S. I ran those in this docker image bethgelab/jupyter-torch.
Wish it helps~

Thanks @LavieC Lav , I finally was able to run the demo. The major problem was with the successful installation of fblualib which really irritated me. Now, I have created a docker file built on the docker file you provided me docker pull rremani/cuda_crnn_torch .
Thanks again!

@rremani can u help me install thpp ? I'm running ubuntu 16.04

@qnkhuat  I can try to help you but it takes lot of time to figure out what the error is actually about. I would suggest you to use docker image rremani/cuda_crnn_torch which has everything installed.
Happy Learning!


Update IP address FAQ

Update IP address FAQ to get the text in line with the message in the warning at the top of the page.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.1 out of 2 committers have signed the CLA.:white_check_mark: feddovanede:x: dbresemanYou have signed the CLA already but the status is still pending? Let us recheck it.


Implement CI/CD

The current process of the application deployment looks like below:

SSH connetion with VPS
Clone repo
Build image
Release

We need to improve this process using images in the docker.

Dockerhub repo created.
docker push nykram/musicbot:tagname
There is a limt 100 pull requests per 6 hours, it does not matter for us.

New workflow for CI/CD deployment process

Build (build application image) -> 2. Deployment -> (push image to docker hub repo and pull it from server) 3. Release (run container)


Increase serviceIP Range (#1917)

Updated service cluster IP range from <IP_ADDRESS>/24 to <IP_ADDRESS>/16, which increases the number of service IPs
Thank you for making MicroK8s better
Please reference the issue this PR is fixing, or provide a description of the problem addressed.
Also verify you have:

[x] Read the contributions page.
[x] Submitted the CLA form, if you are a first time contributor.

Thank you for this PR @rdeepc
Have you tested to see what would happen if you have a cluster with <IP_ADDRESS>/24 and you join it with a node of <IP_ADDRESS>/16?
I wonder if we need to update the joining process [1] to propagate this information so that already existing clusters are not affected.
[1] https://github.com/ubuntu/microk8s/blob/master/scripts/cluster/join.py#L906

Thank you for this PR @rdeepc
Have you tested to see what would happen if you have a cluster with <IP_ADDRESS>/24 and you join it with a node of <IP_ADDRESS>/16?
I wonder if we need to update the joining process [1] to propagate this information so that already existing clusters are not affected.
[1] https://github.com/ubuntu/microk8s/blob/master/scripts/cluster/join.py#L906

Hi @ktsakalozos
I have tested as you mentioned, it joins without any problem, but if the master is in <IP_ADDRESS>/24 , the IP range problem does not solve

Hi @ktsakalozos
I have tested as you mentioned, it joins without any problem, but if the master is in <IP_ADDRESS>/24 , the IP range problem does not solve


[REQUEST] Adding more color differentiation for Luau language

Looks fine to me when using https://marketplace.visualstudio.com/items?itemName=Nightrains.robloxlsp, which seems to be the most popular Luau LSP/Highlight extension:

Can you also try it with luau lsp?

Seems that one is even less maintained, idk enough about the luau ecosystem, the official one seems fine to me from a pure highlighting perspective.


nspawn as provision method

as we've discussed on IRC, systemd-nspawn could be very nice  solution for testing,
it is something between virtualization and containerization with docker/podman.
Implementation could be easy and could be beneficial, because it could provide still new sources because it can use system or remore repos.
Steps are
mkdir tempdir
dnf install --install-root=tempdir --repofrompath=url://toRHEL systemd ${required_packages}
systemd-nspawn --some_args tempdir

then via machinectl shell machine_name command run the commands on target machine e.g. run test there.
and have some option like tmt run -a provision -h nspawn
without any other param it will use local repos, in case of multiple -r/--repo param used, use this repo, with some aliases I can imagine e.g. -r centos-8 will be traslated to url to centos-8

+1 this would be awesome to have

Sounds interesting! I've quickly experimented with the example above and it worked nice.
dnf install --releasever 34 --nogpg --installroot=/tmp/spawn --repofrompath=f34,https://dl.fedoraproject.org/pub/fedora/linux/releases/34/Everything/x86_64/os/ systemd

What are the advantages of nspawn when compared to using podman?


⚠ Bofrost.de has degraded performance

In bd111c3, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 1523 ms

Resolved: Bofrost.de performance has improved in 6ea90e1 after 9 minutes.


Access restrictions mismatch

Access restriction with foot=yes and bike=yes is still interpreted as no pedestrian and bicycle access.
Example: Salzburg Mascagnigasse

see OSM wiki: https://wiki.openstreetmap.org/wiki/Key:access
Logic would be: access = no sets all modes to "no", then individual restrictions/permissions are evaluated and potentially override the global restriction (e.g. bicycle=yes, foot=yes)


Add 1:1 Scheduling Mode

Add a way to make each task run in its own thread.

I'm planning on reintroducing the domain concept, where our current set of schedulers would be something like a 'generic' domain that just does it's best to schedule across cores. Then we would also have a thread domain, which is just a single-threaded scheduler. Then we could have a 1:1 domain where all tasks get their own thread. Possibly we could have some mechanism to pick the scheduler that main spawns into.


Use stable Rust instead of 1.0.0

Instead of testing on stable or 1.0, why not test both? As long as we do not use any of the new stuff, we can continue to support 1.0, right?

@ruud-v-a Testing against both would increase the testing time even more.
I thing we should just keep supporting 1.0 unless we really need a feature from stable.

Don’t the builds run in parallel? At least for this PR the logs show the same start time for every build.

Opened a new PR that addresses the comments in here #472

Closed in favor of https://github.com/PistonDevelopers/image/pull/472


stog: 0.20.0 -> 1.0.0

Diff: https://framagit.org/zoggy/stog/-/compare/0.20.0...1.0.0
Changelog: https://framagit.org/zoggy/stog/-/raw/1.0.0/Changes
Description of changes

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[x] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

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

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

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Closed in favor of https://github.com/NixOS/nixpkgs/pull/297663


Bot Emulator is not able to send or receive messages

Sir
I have created my bot in visual studio and registered it through microsoft my bots.
But when I connect to the bot in emulator,its not sending any messaged and the below error is being shown in the log.
[14:15:34] -> POST getaddrinfo ENOTFOUND http http:443
Please help me solve it
Check my App also, what should i wrie in endpoint URL
App id :-402dc8c7-2a6a-4e35-8c8e-8472740f6be2

The endpoint URL is the URL where the bot is running locally. If you made your bot with visual studio and didn't set a port in the project, the URL is probably this: http://localhost:3979/api/messages
If you added a bot appid and password to your web.config file, then you will also need to provide these in the emulator.
Jeff

Closing due to inactivity. Reply here if you still need assistance and we will reopen.