prebuild repo using scripts and node-gyp

Doc: Prebuild Node-rdkafka Learnings
The motivation for this fork is to create prebuilds and instantly install node-rdkafka when injected as a node_module.
How to create prebuilds: npm run prebuilds

Runs node-gyp rebuild to build from source
Tarballs /build and stores in /prebuilds

How to install files: npm install

Searches for files in /build or proper prebuild platform + arch + ABI in /prebuilds
Will default to node-gyp rebuild if no prebuilds found

Caveats:

The existing solution only works on MacOS, we will need to put in work to extend to Linux and/or Windows machines
Can only create prebuilds using the current platform + architecture + node version

Encountered an interesting experience building x64 version of the node binary. Will document the effort 👍

@rbala19 @awfulstew I believe I responded to all your comments, please let me know if there are any other improvements I can make!


Fix bug in Example D

The example pattern '%[^ 0-9A-z]%' did not match characters in the range 91-96, even though they are not numbers, letters, or spaces.
For example:
SELECT position = PATINDEX('%[^ 0-9A-z]%', 'Please^ensure the door is locked!');
returns 33, but it should return 7.
With the proposed update, it works correctly.

@Mankarse : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@Mankarse What collation are you using. I am using SQL_Latin1_General_CP1_CI_AS. and the code works as expected.

I have tried a variety of different collations. It is true that the original code works correctly in SQL_Latin1_General_CP1_CI_AS, but the only version that works correctly in every Latin collation that I tried is the version that I suggested.
SELECT
    [[^ 0-9A-z]] SQL_Latin1_General_CP1_CI_AS] = PATINDEX('%[^ 0-9A-z]%' COLLATE SQL_Latin1_General_CP1_CI_AS, 'Please^ensure the door is locked!') --7
   ,[[^ 0-9A-z]] SQL_Latin1_General_CP1_CS_AS] = PATINDEX('%[^ 0-9A-z]%' COLLATE SQL_Latin1_General_CP1_CS_AS, 'Please^ensure the door is locked!') --7
   ,[[^ 0-9A-z]] Latin1_General_CI_AS]         = PATINDEX('%[^ 0-9A-z]%' COLLATE Latin1_General_CI_AS        , 'Please^ensure the door is locked!') --7
   ,[[^ 0-9A-z]] Latin1_General_CS_AS]         = PATINDEX('%[^ 0-9A-z]%' COLLATE Latin1_General_CS_AS        , 'Please^ensure the door is locked!') --4
   ,[[^ 0-9A-z]] Latin1_General_100_CI_AS]     = PATINDEX('%[^ 0-9A-z]%' COLLATE Latin1_General_100_CI_AS    , 'Please^ensure the door is locked!') --7
   ,[[^ 0-9A-z]] Latin1_General_100_CS_AS]     = PATINDEX('%[^ 0-9A-z]%' COLLATE Latin1_General_100_CS_AS    , 'Please^ensure the door is locked!') --4
   ,[[^ 0-9A-z]] Latin1_General_100_BIN2]      = PATINDEX('%[^ 0-9A-z]%' COLLATE Latin1_General_100_BIN2     , 'Please^ensure the door is locked!') --33
;

SELECT
    [[^ 0-9a-Z]] SQL_Latin1_General_CP1_CI_AS] = PATINDEX('%[^ 0-9a-Z]%' COLLATE SQL_Latin1_General_CP1_CI_AS, 'Please^ensure the door is locked!')--7
   ,[[^ 0-9a-Z]] SQL_Latin1_General_CP1_CS_AS] = PATINDEX('%[^ 0-9a-Z]%' COLLATE SQL_Latin1_General_CP1_CS_AS, 'Please^ensure the door is locked!')--7
   ,[[^ 0-9a-Z]] Latin1_General_CI_AS]         = PATINDEX('%[^ 0-9a-A]%' COLLATE Latin1_General_CI_AS        , 'Please^ensure the door is locked!')--1
   ,[[^ 0-9a-Z]] Latin1_General_CS_AS]         = PATINDEX('%[^ 0-9a-Z]%' COLLATE Latin1_General_CS_AS        , 'Please^ensure the door is locked!')--7
   ,[[^ 0-9a-Z]] Latin1_General_100_CI_AS]     = PATINDEX('%[^ 0-9a-Z]%' COLLATE Latin1_General_100_CI_AS    , 'Please^ensure the door is locked!')--7
   ,[[^ 0-9a-Z]] Latin1_General_100_CS_AS]     = PATINDEX('%[^ 0-9a-Z]%' COLLATE Latin1_General_100_CS_AS    , 'Please^ensure the door is locked!')--7
   ,[[^ 0-9a-Z]] Latin1_General_100_BIN2]      = PATINDEX('%[^ 0-9a-Z]%' COLLATE Latin1_General_100_BIN2     , 'Please^ensure the door is locked!')--1
;

SELECT
    [[^ 0-9a-zA-Z]] SQL_Latin1_General_CP1_CI_AS] = PATINDEX('%[^ 0-9a-zA-Z]%' COLLATE SQL_Latin1_General_CP1_CI_AS, 'Please^ensure the door is locked!')--7
   ,[[^ 0-9a-zA-Z]] SQL_Latin1_General_CP1_CS_AS] = PATINDEX('%[^ 0-9a-zA-Z]%' COLLATE SQL_Latin1_General_CP1_CS_AS, 'Please^ensure the door is locked!')--7
   ,[[^ 0-9a-zA-Z]] Latin1_General_CI_AS]         = PATINDEX('%[^ 0-9a-zA-Z]%' COLLATE Latin1_General_CI_AS        , 'Please^ensure the door is locked!')--7
   ,[[^ 0-9a-aA-Z]] Latin1_General_CS_AS]         = PATINDEX('%[^ 0-9a-zA-Z]%' COLLATE Latin1_General_CS_AS        , 'Please^ensure the door is locked!')--7
   ,[[^ 0-9a-zA-Z]] Latin1_General_100_CI_AS]     = PATINDEX('%[^ 0-9a-zA-Z]%' COLLATE Latin1_General_100_CI_AS    , 'Please^ensure the door is locked!')--7
   ,[[^ 0-9a-zA-Z]] Latin1_General_100_CS_AS]     = PATINDEX('%[^ 0-9a-zA-Z]%' COLLATE Latin1_General_100_CS_AS    , 'Please^ensure the door is locked!')--7
   ,[[^ 0-9a-zA-Z]] Latin1_General_100_BIN2]      = PATINDEX('%[^ 0-9a-zA-Z]%' COLLATE Latin1_General_100_BIN2     , 'Please^ensure the door is locked!')--7
;


center

before:

after:

Is the name duped on purpose?

@chrisnojima yes, i just wanted a really long path to test with


Improve and simplify Sentry error reporting

Describe the bug
Sentry is reporting too much detail in the title of error events (util.Failed etc), and sometimes results in loads of overwhelming events.
To Reproduce
Steps to reproduce the
Expected behavior
ddev exec, for example, shows errors for every single permutation of failure, most of which have nothing to do with ddev.

Consider only reporting the ddev exec failure, with a detail flag (instead of reporting it in the title)
Stop reporting most ddev composer
Consider reporting only the ddev start command in general

Since what we're doing is hooking on the logging operation, I'm not familiar with the best way to transform the logging output. Logrus is a huge and amazing beast, but it's not obvious from a quick look at https://github.com/evalphobia/logrus_sentry how one with manipulate error information as it passes through.

I think this is as good as it's going to get at this point. Closing for now.


Changelog not being truncated correctly

New Issue Checklist

[X] Updated fastlane to the latest version
[X] I read the Contribution Guidelines
[X] I read docs.fastlane.tools
[X] I searched for existing GitHub issues

Issue Description
When uploading to AppStore Connect, I get the message from fastlane, that the changelog will be truncated. But nevertheless I receive an error 500 from AppStore Connect:
[20:57:10]: Waiting for App Store Connect to finish processing the new build (5.7.0 - 20190928.1) for IOS
[20:57:41]: Waiting for App Store Connect to finish processing the new build (5.7.0 - 20190928.1) for IOS
[20:58:12]: Successfully finished processing the build 5.7.0 - 20190928.1 for IOS
[20:58:12]: Changelog has been truncated since it exceeds Apple's 4000 character limit. It currently contains 4100 characters.

[!] Could not set changelog: Server error got 500
##[error]Error: fastlane failed with return code: 1

If I instead manually truncate the changelog (using | head -c 3900), it seems to work fine. (I haven't tried going up to 4000 bytes since we're on a slow CI).
My suspicion is, either Apple actually allows less than 4k, or there's an issue with number of bytes and number of unicode characters.

What action exactly are you using?

We're using Azure Pipelines with the Apple App Store extensions. So it's just executing fastlane from command line. Here's some more from the log:
fastlane pilot upload -u *** -i /Users/vsts/agent/2.155.1/work/1/s/appstore/MyApp.ipa --changelog [snip]  -q [snip] -a [snip] --distribute_external true --groups [snip]


Wireplumber module not responding to updates

Waybar launches showing the correct current volume level, but when I then change the volume, Waybar fails to update. I'm using Hyprland on Arch Linux.
Here are the following (potentially) relevant bits of my waybar config:
{
"layer": "top",
"position": "top",
"height": 30,
"margin": 6,
"spacing": 0,
"modules-left": [ "wlr/workspaces" ],
"modules-center": [ "hyprland/window" ],
"modules-right": [ "wireplumber", "network", "battery", "clock" ],

"wireplumber": {
	  "format": "{icon}",
	  "format-muted": "󰝟",
	  "format-icons": ["", "", ""],
	  "tooltip-format": "volume: {volume}%"
},

...

And my hyprland.conf:
# start panel
exec-once = waybar

# start volume/brightness indicator
$WOBSOCK = ~/.config/wob.sock
exec-once = rm -f $WOBSOCK && mkfifo $WOBSOCK && tail -f $WOBSOCK | wob

# start easyeffects
exec-once = easyeffects --gapplication-service

# volume
bindle = , XF86AudioRaiseVolume, exec, wpctl set-volume -l "1.0" @DEFAULT_AUDIO_SINK@ 5%+
bindle = , XF86AudioRaiseVolume, exec, wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print int($2*100)}' > $WOBSOCK
bindle = , XF86AudioLowerVolume, exec, wpctl set-volume -l "1.0" @DEFAULT_AUDIO_SINK@ 5%-
bindle = , XF86AudioLowerVolume, exec, wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print int($2*100)}' > $WOBSOCK
bindl = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
bindl = , XF86AudioMute, exec, wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{if ($3) print 0; else print int($2*100)}' > $WOBSOCK

...

Hi. I'm running into similar issues with the Wireplumber module. For me, this is how I run my wireplumber config:
"wireplumber": {
"format": "Vol: {volume}%",
"format-muted": "Vol: M"
},
I also run amixer instead of wpctl commands for keybindings.
!!!IMPORTANT!!! PLEASE READ BELOW!!! Also, @Alexays This might be helpful for fixing the wireplumber issues:
For me, it starts updating the volume only when it detects a change of device e.g connecting to my Bluetooth headphones. It works when I connect the headphones, it works when I disconnect them, but it doesn't start working, until I connect them once, I don't know why. I just think that this can be helpful to make it work. If your Bluetooth device connects before the bar is started, disconnect it, and the bar will work. It somehow triggers on device change, I don't know why.

Is there a way to force-trigger a device change as a workaround in the meantime?
(Btw I am using AUR's wayland-hyprland-git)

One more clue - I'm not sure what I was doing when this happened, but waybar logged this error, suggesting that it has the wrong node id:
[2023-04-07 07:15:34.094] [warning] [wireplumber]: (onMixerChanged) - Object with id 99 not found
[2023-04-07 07:15:34.097] [warning] [wireplumber]: (onMixerChanged) - Object with id 99 not found
[2023-04-07 07:15:34.109] [warning] [wireplumber]: (onMixerChanged) - Object with id 99 not found

The actual id is 79:
 ├─ Sinks:
 │      37. Easy Effects Sink                   [vol: 1.00]
 │  *   79. Built-in Audio Analog Stereo        [vol: 0.15]

What version of waybar are you running?
The latest release (0.9.17) was on Jan 11 and does not have this fix https://github.com/Alexays/Waybar/commit/4e8ccf36b54cacf5281726d23ea14312a133f977
Can you try compiling from source to see if that fixes your issue?

@smoak Hi, Just wanted to let you knw that I tried compiling from source, as you recommended (I'm also using Hyprland on Arch Linux) and not only did that not fix things, but also the wlr/workspaces module is now not being recognised by waybar as a module for some reason, so now I don't even get the workspaces showing up, while the wireplumber issue is still there.

Using Hyprland on Gentoo same issue, even when built straight from the master branch (aka live ebuild on gentoo). Only goes away when I change the output device.

Nice! Since the hyprland patch isn't included by default, I'm stuck with waybar-hyprland/waybar-hyprland-git for now. But at least that tells us that the problem is solved somewhere in the experimental features, and the fix would just need to be un-experimental-ized... and maybe hyprland workspace support along with it? ;)

I'm also facing this issue on Gentoo with the latest stable version (0.9.17). Using the PulseAudio module is not an option anymore if using PipeWire because now the use flag that compiles Waybar with support for that module also brings the PulseAudio daemon as a dependency.


Download development server during gem installation

Activate downloading the shopify-extensions binary during gem installation by updating the Gemspec to include the new Ruby extension.

https://github.com/Shopify/shopify-cli/pull/2132


No "MATCH" occurred when it should

I have an issue of " Match" when I running a Frequency rule. It should have a “Match" there but not.
Here is my frequency.yaml
es_host : localhost
es_port : 9200
name: Example rule
type: frequency
index: time
num_events: 4
timeframe:
hours: 0.2
filter:

term:
rslt: "1"

alert:

"email"
email:
<EMAIL_ADDRESS>
if the first time "rslt: 1" show up and in that timeframe also the num_events reach 4 times (in my case), the "match" will show up and the alert also would be sent.
if the filter term "resl:1" occurred, but less than 4 times in the timeframe first, after that, any events reach 4 times happened in any timeframe would not trigger "match".
and just ONE "match" show up in the alert even if there are more than once "match" should exist in the dataset in buffering time.

I can't really understand what you mean, do you have logs? Add `--verboseif you haven't already. If you seeIgnoring match for silence rule Example Rule`` you can add
realert:
  minutes: 0

I did add --verbose
python -m elastalert.elastalert --verbose --rule example_frequency.yaml
Let me give my example here:
My data looks like this:
`April 3rd 2016, 21:29:18 rlst: 1`
`April 3rd 2016, 21:30:19 rlst: 1`
`April 3rd 2016, 21:31:18 rlst: 1`
`April 1st 2016, 21:31:10 rlst: 1`
`April 1st 2016, 21:31:12 rlst: 1`
`April 1st 2016, 21:31:13 rlst: 1`
`April 1st 2016, 21:31:14 rlst: 1`
`April 1st 2016, 21:31:15 rlst: 1`
`April 1st 2016, 21:31:18 rlst: 1`
`April 1st 2016, 21:31:19 rlst: 1`
`April 1st 2016, 21:31:20 rlst: 1`
`April 1st 2016, 21:31:21 rlst: 1`
`April 1st 2016, 21:31:22 rlst: 1`
`April 1st 2016, 21:31:23 rlst: 1`
`March 23rd 2016, 21:31:18 rlst: 1`
`March 23rd 2016, 21:31:18 rlst: 1`

If I set the  example_frequency.yaml as:
es_host : localhost
es_port : 9200
name: Example rule
type: frequency
index: time

num_events: 4

timeframe:
hours: 0.2

filter:
term:
rslt: "1"
alert:
"email"
email:
<EMAIL_ADDRESS>
For the data, there is a match should be ONE "match" returned because there are 11 events ocurred in the timeframe in April 1st, but not. The out put as:
INFO:elastalert:Queried rule Example rule from 2014-11-16 13:58 CST to 2016-11-15 13:58 CST: 16 / 16 hits
INFO:elastalert:Ran Example rule from 2014-11-16 13:58 CST to 2016-11-15 13:58 CST: 16 query hits, 0 matches, 0 alerts sent

If I change to num_event : 3, TWO "match" should be returned for events in April 3rd and April 2nd. But only one match as:
INFO:elastalert:Queried rule Example rule from 2014-11-16 13:57 CST to 2016-11-15 13:57 CST: 16 / 16 hits
INFO:elastalert:Sent email to<EMAIL_ADDRESS>INFO:elastalert:Ran Example rule from 2014-11-16 13:57 CST to 2016-11-15 13:57 CST: 16 query hits, 1 matches, 1 alerts sent

If I change to num_event : 2, Three "match" should be returned for events in April 3rd, April 2nd ,and March 23rd. But only ONE match occurred:
INFO:elastalert:Queried rule Example rule from 2014-11-16 14:36 CST to 2016-11-15 14:36 CST: 16 / 16 hits
INFO:elastalert:Sent email to<EMAIL_ADDRESS>INFO:elastalert:Ran Example rule from 2014-11-16 14:36 CST to 2016-11-15 14:36 CST: 16 query hits, 1 matches, 1 alerts sent

It only depends on how the events("rslt=1") enter the timeframe in the very beginning. If the events enter the timeframe as a match, the system will return 1 match, and no matter how many matches happen after the first match, it will still return 1, which is undesirable.
If the events enter the timeframe not as a match (say the event happens less than "num_events" times within a timeframe), the system will return 0 match, and no matter how many matches happen after that, there will still be 0 match.

Whats your config.yaml? And are you using --start 2014-11-16 to get it to query 2 years at a time?
Let me try to recreate this behavior

Can you show the full JSON for one of these documents? Is it possible @timestamp is not the timestamp you are looking at?

I did not use --start 2014-11-16, but I set it at config.yaml
rules_folder: example_rules
run_every:
  minutes: 100
buffer_time:
  minutes: 1051200
es_host: <IP_ADDRESS>
es_port: 9200
es_url_prefix: localhost
writeback_index: elastalert_status
alert_time_limit:
  days: 200

I do change the @timestamp. I changed my @timestamp at logstash.
I need to review the data that I have had, but not the real-time data. But the @timestamp is the one that I need.
The date in my data set is the UNIX format. I made the mapping in logstash, to replace my @timestamp.
This is my logstash filter of example.conf
filter {
  csv {
      separator => ","
      columns => ["time","rslt","username"]
  }
  date {
  match => ["time", "UNIX"]
  target => "@timestamp"
  }
}

You can also use
timestamp_format: unix
timestamp_field: time

Oh, I know what the issue is! It basically comes from the fact that your buffer_time is so big compared to the timeframe. What elastalert does is

Make query for buffer_time worth of events
Add all events from this query to the eventwindow
Resize event window so that anything older than (latest event - timeframe) is removed
Check to see if eventwindow.size > num_events

In this case, the 3 events on April 3rd get added, then all of the events from April 1 get removed because they are now too old. This is an optimization IF the timeframe is longer than buffer_time, which usually is the case.
The bug was introduced here https://github.com/Yelp/elastalert/commit/af88f5155aa72082c8c5c2e9344127998e393931 line 212.
# Only check for match _once_ after adding all the events discovered in this run
 +        # If the current running count is 1, and the threshold is 10, and we go to add 8 entries
 +        # it should only count as a single match, and not 8 consecutive ones.

Do you mean that, in order to make the buffer time smaller, instead of changing @timestamp in Logstash, I can change the timeframe I used in example_frequency.yaml?
I changed the filter in Logstash, I removed the date{} , so the @timestamp is the time that I configure the logstash:
filter {
  csv {
      separator => ","
      columns => ["time","rslt","username"]
  }
}

Then I reduce the buffer time to 30 mins and my config.yaml is:
rules_folder: example_rules
run_every:
  minutes: 100
buffer_time:
  minutes: 30
es_host: <IP_ADDRESS>
es_port: 9200
es_url_prefix: localhost
writeback_index: elastalert_status
alert_time_limit:
  days: 200

My  example_frequency.yaml as:
es_host : localhost
es_port : 9200
name: Example rule
type: frequency
index: norltime

timestamp_format: unix
timestamp_field: time
num_events: 2
timeframe:
hours: 0.5

filter:
term:
rslt: "1"
alert:
"email"
email:
<EMAIL_ADDRESS>
After running python -m elastalert.elastalert --verbose --rule example_frequency.yaml, the output is：
user@mylenovo:~/elastalert$ python -m elastalert.elastalert --verbose --rule example_frequency.yaml
INFO:elastalert:Starting up
INFO:elastalert:Queried rule Example rule from 2016-11-16 10:23 CST to 2016-11-16 10:53 CST: 0 / 0 hits
INFO:elastalert:Ran Example rule from 2016-11-16 10:23 CST to 2016-11-16 10:53 CST: 0 query hits, 0 matches, 0 alerts sent
INFO:elastalert:Sleeping for 5999 seconds

I used the same data set. Even the hit cannot be found this time. It should have 16 hits and 3 matches there.
Is there anything I can do for above steps?
Or is there anything I can do without changing the buffer time smaller?
Should I expect a fix to this bug any time soon?

The timestamp thing had nothing to do with it. It's not getting hits because it no long queries 1051200 minutes. In order to hit the documents from April, you need to force a start time.
python -m elastalert.elastalert --verbose --rule example_frequency.yaml --start 2016-03-01 --end 2016-04-04

It works for the dataset which I changed @timestamp in Logstash by adding "--start" and "--end".
However, the problem still exists in my case.
I think you mean that the buffer time cannot be too long, and the timeframe can not be longer than buffer.
But the fixed "--start, --end" does not work for my situation because it has to be done manually, for example, if I can access the dataset weekly, the "--start, --end" time should change every week.
I have two questions,
First, how short the buffer time should be.
I made up a dataset for testing. I first made a data set with @timestamp in 24 hrs and there are 3 or more than 3 time events occurred every hour. So I set config.yaml:
buffer_time:
  minutes: 1440

the example_frequency.yaml:
num_events: 3
timeframe:
  hours: 1

The output also only depends on the events("rslt=1") enter the timeframe in the very beginning. For the case, there is only one match.
Then I change the buffer time smaller,
buffer_time:
  minutes: 120

for the case, two matches should be reported, but only one.
Secondly,
Does the buffer time in config.yaml depends on the @timestamp?
For previous case, I did not replace the @timestamp with "time" column of the dataset in logstash, so
that there is only one @timestamp, which is the time that I configure the logstash.conf. So I think all the data is requested because it just has one @timestamp.
Does "timestample_format:unix, timestamp_field:time" in example_frequency.yaml indicates that we change the procedure to calculate the frequency based on the "time" column but not the @timestamp?
timestamp_format: unix
timestamp_field: time
num_events: 2
timeframe:
hours: 0.5

I really appreciate your help.

First, let me say that this IS a bug that I will fix soon. So this won't matter after I fix it. But, in the meantime:
Change buffer_time to be equal to timeframe or smaller. This should fix all the issues you have.
Secondly:
timestamp_field and timestamp_format don't affect buffer_time or timeframe or anything. That's just how elastalert will format timestamps when making queries. Internally, elastalert uses python datetime objects, and elasticsearch uses DateOptionalTime or some other internal format. If you have both @timestamp AND time fields, it won't make any difference.

Now I got the @timestamp part :)  and thank you for fixing this bug :)

@Gracewan this should be fixed by https://github.com/Yelp/elastalert/pull/809

I have update the elastalert to 0.1.4, however the same problem still exist...

You still have a very large buffer_time, it hits the documents, but no alert happens? Can you please give the full output from the run showing 16 query hits AND the JSON from one of the documents (You can remove irrelevant fields) AND the full rule yaml if it has changed from your earlier post?

I did not change anything of my config.yaml and I still have a large buffer time:
rules_folder: example_rules
run_every:
  minutes: 100
buffer_time:
  minutes: 1051200
es_host: <IP_ADDRESS>
es_port: 9200
es_url_prefix: localhost
writeback_index: elastalert_status
alert_time_limit:
  days: 200

example_frequency.yaml
es_host : localhost
es_port : 9200
name: Example rule
type: frequency
index: time

num_events: 2

timeframe:
hours: 0.2

filter:
term:
rslt: "1"
alert:
"email"
email:
<EMAIL_ADDRESS>
The output is:
user@mylenovo:~/elastalert$ python -m elastalert.elastalert --verbose --rule example_frequency.yaml
INFO:elastalert:Starting up
INFO:elastalert:Queried rule Example rule from 2014-11-22 13:00 CST to 2016-11-21 13:00 CST: 16 / 16 hits
INFO:elastalert:Sent email to<EMAIL_ADDRESS>INFO:elastalert:Ran Example rule from 2014-11-22 13:00 CST to 2016-11-21 13:00 CST: 16 query hits, 1 matches, 1 alerts sent

Can you show the JSON of some of the documents? Ideally two pairs that would have triggered it? I want to verify that
`April 1st 2016, 21:31:13 rlst: 1`
`April 1st 2016, 21:31:14 rlst: 1`
`April 1st 2016, 21:31:15 rlst: 1`
`April 1st 2016, 21:31:18 rlst: 1`
`April 1st 2016, 21:31:19 rlst: 1`
`April 1st 2016, 21:31:20 rlst: 1`

are the actual timestamps being used.

As I said, I changed my @timestamp by adding a filer in the logstash.config
filter {
  csv {
      separator => ","
      columns => ["time","rslt","username"]
  }
  date {
  match => ["time", "UNIX"]
  target => "@timestamp"
  }
}

Then you can see that the time column of "time" is UNIX that I changed in logstash.config.
time          rslt   usernamer
1479238201	1	admin
1479238202	1	admin
1479238203	1	admin
1479238204	1	admin

I just list a piece of it, please let me know if more info is needed.

Can you run it with this patch?
diff --git a/elastalert/ruletypes.py b/elastalert/ruletypes.py
index f53d2f4..62c251e 100644
--- a/elastalert/ruletypes.py
+++ b/elastalert/ruletypes.py
@@ -209,6 +209,7 @@ class FrequencyRule(RuleType):

             # Store the timestamps of recent occurrences, per key
             self.occurrences.setdefault(key, EventWindow(self.rules['timeframe'], getTimestamp=self.get_ts)).append((event, 1))
+            print "Got %s, count: %s" % (event['@timestamp'], self.occurrences['all'].count())
             self.check_for_match(key, end=False)

I found that my ruletypes.py was not updated. And I added it manually, in my local ruletypes.py file.
print "Got %s, count: %s" % (event['@timestamp'], self.occurrences['all'].count())
self.check_for_match(key, end=False)

The output is an error:
user@mylenovo:~/elastalert$ python -m elastalert.elastalert --verbose --rule example_frequency.yaml
INFO:elastalert:Starting up
INFO:elastalert:Queried rule Example rule from 2014-11-22 17:23 CST to 2016-11-21 17:23 CST: 16 / 16 hits
Got 2015-07-08 08:47:34+00:00, count: 1
ERROR:root:Traceback (most recent call last):
  File "/home/yu/elastalert/elastalert/elastalert.py", line 743, in run_all_rules
    num_matches = self.run_rule(rule, endtime, self.starttime)
  File "/home/yu/elastalert/elastalert/elastalert.py", line 532, in run_rule
    if not self.run_query(rule, rule['starttime'], endtime):
  File "/home/yu/elastalert/elastalert/elastalert.py", line 393, in run_query
    rule_inst.add_data(data)
  File "elastalert/ruletypes.py", line 216, in add_data
    self.check_for_match(key, end=False)
TypeError: check_for_match() got an unexpected keyword argument 'end'

ERROR:root:Uncaught exception running rule Example rule: check_for_match() got an unexpected keyword argument 'end'
INFO:elastalert:Rule Example rule disabled
INFO:elastalert:Sleeping for 5999 seconds

I don't think you actually have 0.1.4
That error is because this line doesn't have the changes I made: https://github.com/Yelp/elastalert/blob/master/elastalert/ruletypes.py#L219

I use pip show to check the version:
user@mylenovo:~/elastalert$ pip show elastalert
Name: elastalert
Version: 0.1.4
Summary: Runs custom filters on Elasticsearch and alerts on matches
Home-page: UNKNOWN
Author: Quentin Long
Author-email<EMAIL_ADDRESS>License: Copyright 2014 Yelp
Location: /usr/local/lib/python2.7/dist-packages
Requires: argparse, elasticsearch, jira, jsonschema, mock, python-dateutil, PyStaticConfiguration, pyyaml, simplejson, boto, botocore, blist, croniter, configparser, aws-requests-auth, texttable

Is /elastalert a clone of the code? It looks like you have elastalert installed in two places. /elastalert and /usr/local/lib/python2.7/dist-packages. You can either change directory so it will pick up the system package, or run git pull, or delete /elastalert

I added it manually, and the problem is fixed so far!!!
Thank you so much!!!

Hi, I have a new question about this issue.  From above we can find that in

2016-11-16 10:31:12
this time period, there are 7 hits, which is over the rule (3 hits), one match should be reported, however two matches are reported because the number of total hits(7 hits) in this time period is more than twice the number of hits I set in the rule (3 hits).

When it hit's num_events, the count gets reset. I completely understand why it would make sense to continue for .2 hours after that instead of starting to count again immediately. I've been considering whether to change the behavior, because that does make sense.

I have a new question which is not quite related to above issue, but it is another kind of no match can be found because of the buffer_time.
The config.yaml as below, and I used same JSON as above
rules_folder: rule_tests
run_every:
  minutes: 100

buffer_time:
  minutes: 28800

es_host: <IP_ADDRESS>
es_port: 9200
writeback_index: elastalert_status
alert_time_limit:
  days: 200

The rule in the rule_tests folder is frequency rule
es_host : localhost
es_port : 9200
name: Example frequency rule 002
type: frequency
index: time
num_events: 3
timeframe:
  hours: 0.2
filter:
- term:
    rslt: "1"
alert:
- "email"
email:
-<EMAIL_ADDRESS>
And I ran with user@mylenovo:~/elastalert$ elastalert --start NOW --verbose
The output as below:
user@mylenovo:~/elastalert$ elastalert --start NOW --verbose
INFO:elastalert:Starting up
INFO:elastalert:Queried rule Example rule 002 from 2016-11-29 17:07 CST to 2016-11-29 17:07 CST: 0 / 0 hits
INFO:elastalert:Ran Example rule 002 from 2016-11-29 17:07 CST to 2016-11-29 17:07 CST: 0 query hits, 0 matches, 0 alerts sent
INFO:elastalert:Sleeping for 5999 seconds

The queried rule time and the  ran time are not depends on buffer_time:  minutes: 28800
SO no hit, no match.

You added --start NOW so it doesn't look back in time? Is that not what you expect to happen?

It was added by accident and I did not review carefully. Thanks for your patience!!!

Hi @Qmando , I do not know if I can keep posting my new problem here. If not please let me know and I will open a new question.
My new question is about the error: AttributeError: 'NoneType' object has no attribute 'access_key'
I check the previous problem, it might come from the ALERT, but I did not use SNS, I use email as usual, but this error occurred
user@tuolenovo:~/elastalert$ python -m elastalert.elastalert --verbose --rule rule_tests/example_any.yaml
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 164, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 74, in _run_code
    exec code in run_globals
  File "/home/user/elastalert/elastalert/elastalert.py", line 1409, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/home/user/elastalert/elastalert/elastalert.py", line 1404, in main
    client = ElastAlerter(args)
  File "/home/user/elastalert/elastalert/elastalert.py", line 115, in __init__
    self.writeback_es = elasticsearch_client(self.conf)
  File "elastalert/util.py", line 260, in elasticsearch_client
    boto_profile=es_conn_conf['boto_profile'])
  File "elastalert/auth.py", line 40, in __call__
    aws_access_key_id = str(aws_credentials.access_key)
AttributeError: 'NoneType' object has no attribute 'access_key'

My example_any.yaml:
es_host : localhost
es_port : 9200
name: Example rule any for jiangsu01
type: any
index: ip_date_fixed
filter:
- term:
    rslt: "1"
alert:
- "email"
email<EMAIL_ADDRESS>

I am looking forward to seeing your reply

Hmm. This should only happen if aws_region is set. Why don't you apply this diff and tell me what it prints out
diff --git a/elastalert/util.py b/elastalert/util.py
index 7ade3ce..e6c7a7f 100644
--- a/elastalert/util.py
+++ b/elastalert/util.py
@@ -266,6 +266,7 @@ def elasticsearch_client(conf):
     """ returns an Elasticsearch instance configured using an es_conn_config """
     es_conn_conf = build_es_conn_config(conf)
     auth = Auth()
+    print "es_conn_conf:", es_conn_conf
     es_conn_conf['http_auth'] = auth(host=es_conn_conf['es_host'],
                                      username=es_conn_conf['es_username'],

First, thank you for the replying :)
I added print "es_conn_conf:", es_conn_conf in my util.py
then get the print out after running the rule
user@tuolenovo:~/elastalert$ python -m elastalert.elastalert --verbose --rule rule_tests/example_any.yaml
es_conn_conf: {'es_port': 9200, 'http_auth': None, 'aws_region': 'us-west-2', 'es_password': None, 'boto_profile': None, 'es_url_prefix': '', 'es_username': None, 'send_get_body_as': 'GET', 'use_ssl': False, 'es_conn_timeout': 10, 'es_host': '<IP_ADDRESS>', 'verify_certs': True}
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 164, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 74, in _run_code
    exec code in run_globals
  File "/home/yu/elastalert/elastalert/elastalert.py", line 1409, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/home/yu/elastalert/elastalert/elastalert.py", line 1404, in main
    client = ElastAlerter(args)
  File "/home/user/elastalert/elastalert/elastalert.py", line 115, in __init__
    self.writeback_es = elasticsearch_client(self.conf)
  File "elastalert/util.py", line 261, in elasticsearch_client
    boto_profile=es_conn_conf['boto_profile'])
  File "elastalert/auth.py", line 40, in __call__
    aws_access_key_id = str(aws_credentials.access_key)
AttributeError: 'NoneType' object has no attribute 'access_key'

Do you have a file config.yaml file that has aws_region set in it? That default value isn't coming from elastalert, at least not on the most recent version.


[libsodium] use x64 specific gcc options only on x64 platform

fixes #15288

cc @myd7349 who may interest in the changes.
@BillyONeal, could you help further review?

Thanks for your help!


[BUG] iroha2:base image fails to be built

GIT commit hash
7cf42c6c
Minimum working example
docker build -f Dockerfile.base -t iroha2:base .

Expected behaviour
Successfully built
Actual behaviour

Operating system
Ubuntu 22.04 LTS
LibC type and version
ldd (Ubuntu GLIBC 2.35-0ubuntu3) 2.35
Current environment
Source code build
Logs in JSON format

Log contents
Replace this text with a JSON log,
so it doesn't grow too large and has highlighting.

Who can help?
No response

Closed as resolved


Kubernetes upgrade from CNX 7 to 8

Hi,
today I tried to update my Connections 7 environment, that it uses the CNX 8 containers from harbor.
I assumed that I just add the new variables for the docker registry user and the updated Kubernetes version.
Sadly, the upgrade fails because the kubernetes-upgrade role just tries to use the binaries of the version set in environments and does a kubeadm upgrade, but CNX 7 used 1.21 and 8 uses 1.27 now. So the upgrade process would be 1.21 → 1.22 → 1.23 → 1.24 → 1.25 → 1.26 → 1.27 or uninstall Kubernetes (destroy the cluster) and deploy the new version. But this is not built in or documented as far as I see.
What's the recommended way to do this? The kb doc on using Harbor images with CNX 7 just points to the Connections 8 documentation.
Could you build a playbook for a CNX 7 to CNX 8 upgrade, or CNX 7 → CNX 7 with Harbor → CNX 8, please?
Regards
Christoph

Hi @stoeps13, yes kubernetes-upgrade playbook needs to be run iteratively to upgrade across versions.  It's mentioned here https://github.com/HCL-TECH-SOFTWARE/connections-automation/blob/main/documentation/howtos/connections_upgrade_to_8.x.md#preparation-if-upgrading-to-kubernetes-125 but it's applicable not limited to v1.25.  We'll adjust the title.

But running the playbook 7 or 8 times makes no sense and the playbook does not check the difference from actual installed version against target.
It would be easy to loop through all versions between installed and update_version.


Clarify cloudProvider.region in config.json

Closes #950.
region and not zone as confirmed by @vponline.
Preview site: https://api3-docs--config-provider-region-fix-2kymxgi1.web.app/

Thanks, I think we're safe skipping the link.


arch: doxygen: group architecture interfaces

Group all architecture interfaces under one group in doxygen.

You need to make a similar change in include/sys/arch_inlines.h

you are not defining new groups in include/sys/arch_inlines.h, so the association is already created.


Design review of contextual help

Type

[ ] Bug fix
[ ] New feature
[x] Improvement to existing feature

Related JIRA Issue(s)
https://www.ebi.ac.uk/panda/jira/browse/ENSWBSITES-1320
Description
This PR contains design review tweaks.
I have moved HistoryButtons into a separate component from HelpPopupBody.
Deployment URL
http://contextual-help-design-review.review.ensembl.org/
Views affected
Help article popup
Other effects
NA

[ ] I have checked any requirements for Google Analytics
[ ] I have created any required tests
[ ] The PR has as its final commit a WASM/JS update commit if any Rust files were updated.

Possible complications
NA

@jyothishnt - I think you missed the following from the ticket:
"Remove the 17px from line-height on .textArticle p (line height should revert to 1.5)"
https://github.com/Ensembl/ensembl-client/pull/588/files#diff-4779529293e7b159150b0395a046c4752bbee34a44750d33458dfbb3c953bd03L34


Trying to change port on Redis for windows 8.1

Hello everyone.
Tried to change port on Redis 2.8.21.(Screenshot here:http://3.1m.yt/AGpx1ZjbQ.png)
Afterwards restarted both redis-cli and redis-server.
Also tried to change it via redis-server with 'config set port 3001' command.
How do I do that? googled it thoroughly and could not figute out how. Or maybe it's a syntax error?
Would like to hear your opinios and suggestions. Thank you.

@osherdo,
if redis-server runs as a service change the port in redis.windows-service.conf otherwise change it in redis.windows.conf and run redis-server.exe redis.windows.conf.
The CONFIG command doesn't support the port parameter.

@enricogior thanks again for your answer.
Redis does running as a service in my OS since it appears in the services window (services.msc).
I have changed the port in redis.windows-service.conf( to 3001) :
# Accept connections on the specified port, default is 6379.
# If port 0 is specified Redis will not listen on a TCP socket.
port 3001

Yet it still comes <IP_ADDRESS>:6379 in redis-clie.exe
One thing I should mention is that I cannot edit the file redis.windows.conf for some reason. it does not allow me to make any changes in this file.

@osherdo,
copy the redis.windows-service.conf file to the desktop, edit the file and then copy it back to the c:\program files\redis folder.
From a command prompt with admin rights:
C:> net stop redis
C:> net start redis
C:> type "C:\Program Files\Redis\Logs\redis_log.txt"
the last line should contain "The server is now ready to accept connections on port 3001".

@enricogior I have done cd into C:\Program Files\Redis\Logs and tried to run:
 The process cannot access the file because it is being used by another process.

I have tried to access the file again after restart but it keeps giving me the same message.
So I thought maybe port 3001 is busy ,and entered this at the command prompt (with administrative priviliges) and got this output:
C:\WINDOWS\system32>   netstat -aon | find ":3001"
  TCP    <IP_ADDRESS>:3001           <IP_ADDRESS>:0              LISTENING       3180
  TCP    [::]:3001              [::]:0                 LISTENING       3180

the same applies for port 2999.

@osherdo
"3180" is the pid of the process that is using port 3001, check in the task manager what process is.
If you are still having problems setting the Redis port I suggest to uninstall Redis and reinstall it.
During the installation you may change the default port number to 3001.
After uninstalling and before reinstalling, run again netstat -aon | find ":3001" to make sure the port is not already in use.

it is funny becuase I did anything you've said and yet it is going to port 6379.
checked to make sure that either port 3001 or 2999 for instance are not busy before reinstaliing. anything you can tell me to do next?

@enricogior

@osherdo
did you select port 3001 during the MSI installation and still the redis.windows-service.conf shows port 6379?
Please make sure Redis was uninstalled first verifying that the C:\Program Files\Redis folder is not present, if present delete it.
Make sure there are no other instances of Redis running.
Reinstall following the instructions I gave before and make sure the redis.windows-service.conf is updated with the correct port number.
We have never seen this problem before and I don't have a Windows 8.1 box to test it, but it seems strange that only occurs on Windows 8.1.

Yes I selected port 3001 during the MSI installation and still the redis.windows-service.conf shows port 6379.
Do you know maybe if ``` redis.windows-service.conf```` is set as default config file for Redis? if not, how do I change it?  because port 2999(that I chose during installation) is actually set in this file.Yet the program showing current port as 6379.

@osherdo
you first said: "still the redis.windows-service.conf shows port 6379"
but then you pasted the  lines from redis.windows-service.conf that show that the port is set to 2999.
So too me it seems that the MSI is working as expected.
When the installation is completed, redis-server.exe is started as a service and if you check the log file it should show that Redis is using the 2999 port.
Use the command: C:> type "C:\Program Files\Redis\Logs\redis_log.txt"
If you run redis-server.exe manually, that is another instance and it will use the redis.windows.conf (not the redis.windows-service.conf) that still has the default 6379 port, that is also expected.

@enricogior that's right. the config file is configured to use port 2999. Saw it on the log file (from 2 hours,though. it does not show logging for the current time.Is it okay?).
But the CLI shows port 6379 as the one being used, though.
the log says one thing and CLI is saying another, and not the same.
I do run redis-server manually. the port 6379 does appear in redis.windows.conf file and cannot be edited at all. This brings me back to ask what is the way to change configuration path file in Redis for windows? the one in the Redis website is for Mac.
This is the log file right now:
[7808] 04 Aug 21:50:07.833 * Redis 2.8.2101 (00000000/0) 64 bit, stand alone mode, port 2999, pid 7808 ready to start.
[7808] 04 Aug 21:50:07.834 # Server started, Redis version 2.8.2101
[7808] 04 Aug 21:50:07.834 * The server is now ready to accept connections on port 2999

and this is a current screenshow from redis-cli:
http://2.1m.yt/0Rlhqqdk.png
What would you suggest to do next?

@osherdo
regarding: "the port 6379 does appear in redis.windows.conf file and cannot be edited at all"
to edit redis.windows.conf copy the file to the desktop, change the port number and copy it back to C:\Program Files\Redis\
When you run redis-server.exe manually you have to pass the configuration file:
redis-server.exe redis.windows.config
otherwise it will use the default settings.

@enricogior sorry I forgot about the port changing method. Changed it too to 2999 in redis.windows.conf as well.
I just don't know how to pass the configuration file manually.
redis-cli.exe does not accept any kind of this argument.
that's the last thing I need to know in order to make it succeed, I believe.

@osherdo
the configuration files is passed to the server not to the client, to pass the config file manually to the server:
C:\>cd \Program Files\Redis
C:\Program Files\Redis>redis-server.exe redis.windows.conf

got it finally.
works just fine on redis-cli.
Now how do I pass the port to the redis-cli? it still exist as 6379 there.

@osherdo
to connect the client to the server that runs on port 2999:
C:\Program Files\Redis>redis-cli.exe -p 2999

Thank you deeply @enricogior for the ongoing support . Finally!
:)

just out of coriousity: do you know what that means?
I am trying get tcp_port and the cli returns this:
(nil)
any idea what that is?

@osherdo
it seems you already found the answer, anyway it's explained here: http://redis.io/commands/get
I close the issue.


system-monitor widget: Add label parameter for sensors

Hello, thank you everyone for your work!
This is a small change to allow adding a label for a system monitor panel widget.
I did it by copying the code pattern currently used for colors (I'm sure it could be done better by creating re-usable modules etc for lines 40 and 101, but I'm new to Nix so I wouldn't know how to do it yet :sweat_smile: )

You solution looks just fine :). Works good, so I'll merge when checks are done. Thanks.


Where statement on Joined table

Hi!
Is it possible to add where statement to a joined table?
For example, I have such SQL query:
'SELECT * from $_personsTable as A ' +
            'INNER JOIN $_projectWorkersTable as B ' +
            'ON A.id = B.workerId ' +
            'WHERE B.projectId = ?'

In moor I have this:
List<TypedResult> results = await select(moorPersons).join([
      innerJoin(
        moorProjectWorkers,
        moorProjectWorkers.workerId.equalsExp(moorPersons.id),
      )
    ]).get();

But I have no idea how to put where statement on joined table. My only idea is to switch tables but it works only in this example.
I would appreciate your help :)

You could use
final query = select(moorPersons).join([
  innerJoin(...)
])..where(moorProjectWorkers.projectId.equals(yourTargetId));
List<TypedResult> results = await query.get();

By the way: If you prefer to use sql, using moor files might be something worth looking into. You can put named sql queries in there, moor will analyze them and generate matching Dart methods. With imports, you can also use Dart-defined tables in moor files (small limitation: At the moment only the Dart database file or imports of it can be imported in moor files).

Well, I'm surprised I didn't think about it :D Thank you!  <3

@simolus3 it seems to fail when we have tables generated via dart classes and we write sql queries in a moor file. Moor generator is not able to associate tables:

You need to import the Dart file defining the table into the moor file:
-- This is database_queries.moor
import 'database.dart'; -- assuming that SomeTable is defined in database.dart

@simolus3 just wow! That's really amazing thank you for your hard work


parser goroutine leaks if not explicitly Stop()-ed

Currently not calling env.Stop() will make zygo not be GCed; code like this:
func worker() {
	env := zygo.NewZlisp()
	_ = env.LoadString("(+ 3 2)")
	_, _ = env.Run()
}

will quickly make it leak memory.
Maybe defer env.Stop() should be added somewhere in wiki ? Meanwhile I added  some comment to the function (https://github.com/glycerine/zygomys/pull/51 ) so at least there is hint in godoc about.

This is a reasonable concern. I've merged the Stop description addition.
Typically one only needs a single env for the process, so having the one parser background goroutine in the background is fine. It is like having an open file handle during the process.
But that isn't always true. Sometimes I end up with a bunch of parser goroutines just hanging around that won't be used in the future. A more complete solution would be to have method that is explicitly "OneShot" that automatically closes the parser goroutine after evaluating a string.
Or to have the parser goroutine timeout after a period of non-use.
I'll leave this open while thinking about what more to do.

Honestly I think just clarifying comments and documentation a bit would've been enough. I haven't found a mention about it running in the background and it wasn't in a example and not in IDE hint (as there was no comments) so I assumed it just get GCed as normal. RunAndClose() kind of method would provide way to run one-shots easily but considering there is already setup required anyway just asking user to call defer env.Close() isn't a big deal, especially that the Go stdlib does that in few places too.

Typically one only needs a single env for the process, so having the one parser background goroutine in the background is fine. It is like having an open file handle during the process.

My use case was using it as  tiny query language so I did it per-call just to not have to do sync.lock->clear->run->unlock on each event

Or to have the parser goroutine timeout after a period of non-use.

That seems very "magical" and prone to errors. Like someone's code can pass all the tests then fail just because program "in real life" called the parser again after half a day. There's also runtime.SetFinalizer but as fair as I know it isn't exactly recommended, and it would really just hide bugs from user (unless maybe use it to print warning about unClose()d parser?)

The latest release, v6.0.7, implements the ideas above in lazyparser.go, which was present before but not fully implemented. The LazyParse approach is now fully implemented and on by default. We start a parser goroutine only when needed, and shut it down eagerly.  As a result, there should be no lingering goroutines if they are not being used. Calling Stop() is still a good idea, of course. I found having the extra goroutines in stack dumps a distraction. The LazyParse approach results in much cleaner stack dumps when the parsing goroutines are not in use, as they are no longer present.


prediction_hooks argument for tf.estimator.EstimatorSpec

When trying to run eval_ssd.py I get the following error:
File "eval_ssd.py", line 373, in ssd_model_fn
loss=None, train_op=None)
TypeError: new() got an unexpected keyword argument 'prediction_hooks'
I'm using TF 1.4.1. Is this another TF compatibility issue?
Is there an easy patch I can use as you did for tf_replicate_model_fn?
Thanks in advance!

@netanel-s  Hi, sorry for that. This is indeed another compatibility issue,  you can just remove that 'prediction_hooks' argument.

Thanks.


Toaster UI for complete actions: Delegate, Undelegate, Unlock funds

what's the story, do you wish you had toasters to see this? But it's not as granular. We now have toasters for tx, and the txs do a million things, all at once in general. Undelegating, unvoting, delegating etc.. I fear this wouldn't fit well in a toaster :see_no_evil:

Closed in #112 I didn't pull properly


fix polyfill String.prototype.endsWith

endsWith doesnt return the right result when the length of string in arguments is equals to the other string's length -1
For exemple, if you have this = 'a' and string = 'ab', 'a'.endsWith('ab') will return true.

Added some tests in 4f0ab0c42c8185c4845d895448955ee7fc86c488 that include a test for the case discussed here. Current lib fails, proposed change passes, so happy to merge.
Thanks for the contribution.


spacing in eduction heading on different screen size

heading of the education page are not responsive for different screen size and needs changes in breakpoint

please assign me that issue

Assigned for 2 days

@rushikadivar what's the status of your PR?

It's already merged with different issue along with their code

got it!


Known issue: unable to import opengl.gl in python on macos

Link: https://stackoverflow.com/questions/63475461/unable-to-import-opengl-gl-in-python-on-macos

Test now pass with new Big Sur patch.


textfield not respect language

@salah-mohammed Thank you to use this lib.
I fixed it and it's available on 0.4.3


[test]add mount test

What this PR does / why we need it:
Special notes for your reviewer:
Does this PR introduce a user-facing change?

Codecov Report

Merging #489 (16703a7) into main (00fe5a4) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #489   +/-   ##
=======================================
  Coverage   25.48%   25.48%
=======================================
  Files          19       19
  Lines         973      973
=======================================
  Hits          248      248
  Misses        695      695
  Partials       30       30

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


User detail page perms

Regression caused by https://github.com/OSU-Net/cyder/pull/901
As mentioned in a bug report:
|.......User Description......|
When wojcikc tries to log in he gets user access. When he clicks on his name he is directed to this error.
How to Reproduce:

Log in as wojcikc (possibly anyone with "user" access).
Click username in the top left.

Expected Result:
You should see your containers.
Actual Result:
You get a Django error stack trace:
AttributeError at /core/user/298/
'Token' object has no attribute 'get_ctnrs'
Request Method: GET
Request URL:    https://cyder.oregonstate.edu/core/user/298/
Django Version: 1.4.1
Exception Type: AttributeError
Exception Value:
'Token' object has no attribute 'get_ctnrs'
Exception Location:     /data/cyder/cyder/core/cyuser/backends.py in _has_perm, line 67

The bug occurs for any user that has an API token assigned to them.


Remove crates/x

I've considered removing a few other items too (like sally or the TestDB in typed-store), but ultimately decided that it would make backports more difficult without that much benefit.

But of course I forgot the lockfile; it won't change the CI results, though, so merging.


gvalid: invalid_rule cannot be outputed in the gvalid.Error.String()

1. What version of Go and system type/arch are you using?
go version go1.14.9 windows/amd64

2. What version of GoFrame are you using?
1.14.5

3. Can this issue be reproduced with the latest release?
Yes
4. What did you do?

I defined a wrong validation tag and gvalid catches the error as an invalid rule.
I need to handler occasions when sometimes tags are incorrect.
type a struct {
Name string `v:"hh"`
}
aa := a{Name: "2"}
err := gvalid.CheckStruct(&aa, nil)
fmt.Println(err.String())

5. What did you expect to see?
error string as:
invalid rule: hh
6. What did you see instead?
err.String() == ""
Possible Cause
util\gvalid\gvalid_check.go   line149-line171
	// Handle the char '|' in the rule,
	// which makes this rule separated into multiple rules.
	ruleItems := strings.Split(strings.TrimSpace(rules), "|")
	for i := 0; ; {
		array := strings.Split(ruleItems[i], ":")
		_, ok := allSupportedRules[array[0]]
		if !ok && customRuleFuncMap[array[0]] == nil {
			if i > 0 && ruleItems[i-1][:5] == "regex" {
				ruleItems[i-1] += "|" + ruleItems[i]
				ruleItems = append(ruleItems[:i], ruleItems[i+1:]...)
			} else {
				return newErrorStr(
					"invalid_rules",
					"invalid rules: "+rules,
				)
			}
		} else {
			i++
		}
		if i == len(ruleItems) {
			break
		}
	}

the unknown validation tag will return a new error map, key = "invalid_rules", value = "invalid rules: "+rules
the key will be used in the code below, when formatting the error string.
util\gvalid\gvalid_error.go   line150-line180
// Strings returns all error messages as string array.
func (e *Error) Strings() (errs []string) {
	if e == nil {
		return []string{}
	}
	errs = make([]string, 0)
	// By sequence.
	if len(e.rules) > 0 {
		for _, v := range e.rules {
			name, rule, _ := parseSequenceTag(v)
			if m, ok := e.errors[name]; ok {
				for _, rule := range strings.Split(rule, "|") {
					array := strings.Split(rule, ":")
					rule = strings.TrimSpace(array[0])
					if err, ok := m[rule]; ok {
						errs = append(errs, err)
					}
				}
			}
		}
		return errs
	}
	// No sequence.
	for _, m := range e.errors {
		for _, err := range m {
			errs = append(errs, err)
		}
	}
	return
}

the code below will match the rule with the error map
if err, ok := m[rule]; ok {
errs = append(errs, err)
}

the wrong rule can't match the key: invalid_rule

so the invalid error is ignored and can't be outputed as error string.
I thought it might be part of the concern that gf should ignore the tag that it can't parse, making the framework more flexible.
What if I need to handle the invalid rule error?
I thought the change below might handle my problem.
return newErrorStr(
  array[0],
  "invalid rules: "+rules,
)

err := gvalid.CheckStruct(&aa, nil)
err != nil,  so I need to handler, but the err.String() shows nothings.
Currently I can only use the err.Maps(), and check if the map[string]map[string]interface has second key == "invalid_rule"
This might not be the best practice.

@MTTMTTMTT go get -u github.com/gogf/gf@master and try again.

Exaclty as I expected.
So I should use version >= 1.14.7 after released?
Thanks for patience


No token found for tokenId: 45ee725c2c5993b3e4d308842d87e973bf1951f5f7a804b21e4dd964ecd12d6b_0

I encountered an issue where the token with tokenId 45ee725c2c5993b3e4d308842d87e973bf1951f5f7a804b21e4dd964ecd12d6b_0 could not be found.
Please advise on how this can be resolved or if additional steps are required on my end. Let me know if further details are needed.

cause of you didn't sync completely...

exactly


Fixed image link for flowchart in imageMgmtAPI.rst

Pull Request Test Coverage Report for Build 5864

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.006%) to 43.546%

Totals

Change from base Build 5863:
0.006%

Covered Lines:
15182

Relevant Lines:
34864

💛  - Coveralls

Pull Request Test Coverage Report for Build 5864

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.006%) to 43.546%

Totals

Change from base Build 5863:
0.006%

Covered Lines:
15182

Relevant Lines:
34864

💛  - Coveralls


Fix random value order

I want to merge this change because it fixes random attribute value ordering during the attribute creation.
Pull Request Checklist

[ ] Privileged views and APIs are guarded by proper permission checks.
[ ] All visible strings are translated with proper context.
[ ] All data-formatting is locale-aware (dates, numbers, and so on).
[ ] Database queries are optimized and the number of queries is constant.
[ ] Database migration files are up to date.
[ ] The changes are tested.
[ ] The code is documented (docstrings, project documentation).
[ ] GraphQL schema and type definitions are up to date.
[x] Changes are mentioned in the changelog.

Here is the report for 4b8b6e7e23d735c4a197d4c7ea586be797557b46 (mirumee/saleor @ attributes/fix-random-value-order)
Base comparison is 1e248962a0689101677d294cb0d98a67228a9742.
No differences were found. (click me)

# api.benchmark checkout
  test name                           	left count 	right count	duplicate count
  ------------------------------------	-----------	-----------	---------------
  add billing address to checkout     	         34	         34	             20
  add shipping to checkout            	          7	          7	              0
  checkout payment charge             	         14	         14	              0
  complete checkout                   	          6	          6	              0
  create checkout                     	         43	         43	             21

# api.benchmark homepage
  test name                           	left count 	right count	duplicate count
  ------------------------------------	-----------	-----------	---------------
  retrieve main menu                  	          5	          5	              0
  retrieve product list               	          4	          4	              0
  retrieve secondary menu             	          5	          5	              0
  retrieve shop                       	          2	          2	              0

# api.benchmark product
  test name                           	left count 	right count	duplicate count
  ------------------------------------	-----------	-----------	---------------
  product details                     	         15	         15	              3

# api.benchmark variant
  test name                           	left count 	right count	duplicate count
  ------------------------------------	-----------	-----------	---------------
  retrieve variant list               	         15	         15	              6

Codecov Report

Merging #4535 into next/enterprise-grade-attributes will decrease coverage by 0.01%.
The diff coverage is n/a.

@@                         Coverage Diff                         @@
##           next/enterprise-grade-attributes   #4535      +/-   ##
===================================================================
- Coverage                             90.71%   90.7%   -0.02%
===================================================================
  Files                                   298     298
  Lines                                 17373   17373
  Branches                               1776    1776
===================================================================
- Hits                                  15760   15758       -2
- Misses                                 1103    1104       +1
- Partials                                510     511       +1

Impacted Files
Coverage Δ

saleor/payment/utils.py
90.47% <0%> (-0.87%)
:arrow_down:

Continue to review full report at Codecov.

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


Adds a test case with an evil HTTP server

NOT TO BE MERGED (yet)
Protocol detection should work even if the evil server first acts like a FTP server.
As for now, it does not.

Could be merged once that suricata PR gets merged

@catenacyber Whats the status of this?

Still valid.
Latest PR was https://github.com/OISF/suricata/pull/4605
But this should come after https://github.com/OISF/suricata/pull/5759 https://github.com/OISF/suricata-verify/pull/417
We can close this PR in the meantime if you prefer

Closing for now


nginxModules: update and add nginx modules

Update nginx modules:

http_proxy_connect_module to 16.04.2019
dav to 3.0.0
lua to 0.10.14
upstream-check to 12.08.2018
upstream-tarantool to 2.7.1
subsFilter to 13.04.2016

Added nginx modules:

live 18.11.2018
mpeg-ts 0.1.1
coolkit 0.2
slowfs-cache 1.10
limit-speed 21.05.2014
sorted-querystring 0.3
video-thumbextractor 0.9.0
naxsi 0.56

Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Assured whether relevant documentation is up to date
[ ] Fits CONTRIBUTING.md.

@GrahamcOfBorg build nginxMainline
@GrahamcOfBorg test nginx

cc @Mic92

@Izorkin it looks like nginxModules.dav update broke the build of tengine
See: https://hydra.nixos.org/build/93598570 (first failing build on x86_64)

@c0bw3b thanks. Update - https://github.com/NixOS/nixpkgs/pull/61907


Adding "expected" requests

Wes,
First off, thanks so much for this great Angular work. I'm using the component in a large-scale angular project and it has been outstanding. Thank you!
I wanted to get your opinion on a common occurrence in more data loading situations. Say you need to fetch 2 things, and then fetch 2 more based on the outcome of the first two fetches (not unlikely in a REST environment). The loading bar will jump back and forth—looking like it completes only to jump back to the beginning when the second set of requests are made. This makes sense technically since angular (and therefore the loading bar) don't know anything about the second 2 requests until they're actually made. But the developer knows about them, and therefore there might be a better way to handle these situations.
I started looking at a way to address this situation and wanted to get your feedback. In my forked repo, I added the ability to pass in a loadingBarShouldExpect parameter on the $http configuration object. This would tell the loading bar to "expect" additional requests in the future. So a loadingBarShouldExpect: 4 parameter would tell the loading bar "this is the first of 4 requests." This allows the same situation described above to appear as a single load event instead of two sets of events back-to-back.
You can see a diff of my fork and your repo. Most of the changes were used to piece together a demo which loads 100 sets of weather data synchronously as one load event (not a great example, but it shows the added functionality). The few changes to the actual source are shown in the last file.
Let me know what you think and whether there's a better way to go about this.
Thanks again,
-Nate

It would be cool to pass the loading bar a promise which would kick off start() and then call complete() when the promise resolves. This would be a lot easier way for complex interactions, like this, to have one overarching loading bar.

@joshperry, that solution would be great for situations where you have 3 requests and then 2 of those requests fire 2 more. But we have situations where one request starts, then completes and kicks off another request, which completes, and then kicks of another request. Since at those points "all" requests are "done" I think you'd still have a bouncing loading bar.


Open source no dashboard？

Open source no dashboard？

Yep! The Saiku Enterprise has a dashboard. Check it: https://www.meteorite.bi/products/saiku/download


Table CDN example dom error

                Id
                Name
                Sport

            <vuedraggable v-model="list" tag="tbody" item-key="name">
              <template #item="{ element }">

                  {{ element.id }}
                  {{ element.name }}
                  {{ element.sport }}

              </template>
            </vuedraggable>

I am experiencing the same problem.
Is there a workaround?

@kabanoki No, I keep use old version

@hunteryun
I've figured out how to make it work!
Change it as follows
<vuedraggable v-model="list" tag="tbody" item-key="name">
↓

Sample URL
https://codepen.io/kabanoki/pen/zYEVwrp

@kabanoki WOW，you are legend !  :thumbsup:

Has anyone got this to work using the Simple demo?

what's trouble with you? show your code? this is my code:

        some code

          some code

what's trouble with you? show your code?
Here is my code:
https://jsfiddle.net/squidg/mev83ngo/2/

I'm getting the following in console.
Uncaught TypeError: Cannot read properties of undefined (reading 'type')
    at Kc (vue.global.prod.js:1:97696)
    at Kc (vue.global.prod.js:1:97732)
    at zc (vue.global.prod.js:1:97560)
    at Wc (vue.global.prod.js:1:97405)
    at zc (vue.global.prod.js:1:97552)
    at vue.global.prod.js:1:98383
    at Kc (vue.global.prod.js:1:98540)
    at Kc (vue.global.prod.js:1:97732)
    at zc (vue.global.prod.js:1:97560)
    at Wc (vue.global.prod.js:1:97405)

what's trouble with you? show your code?

Here is my code:
https://jsfiddle.net/squidg/mev83ngo/2/
I'm getting the following in console.
Uncaught TypeError: Cannot read properties of undefined (reading 'type')
    at Kc (vue.global.prod.js:1:97696)
    at Kc (vue.global.prod.js:1:97732)
    at zc (vue.global.prod.js:1:97560)
    at Wc (vue.global.prod.js:1:97405)
    at zc (vue.global.prod.js:1:97552)
    at vue.global.prod.js:1:98383
    at Kc (vue.global.prod.js:1:98540)
    at Kc (vue.global.prod.js:1:97732)
    at zc (vue.global.prod.js:1:97560)
    at Wc (vue.global.prod.js:1:97405)

@PeterStavrou
For now, if you just want to see it in action, take a look at the sample below.
https://jsfiddle.net/kabanoki/fszm3w47/10/

For now, if you just want to see it in action, take a look at the sample below. https://jsfiddle.net/kabanoki/fszm3w47/11

Perfect! Thank you!

@PeterStavrou
For now, if you just want to see it in action, take a look at the sample below. https://jsfiddle.net/kabanoki/fszm3w47/11
Only some HTML has been changed.

Appreciate your help!


Enable source-build for the ASP.NET Core shared framework

See also https://github.com/dotnet/source-build/issues/375.
The Microsoft.AspNetCore.App shared framework and many of dependencies are not currently supported in source-build. To enable source-build on this shared runtime, we expect the following changes will need to be made:

Add a build flag to enable building only source-buildable assets. Not everything in the repo will support source-build
Enabling compiling without any remote assets.
Change our build scripts skip steps which require unavailable tools, such as NuGetPackageVerifier, xunit analyzers, etc.

Requirements
The following must be available via source-build:

everything in the Microsoft.AspNetCore.App shared framework for Linux (currently excluding Windows, which requires Visual Studio to build)
all assemblies in the Microsoft.AspNetCore.App  targeting pack

What's not in source-build yet:

test projects
internal tools
KoreBuild
anything not in Microsoft.AspNetCore.App

I've looked closer at implementing this. Here are some thoughts
Notes:

Repos to add to source-build, in order

aspnet/Extensions
aspnet/AspNetCore-Tooling
aspnet/AspNetCore

It's unclear how our contributors and devs will know if a particular change would break source-build. I cannot identify a simple way to test source-build support as a pull-request check.
Dependency flow for Maestro and dependency flow for source-build are slightly different (see https://github.com/dotnet/source-build/tree/master/Documentation/auto-dependency-flow). I think it should be possible to make both work without having duplicate dependency-flow systems, but concerned it may be fragile unless we have a good way to test this continually.
We will need a fix or workaround for https://github.com/dotnet/sdk/issues/2910 before we can add aspnet/AspNetCore. Our build currently the build assumes the SDK is in $repoRoot/.dotnet/, but according to the Repo API, we may need to allow for external location and version of dotnet
https://github.com/aspnet/AspNetCore/issues/7280 - convert to Arcade. Done on 2/3 repos. This should be done first so we don't also need to convert KoreBuild to source-build
The Repo API calls for supporting .rsp files as input to build.sh/cmd scripts (see https://github.com/dotnet/source-build/blob/master/Documentation/RepoApi.md#rsp-files). This may be challenging to implement in PowerShell/bash. We should look to see if we can copy what other repos have done.
Source build for Windows will be very challenging due to our dependency on Visual Studio C++ tooling to build the IIS inprocess hosting .dll.
As mentioned in OP, we do not intend to build every line of code in these repos. This means we need exclude the following when -DotNetBuildFromSource true is set

Visual Studio tooling projects (.vsix)
All NuGet packages, except those required to move bits between repos (in 3.0, targeting packs and runtime packs are bundled in the SDK and not necessarily consumed via NuGet)
All test projects and samples
All NodeJS and Java code

cc @Eilon @dseefeld

With #11122 , we have eliminated most of the prebuilds in our build-time dependencies. The last remaining one is the 'GenerateFileFromTemplate' MSBuild task which comes from https://github.com/aspnet/BuildTools/blob/master/src/Internal.AspNetCore.BuildTasks/GenerateFileFromTemplate.cs.
There was a request a long time ago for a feature in arcade which, if resolved, would mean we don't need Internal.AspNetCore.BuildTasks/ anymore. See https://github.com/dotnet/arcade/issues/204. You might be able to resolve this by just copying Internal.AspNetCore.BuildTasks/GenerateFileFromTemplate.cs into Microsoft.DotNet.Arcade.Sdk.

There are still a few concerns that may need to be addressed but the bulk of the work for source build support is done in #11717. I will also follow up with the source build team to integrate AspNetCore into their build.

It looks like AspNetCore has been integrated in source build in https://github.com/dotnet/source-build/pull/1144. We're done!


Update permission levels for repositories owned by an organization

https://github.com/google/go-github/blob/747f93dd9b489bd56f7442b3c42bfea12800a75b/github/repos_collaborators.go#L101-L110
Can this be updated to include maintain and triage ?
As per https://developer.github.com/v3/repos/collaborators/#add-user-as-a-collaborator

Since the parameter is a string, you can already do that. But you are correct that the documentation comment should be updated.
Thank you for the report!

Can I take this

Yes, @vaibhavsanap - thank you!  It is yours.

Also as per https://developer.github.com/v3/teams/#add-or-update-team-repository
type TeamAddTeamRepoOptions struct {
// Permission specifies the permission to grant the team on this repository.
// Possible values are:
//     pull - team members can pull, but not push to or administer this repository
//     push - team members can pull and push, but not administer this repository
//     admin - team members can pull, push and administer this repository
//
// If not specified, the team's permission attribute will be used.
Permission string json:"permission,omitempty"
}
Do we need to update documentation comment for above struct also with for same changes

#1518

Yes, if you see comments that are out-of-date, it would be good to update them. Thank you.


The container registry being used doesn't allow for public API access.

Currently the Azure Container Registry being used to host the modules in it has been set to have anonymous access enabled as defined in the document.
However the API is not returning results and is saying authentication is necessary still.
https://managedplatform.azurecr.io/v2/bicep/platform/container-registry/tags/list

ACR only allows you to get tags with basic authentication. I opened a ticket with Azure to support to see if they can help us. In the meantime, I created a PR to full module tags from GitHub itself.


Fixed running the game before saving scene

Closes #6184

I don't understand what was causing the bug. How does changing the parameter to run the current scene fixes it?

Previously -
When I run current scene without saving, a prompt comes up for saving. But after done saving, the scene doesn't automatically runs but we need to click run current scene again to do that.
The problem was that parameter in the function was set to false which was the reason the run current scene not automatically done.
And so I changed it to true.

Oh, I misunderstood the bug.


v1.3 scan: UI Med 1

CampD_UI_1211.xlsx
Content Security Policy (CSP) is an added layer of security that helps to detect and mitigate certain types of attacks, including Cross Site Scripting (XSS) and data injection attacks. These attacks are used for everything from data theft to site defacement or distribution of malware. CSP provides a set of standard HTTP headers that allow website owners to declare approved sources of content that browsers should be allowed to load on that page — covered types are JavaScript, CSS, HTML frames, fonts, images and embeddable objects such as Java applets, ActiveX, audio and video files.
Ensure that your web server, application server, load balancer, etc. is configured to set the Content-Security-Policy header, to achieve optimal browser support: "Content-Security-Policy" for Chrome 25+, Firefox 23+ and Safari 7+, "X-Content-Security-Policy" for Firefox 4.0+ and Internet Explorer 10+, and "X-WebKit-CSP" for Chrome 14+ and Safari 6+.

Ngnix Configurations:
Content-Security-Policy (for Chrome 25+, Firefox 23+, Safari 7+)
add_header Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self';";
X-Content-Security-Policy (for Firefox 4.0+ and Internet Explorer 10+)
add_header X-Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self';";
X-WebKit-CSP (for Chrome 14+ and Safari 6+)
add_header X-WebKit-CSP "default-src 'self'; script-src 'self'; style-src 'self';";

Will be resolved by addressing #6101


How to remove entry from Seed

If we remove the seed from the fixture file, is there a way to remove the entry without explicitly removing the seed?

Not sure what you're asking exactly, can you elaborate?

I'm guessing this is the same use case as in #85.
When I use seeds to populate a "static" table, I have the exact list of records in my seeds.
Beverage.seed(:id
  { id: 1, i18n_key: 'coffee' },
  { id: 2, i18n_key: 'tea' }
)

Any changes to their attributes are handled nicely by seed-fu, as are additions.
Beverage.seed(:id
  { id: 1, i18n_key: 'coffee' },
  { id: 2, i18n_key: 'black tea' },
  { id: 3, i18n_key: 'green tea' }
)

But if I want to remove one of the previously seeded records, there doesn't seem to be a way to express it with seed-fu.
Simply removing the record from the seed file won't affect the already seeded database. This is exactly as it should be for most cases. For static tables like these, it would be useful to be able to express that a particular record should no longer be present.
Beverage.seed(:id
  { id: 2, i18n_key: 'black tea' },
  { id: 3, i18n_key: 'green tea' }
)

# Coffee is still present in the database

I'm guessing the use case is similar for you, @luckyx1?

I've previously handled this by removing the record in a migration. I use migration_data to distinguish data migrations from schema migrations, but using plain ActiveRecord migrations works just as well.
class DataRemoveCoffee < ActiveRecord::Migration
  def data
    coffee = Beverage.find_by(id: 1)
    coffee.destroy unless coffee.nil?
  end
end

Yes I ended up doing a migratation_data to remove it, but was wondering if there would be native support to remove it in the future. In any case, thanks everyone, I'll close this 👍


Fix invalid slugs

Update invalid products: azure-postgresql; Remove invalid languages slugcss, scss.
@tonybaloney and @hemarina for notification.

This repo is generated, could you make same change here? https://github.com/Azure-Samples/Azure-Python-Standardization-Template-Generator/blob/main/{{cookiecutter.__src_folder_name}}/README.md
Thanks!

@pamelafox I have made same change in the repo you provided. Please review.

PR link: https://github.com/Azure-Samples/Azure-Python-Standardization-Template-Generator/pull/83

Besides, do we still need this PR? If not, I will close it.

@pamelafox Could you help review this PR?

Merged the upstream, so I'll close this one. The slugs should be updated in the next repo update.


[front] Add migration script for dust apps

fixes: https://github.com/dust-tt/dust/issues/7243
Description
Migrate existing dust apps to use data source view sId in their config instead of datasource name
Risk
break existing configs
Deploy Plan
run migration script

I would save all previous specifications/config to a file or pipe it to the output as JSONL so that we have a way to revert in case this goes badly
Otherwise LGTM

Good point, I will add that ..


ERROR 404 NOT FOUND - get_started.md

Hello,
Thanks a lot for your work and this model. Just a quick message to tell you that the get_started.md file is no longer accessible. We have a 404 Not found.
Quentin

Hi, thanks for reporting. It's fixed. Pleased refer to mmdet official repository for more details.


Proper fixes for /dex page

What would you like to be added:
Quick fixes were made in https://github.com/DeFiCh/scan/pull/1316.
Proper Fix for the following are needed:

Filter for spplitted pairs (e.g. amzn-dusd/v1)
Usage of poolpairs displaySymbol instead of tokenA.displaySymbol for pairs where tokenA is used across multiple pairs (dUSDT-DUSD and dUSDT_DFI).

Why is this needed:

May want to consider using full poolpair displaySymbol from now on. To prevent links from breaking in the future.
cc: @gjj

You mean like the /v1 in:

https://defiscan.live/tokens/dGOOGL/v1
https://defiscan.live/tokens/dGOOGL-dDUSD/v1
https://defiscan.live/tokens/dAMZN/v1
...and all other v1 stock split symbols?


made the navbar sticky while scrolling

@anubhav1206  please attach a screenshot

Here is the screenshot for the same

Here is the screenshot for the same

It is overlapping the elements please fix that

I tried but I am unable to come up with a fix for the overlapping logo.

I tried but I am unable to come up with a fix for the overlapping logo.

you can take an example from this code
https://github.com/nitin-pandita/Nitin-Fashionwear/pull/15
He has done a that


Add CIFuzz

OSS-Fuzz was wondering if zlib-ng would use CIFuzz, a new feature being rolled out
in OSS-Fuzz. It allows for pull requests to be fuzzed in CI using fuzz targets enabled
in OSS-Fuzz. Documentation for this feature can be found at https://google.github.io/oss-fuzz/getting-started/continuous-integration/
Let us know if you have any questions!

Thank you.
I don't know exactly how this overlaps or extends our own CI fuzzing, but I don't see how it could be negative. So lets try this :)


accept connection pooling, ssl and url string option in datasource

Is your feature request related to a problem? Please describe.
SequelizeDatasource should accept connection pooling, ssl and url string options in datasource
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.

:tada: This issue has been resolved in version 2.3.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Search broken for Javadocs of Java bindings

Steps to Reproduce

Browse to https://docs.daml.com/app-dev/bindings-java/javadocs/com/daml/ledger/javaapi/data/codegen/Contract.html.
In the search box in the upper-right corner, type "ActiveContracts" and press ENTER.

Expected Behavior
The page https://docs.daml.com/app-dev/bindings-java/javadocs/com/daml/ledger/javaapi/data/ActiveContracts.html opens.
Actual Results
The page https://docs.daml.com/app-dev/bindings-java/javadocs/undefined/com/daml/ledger/javaapi/data/ActiveContracts.html opens.
(Notice the undefined in the URL.)

Confirmed working on the live site.


Answer to question 1.4 doesn't handle a case of repeating number in array that is not currentMin

array = [7,4,2,9,9,15,1]
The answer doesn't handle if array[i] === array[i-1]
or in the case of array above, 9,9

Hey @misstonbon! Can you give me an example where the code breaks? The code should work provided your array with: array = [7,4,2,9,9,15,1]. The answer returned should be 13, which is the difference between 2 and 15

https://codepen.io/tanjastroble/pen/ZjaaoZ


[CHORE] DX: easify getting started contributing

WHY
In order attract developers to start contributing to the whenever gem, I believe we should improve developer experience and make the bootstrap for the repo easier.
Changes

Creates Makefile
Creates CONTRIBUTING.md
Sets versioning for development dependencies minitest and mocha

-  s.add_development_dependency "mocha", ">= 0.9.5"
-  s.add_development_dependency "minitest"
+  s.add_development_dependency "mocha", ">= 0.9.5", "< 2.0.0"
+  s.add_development_dependency "minitest", "<= 5.2.0"

Related Issue
closes: https://github.com/javan/whenever/issues/845

Just tagging @benlangfeld and @javan for visibility 😄


PEX_PATH should unify pex sources in addition to 3rdparty deps

given the attached example pex files, it appears that usage of PEX_PATH doesn't respect source file imports from one pex to another:
[illuminati tt2]$ PEX_VERBOSE=9 PEX_INTERPRETER=1 PEX_PATH=pex1 python2.7 pex2
pex: Detected PEX_PYTHON, re-exec to /opt/twitter_mde/package/python2.7/current/bin/python2.7
pex: Found site-library: /opt/twitter_mde/package/python2.7/661aa656879f98d1b878042a3f00369a1aed87a249570c188e091f2cbcaaa163/lib/python2.7/site-packages
pex: Found site-library: /opt/twitter_mde/package/python2.7/661aa656879f98d1b878042a3f00369a1aed87a249570c188e091f2cbcaaa163/lib/site-python
pex: Found site-library: /opt/twitter_mde/package/python2.7/current/lib/site-python
pex: Found site-library: /opt/twitter_mde/package/python2.7/current/lib/python2.7/site-packages
pex: Not a tainted path element: /private/tmp/tt2/pex2/.bootstrap
pex: Not a tainted path element: /private/tmp/tt2/pex2
pex: Not a tainted path element: /opt/twitter_mde/package/python2.7/current/lib/python27.zip
pex: Not a tainted path element: /opt/twitter_mde/package/python2.7/current/lib/python2.7
pex: Not a tainted path element: /opt/twitter_mde/package/python2.7/current/lib/python2.7/plat-darwin
pex: Not a tainted path element: /opt/twitter_mde/package/python2.7/current/lib/python2.7/plat-mac
pex: Not a tainted path element: /opt/twitter_mde/package/python2.7/current/lib/python2.7/plat-mac/lib-scriptpackages
pex: Not a tainted path element: /opt/twitter_mde/package/python2.7/current/lib/python2.7/lib-tk
pex: Not a tainted path element: /opt/twitter_mde/package/python2.7/current/lib/python2.7/lib-old
pex: Not a tainted path element: /opt/twitter_mde/package/python2.7/current/lib/python2.7/lib-dynload
pex: Tainted path element: /opt/twitter_mde/package/python2.7/current/lib/python2.7/site-packages
pex: Scrubbing from user site: /Users/kwilson/.local/lib/python2.7/site-packages
pex: Scrubbing from site-packages: /opt/twitter_mde/package/python2.7/current/lib/python2.7/site-packages
pex: Scrubbing from path_importer_cache: /Users/kwilson/.local/lib/python2.7/site-packages
pex: Scrubbing from path_importer_cache: /opt/twitter_mde/package/python2.7/current/lib/python2.7/site-packages
pex: Activating PEX virtual environment from /private/tmp/tt2/pex2: 0.2ms
pex:   Searching dependency cache: /private/tmp/tt2/pex2/.deps: 0.1ms
pex: Activating PEX virtual environment from pex1: 0.1ms
pex:   Searching dependency cache: pex1/.deps: 0.1ms
pex: PYTHONPATH contains:
pex:     /private/tmp/tt2/pex2/.bootstrap
pex:     /private/tmp/tt2/pex2
pex:   * /opt/twitter_mde/package/python2.7/current/lib/python27.zip
pex:     /opt/twitter_mde/package/python2.7/current/lib/python2.7
pex:     /opt/twitter_mde/package/python2.7/current/lib/python2.7/plat-darwin
pex:     /opt/twitter_mde/package/python2.7/current/lib/python2.7/plat-mac
pex:     /opt/twitter_mde/package/python2.7/current/lib/python2.7/plat-mac/lib-scriptpackages
pex:     /opt/twitter_mde/package/python2.7/current/lib/python2.7/lib-tk
pex:   * /opt/twitter_mde/package/python2.7/current/lib/python2.7/lib-old
pex:     /opt/twitter_mde/package/python2.7/current/lib/python2.7/lib-dynload
pex:   * - paths that do not exist or will be imported via zipimport
pex: PEX_INTERPRETER specified, dropping into interpreter
Python 2.7.10 (default, Dec 16 2015, 14:09:45)
[GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from example.hello.main import main
Traceback (most recent call last):
  File "<console>", line 1, in <module>
ImportError: No module named example.hello.main
>>>

note that the PYTHONPATH in the debug logging does not contain the pex1 pex files path; however, manually appending this to sys.path causes the import to work.
the existing PEX_PATH handling seems to be specific to 3rdparty deps as handled here: https://github.com/pantsbuild/pex/blob/master/pex/pex.py#L70-L79
but the requisite sys.path manipulation required to import sources from the PEX_PATH'd pex itself seems to live in the boilerplate here: https://github.com/pantsbuild/pex/blob/master/pex/pex_builder.py#L39-L40
so it seems like we'd probably want to extract a PEX._process_pex_paths() method that would provide a list of additional envs and sys.path components; then make PEX._activate() take an extra_envs param and PEX.patch_sys() take an extra_paths param; then in PEX.execute() call _process_pex_paths() early on and plumb the extras to _activate() and _patch_sys(). or something along those lines.
this is a blocker for @benjyw 's work on the improved python product pipeline in pants.

pexstuff.zip

this was fixed in #329


Add a single character shortcut for --no-reuse-existing-virtualenvs

How would this feature be useful?
A common way to use Nox that saves a lot of time when re-running sessions over and over by avoiding recreating venvs is to set:
nox.options.reuse_existing_virtualenvs = True

You can see the pip developers use this:

https://github.com/pypa/pip/blob/main/noxfile.py#L19

When dependencies do change, the developer can then run:
nox --no-reuse-existing-virtualenvs -s test

Given this can be a very common work flow, avoiding having to type out --no-reuse-existing-virtualenvs on the command line would be a great improvement to UX.
A note on tox
What I'm describing above is also the default workflow for tox users. Many people moving from tox will be familiar with this workflow. (e.g. tox re-uses venvs by default, and tox -r is an opt-in recreation).
Describe the solution you'd like
Add a new alias for --no-reuse-existing-virtualenvs, for example -C for "Create"
nox -C -s test

Related to #488

The CLI supports multicharacter short options and does not currently use -n (which would cause ambiguity), so it may be possible to use the more intuitive -nr short option.

-nr would also be a suitable fix for this if the team agrees.

I don't see any blockers to do this. Any thoughts @wntrblm/nox?

By default environments are destroyed and recreated, so wouldn't this be a noop?

@crwilcox Not if the user has set in their noxfile.py:
nox.options.reuse_existing_virtualenvs = True

Alright. So, to me this sort of feels like an antipattern, but since we already have the  long flag, I'd be okay with adding -nr.

I don't know how prevalent setting args in noxfile.py really is, but as it is allowed, that might not be that relevant

The pip developers seem to like them 😄

https://github.com/pypa/pip/blob/main/noxfile.py#L19


Convert bug

[ X] This contribution adheres to CONTRIBUTING.md.
[ X] New tests have been created for any new features or regression tests for bugfixes.
[ ] tox successfully runs, including unit tests and style checks (see CONTRIBUTING.md).

What does this Pull Request accomplish?
Fix for #275
Why should this Pull Request be merged?
Bugfix of infinite loop.
What testing has been done?
Test added for previously failing case.

Coverage decreased (-0.03%) to 67.713% when pulling 1459e00bf16fa92690a0c5e5f606270a22b5e677 on m-n-a-g:ConvertBug into eabf2e4361cc127de76d3bd59da0b1053049e746 on ni:master.

Thank you for you're contribution. The changes look good to me.
Note: The Python 3.5 CI failure is not due to the changes in this PR.


feat(endpoints): add the ability to define endpoints from an external…

… source
This PR introduces external endpoint management as required in #484
Two new CLI flags are introduced:

--external-endpoints: enable external endpoint management by specifying the path to a JSON endpoint source in a file
--sync-interval: time interval between two endpoints synchronization requests (expressed as a string, e.g. 30s, 5m, 1h... as supported by the time.ParseDuration method https://golang.org/pkg/time/#ParseDuration). Optional, defaults to 60s

When using the --external-endpoints flag, Portainer will read the specified JSON file at startup and automatically create the endpoints. The first endpoint in the list will be defined as the currently active endpoint.
Portainer will then read the file based on the interval defined in --sync-interval (every minute by default) and will automatically do the following:

For each endpoint in the database, it will automatically merge any configuration find in the file using the enpoint name as the comparison key
If an endpoint exists in the database but is not present in the file, it will be removed from the database
If an endpoint exists in the file but not in the database it will be created in the database

When starting Portainer with the --external-endpoints flag with either an invalid JSON file or an empty array ([]), Portainer will log an error and exit.
When using external endpoint management, endpoint management will via the UI will be disabled to avoid any possible configuration overwrite (the endpoints view is still accessible but will only display the list of endpoints without giving the possibility to create/update endpoints). A simple warning message will be displayed in the endpoints view.
Also, the -H is mutually exclusive with --external-endpoints, Portainer will exit and an error will be printed when using both options on the CLI.
Endpoint JSON schema
An endpoint element must be valid JSON object.
Examples:

An endpoint accessed via the Unix socket:

{
  "Name": "my-local-endpoint",
  "URL": "unix:///var/run/docker.sock",
}

A TLS secured endpoint accessed via TCP:

{
  "Name": "my-secure-endpoint",
  "URL": "tcp://myendpoint.mydomain:2375",
  "TLS": true,
  "TLSCACert": "/tmp/ca.pem",
  "TLSCert": "/tmp/cert.pem",
  "TLSKey": "/tmp/key.pem"
}

Name
Required
Name of the endpoint. Used to check if an endpoint already exists in the database during a synchronization request. It will also be displayed in the UI.
URL
Required
How to reach the endpoint. Protocol must be specified, only tcp:// and unix:// are supported at the moment. Any definition not using one of these 2 protocols will be skipped.
TLS
Optional
Specify this field to true if you need to use TLS to connect to the endpoint. Defaults to false. When applying the true value to this field, Portainer will expect the TLSCACertPath, TLSCertPath and TLSKeyPath fields to be defined too.
TLSCACert
Optional
Path to the CA used to connect to the endpoint.
TLSCert
Optional
Path to the certificate used to connect to the endpoint.
TLSKey
Optional
Path to the key used to connect to the endpoint.
Endpoints definition source
The content of the file specified as a parameter to the --external-endpoints file must be a valid JSON array.
Example:
[
  {
    "Name": "my-local-endpoint",
    "URL": "unix:///var/run/docker.sock"
  },
  {
    "Name": "my-secure-endpoint",
    "URL": "tcp://myendpoint.mydomain:2375",
    "TLS": true,
    "TLSCACert": "/tmp/ca.pem",
    "TLSCert": "/tmp/cert.pem",
    "TLSKey": "/tmp/key.pem"
  }
]

Documentation introduced via https://github.com/portainer/portainer-docs/pull/17


docs(contributing): Fix indentation on manifests provided as examples

The manifests that are being provided as testing examples on contributing page had some indentation issues namely:
TerraformRepository

repository.name, repository.namespace

TerraformLayer
repository.url, terraform.enabled, opentofu.enabled, terragrunt.enabled

Thanks for noticing and fixing this !


[Android] Network request failed when request response status is 304

fetch is throwing Network request failed, when an API returns a 304 (Not Modified), on Android only. I am using fetch to poll an API for new real estate listings. This happens every time the API returns a 304.
If the fetch returns a 200 response it works as expected and logs the amount of new listings in my example below.
The exact same code works on iOS with no errors
Note: I am connecting to the API via its public IP. It is not running locally on my machine.
Fetch code
pollListings() {
  fetch(URL, {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json',
      'Accept' : 'application/json'
    }
  })
  .then(response => {
    if(response.status==200) {
      response.json().then(json => {
        console.log('Found '+json.length+' new listings')
      })
    } else if(response.status==304){
      console.log('Completed poll: no changes')
    }
  })
  .catch(error => {
    console.log(error)
  })
}

I listened to the didReceiveNetworkResponse event, which is emitted from Java native code from onResponseReceived() in ResponseUtil.java, using the DeviceEventEmitter in RN as below
const nativeListener = DeviceEventEmitter.addListener('didReceiveNetworkResponse',
  (e)=>{
    console.log(e)
})

Output
[
  //requestId
  0 : 15
  //response
  1 : 304
  // headers
  2 : {
        access-control-allow-credentials:"true"
        access-control-allow-headers:"Authorization"
        access-control-allow-methods:"POST,GET,PUT,DELETE,OPTIONS"
        access-control-allow-origin:"*"
        content-length:"29"
        content-type:"application/json; charset=UTF-8"
        date:"Tue, 29 Nov 2016 08:55:24 GMT"
        server:"cloudflare-nginx"
      }
  3 : "http://someapi/listings?filter=all&since=1480409715249"
]

It seems that React Native appears to be receiving the 304 response from the Native layer, but something is going wrong maybe in XMLHttpRequest.js ?

React Native version: 0.38.0 (Tested and found to be an issue on 0.35.0 through 0.38.0)
Platform: Android only
Operating System: MacOS

Hmm, this sounds like a real problem. Can you stick a bunch of print statements in the code and figure out where the problem is, in XMLHttpRequest.js or elsewhere?

@brien-crean, @lacker - I am able to produce a 304 using curl/postman, however not via react-native (I receive 200s). Any ideas?

Hi there! This issue is being closed because it has been inactive for a while.
But don't worry, it will live on with Canny! Check out its new home: https://react-native.canny.io/feature-requests/p/android-network-request-failed-when-request-response-status-is-304


Noticed something weird with Messenger navigator, any Ideas ?

Hey guys, when testing to see about my Mobile informations with looking at userAgent and platform.
I first looked at my site from my Mobile Chrome navigator :

Then I had sent it into my messenger account and read it from there, and here is the result :

Isn't that cool !! So Messenger previous navigator give you more info then the Chrome or any navigator ! I should think that is mostly a vulnerability, no ? Or was made by purpose ?
(Sorry if my English is bad, I'm not really that good at it ...)

You can even notice that in the Messenger side there is I think a IP address that was given, I just eras it.

Messenger *preview sorry fo the error.


Is this project dead?

Is this project dead? I haven't seen an update in about 1 year.
Please tell me what you know, thanks!

Hi @junhwong,
I've just received repo moderator and NPM publishing access from Adam for this repository, and will be working to catch-up on the all the open issues and PRs this week.
Will keep you in the loop and keep this issue open so that individuals are aware.

Looking forward to doing better and thanks for your contribution