Retrieving property from a Marker or Circle

I'm rendering my map with markers and circles beautifully. My app use case however has me needing to retrieve values from the objects at various stages in my code.
For example:
<Circle
key={ping.ping_time}
ref={ref => { this.circles[device_index + "_" + (parseInt(index)+1)] = ref;}}
center={{ latitude : ping.latitude , longitude : ping.longitude }}
radius={ping.radius}
fillColor={radius_overlay[device_index]}
strokeColor={'white'}
strokeWidth={0.3}

Using the reference I've created, I need to obtain the radius of this circle. What is the syntax to get that value by using the reference?
I expected something like this to work:
this.circles[reference_index].radius

Hi abenzick!!!
It is hard to correctly fix an issue without accessing the source code but from what I have understood after having looked at your snippet of code ,I can tell you that this problem may not be due to react native maps but how you use the ref system of react itself;
/*
const Mycontainer = ()=>{
const refContainer = useRef(myinitialValue);
///Any where in this component can freely access my ref value using refContenair.current.
//https://reactjs.org/docs/hooks-reference.html for functional components.
//https://reactjs.org/docs/refs-and-the-dom.html for class components.
/*****************************************************************
//If you would like to have access to your ref outside of this component ,please ,do use forwardRef.
//https://reactjs.org/docs/forwarding-refs.html#gatsby-focus-wrapper for fowarding ref.
return (
// some Components here ...
<Circle
key={ping.ping_time}
ref={refContainer}}
center={{ latitude : ping.latitude ,
longitude : ping.longitude }}
radius={ping.radius}
fillColor={radius_overlay[device_index]}
strokeColor={'white'}
strokeWidth={0.3} />
//Some component here ................
)
} */

Why don't you use context that you use any way use whish to have the radius of your circle anywhere in your code base?
https://reactjs.org/docs/context.html#gatsby-focus-wrapper
https://reactjs.org/docs/hooks-reference.html#usecontext

I think you are zeroing in on the problem I'm having not being necessarily something with react native maps but with my understanding of react-native. I figure my use case is something common for users or react native maps however.
I need an individual reference for each each circle as there are hundreds on the screen. I need to be able to reference a drawn circle on the screen by a unique identifier and read the radius value for that circle.
With the reference I have in my example code, it is initialized with this:
circles = [];
Then the following line adds to that array of references with the unique identifier I can reference later:
ref={ref => { this.circles[device_index + "_" + (parseInt(index)+1)] = ref;}}
I do similar things for making a reference for markers and can access methods like this:
this.markers['4_440'].showCallout()
But I can't figure out how to read the value of a props such as the radius....

Hi Abenzick.
These lines of codes may  give you a hint but  not be what you are exactly looking.
import  React,{useEffect,useRef,useReducer} from 'react';
// import MapView, { PROVIDER_GOOGLE ,Circle,Marker} from 'react-native-maps'
// import { StyleSheet, Text, View, Dimensions,Button,Alert,Platform} from 'react-native';
// const reducer=(state,{type,payload})=>{
//   switch(type){
//     case "value":
//     return [...state,payload]
//     default:
//     return state;
//   }
// }
// export default function App() {
//   const mRef=useRef();
//         const[circle,dispatch]=useReducer(reducer,[])
//   return (
//
//      <MapView
//        onPress={event=>{
//          console.log(mRef.current.props);
//          console.log(mRef.current.props.radius)
//        if(mRef.current.props.radius){
//          dispatch({
//            type:"value",
//          payload:{
//            radius:mRef.current.props.radius,
//            latitude:mRef.current.props.latitude,
//            longitude:mRef.current.props.longitude}
//          })
//        }
//          }}
//           initialRegion={{
//           longitude:-73.84111781714093,
//           latitude:45.64834003187947,
//            latitudeDelta:0.01,
//           longitudeDelta:0.01
//                   }}
//                   style={{height:400,width:400}} >
//                   <Circle
//                   ref={mRef}
//                   name="hola"
//                   key={4}
//                    center={{longitude:-73.84111781714093,
//                     latitude:45.64834003187947}}
//                     strokeColor="red"
//                     radius={100}
//                         fillColor="red"
//                  / >
//                      <Circle
//                   ref={mRef}
//                   key={4}
//                    center={{longitude:-73.94111781714094,
//                     latitude:45.4834003187946}}
//                     strokeColor="red"
//                     radius={50}
//                     fillColor="red"
//                  / >
//                      <Circle
//                   ref={mRef}
//                   key={4}
//                    center={{longitude:-73.84111781714093,
//                     latitude:45.64834003187947}}
//                     strokeColor="red"
//                     radius={150}
//                         fillColor="green"
//                 //Attaching a onPress on a circle won't work.
//                  / >
//
//             {circle.length?circle.map(el=>{el.radius}):Hi there}
//
//   )
// }
I do believe that there is a better way t o achieve what you mean to with using the ref system.

Please use this issue tracker for bug reports and features. Questions are better suited for Stack Overflow.
Thanks!


Move current_user into helper methods

Most rails authentication systems have a concept of current_user.
We need to introduce a current user and current group concept.
This has quite a few moving parts and I wanted to capture them:

[ ] introduce current_user concept into controllers -- #3164
[ ] introduce login_as to specs
[ ] introduce current_user into ApplicationHelper
[ ] convert User.current_user to current_user in controllers
[ ] convert session[:username] to current_user.username
[ ] move session[:eligible_groups] to CurrentUser.elgible_groups
[ ] convert current_user.current_group to current_group
[ ] convert session[:group] to current_groupid
[ ] convert / remove session[:group_description]
[ ] convert / remove session[:role] (no longer used?
[ ] convert / remove session[:userrole] - leverage current_group
[ ] introduce current_user_id
[ ] cache @current_user
[ ] convert MiqWidgetSet.find_all_by_owner_id type calls to pass in actual objects (not userid / groupid)
[ ] create_initial_content_for_user

Ping if you feel I am missing something
/cc @jrafanie @Fryguy @chessbyte

Looks good...just curious if this is like in order of importance?  Do you need all this for multi-tenancy?

@Fryguy Thanks. added an above and below the fold. For multi-tenancy, I need a solid current_group concept.

/cc @dclarizio This is my identity game plan for the ui.

Think this has gone about as far as I can take it for now.
While I think current_user nil object and removing :role_choice are good ideas, this has lost steam and already changed enough around current_user for a few years


Add actions in workflow to replace former CI implementation

Is your feature request related to a problem? Please describe.
CI no longer running for PR's in nasa repo
Describe the solution you'd like
Implement CI as GitHub Actions
Describe alternatives you've considered
None
Additional context
Similar to transition in nasa/cFS
Requester Info
Jacob Hageman - NASA/GSFC

Fixed by #1064

Fixed by #1064


Call stellar

Codecov Report
Base: 90.05% // Head: 80.59% // Decreases project coverage by -9.46% :warning:

Coverage data is based on head (845ad24) compared to base (5e78e14).
Patch has no changes to coverable lines.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #75      +/-   ##
==========================================
- Coverage   90.05%   80.59%   -9.46%
==========================================
  Files          15        3      -12
  Lines         362       67     -295
==========================================
- Hits          326       54     -272
+ Misses         36       13      -23

Impacted Files
Coverage Δ

src/argument_parsing/build.cpp

src/argument_parsing/consolidate.cpp

src/argument_parsing/search.cpp

src/argument_parsing/split.cpp

src/valik_search.cpp

src/consolidate/io.cpp

src/valik_main.cpp

src/valik_consolidate.cpp

src/argument_parsing/top_level.cpp

src/valik_build.cpp

... and 2 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


How to debug Cannot read properties of undefined (reading 'css')?

Description
I am getting this error:
🐼 error [file:extract] TypeError: Cannot read properties of undefined (reading 'css')
    at /Users/ada/Developer/adaboese/aimd/node_modules/.pnpm/@pandacss+core@0.25.0/node_modules/@pandacss/core/dist/index.js:1241:42
    at Array.forEach (<anonymous>)
    at _StyleEncoder.processAtomicRecipe (/Users/ada/Developer/adaboese/aimd/node_modules/.pnpm/@pandacss+core@0.25.0/node_modules/@pandacss/core/dist/index.js:1240:22)
    at /Users/ada/Developer/adaboese/aimd/node_modules/.pnpm/@pandacss+parser@0.25.0_jsdom@22.1.0_typescript@5.3.3/node_modules/@pandacss/parser/dist/index.js:132:45
    at Array.forEach (<anonymous>)
    at ParserResult.set (/Users/ada/Developer/adaboese/aimd/node_modules/.pnpm/@pandacss+parser@0.25.0_jsdom@22.1.0_typescript@5.3.3/node_modules/@pandacss/parser/dist/index.js:132:19)
    at /Users/ada/Developer/adaboese/aimd/node_modules/.pnpm/@pandacss+parser@0.25.0_jsdom@22.1.0_typescript@5.3.3/node_modules/@pandacss/parser/dist/index.js:453:30
    at Array.forEach (<anonymous>)
    at /Users/ada/Developer/adaboese/aimd/node_modules/.pnpm/@pandacss+parser@0.25.0_jsdom@22.1.0_typescript@5.3.3/node_modules/@pandacss/parser/dist/index.js:441:28
    at t.when (/Users/ada/Developer/adaboese/aimd/node_modules/.pnpm/ts-pattern@5.0.5/node_modules/ts-pattern/dist/index.cjs:1:9791)

I added console.log to _StyleEncoder.processAtomicRecipe and it shows:
{ compoundVariants: [] }
{ compoundVariants: [] }
{ compoundVariants: [ undefined, undefined ] }
🐼 error [file:extract] TypeError: Cannot read properties of undefined (reading 'css') ...
{ compoundVariants: [] }
{ compoundVariants: [] }

Where does it get those undefined values from?
Link to Reproduction
N/A
Steps to reproduce

Go to '...'
Click on '...'
Scroll down to '...'
See error

JS Framework
No response
Panda CSS Version
0.25.0
Browser
No response
Operating System

[ ] macOS
[ ] Windows
[ ] Linux

Additional Information
No response

I can fix this by simply patching panda CSS to check if value is set, e.g.
compoundVariants.forEach((compoundVariant) => {
  if (compoundVariant) {
    this.processAtomic(compoundVariant.css);
  }
});

However, feels like an issue upstream.

I'm guessing this is coming from an extracted value that contains some stuff not resolved, e.g not static enough for the extractor to understand
using the panda debug command could help you find the file causing this
can you provide a minimal repro so that I can look into it ?


[TASK] Isolate database and peers

Estimated story points: 3
Description

So data from different groups doesn't merge

Acceptance criteria

time: 1.5h


Merge branch feature/create_queue_authorized_users

Now the user that created the queue will get authorized.

Nice feature. 👍

:warning: Please install the  to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Files with missing lines
Patch %
Lines

manager/views.py
0.00%
3 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Flag
Coverage Δ

unittests
62.18% <0.00%> (-0.13%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines
Coverage Δ

manager/views.py
27.35% <0.00%> (-0.17%)
:arrow_down:


v7 migration, fewer SQl_STAT_KEY and SQL_STAT_VAL entries then before migration

Are they trimmed, or is there a migration issue?

doh!  it was an old clone and the new retention/aggr stuff in SQL stats clobbered all the old data


DM-25978: Add an example measurement and aggregator for extras

To be clear, this was intended purely as a demonstration of functionality, not necessarily to produce something broadly useful.  If there is an obvious thing to do with that histogram, I'm happy to change the default.  I just thought the mode was an easy to compute and easy to understand quantity.
To answer 1) I think the patch level extras should definitely be packaged with the extras.  At the aggregated level, I don't think they should, since the aggregation is either over the metric measurement (AM1) or the extras.

I have also changed from a mode to a median for the aggregated computation.  The median is computed on the binned data, so only an estimate of the median is possible.  I chose a linear interpolation in the bin containing the median as the estimate of the median.


feat(types): Memoize simple types without arguments

Benchmarks (with --warmup=20 --revs=200 --retry-threshold=1)
The result there is that it has close to zero impact (+ or - 5% which is a matter of nanoseconds) on the regular types, but has a big impact on the shape() coercions.
The ShapeTypeBench is the only one that calls multiple types that now get memoized so it represents real-life wins better : In real applications, types tend to repeat more than in the benchmarks.
\Psl\Tests\Benchmark\Channel\CommunicationBench

    benchBoundedCommunication...............R2 I4 - [Mo2.409ms vs. Mo2.377ms] +1.31% (±0.28%)
    benchUnboundedCommunication.............R1 I1 - [Mo2.379ms vs. Mo2.396ms] -0.70% (±0.51%)

\Psl\Tests\Benchmark\Type\VecTypeBench

    benchCoerce # mixed, empty array........R1 I2 - [Mo0.140μs vs. Mo0.140μs] 0.00% (±0.00%)
    benchCoerce # mixed, empty iterable.....R1 I4 - [Mo0.180μs vs. Mo0.180μs] 0.00% (±0.00%)
    benchCoerce # mixed, non-empty array....R1 I3 - [Mo0.330μs vs. Mo0.325μs] +1.49% (±0.00%)
    benchCoerce # mixed, non-empty iterable.R2 I2 - [Mo0.495μs vs. Mo0.490μs] +0.99% (±0.40%)
    benchCoerce # mixed, large array........R2 I4 - [Mo5.212μs vs. Mo5.195μs] +0.33% (±0.11%)
    benchCoerce # mixed, large iterable.....R4 I4 - [Mo8.279μs vs. Mo8.120μs] +1.95% (±0.66%)
    benchCoerce # int, empty array..........R1 I2 - [Mo0.145μs vs. Mo0.140μs] +3.57% (±0.00%)
    benchCoerce # int, empty iterable.......R5 I4 - [Mo0.180μs vs. Mo0.180μs] 0.00% (±0.00%)
    benchCoerce # int, non-empty array......R2 I4 - [Mo0.360μs vs. Mo0.355μs] +1.36% (±0.00%)
    benchCoerce # int, non-empty iterable...R1 I0 - [Mo0.505μs vs. Mo0.535μs] -5.58% (±0.63%)
    benchAssert # mixed, empty array........R1 I0 - [Mo0.150μs vs. Mo0.150μs] 0.00% (±0.00%)
    benchAssert # mixed, non-empty array....R1 I1 - [Mo0.325μs vs. Mo0.325μs] 0.00% (±0.00%)
    benchAssert # mixed, large array........R1 I4 - [Mo4.815μs vs. Mo4.839μs] -0.49% (±0.15%)
    benchAssert # int, empty array..........R3 I4 - [Mo0.150μs vs. Mo0.150μs] 0.00% (±0.00%)
    benchAssert # int, non-empty array......R2 I4 - [Mo0.330μs vs. Mo0.330μs] +0.05% (±0.74%)
    benchMatch # mixed, empty array.........R5 I4 - [Mo0.125μs vs. Mo0.125μs] 0.00% (±0.00%)
    benchMatch # mixed, non-empty array.....R1 I2 - [Mo0.280μs vs. Mo0.280μs] 0.00% (±0.00%)
    benchMatch # mixed, large array.........R2 I4 - [Mo4.471μs vs. Mo4.447μs] +0.56% (±0.31%)
    benchMatch # int, empty array...........R1 I1 - [Mo0.125μs vs. Mo0.125μs] 0.00% (±0.00%)
    benchMatch # int, non-empty array.......R1 I2 - [Mo0.285μs vs. Mo0.290μs] -1.72% (±0.00%)

\Psl\Tests\Benchmark\Type\DictTypeBench

    benchCoerce # generic array, empty arra.R1 I1 - [Mo0.150μs vs. Mo0.155μs] -3.23% (±0.00%)
    benchCoerce # generic array, empty iter.R5 I4 - [Mo0.185μs vs. Mo0.190μs] -2.63% (±0.00%)
    benchCoerce # generic array, non-empty .R5 I4 - [Mo0.310μs vs. Mo0.310μs] 0.00% (±0.79%)
    benchCoerce # generic array, non-empty .R4 I4 - [Mo0.390μs vs. Mo0.385μs] +1.26% (±0.63%)
    benchCoerce # generic array, large arra.R1 I2 - [Mo12.453μs vs. Mo12.458μs] -0.04% (±0.07%)
    benchCoerce # generic array, large iter.R1 I1 - [Mo15.398μs vs. Mo15.397μs] +0.01% (±0.12%)
    benchCoerce # int array, empty array....R5 I4 - [Mo0.150μs vs. Mo0.150μs] 0.00% (±0.00%)
    benchCoerce # int array, empty iterable.R1 I1 - [Mo0.190μs vs. Mo0.190μs] 0.00% (±0.00%)
    benchCoerce # int array, non-empty arra.R3 I4 - [Mo0.515μs vs. Mo0.510μs] +0.95% (±0.48%)
    benchCoerce # int array, non-empty iter.R1 I2 - [Mo0.640μs vs. Mo0.640μs] +0.00% (±0.31%)
    benchCoerce # int array, large array....R1 I2 - [Mo10.080μs vs. Mo10.085μs] -0.05% (±0.48%)
    benchCoerce # int array, large iterable.R1 I2 - [Mo12.950μs vs. Mo12.943μs] +0.05% (±0.07%)
    benchCoerce # map, empty array..........R1 I2 - [Mo0.155μs vs. Mo0.150μs] +3.33% (±0.00%)
    benchCoerce # map, empty iterable.......R2 I1 - [Mo0.190μs vs. Mo0.195μs] -2.56% (±0.00%)
    benchCoerce # map, non-empty array......R5 I4 - [Mo0.603μs vs. Mo0.590μs] +2.21% (±0.62%)
    benchCoerce # map, non-empty iterable...R1 I1 - [Mo0.725μs vs. Mo0.720μs] +0.67% (±0.34%)
    benchCoerce # map, large array..........R1 I4 - [Mo10.670μs vs. Mo10.861μs] -1.76% (±0.21%)
    benchCoerce # map, large iterable.......R2 I4 - [Mo13.552μs vs. Mo13.522μs] +0.22% (±0.21%)
    benchAssert # generic array, empty arra.R1 I4 - [Mo0.140μs vs. Mo0.135μs] +3.70% (±0.00%)
    benchAssert # generic array, non-empty .R1 I1 - [Mo0.295μs vs. Mo0.290μs] +1.72% (±0.00%)
    benchAssert # generic array, large arra.R1 I3 - [Mo12.260μs vs. Mo11.956μs] +2.54% (±0.23%)
    benchAssert # int array, empty array....R2 I4 - [Mo0.140μs vs. Mo0.140μs] 0.00% (±0.00%)
    benchAssert # int array, non-empty arra.R2 I3 - [Mo0.470μs vs. Mo0.460μs] +2.21% (±0.52%)
    benchAssert # int array, large array....R3 I4 - [Mo10.717μs vs. Mo10.952μs] -2.14% (±0.39%)
    benchAssert # map, empty array..........R1 I2 - [Mo0.135μs vs. Mo0.135μs] 0.00% (±0.00%)
    benchAssert # map, non-empty array......R1 I1 - [Mo0.565μs vs. Mo0.565μs] 0.00% (±0.00%)
    benchAssert # map, large array..........R1 I3 - [Mo10.230μs vs. Mo10.238μs] -0.08% (±0.18%)
    benchMatch # generic array, empty array.R1 I2 - [Mo0.165μs vs. Mo0.170μs] -2.94% (±0.00%)
    benchMatch # generic array, non-empty a.R4 I4 - [Mo0.315μs vs. Mo0.320μs] -1.56% (±0.77%)
    benchMatch # generic array, large array.R1 I3 - [Mo12.008μs vs. Mo11.935μs] +0.61% (±0.30%)
    benchMatch # int array, empty array.....R2 I4 - [Mo0.170μs vs. Mo0.170μs] 0.00% (±0.00%)
    benchMatch # int array, non-empty array.R1 I1 - [Mo0.485μs vs. Mo0.485μs] 0.00% (±0.50%)
    benchMatch # int array, large array.....R1 I4 - [Mo11.024μs vs. Mo10.795μs] +2.13% (±0.32%)
    benchMatch # map, empty array...........R1 I4 - [Mo0.170μs vs. Mo0.170μs] 0.00% (±0.00%)
    benchMatch # map, non-empty array.......R1 I1 - [Mo0.590μs vs. Mo0.595μs] -0.84% (±0.00%)
    benchMatch # map, large array...........R5 I4 - [Mo10.208μs vs. Mo10.184μs] +0.24% (±0.11%)

\Psl\Tests\Benchmark\Type\NonEmptyStringTypeBench

    benchCoerce # string....................R5 I4 - [Mo0.105μs vs. Mo0.105μs] 0.00% (±0.00%)
    benchCoerce # int.......................R5 I4 - [Mo0.125μs vs. Mo0.125μs] 0.00% (±0.00%)
    benchCoerce # instanceof Stringable (ex.R1 I2 - [Mo0.150μs vs. Mo0.150μs] 0.00% (±0.00%)
    benchCoerce # instanceof Stringable (im.R1 I1 - [Mo0.150μs vs. Mo0.150μs] 0.00% (±0.00%)
    benchAssert.............................R5 I4 - [Mo0.100μs vs. Mo0.100μs] 0.00% (±0.00%)
    benchMatch..............................R5 I4 - [Mo0.105μs vs. Mo0.105μs] 0.00% (±0.00%)

\Psl\Tests\Benchmark\Type\StringTypeBench

    benchCoerce # string....................R5 I4 - [Mo0.090μs vs. Mo0.090μs] 0.00% (±0.00%)
    benchCoerce # int.......................R5 I4 - [Mo0.120μs vs. Mo0.115μs] +4.35% (±0.00%)
    benchCoerce # instanceof Stringable (ex.R2 I3 - [Mo0.140μs vs. Mo0.140μs] 0.00% (±0.00%)
    benchCoerce # instanceof Stringable (im.R5 I4 - [Mo0.140μs vs. Mo0.140μs] 0.00% (±0.00%)
    benchAssert.............................R2 I2 - [Mo0.085μs vs. Mo0.085μs] 0.00% (±0.00%)
    benchMatch..............................R5 I4 - [Mo0.095μs vs. Mo0.095μs] 0.00% (±0.00%)

\Psl\Tests\Benchmark\Type\ArrayKeyTypeBench

    benchCoerce # string....................R5 I4 - [Mo0.095μs vs. Mo0.095μs] 0.00% (±0.00%)
    benchCoerce # int.......................R1 I0 - [Mo0.100μs vs. Mo0.100μs] 0.00% (±0.00%)
    benchCoerce # instanceof Stringable (ex.R1 I0 - [Mo5.728μs vs. Mo5.701μs] +0.47% (±0.59%)
    benchCoerce # instanceof Stringable (im.R3 I3 - [Mo5.729μs vs. Mo5.775μs] -0.79% (±0.52%)
    benchAssert # string....................R2 I2 - [Mo0.090μs vs. Mo0.090μs] 0.00% (±0.00%)
    benchAssert # int.......................R5 I4 - [Mo0.100μs vs. Mo0.100μs] 0.00% (±0.00%)
    benchMatch # string.....................R5 I4 - [Mo0.100μs vs. Mo0.100μs] 0.00% (±0.00%)
    benchMatch # int........................R5 I4 - [Mo0.100μs vs. Mo0.100μs] 0.00% (±0.00%)

\Psl\Tests\Benchmark\Type\IntTypeBench

    benchCoerce # int.......................R5 I4 - [Mo0.095μs vs. Mo0.095μs] 0.00% (±0.00%)
    benchCoerce # string....................R1 I1 - [Mo0.160μs vs. Mo0.160μs] 0.00% (±0.00%)
    benchCoerce # float.....................R1 I2 - [Mo0.120μs vs. Mo0.115μs] +4.35% (±0.00%)
    benchCoerce # instanceof Stringable (ex.R1 I3 - [Mo0.205μs vs. Mo0.205μs] 0.00% (±0.00%)
    benchCoerce # instanceof Stringable (im.R1 I4 - [Mo0.205μs vs. Mo0.205μs] 0.00% (±0.00%)
    benchAssert.............................R2 I4 - [Mo0.085μs vs. Mo0.085μs] 0.00% (±0.00%)
    benchMatch..............................R2 I4 - [Mo0.095μs vs. Mo0.095μs] 0.00% (±0.00%)

\Psl\Tests\Benchmark\Type\ShapeTypeBench

    benchCoerce # empty shape, empty array .R3 I4 - [Mo0.330μs vs. Mo0.330μs] +0.05% (±0.74%)
    benchCoerce # empty shape, empty iterab.R2 I3 - [Mo0.320μs vs. Mo0.565μs] -43.33% (±0.76%)
    benchCoerce # empty shape, non-empty ar.R1 I2 - [Mo0.375μs vs. Mo0.370μs] +1.31% (±0.00%)
    benchCoerce # empty shape, non-empty it.R1 I3 - [Mo0.540μs vs. Mo0.775μs] -30.34% (±0.46%)
    benchCoerce # complex shape with option.R2 I4 - [Mo0.690μs vs. Mo0.683μs] +1.02% (±0.29%)
    benchCoerce # complex shape with option.R2 I2 - [Mo1.553μs vs. Mo1.810μs] -14.24% (±0.51%)
    benchCoerce # complex shape with option.R1 I2 - [Mo0.970μs vs. Mo0.975μs] -0.47% (±0.21%)
    benchCoerce # complex shape with option.R1 I3 - [Mo3.039μs vs. Mo3.295μs] -7.76% (±0.52%)
    benchAssert # empty shape, empty array .R2 I1 - [Mo0.130μs vs. Mo0.130μs] 0.00% (±0.00%)
    benchAssert # empty shape, non-empty ar.R2 I2 - [Mo0.230μs vs. Mo0.230μs] 0.00% (±0.00%)
    benchAssert # complex shape with option.R2 I4 - [Mo1.025μs vs. Mo1.030μs] -0.53% (±0.31%)
    benchAssert # complex shape with option.R2 I1 - [Mo2.083μs vs. Mo2.082μs] +0.03% (±0.35%)
    benchMatch # empty shape, empty array v.R5 I4 - [Mo0.160μs vs. Mo0.160μs] 0.00% (±0.00%)
    benchMatch # empty shape, non-empty arr.R2 I4 - [Mo0.255μs vs. Mo0.255μs] 0.00% (±0.00%)
    benchMatch # complex shape with optiona.R1 I4 - [Mo1.055μs vs. Mo1.055μs] -0.01% (±0.38%)
    benchMatch # complex shape with optiona.R5 I4 - [Mo2.113μs vs. Mo2.122μs] -0.41% (±0.35%)

Subjects: 23, Assertions: 0, Failures: 0, Errors: 0

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

87 of 111 (78.38%)  changed or added relevant lines in 25 files are covered.
6 unchanged lines in 3 files lost coverage.
Overall coverage decreased (-0.7%) to 98.254%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/Psl/Type/array_key.php
3
4
75.0%

src/Psl/Type/bool.php
3
4
75.0%

src/Psl/Type/f32.php
3
4
75.0%

src/Psl/Type/f64.php
3
4
75.0%

src/Psl/Type/float.php
3
4
75.0%

src/Psl/Type/i16.php
3
4
75.0%

src/Psl/Type/i32.php
3
4
75.0%

src/Psl/Type/i64.php
3
4
75.0%

src/Psl/Type/i8.php
3
4
75.0%

src/Psl/Type/int.php
3
4
75.0%

Files with Coverage Reduction
New Missed Lines
%

src/Psl/Type/Internal/ArrayKeyType.php
1
88.89%

src/Psl/Type/Internal/NumType.php
1
50.0%

src/Psl/Type/Internal/ScalarType.php
4
20.0%

Totals

Change from base Build<PHONE_NUMBER>:
-0.7%

Covered Lines:
4389

Relevant Lines:
4467

💛  - Coveralls


x/tools/gopls: .go files starting with "_" can cause error

What version of Go, VS Code & VS Code Go extension are you using?

go version

 go version go1.15.6 darwin/amd64

gopls -v version

Build info
----------
golang.org/x/tools/gopls v0.6.0
<EMAIL_ADDRESS>h1:vD171EDBkyUVyp9B45IYXklV/VEfbHgX0FKw0Q0dO30=
<EMAIL_ADDRESS>h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
<EMAIL_ADDRESS>h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k=
<EMAIL_ADDRESS>h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
<EMAIL_ADDRESS>h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=
<EMAIL_ADDRESS>h1:SQFwaSi55rU7vdNs9Yr0Z324VNlrF+0wMqRXT4St8ck=
<EMAIL_ADDRESS>h1:4hzTNH658xirWc4MvAx9HK2/2hY6z42i1+lRK8OzeJE=
<EMAIL_ADDRESS>h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
<EMAIL_ADDRESS>h1:W18jzjh8mfPez+AwGLxmOImucz/IFjpNlrKVnaj2YVc=
<EMAIL_ADDRESS>h1:z+/YqapuV7VZPvBb3GYmuEJbA88M3PFUxaHilHYVCpQ=
<EMAIL_ADDRESS>h1:NSZPykBXJFCetGZykLAxaL6SIpvbVy/UFEniIfHAa8A=
- Run `code -v` or `code-insiders -v` to get version of VS Code or VS Code Insiders
	Version: 1.52.1
Commit: ea3859d4ba2f3e577a159bc91e3074c5d85c0523
Date: 2020-12-16T16:30:02.420Z
Electron: 9.3.5
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: <IP_ADDRESS>-electron.0
OS: Darwin x64 20.1.0

go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN="/Users/martin/go/bin"
GOCACHE="/Users/martin/Library/Caches/go-build"
GOENV="/Users/martin/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/martin/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/martin/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/martin/go/src/github.com/programmfabrik/fylr/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/4f/l31kb4n521d6g89qxrwcx69h0000gp/T/go-build409113686=/tmp/go-build -gno-record-gcc-switches -fno-common"

Share the Go related settings you have added/edited
    "go.vetOnSave": "off",
    "go.lintOnSave": "off",
    "go.delveConfig": {
        "useApiV1": false,
        "dlvLoadConfig": {
            "followPointers": true,
            "maxVariableRecurse": 3,
            "maxStringLen": 256,
            "maxArrayValues": 256,
            "maxStructFields": -1
        }
    },
    "go.languageServerExperimentalFeatures": {

        "diagnostics": true,
        "documentLink": true
    },
    "go.formatTool": "goimports",
    "go.buildOnSave": "workspace",
    "go.useLanguageServer": true

Describe the bug
In my project I have an obsolete "_claims.go" file which is not ignored by gopls, causing bugs:

[Error - 3:06:11 PM] 2021/01/05 15:06:11 no highlight: getting file for Highlight: go [-e -json -compiled=true -test=true -export=false -deps=true -find=false -- github.com/olivere/elastic/v7 github.com/programmfabrik/fylr/internal/api/acl github.com/programmfabrik/fylr/internal/api/datamodel github.com/programmfabrik/fylr/internal/indexer github.com/programmfabrik/fylr/internal/api/file github.com/programmfabrik/fylr/internal/api/fcontext github.com/programmfabrik/fylr/internal/baseconfig github.com/programmfabrik/fylr/internal/api/facet golang.org/x/xerrors github.com/programmfabrik/fylr/internal/util/iso8601 github.com/programmfabrik/fylr/internal/api/mapping github.com/programmfabrik/fylr/internal/api/transition github.com/programmfabrik/fylr/internal/api/privatetag github.com/dgrijalva/jwt-go github.com/programmfabrik/fylr/internal/api/object/enumerate github.com/programmfabrik/fylr/internal/api/event github.com/programmfabrik/fylr/internal/api/settings]: exit status 1: go: updates to go.sum needed, disabled by -mod=readonly

	URI=file:///Users/martin/go/src/github.com/programmfabrik/fylr/internal/api/_session/_claims.go

[Error - 3:06:11 PM] Request textDocument/formatting failed.
  Message: 82:2: expected statement, found '.'
  Code: 0
[Error - 3:06:11 PM] 2021/01/05 15:06:11 imports fixes: AllImportsFixes: /Users/martin/go/src/github.com/programmfabrik/fylr/internal/api/_session/_claims.go:82:2: expected statement, found '.'
	file="/Users/martin/go/src/github.com/programmfabrik/fylr/internal/api/_session/_claims.go"

if I comment the package "github.com/dgrijalva/jwt-go" in _claims.go gopls works again.
With this bug, none of the features like "Show all occurrences" work.
"gopls" should ignore all files starting with "_", the same as "go build" does.

@martinrode Thanks for the report.
@stamblerre According to https://tip.golang.org/cmd/go/#hdr-Package_lists_and_patterns, directory and file names beginning with "." or "_" should be ignored by the go tool.

@martinrode Thanks for the report.
@stamblerre According to https://tip.golang.org/cmd/go/#hdr-Package_lists_and_patterns, directory and file names beginning with "." or "_" should be ignored by the go tool.

I hit this as well. I also tried to move my files into a folder testdata, which is ignored by the Go compiler as well, but gopls does still consider the files located in the testdata folder.

@breml: Do you mind opening a new issue with your gopls logs attached? Information on how to capture them can be found here.
The original issue is probably outdated, especially since the latest gopls version is v0.6.9.

@stamblerre I was no longer able to reproduce the problem with gopls v0.6.10. I will open an issue, when I observe the problem again. Thanks anyway.


Focus on files

Any movement from the commit list (e.g. cursor down or up) would change focus to the list of changed files.
This makes browsing the history via the keyboard very inconvenient.
Is there the way not to loose the focus from the current panel?

There's currently no way to disable this behavior, it'll have to be fixed

@arialdomartini can you test in version 1.2.1 and above if it is working now?

I can confirm that in 9f7574a25ff6318be9004a489c0e8bf9ae6c3f08 (1.2.1) it works perfectly!
Cool!

Great!


Add validation of timestamp field and tag fields in the doc mapper

Timestamp field and tag fields define a field path: dots '.' are used as a field name separator. And if a dot is part of a field name, it must be escaped.
We should not accept a field path that starts with a dot or ends with a dot.

hey @fulmicoton is it cool if me and @AyWa work on this?


206 plot dataframe

Dataframe plotting functionality, plotting testing improvements, fixes to ops.init concerning also other operations.

Codecov Report

Merging #207 into master will decrease coverage by 0.04%.
The diff coverage is 42.85%.

@@            Coverage Diff             @@
##           master     #207      +/-   ##
==========================================
- Coverage    74.6%   74.56%   -0.05%
==========================================
  Files          68       68
  Lines        9010     9022      +12
==========================================
+ Hits         6722     6727       +5
- Misses       2288     2295       +7

Impacted Files
Coverage Δ

cate/ops/__init__.py
100% <100%> (ø)
:arrow_up:

cate/ops/plot.py
23.66% <38.46%> (+1.81%)
:arrow_up:

Continue to review full report at Codecov.

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


Refactor web map to GeoJSON

[xf:gis]
Is your feature request related to a problem? Please describe.
The fastest leaflet.js view and the smallest web applications and universal export of GIS data based on GeoJSON format. Now DBeaver's web map freeze if there is more than ~2500 points/other objects. Leaflet.js can support not less than ~10000..20000 points depends on CPU/RAM.
Now in DBeaver's web app there is sourceValues (wkx format) and sourceTips(array). In complex there is full data model for the geotable. This two variables is calculated base for leaflet.js through wkx.js, not geodata "as is", which is geoJSON for leaflet.js.
I think, DBaver's team can refactor web application (especially for PostGIS, I don't know how there is in OracleSpatial and other ) from wkx directly to geoJSON. Web app will be simpler and faster and there will be no problems with other useful function "export geodata in GeoJSON format".
How to compose both data and geometry to geoJSON?
Example
{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {
        "start_date": 1792,
        "reconstruction_date": [1850, 1947, 2013]
      },
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          [
            [
              30.452706813812256,
              59.68983687874888
            ],
            [
              30.45325398445129,
              59.68956073111389
            ],
            [
              30.453307628631595,
              59.68958238983421
            ],
            [
              30.45274972915649,
              59.68985312265652
            ],
            [
              30.452706813812256,
              59.68983687874888
            ]
          ]
        ]
      }
    },
    {
      "type": "Feature",
      "properties": {
        "name": "Затвор из дерева",
        "год реконструкции": 2013
      },
      "geometry": {
        "type": "Point",
        "coordinates": [
          30.45335054397583,
          59.68954448706445
        ]
      }
    }
  ]
}

for this objects:

Describe the solution you'd like
Web application files structure
├── inc
│   ├── layers.png
│   ├── leaflet.css
│   ├── leaflet.js
│   └── webApp.html
└── *.geoJSON

Describe alternatives you've considered
WebApp based on two files: static webApp.html and dynamic *.geoJSON for separating geodata.
Additional context
It can be useful shadow select for PostGIS like
ST_AsGeoJSON(ST_Transform(geo, 4326), 15,0)::json
DBeaver can save in variable for a geomery only element of geoJSON "features": []. In display time DBeaver can collect this features by user's selection in real full geoJSON as
{ "type": "FeatureCollection",
  "features": [...

How to build geoJSON with properties member in one step? See the first example from ST_AsGeoJSON

To build FeatureCollection:

How to prepare separate features? See the second example from ST_AsGeoJSON

To get Features as records:

There is actual RFC about geoJSON https://tools.ietf.org/html/rfc7946

Thank you for the suggestion.


refactor!: Moved apps api under project

This PR moves the apps related api from management to the main api under the scope of the project.

cli-test is expected to remain broken until the CLI changes are released.

Codecov Report
Base: 34.33% // Head: 34.33% // Decreases project coverage by -0.00% :warning:

Coverage data is based on head (8d7ea08) compared to base (7b845da).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #668      +/-   ##
==========================================
- Coverage   34.33%   34.33%   -0.01%
==========================================
  Files         103      103
  Lines       11500    11501       +1
==========================================
  Hits         3949     3949
- Misses       7189     7190       +1
  Partials      362      362

Impacted Files
Coverage Δ

server/middleware/measure.go
0.00% <ø> (ø)

server/services/v1/api.go
0.00% <0.00%> (ø)

server/services/v1/management.go
0.00% <ø> (ø)

server/services/v1/service.go
0.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


fix: use spooled temp file to reduce memory usage

Signed-off-by: Frost Ming<EMAIL_ADDRESS>

@Zheaoli @frostming learned that, thanks


labels placement is confusing

Hello,
Is there any way to center the labels according to the grid and points ? The right align is confusing especially when there is a lot of labels.

Also wanted to say thank you for this great charts library :)

Duplicate of #439


installed successfully...Thank you

Thank you .. This extension is great and has been installed successfully..its work 100/100

@alidz1982 glad it worked out, enjoy! And consider becoming a patron at https://patreon.com/flagrow !


Adds default App Engine project skeleton

Summary
This PR adds a basic webapp skeleton to the repo to reduce conflicts between the three of us and give basic structure to adding new files.

Had to make a new PR as I do not have access to the branches on the unforked repo!


FutureReturnValueIgnored

FutureReturnValueIgnored:  Return value of methods returning Future must be checked. Ignoring returned Futures suppresses exceptions thrown from the code that completes the Future.
(at-me in a reply with help or ignore)
Originally posted by @sonatype-lift[bot] in https://github.com/WesleyOne/qy-weixin-robot-spring-boot-starter/pull/6#discussion_r676147593

Not necessary.
just add no-meaning return value.


TypeScript + Array prop type causes component type to become "corrupt"

Version
3.0.0-rc.5
Reproduction link
https://github.com/ffxsam/repro-ts-array-prop-bug
Steps to reproduce
Clone repo and open HelloWorld.vue in VS Code (or run yarn serve)
What is expected?
No TS errors
What is actually happening?
Error: Property 'okProp' does not exist on type 'Vue'.

Try commenting out line 39 (fields prop def), and you'll notice the TS error go away

This is an issue with Vue itself, see https://github.com/vuejs/vue/issues/6841


feat: discord verification program

Description
Apply to the Discord Verification Program:
Let's Verify our server and let everyone know this is the official place for our community to gather.
Benefits: advanced server insights, server discovery, invite splash art and a custom invite link
How will it help

advanced server insights will allow us to know how can we improve
server discovery will allow people to just search for our server and join it, moreover, it will allow more folks to discover eddiehub and start their open source journey
invite splash will make our community, more personalized
custom invite link will make a permanent, custom invite link, allowing eddie to display small popups, with the link discord.gg/eddiehub

Screenshots

Additional Context
Link: discord.com/verification
Requirements (Already completed, last check 12:00 Noon IST 15/06/2021): Qualifications for Discord Verification Program

Done

Done

Eddie is quick 🤩

Not usually, but if I didn't do it, I would forget 🤦♂


Option to listen on next available port

While researching the concept of listening on an ephemeral port, I stumbled across this interesting issue:
http://stackoverflow.com/questions/5139808/tcp-simultaneous-open-and-self-connect-prevention
It seems that listening on an ephemeral port is not a great idea.
We might want to enable Kitura to listen on "the next available port starting at X", so that a group of servers could be started without having to determine in advance what port to use.  The actual port in use would then be logged, and available programatically via HTTPServer.port.
We might want to allow the user to define a range of values they consider acceptable, eg. listen on (8080 ... 8100).

This follows on from https://github.com/IBM-Swift/Kitura-net/pull/156 which fixes a bug where the reference to the port was not updated if the port number requested was 0 (any ephemeral port).

I can see the rationale for doing this, but has anyone asked for this feature yet?


add --remove-orphans to docker-compose command?

I got the following error while using the plugin. Does it make sense to add --remove-orphans to the docker-compose command?
Exception: Command 'docker-compose -f "<hidden>" -p "pytest7" down -v' returned 1: """Stopping <hidden> ...
E           Stopping <hidden>      ...
E
Stopping <hidden> ... done
Stopping <hidden>      ... done
Found orphan containers (<hidden>, <hidden>, <hidden>) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.

Hmm. I have seen this problem intermittently. We have a set of VMs connected to Jenkins which runs our CI.
My current theory is that a job was aborted and left containers running. Then when the job re-runs it produces this error.
I'll try to reproduce it.

Ok. I didn't use --remove-orphans before and I'm not sure how that affects other workflows with Compose. So I'd be cautious about adding that. But if we can change something in the code that would prevent the situation from occuring, i.e. killing the containers when the tests are killed, that would be safer, I guess. But I think there should be a reproducible flow before the code is changed.

I agree, I don't know the impact of just adding in --remove-orphans. I'm not that familiar with docker so I'll need to research how orphaned containers occur in the first place. I'll post back here once I have a reproducible flow for this error.

I'm guessing it's got something to do with changing the compose file while a previous instance is running

Yes, this option is useful after removing services from a compose file.  Example:
a:
  image: redis

b:
  image: redis

Run docker-compose up -d.   If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
Removing desktop_a_1 ... done

I don't see how this could happen during normal operation.  You could probably trigger this on long builds by editing your docker-compose.yml file while the build is running, but since you mention this happening on CI builds, that's unlikely.

My current theory is that a job was aborted and left containers running. Then when the job re-runs it produces this error.  I'll try to reproduce it.

Hint: you might want to look for builds from multiple branches where one branch contains a service that is not defined in other branches.  Think of this sequence:

Start build for branch A, with service not defined in branch B
Make sure that docker-compose up -d has run and kill the build for branch A
Start build for branch B and let it complete.

Hint: concurrent builds on the same machine might also be an issue, especially if the compose project name is fixed across branches.  Think of this sequence:

Start build for branch A
Start build for branch B that has one service not defined in branch A
Build for branch A completes and runs docker-compose down -v, which detects and orphaned container.

IMO, you might consider using a random compose project name to avoid conflicts in both cases, then run a cron job on your build machine to clean up orphaned containers once in a while to account for jobs that get killed.
Note: if editing docker-compose.yml file while the build is running is actually an issue for you, I guess we could copy the file to a temporary location somewhere else to prevent this from occurring.

Since there is no response from @vicyap, I will close this issue.  Feel free to open a new issue if you run into this issue again.


From time to time decryption errors for the same input data

Hi @vanitasvitae,
We've received some feedback about errors that occurred from time to time for the same input data.
Please look at the following code
  fun decryptAndOrVerifyWithResult(
    srcInputStream: InputStream,
    publicKeys: PGPPublicKeyRingCollection? = null,
    secretKeys: PGPSecretKeyRingCollection? = null,
    protector: SecretKeyRingProtector? = null,
    passphrase: Passphrase? = null,
    ignoreMdcErrors: Boolean = false
  ): DecryptionResult {
    srcInputStream.use { srcStream ->
      val destOutputStream = ByteArrayOutputStream()
      destOutputStream.use { outStream ->
        try {
          val decryptionStream = genDecryptionStream(
            srcInputStream = srcStream,
            publicKeys = publicKeys,
            secretKeys = secretKeys,
            protector = protector,
            passphrase = passphrase,
            ignoreMdcErrors = ignoreMdcErrors
          )

          decryptionStream.use { it.copyTo(outStream) }
          return DecryptionResult(
            openPgpMetadata = decryptionStream.result,
            content = destOutputStream
          )
        } catch (e: Exception) {
          return DecryptionResult.withError(
            processDecryptionException(e)
          )
        }
      }
    }
  }

From time to time in the catch block we catch the following errors:
java.util.NoSuchElementException: No direct-key signature and no user-id signature found.
	at org.pgpainless.key.info.KeyRingInfo.getPrimaryKeyExpirationDate(KeyRingInfo.java:701)
at org.pgpainless.key.info.KeyRingInfo.getEncryptionSubkeys(KeyRingInfo.java:905)
at org.pgpainless.decryption_verification.OpenPgpMessageInputStream.getDecryptionKey(OpenPgpMessageInputStream.java:695)
at org.pgpainless.decryption_verification.OpenPgpMessageInputStream.processEncryptedData(OpenPgpMessageInputStream.java:492)
at org.pgpainless.decryption_verification.OpenPgpMessageInputStream.consumePackets(OpenPgpMessageInputStream.java:306)
at org.pgpainless.decryption_verification.OpenPgpMessageInputStream.<init>(OpenPgpMessageInputStream.java:227)
at org.pgpainless.decryption_verification.OpenPgpMessageInputStream.create(OpenPgpMessageInputStream.java:166)
at org.pgpainless.decryption_verification.OpenPgpMessageInputStream.create(OpenPgpMessageInputStream.java:136)
at org.pgpainless.decryption_verification.OpenPgpMessageInputStream.create(OpenPgpMessageInputStream.java:116)
at org.pgpainless.decryption_verification.DecryptionBuilder$DecryptWithImpl.withOptions(DecryptionBuilder.java:39)
at com.flowcrypt.email.security.pgp.PgpDecryptAndOrVerify.genDecryptionStream(PgpDecryptAndOrVerify.kt:135)
at com.flowcrypt.email.security.pgp.PgpDecryptAndOrVerify.decryptAndOrVerifyWithResult(PgpDecryptAndOrVerify.kt:80)
at com.flowcrypt.email.security.pgp.PgpDecryptAndOrVerify.decryptAndOrVerifyWithResult$default(PgpDecryptAndOrVerify.kt:64)
at com.flowcrypt.email.security.pgp.PgpMsg.processPgpMsgRawBlock(PgpMsg.kt:868)
at com.flowcrypt.email.security.pgp.PgpMsg.processRawBlocks(PgpMsg.kt:375)
at com.flowcrypt.email.security.pgp.PgpMsg.extractMsgBlocksFromPart(PgpMsg.kt:336)
at com.flowcrypt.email.security.pgp.PgpMsg.extractMsgBlocksFromPart$default(PgpMsg.kt:234)
at com.flowcrypt.email.security.pgp.PgpMsg.processMimeMessage(PgpMsg.kt:225)
at com.flowcrypt.email.security.pgp.PgpMsg$processMimeMessage$2.invokeSuspend(PgpMsg.kt:199)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

java.lang.ArrayIndexOutOfBoundsException: length=8; index=8
at org.bouncycastle.crypto.digests.LongDigest.update(Unknown Source:8)
at org.bouncycastle.crypto.digests.LongDigest.update(Unknown Source:8)
at org.bouncycastle.openpgp.operator.bc.BcImplProvider$EdDsaSigner.update(Unknown Source:2)
at org.bouncycastle.openpgp.operator.bc.SignerOutputStream.write(Unknown Source:2)
at org.bouncycastle.openpgp.PGPSignature.blockUpdate(Unknown Source:2)
at org.bouncycastle.openpgp.PGPSignature.update(Unknown Source:16)
at org.bouncycastle.openpgp.PGPSignature.update(Unknown Source:2)
at org.bouncycastle.openpgp.PGPSignature.updateWithPublicKey(Unknown Source:21)
at org.bouncycastle.openpgp.PGPSignature.verifyCertification(Unknown Source:4)
at org.pgpainless.signature.consumer.SignatureValidator$19.verify(SignatureValidator.java:612)
at org.pgpainless.signature.consumer.SignaturePicker.pickLatestUserIdCertificationSignature(SignaturePicker.java:259)
at org.pgpainless.key.info.KeyRingInfo$Signatures.<init>(KeyRingInfo.java:1164)
at org.pgpainless.key.info.KeyRingInfo.<init>(KeyRingInfo.java:104)
at org.pgpainless.decryption_verification.OpenPgpMessageInputStream.getDecryptionKey(OpenPgpMessageInputStream.java:694)
at org.pgpainless.decryption_verification.OpenPgpMessageInputStream.processEncryptedData(OpenPgpMessageInputStream.java:492)
at org.pgpainless.decryption_verification.OpenPgpMessageInputStream.consumePackets(OpenPgpMessageInputStream.java:306)
at org.pgpainless.decryption_verification.OpenPgpMessageInputStream.<init>(OpenPgpMessageInputStream.java:227)
at org.pgpainless.decryption_verification.OpenPgpMessageInputStream.create(OpenPgpMessageInputStream.java:166)
at org.pgpainless.decryption_verification.OpenPgpMessageInputStream.create(OpenPgpMessageInputStream.java:136)
at org.pgpainless.decryption_verification.OpenPgpMessageInputStream.create(OpenPgpMessageInputStream.java:116)
at org.pgpainless.decryption_verification.DecryptionBuilder$DecryptWithImpl.withOptions(DecryptionBuilder.java:39)
at com.flowcrypt.email.security.pgp.PgpDecryptAndOrVerify.genDecryptionStream(PgpDecryptAndOrVerify.kt:131)
at com.flowcrypt.email.security.pgp.PgpDecryptAndOrVerify.decryptAndOrVerifyWithResult(PgpDecryptAndOrVerify.kt:76)
at com.flowcrypt.email.security.pgp.PgpDecryptAndOrVerify.decryptAndOrVerifyWithResult$default(PgpDecryptAndOrVerify.kt:64)
at com.flowcrypt.email.security.pgp.PgpMsg.processPgpMsgRawBlock(PgpMsg.kt:868)
at com.flowcrypt.email.security.pgp.PgpMsg.processRawBlocks(PgpMsg.kt:375)
at com.flowcrypt.email.security.pgp.PgpMsg.extractMsgBlocksFromPart(PgpMsg.kt:336)
at com.flowcrypt.email.security.pgp.PgpMsg.extractMsgBlocksFromPart$default(PgpMsg.kt:234)
at com.flowcrypt.email.security.pgp.PgpMsg.processMimeMessage(PgpMsg.kt:225)
at com.flowcrypt.email.security.pgp.PgpMsg$processMimeMessage$2.invokeSuspend(PgpMsg.kt:199)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

The main problem - it happens from time to time. For example, the following code resolves the problem
fun decryptAndOrVerifyWithResult(
    srcInputStream: InputStream,
    publicKeys: PGPPublicKeyRingCollection? = null,
    secretKeys: PGPSecretKeyRingCollection? = null,
    protector: SecretKeyRingProtector? = null,
    passphrase: Passphrase? = null,
    ignoreMdcErrors: Boolean = false
  ): DecryptionResult {
    srcInputStream.use { srcStream ->
      val destOutputStream = ByteArrayOutputStream()
      destOutputStream.use { outStream ->
        try {
          val decryptionStream = genDecryptionStream(
            srcInputStream = srcStream,
            publicKeys = publicKeys,
            secretKeys = secretKeys,
            protector = protector,
            passphrase = passphrase,
            ignoreMdcErrors = ignoreMdcErrors
          )

          decryptionStream.use { it.copyTo(outStream) }
          return DecryptionResult(
            openPgpMetadata = decryptionStream.result,
            content = destOutputStream
          )
        } catch (e: Exception) {
          try {
            if (srcStream.markSupported()) {
              srcStream.reset()
              val decryptionStream = genDecryptionStream(
                srcInputStream = srcStream,
                publicKeys = publicKeys,
                secretKeys = secretKeys,
                protector = protector,
                passphrase = passphrase,
                ignoreMdcErrors = ignoreMdcErrors
              )

              decryptionStream.use { it.copyTo(outStream) }
              return DecryptionResult(
                openPgpMetadata = decryptionStream.result,
                content = destOutputStream
              )
            } else {
              return DecryptionResult.withError(
                processDecryptionException(e)
              )
            }
          } catch (e: Exception) {
            return DecryptionResult.withError(
              processDecryptionException(e)
            )
          }
        }
      }
    }
  }

it means if I do one more attempt to decrypt - it works well and I can't catch the same errors.
I've tried to reproduce this issue in a Junit test but failed. I haven't received any errors for 100000 iterations for the same data.
Maybe you have an idea of what can be wrong.

I will check it out. Thanks for the heads up!

A few more details. From time to time I receive such errors for the missing passphrase case. Instead of receiving MissingPassphraseException I receive NoSuchElementException: No direct-key signature and no user-id signature found.

for now we use
implementation('org.pgpainless:pgpainless-core:1.4.4') {
    exclude group: 'org.bouncycastle'
}

implementation 'org.bouncycastle:bcprov-jdk15to18:1.72'
implementation 'org.bouncycastle:bcpg-jdk15to18:1.72.3'

Hm, interesting...

I receive NoSuchElementException: No direct-key signature and no user-id signature found.

I got the same error reported in a different context. I assumed the key was just bad in that case, but your report makes me seriously reconsider. I guess there's a nasty one hiding somewhere in the code.
Tomorrow evening I will be back in Germany, so after that I will be able to concentrate again and I will make this issue priority (even though I have no clue yet how to reproduce :D)

Please feel free to ask me for any additional information. Tomorrow I will try to find a stable version (commit) that doesn't have such a problem (if it is possible).

I have new details. Maybe it is not related to the current issue. But anyway I'm adding it here.
Starting from https://github.com/pgpainless/pgpainless/commit/80e12db8b683193fcf4c4365a37b21498c8dbac4 the decryption process became unstable for the same data.(from time to time I receive NoSuchElementException("No suitable signatures found on the key."))

That appears to be a good place to start the diagnose. Big thanks!

Hm, the commit you identified changes PGPainless' behavior to check the keys expiration and the subkeys keyflags for encryption capability.
Apparently somehow determining the expiration date fails, since neither a direct-key signature on the primary key, nor a self-certification over the primary user-id do get picked up.
As a workaround I suppose we can add a flag STRICT_SUBKEY_EVAL or something similar to OpenPgpMessageInputStream, which if set to false will fall back to the behavior prior to the commit. That way you can also decrypt old messages using an expired key (which might not be a bad idea actually :P
I'm playing with the thought of reducing the number of repeated signature checks in PGPainless by introducing a new key class Validated{Public|Secret}KeyRing, similar to OpenKeychains CanonicalizedKeyRing or Sequoias ValidCert, meaning all the heavy lifting of signature validation is done once, and afterwards properties can be extracted without the need to re-calculate expirations/revocations etc.

After some more digging and playing around:
Can you confirm, that this issue happens with keys that use SHA-1 self signatures?
My suspicion is, that there might be a race condition between you setting a custom hash algorithm policy allowing SHA-1 and starting the decryption process with it using PGPainless' default policy rejecting SHA1.
Maybe on the first decryption pass the policy is not yet set, resulting in the failure you observe, while with the second pass your custom policy is used, yielding success?
I created #366 which allow decryption using unbound decryption keys.

Can you confirm, that this issue happens with keys that use SHA-1 self signatures?

I've created a fresh private key using the following code
PGPSecretKeyRing secretKeys =<EMAIL_ADDRESS>"android");
-----BEGIN PGP PRIVATE KEY BLOCK-----
Version: PGPainless

lIYEZDKdWRYJKwYBBAHaRw8BAQdAUyEDStyTRMczwaHL0iRFyum4ihXdxvNjadCS
IV1/F8b+CQMC3o80QhYkmgxgEZ5BtvdUoSMCkuUck7EXfMItiCbDl0F/7FC5y9p1
/8dDB1VVcBTicIXvQhNkUVEX4DeKCkzzuUSLLJqnxOheXhkOAFLSj7QWZGVmYXVs
dEBmbG93Y3J5cHQudGVzdIiPBBMWCgBBBQJkMp1ZCRD4Fpfj51ziqhYhBNn0oI7T
WesjW6PG6/gWl+PnXOKqAp4BApsDBRYCAwEABAsJCAcFFQoJCAsCmQEAAKixAP0a
H64kXwJ302R5k+MTRVVKt/qvbzsnBDbIEjjzl+HJHQD7BTCnTMm53H/E+ow+yJe7
p+ov4lKA/u2ykpnrnZo08A+ciwRkMp1ZEgorBgEEAZdVAQUBAQdAfjg9JjKT22Sx
Rq0xMlMj8cixDEYqli58cXylF50AI34DAQgH/gkDAt6PNEIWJJoMYOgqj0ivvoLn
uPI4jVR3FE1/vrHJA68pUaghM3ZRAkp7bDzpTN+D9/wAK7+FwMYeYzLHa+TYLGXL
0gu9kddQpdRByFPigrmIdQQYFgoAHQUCZDKdWQKeAQKbDAUWAgMBAAQLCQgHBRUK
CQgLAAoJEPgWl+PnXOKqlzkBAOpq+t/icr0tUr6Yd1joWryTxqFxhYjJQgrQOrOT
xHDrAQD11FmjfigujCmztSMZ2rP1CMmWRu/dpqfuQF/rnUjQDA==
=vctV
-----END PGP PRIVATE KEY BLOCK-----

I can reproduce the issue with this key('org.pgpainless:pgpainless-core:1.4.3') with and without the following global settings
PGPainless.getPolicy().signatureHashAlgorithmPolicy = HashAlgorithmPolicy(
        HashAlgorithm.SHA512, listOf(
          HashAlgorithm.SHA512,
          HashAlgorithm.SHA384,
          HashAlgorithm.SHA256,
          HashAlgorithm.SHA224,
          HashAlgorithm.SHA1
        )
      )

PGPainless.getPolicy().isEnableKeyParameterValidation = true

Maybe on the first decryption pass the policy is not yet set, resulting in the failure you observe, while with the second pass your custom policy is used, yielding success?

I use absolutely the same input data. I'm sure about that. Or did you mean something else?

I created https://github.com/pgpainless/pgpainless/pull/366 which allow decryption using unbound decryption keys.

Looks like it ConsumerOptions().setRequireValidDecryptionKey(false) resolves the issue. I can't catch the error.
But what will be better(safer)?

use ConsumerOptions().setRequireValidDecryptionKey(false)
or try to decrypt a few times

Can you confirm, that this issue happens with keys that use SHA-1 self signatures?

I've created a fresh private key using the following code:

Hm, that rules out my initial suspicion. I will dig further.
setRequireValidDecryptionKey(false) is totally just a workaround unfortunately.
Can you reproduce the issue reliably in a unit test? In that case I will try to find the origin of the issue itself.
That the key is not reliably found as decryption key is a bug.

I cannot reproduce the issue with a @RepeatedTest(10000) that looks like this:
    @RepeatedTest(10000)
    public void decrypt() throws IOException, PGPException {
        // created earlier using PGPainless
        String ciphertext = "-----BEGIN PGP MESSAGE-----\n" +
                "Version: PGPainless\n" +
                "\n" +
                "hF4DpkF+MiWpctkSAQdAoHWa5DgYsv6Fa2jrojIqShKVpTmIh0nFbUqou39XUAgw\n" +
                "ea22qCtFDE91QU+erdygJ4U9M8GpqC/8jFJH3CEUeuPxkuZz9Wa6RDy87/CFkPnd\n" +
                "0j8B8r/DvEEYRTgsYxqi14cUWlscCv0hRnIm4X7hqM3zqSqqxCPWxyA3zzDq4NRE\n" +
                "+2agUKlmRqMCZob9Mt3bHFc=\n" +
                "=ei85\n" +
                "-----END PGP MESSAGE-----";
        PGPSecretKeyRing secretKeys = PGPainless.readKeyRing().secretKeyRing(KEY);

        DecryptionStream decryptionStream = PGPainless.decryptAndOrVerify()
                .onInputStream(new ByteArrayInputStream(ciphertext.getBytes(StandardCharsets.UTF_8)))
                .withOptions(ConsumerOptions.get()
                        .addDecryptionKey(secretKeys, protector)); // protector uses password "android"
        ByteArrayOutputStream out = new ByteArrayOutputStream();

        Streams.pipeAll(decryptionStream, out);
        decryptionStream.close();

        assertEquals("Hello, World!", out.toString());
    }

I noticed that the stacktrace you shared in the original post hints that the error happens because the self-signature on a key fails to verify.
That makes me wonder, on what system do you run the test that fails? Android? Android VM? Perhaps there is some kind of instability on the platform? I just finished 100.000 successful consecutive decryptions of the same ciphertext without issues on my linux machine.

That makes me wonder, on what system do you run the test that fails? Android? Android VM?

It fails on Android

I just finished 100.000 successful consecutive decryptions of the same ciphertext without issues on my linux machine.

I have the same result for a standard Java environment. I still can't reproduce the bug via JUnit tests.

Perhaps there is some kind of instability on the platform?

I'm scared about that too. I need some additional time to investigate the issue.

I created a small test app which has a button that triggers a background thread that decrypts a message 1000 times, but so far I haven't been able to reproduce the issue on my phone.
Do you have any idea what I could try to reproduce the issue?

I created a small test app which has a button that triggers a background thread that decrypts a message 1000 times, but so far I haven't been able to reproduce the issue on my phone.

Did you create an Android app?

Do you have any idea what I could try to reproduce the issue?

It's hard to say. Sorry for the delay. I'm still a little busy with the current milestone for FlowCrypt and can't arrange some free time for investigation. We should release a new version next week. After that, I will switch to the current issue. For now, to prevent errors I just use the retry strategy as a quick temporary fix.

Did you create an Android app?

Yes. I can upload the source code later, if it is of use for you.

java.lang.ArrayIndexOutOfBoundsException: length=8; index=8
at org.bouncycastle.crypto.digests.LongDigest.update(Unknown Source:8)
at org.bouncycastle.crypto.digests.LongDigest.update(Unknown Source:8)
at org.bouncycastle.openpgp.operator.bc.BcImplProvider$EdDsaSigner.update(Unknown Source:2)
at org.bouncycastle.openpgp.operator.bc.SignerOutputStream.write(Unknown Source:2)
at org.bouncycastle.openpgp.PGPSignature.blockUpdate(Unknown Source:2)
at org.bouncycastle.openpgp.PGPSignature.update(Unknown Source:16)
at org.bouncycastle.openpgp.PGPSignature.update(Unknown Source:2)
at org.bouncycastle.openpgp.PGPSignature.updateWithPublicKey(Unknown Source:21)
at org.bouncycastle.openpgp.PGPSignature.verifyCertification(Unknown Source:4)
at org.pgpainless.signature.consumer.SignatureValidator$19.verify(SignatureValidator.java:612)

This part of the stacktrace you posted sounds like a bug in BC.
If I interpret the trace correctly, the AOOB happens in this line.
Checking the git history reveals that there has been a change in https://github.com/bcgit/bc-java/commit/1296f25e21db825e886779e8863ae057c7261ba3 which might be relevant.

for now we use
implementation('org.pgpainless:pgpainless-core:1.4.4') {
    exclude group: 'org.bouncycastle'
}

implementation 'org.bouncycastle:bcprov-jdk15to18:1.72'
implementation 'org.bouncycastle:bcpg-jdk15to18:1.72.3'

Hm, 1.72 is older than the commit. Perhaps these errors stem from older versions of your app that used older BC releases?
Otherwise the BC code looks sane. I could only imagine a race condition to cause the error, but thats only wild speculation.

Hm, 1.72 is older than the commit. Perhaps these errors stem from older versions of your app that used older BC releases?
Otherwise the BC code looks sane. I could only imagine a race condition to cause the error, but thats only wild speculation.

I've already restored my investigation )). But I still don't have strong results.
About BC versions. I'm not sure. I tested a lot of combinations. Had the same results.
I guess it can be threads issue. It looks like in my code I have a situation when I run the same code twice in different threads. I hope we will know a reason of the problem soon. I'm working on it.

I have some more details. I can reproduce the issue on Android. I use the following code.
fun decryptAndOrVerifyWithResult(
    srcInputStream: InputStream,
    publicKeys: PGPPublicKeyRingCollection? = null,
    secretKeys: PGPSecretKeyRingCollection? = null,
    protector: SecretKeyRingProtector? = null,
    passphrase: Passphrase? = null,
    ignoreMdcErrors: Boolean = false,
    attempts: Int = 1,
    action: (i: Int) -> Unit
  ): DecryptionResult {
    var decryptionResult: DecryptionResult =
      DecryptionResult.withError(processDecryptionException(IllegalStateException()))
    for (i in 0 until attempts) {
      if (srcInputStream.markSupported()) {
        srcInputStream.reset()
      }
      try {
        srcInputStream.use { srcStream ->
          val destOutputStream = ByteArrayOutputStream()
          destOutputStream.use { outStream ->

            val decryptionStream = genDecryptionStream(
              srcInputStream = srcStream,
              publicKeys = publicKeys,
              secretKeys = secretKeys,
              protector = protector,
              passphrase = passphrase,
              ignoreMdcErrors = ignoreMdcErrors
            )

            Log.d("DDDDDD", "try to decrypt = $i + ${Thread.currentThread().name}")

            decryptionStream.use { it.copyTo(outStream) }
            decryptionResult = DecryptionResult(
              openPgpMetadata = decryptionStream.result,
              content = destOutputStream
            )
            action.invoke(i)
          }
        }
      } catch (e: Exception) {
        Log.d(
          "DDDDDD",
          "Attempt with exception = $i + ${Thread.currentThread().name} | $srcInputStream | $publicKeys | $secretKeys | $protector"
        )
        e.printStackTrace()
        return DecryptionResult.withError(
          processDecryptionException(e)
        )
      }
    }

    Log.d(
      "DDDDDD",
      "Attempt = $attempts + ${Thread.currentThread().name} | $srcInputStream | $publicKeys | $secretKeys | $protector"
    )
    return decryptionResult
  }

It works fine for a case when I run it only from one thread (even for attempts = 10000). But if I run this code from 2 different threads I receive an exception. In logs I see the following
For the first thread
Attempt with exception = 280 + DefaultDispatcher-worker-4 | java.io.ByteArrayInputStream@c16c091 | org.bouncycastle.openpgp.PGPPublicKeyRingCollection@5825bf6 | org.bouncycastle.openpgp.PGPSecretKeyRingCollection@6ca4bf7 | org.pgpainless.key.protection.PasswordBasedSecretKeyRingProtector@f51ca64
For the second thread
Attempt with exception = 51 + DefaultDispatcher-worker-1 | java.io.ByteArrayInputStream@b704182 | org.bouncycastle.openpgp.PGPPublicKeyRingCollection@f4db093 | org.bouncycastle.openpgp.PGPSecretKeyRingCollection@49328d0 | org.pgpainless.key.protection.PasswordBasedSecretKeyRingProtector@9f7f0c9
attempt position is random for every thread
When it happens I see a combination of java.lang.ArrayIndexOutOfBoundsException: length=8; index=8 and java.util.NoSuchElementException: No direct-key signature and no user-id signature found.
Looks like objects in the threads are different. I mean I don't use the same object in both threads.
I guess there is some static code in PGPainless or BC. And this code doesn't like such a race condition. just a guess.
P.S. I still can't reproduce it via tests. Work in progress.

I've finally found a reason.

Looks like objects in the threads are different. I mean I don't use the same object in both threads.

I was wrong. I logged some info and it showed different objects. PGPSecretKeyRingCollection was a different object for all threads. But PGPSecretKeyRing was the same in every PGPSecretKeyRingCollection. It causes the issue.
Let me add more details about what logic I have.
Our app can have a few accounts(similar to the Gmail app). Every account can have some imported private keys locally. These keys are stored in the local database (protected by a key pass phrase and by Android Key Store). As parsing and decryption a key takes some time we have a cache in RAM. Every time when the app is starting or a user is updating keys we update the cache in RAM. This cache contains List<PGPSecretKeyRing> with already parsed keys from the database (but still protected by pass phrase). When we need to encrypt/decrypt something we just call KeysStorage.getPGPSecretKeyRings() and use these key rings.
Please share your thoughts. Is it a bad idea to have such logic(reuse PGPSecretKeyRing)? Do I need to change the logic on my side? Or this problem can be(should be) fixed in PGPainless?

In this case getPGPSecretKeyRings() always will return a thread-safe version of PGPSecretKeyRing objects

I created a bug report / discussion upstream: https://github.com/bcgit/bc-java/issues/1379

I'm just not sure about BcKeyFingerprintCalculator() usage.

BcKeyFingerprintCalculator should be thread safe I believe.

I will close this issue then. Feel free to reopen if necessary :)

Agree. I don't have any questions here. All is clear. Thanks!

I drafted a patch for BC :D
https://github.com/bcgit/bc-java/commit/cb024359b083679ba678ec44c6d32d0864321ddc
Feel free to comment on https://github.com/bcgit/bc-java/issues/1379 to let the BC devs know if you'd appreciate such a patch ;)

Reference #373

PGPainless 1.5.1 contains a change that relaxes constraints on decryption keys, such that you can now also decrypt with revoked, expired subkeys, or if the sender erroneously used the wrong key for encryption (e.g. an RSA primary key marked with keyflags SIGN and CERTIFY, but not ENCRYPT).


Docs improvements

fix headings level
specify language on a fenced code block
add sub-levels on Input and output files
remove extra space after two list marks
fix typo
remove trailing punctuation in one heading

Thanks for these improvements!


AWS ECS - propagate tags to tasks

In the AWS ECS setup, the aws_ecs_service resource doesn't propagate tags to the tasks. This results in large amounts of fargate VCPU usage going untagged and potentially not visible in AWS Cost Explorer.
Could we get this added as per the AWS terraform documentation documentation on the service resource. There are two options, so perhaps defaulting to one and allowing a variable for the other would make sense.

@alexmaras thanks for the feedback, we'll take a look. If you know how this should be solved and feel comfortable submitting a PR we will definitely try to get it merged!

@samsternatretool - https://github.com/tryretool/terraform-retool-modules/pull/40
Forgot to link across to this when I put it up.

Fixed by https://github.com/tryretool/terraform-retool-modules/pull/40
Thank you @alexmaras for contributing!


check_duplicates() indicator column sometimes is duplicates sometimes is duplicates_keep

I think it should be always the same to prevent breaking code if someone tweaks the keep argument

fixed


Spread operators

What do you think about spread operators? Operators/Spread_syntax
Use it or lose it? 👍

👍


Add instructions about how to run the Cairo Scripts

Description

Add in the README a section about how to build and run the Cairo Scripts
Follow this guide

I'm a Full Stack Developer with two years of experience. I'm also a member of Dojo Coding, where I'm expanding my expertise in Cairo and Web3 technologies. I'm enthusiastic about learning, and becoming a part of this project.
To address this issue, I would take the following steps:

Review the Project Scripts: I will analyze the existing Cairo scripts to understand their structure, dependencies, and functionality.

Consult the Documentation Guide: I will follow the provided guide to ensure that I include all necessary details in the README.

Verify Execution Steps: I will run the Cairo scripts myself to confirm that the documented steps are accurate and functional.

Draft README Instructions: I will create a clear and concise section in the README that outlines how to build and run the Cairo scripts.

@DiegoB1911 any updates here?

Sorry for the delay. I’ll create the PR by tomorrow


Analysis Code for Sonarqube and Codeclimate

I would like to add the feauture to support the generic issues report formats for sonarqube and codeclimate.
The specifications are documented here:
https://github.com/codeclimate/platform/blob/master/spec/analyzers/SPEC.md#data-types
https://docs.sonarsource.com/sonarqube/9.9/analyzing-source-code/importing-external-issues/generic-issue-import-format/
I have already some code which works locally on our side.
formatter for sonarqube:
import {Issue} from "@abaplint/core";
import {IFormatter} from "./_iformatter";

export class Sonarqube implements IFormatter {

  public output(issues: Issue[], _fileCount: number): string {

    const out: any = {};
    const issueArray = [];
    const defaultSeverity = "INFO";
    const severityArray = ["INFO", "MINOR", "MAJOR", "CRITICAL", "BLOCKER"];
    type sonarIssue = {
      engineId: string;
      ruleId: any;
      severity: any;
      type: string;
      primaryLocation: {
        message: any;
        filePath: any;
        textRange: {
          startLine: any;
          endLine: any;
          startColumn?: number;
          endColumn?: number;
        };
      };
      effortMinutes: number;
    };

    for (const issue of issues) {
      const startOffset = issue.getStart().getCol() - 1;
      const endOffset = issue.getEnd().getCol() - 2;
      const single: sonarIssue = {
        engineId: "abaplint",
        ruleId: issue.getKey(),
        severity: ( severityArray.includes(issue.getSeverity().toUpperCase()) ) ? issue.getSeverity().toUpperCase() : defaultSeverity,
        type:"CODE_SMELL",
        primaryLocation: {
          message: issue.getMessage(),
          filePath: issue.getFilename(),
          textRange: {
            startLine: issue.getStart().getRow(),
            endLine: issue.getEnd().getRow(),
            startColumn: startOffset,
            endColumn: endOffset,
          },
        },
        effortMinutes: 10,
      };
      if (startOffset >= endOffset )
      {
        delete single.primaryLocation.textRange.startColumn;
        delete single.primaryLocation.textRange.endColumn;
      }
      issueArray.push(single);
    }
    out.issues = issueArray;
    return JSON.stringify(out) + "\n";
  }
}

formatter for codeclimate:
import {Issue} from "@abaplint/core";
import {IFormatter} from "./_iformatter";
import {createHash} from "node:crypto";

function md5(content: string) {
  return createHash("md5").update(content).digest("hex");
}

export class CodeClimate implements IFormatter {

  public output(issues: Issue[], _fileCount: number): string {
    const out = [];
    const defaultSeverity = "info";
    const severityArray = ["info", "minor", "major", "critical", "blocker"];

    for (const issue of issues) {
      const single = {
        type: "issue",
        check_name: issue.getKey(),
        description: issue.getMessage(),
        categories: ["Code Quality"],
        location: {
          path: issue.getFilename(),
          lines: {
            begin: issue.getStart().getRow(),
            end: issue.getEnd().getRow(),
          },
        },
        severity: ( severityArray.includes(issue.getSeverity().toLowerCase()) ) ? issue.getSeverity().toLowerCase() : defaultSeverity,
        fingerprint: md5(issue.getKey() + issue.getMessage() + issue.getFilename() + issue.getStart().getRow() + issue.getEnd().getRow()),
      };
      out.push(single);
    }
    return JSON.stringify(out) + "\n";
  }

}

both of those are commercial offerings, if you like to support the project I recommend using https://github.com/marketplace/abaplint

@boommaker17 what is your affiliation?

We are using magenta cicd(gitlab) https://devops.telekom.de/en and sonarqube community edition and would like to integrate abaplint in our already existing continious integration pipelines

thanks, I do suggest supporting the project if starting to use it, we also offer commercial support

Thank you:)

I'll publish it as 2.102.57 later today, https://github.com/abaplint/abaplint/pull/3129 must first run through the regression test

2.102.57 published


Store data in own directory

Problem
After every restart of the docker container all data stored in ideas.json and users.json is lost.
Idea
We need to have the files at a location that can be mounted into the container, so that it can be persisted.
Implementation
I moved the files to a dedicated data directory, stored at /app/data.
The files are read from the directory /app/data instead of ./ as previously.
The path /app/data can now be mounted into the docker container and the ideas.json and users.json are persisted.
When a directory is mounted into a docker container, the directory of the host overrides the directory in the container.
Using a predefined users.json and ideas.json was not possible before, as mounting the directory from the host would override the directory (and thus the files) in the container.
I additionally implemented the prepopulation of the files with the default values programatically.
Other
This merge request should also fix this issue: https://github.com/icbestCA/giftmanager/issues/9#issue-2485308802

So this is a problem with the permissions? So you suggest to mount the data folder in a location with controlled permissions?? If so, we will also need to modify the docker script with the backup system.
Thanks I will look into that.

No, its not a permission problem but how docker containers work.
When you stop a container, all data is wiped. On restart of the container, the container is in its original state. So by stopping the container, the content of the users.json and ideas.json was lost.
To persist data in a container, you have to mount a directory from the host (your PC) into the container.
This is now possible by using the /app/data directory.
See:
https://docs.docker.com/engine/storage/
https://docs.docker.com/engine/storage/volumes/

BTW: Thank you for the nice app! I was looking for a gift manager for a long time, but never had time to implement it myself! Keep up the good work!

What you additionally gain by using this approach is, that you don't have to backup data anymore. Everything is already persisted in the mounted directory of the host, so no backups needed.

Hey,  thank you for the feedback! I fixed the f-strings as per your stacktrace.
Can you please try running it in Docker again?

Can you maybe add the Dockerfile to the repository so that I can build and test it myself?

The dockerfile is in this repo. https://github.com/icbestCA/dockergiftmanager
I will merge it with the main later this day. Because the app.py file is different from the flask app, I will make a separate folder. But for now you can take it on the other repo, it's the one I use.

Thanks!! I've used your code but added it to a new folder. Thank you, I've pushed the new docker image.


Intel Management Engine & AMD Secure Technology

Backdoor in computers
https://www.youtube.com/watch?v=Lr-9aCMUXzI
You should also make people aware of Firmware Blobs

Alternative seems to be https://en.wikipedia.org/wiki/RISC-V
Is there anything known for ARM architecture?

I don't see why this YouTube video is related to AMD.
Also the video description recommend NordVPN as protection.
Seriously?

I asked Purism when they started producing Intel-based machines why the hell they were supporting Intel and its M.E.  They had an /oh shit/ panic moment because they did a bunch of Intel development without knowing about the ME.  They refused to throw away the work they had done.  Eventually someone worked out how to "disable" (*) ME and Purism took that idea and ran with it - using marketing that kind of implies that Purism did the work.  The big problem is not taking credit for someone elses work, but rather that Purism continued to support Intel.  Of all chip makers Intel (founder of ALEC) is the most unethical.  So Purism is leading consumers to feed the worst player because they don't want the effort of changing directions to favor ethics.
(*) disable is in scare quotes because ME is never fully disabled.  It must run to boot the chip, but post-boot it can be disabled to some extent.
Arm
Arm has Trustzone, which is the same problem as ME.  But Arm has multiple producers which at least means there's a competition of pricing and ethics.
AMD
AMD also has a Platform Security Processor, which uses Arm's Trustzone.
Privacy and freedom comparison
Intel chips have always been non-free proprietary closed-source.  AMD had a moment of enlightenment where their code was open source for a window of time and this benefited libreboot, which ended in 2013.  All modern chips (x86, amd, arm) are spy chips, and all have a non-free blob.  So strictly in terms of the nuts and bolts of privacy it makes sense to condemn all post-2008 Intel chips and post-2013 AMD and ARM.  If someone must have a modern chip, all chips are equally at risk for privacy abuse AFAIK.
In this situation, ethical consideration needs amplification.  Intel is the most insidiously under-handed and bent against individual consumers.  So I boycott Intel, which also means I will not buy a Purism laptop.  Shame on Purism for discarding ethics in their decision.

So the Purism team use Intel because of better marketing (disable ME shit)?
Ridiculous

I'm not sure why Purism chose Intel in the first place, but often people favor Intel if they're performance junkies.  I was already boycotting Intel before the ME scandal hit on ethical grounds.  Why Purism stuck with Intel is likely because they already invested effort into it.. but I can only guess.  Maybe it goes back to whatever their original reason for choosing intel was.
It would be important to Purism to be able to disable ME/PSP/Trustzone.  PSP can also be disabled in the BIOS and the latest UEFI, and the AMD approach is better documented.  Not sure about trustzone.

Intel ME is a chip, a piece of hardware with its own OS, Minix, that totally bypasses windows or any other OS the users install above it. It can communicate with less known protocols as I2C and so Purism users do not have "complete visibility into the deeper levels" of their computers.
Removing any intel related software, service and drivers does nothing to the OS into the ROM of the chip.
The way to go is to flash the ROM, like this.

I agree that purism should largely be avoided where possible, since it is possible to get an x86 based computer which provide more software freedom, for alot less money. Cryptogs.de for example. For modern computers, one could take a look at the Talos II and the Talos lite from Raptor, these computers are based upon the power 9 architecture and allow you to run a fully libre stack. These are sadly still expensive machines, soon the Blackbird, also from raptor, will be released and will be about the price of a high end gaming desktop.
Anyway about hardware freedom on x86, This is impossible going forward. The nasty thing is that even if one where to copy Intel ME bit for bit perfectly, they wouldn't be able to use it because the computer will force shutdown after exactly 30 minutes. This is because the code is not signed by intel. Sure, Purism could claim the are "actively working with Intel", but this is just false hope. Even Google has tried to open up intel ME and didn't succeed. If a immensely powerfull mega corperation like Google cannot convince Intel, then a tiny laptop OEM like Purism won't stand a chance.
As for now: if you have alot of money to burn, one could buy a Talos machine and run debian on it. If this is not the case, one will have to settle with an older x86 machine with libreboot to have full hardware freedom, atleast until alternative architectures like RISC-V (look at Sifive) or power 9 (look at Raptor) are more in the reach of the general population.

I have heard something interesting about AMD, their richland processors:
https://freundschafter.com/cybersecurity-cpu-and-system-alternatives-without-intel-me-iamt-and-amd-psp-secure-technology/
IF this is true, the richland processors can be used without a non-free bios, if people do the work of liberating them completely.

You can always partialy deblob Intel ME/TXE firmware images with me-cleaner but it does require external flashing

I think at this point it's really something we can't give advice about. ME can only be partially cleaned on some processors.
It's also a very experimental area, which is subject to permanently damage your device if you don't know what you're doing.
There aren't really any products to recommend. The closest would be the librem laptops.

@tya99 Librem use Intel too. Even if they fully can circumstances ME, you have still the much Intel security problems.
And old CPUs: same problem with security holes aka Sidechannel attacks
So I still recommend AMD

@tya99 Librem use Intel too. Even if they fully can circumstances ME, you have still the much Intel security problems.

Yeah I know they use Intel. Part of the reason they're 7th gen and not 8th gen is because of the related progress on disabling ME on 8th gen hadn't progressed as far as it needed to put that on the market.

And old CPUs: same problem with security holes aka Sidechannel attacks
So I still recommend AMD

Some of the vulnerabilities haven't effected AMD this is true. However PSP is also not open so there could be something lurking there.
I guess in coming years we will find out, particularly as Ryzen is becoming popular in the desktop market. Unfortunately Intel is still very common in the mobile, server markets.

System76 is offering several laptops with coreboot and their pop os - i'm waiting to hear from them about coreboot status regarding their Thelio towers


Add a new system config 'enable_jit'

Which issue(s) this PR fixes:
N/A
What this PR does / why we need it:
This adds a new option to enable Ruby JIT in worker processes.
Here is an example configuration:
<system>
  workers 3
  enable_jit true
</system>

The exact JIT strategy (in particular, mjit or yjit) will be chosen
by Ruby as it sees fit. See the following ticket for details:
https://bugs.ruby-lang.org/issues/18349
Docs Changes:
https://github.com/fluent/fluentd-docs-gitbook/pull/422
Release Note:
Add a new system configuration enable_jit

The good news is that Ruby JIT made Fluentd 10%-20% faster on my Ubuntu
22.04. Here is the summary of my experiments:

The not-so-good news is that it's still somewhat experimental. In fact,
I observed some segmentation fault with Ruby 3.1 + YJIT.
While the particular SEGV bug seems to be already fixed in Ruby's
latest master, I think we should use this feature wisely.

Thanks for the fix!
I'm not sure about Ruby JIT, but I don't see any problem with this fix.

Here is the summary of my experiments (with tail + ltsv parser)

@fujimotos Do you happen to have the benchmark script still? I'm interested in running the same thing if possible.


cannot read property address of null on Node-RED restart

I am unable to re-produce this issue so investigation continues. I currently use RED.server.address().address but this should always return a value. Investigation continues, please add a comment for the issue if you have any thoughts to resolve this issue. Workaround solution : currently a Re-deploy of the flow is required in order to run GraphQL in node after Node-RED restart.

I verified this is not only applicable to the Docker image.. on a new Ubuntu installation with fresh node-red install, the same issue occurs.

RED.server.address() is null because RED.server.listening = false . I am not sure why would server.listening return false. Anyway I do not need to use it and instead used RED.settings.uiHost and RED.settings.uiPort which should always return the same thing.


B 19997 INT - V2

B-19997
Original Integration Review
Summary
This task creates the standalone shipment functionality for the office app, and the UI for the TIO role. When a standalone shipment is part of a payment request, it will be displayed with a '- Standalone' tag on it to alert the TIO. Additionally, when they are reviewing the payment request it will be noted there that the shipment is a standalone, and in the calculation details it will display the Standalone Payment Cap, which is currently 1000$. Any Standalone Domestic Crating service item should not exceed this cap regardless of how large the crate is.
Additionally, the 'show calculations' button when reviewing this shipment should display the 'Uncapped Request Total'. This is the total as calculated before the cap was applied.
Verification Steps for the Author
These are to be checked by the author.

[ ] Tested in the Experimental environment (for changes to containers, app startup, or connection to data stores)
[ ] Have the Agility acceptance criteria been met for this change?

Verification Steps for Reviewers
These are to be checked by a reviewer.

[x] Has the branch been pulled in and checked out?
[x] Have the BL acceptance criteria been met for this change?
[x] Was the CircleCI build successful?
[x] Has the code been reviewed from a standards and best practices point of view?

Setup to Run the Code

Instructions for starting storybook
Instructions for starting the MilMove application
Instructions for running tests

How to test
Setup: Run db_dev_fresh to ensure db changes are in place
Note: When testing I found that many of the service items for existing data are not complete, and will cause the creation of a payment request to error out. To test a payment request with multiple service items it is easiest to just create them yourself.

Access the Office app

Login to the Prime Sim

Add a domestic crating service item with the standalone box checked.

Login as a TOO

Find the Move you edited in the Prime Sim

Approve the newly created Service Item

Login to the Prime Sim

Navigate to the previously edited move

Create a payment request that includes the Standalone crating item you created

Login as a TIO

Find the move you edited in the Prime Sim

Navigate to the payment requests tab

Note that the Domestic crate service item you created has '- Standalone' after domestic crating

Review the payment request

Note that the Domestic crate service item you created has '- Standalone' after domestic crating in the payment request review

Click on calculations to view the calculations

Note that the Uncapped Request Total is displayed

Note that the standalone payment cap is displayed

Frontend

[ ] There are no aXe warnings for UI.
[ ] This works in Supported Browsers and their phone views (Chrome, Firefox, Edge).
[ ] There are no new console errors in the browser devtools.
[ ] There are no new console errors in the test output.
[ ] If this PR adds a new component to Storybook, it ensures the component is fully responsive, OR if it is intentionally not, a wrapping div using the officeApp class or custom min-width styling is used to hide any states the would not be visible to the user.
[ ] This change meets the standards for Section 508 compliance.

Backend

[ ] Code follows the guidelines for Logging.
[ ] The requirements listed in Querying the Database Safely have been satisfied.

Database
Any new migrations/schema changes:

[ ] Follows our guidelines for Zero-Downtime Deploys.
[ ] Have been communicated to #g-database.
[ ] Secure migrations have been tested following the instructions in our docs.

Screenshots

Warnings

:warning:
This PR does not include changes to unit tests, even though it affects app code.

  Generated by :no_entry_sign: dangerJS against 9e2aeb2eca56390e815350dbcf91a0c36620365c


docs don't show example code blocks?

both firefox and chrome

We are working on a fix.

Fixed. Thanks for reporting!!!


Sign in with Google does not work correctly on macOS

Describe the bug
Sign in with Google do not set current user on macOS
To Reproduce
Steps to reproduce the behavior:

Call

GoTrueClient().signInWithOAuth(
        Provider.google,
        redirectTo: '',
      );

method.
2. Select needed account in opened browser window
3. After selecting it redirects us to local-host with error page (see screenshot)
Expected behavior
It must authenticates us inside app and set currentUser for supabase client
Screenshots

Version (please complete the following information):

supabase_flutter - 1.4.0
supabase - 1.5.0

Additional context
signInWithOAuth() method returns true, but does not set currentUser
Also everything works correctly for another platform (web)

@solid-oleksandrhordiienko
In order to complete sign-in using OAuth on platform that is not web, you need to configure deep links.
Please refer to the steps here on how to complete those steps.
await supabase.signInWithOAuth(
        Provider.google,
        redirectTo: '[YOUR_SCHEME]://[YOUR_AUTH_HOSTNAME]',
      );

@dshukertjr Thanks!


[Suggestion] Speedup archive.org sources with torrent?

What do you think of speeding up archive.org files with torrent? aria2 supports BitTorrent protocol.
They have excellent amount of seeds, along with web seeds from archive.org mirrors.
Maybe this can be opt-in by a variable. Using this will make archive.org sources the fastest.

if you add BitTorrent support be sure to add the iso URL as a web seed to keep availability at 100%.

archive.org usually has webseeds.
But I don't think webseeds are even required for this application, since the files are popular, and I have seen more than 500 active seeds. Even behind a NAT, my internet connection gets saturated pretty quickly. This is a huge contrast to archive.org, which doesn't really seems to have well distributed mirrors. The mirrors seem to be in North America only.


Background layers processor

Added Processor for adding background layers to a map. See #231 for details.

I added some comments, but this is looking good!
Will this PR also close #230? Or do you still want something generic (for what use-case)?

Looks good but shouldn't he also be able to add overlay ?
Sometimes we want to add a graticule, watermark, or something else generated by the WMS server, ...

I have updated this PR so that it can do overlays or background layers.  But unfortunately I rebased onto develop and lost the comments of @tsauerwein
@tsauerwein do you remember your comments?  Or perhaps you can re-review this?  I need this for the sogelink.

My original comment (which was lost) was about the dependencies in mapfish-spring-processors.xml, which you addressed already. So it looks good to me.


Break down the API Documentation page

I'm using the API Documentation page and its length is make it difficult to use. Streams are a complicated subject, and it doesn't help that their documentation is on the same page with the other features.
In the beginning of the page you have an "API overview" section with 7 bullets, I suggest that the division to pages be roughly as that of the bullets.

That's a great idea, would you like to make a PR for that?
The main API page could have this (without :members:!):
.. automodule:: sounddevice

And then a toctree directive with the sub-pages.
Most of the current API page is already split into separate pieces, so it should be easy to create separate pages.

Can you please give me the code needed to build the documentation locally?
I tried this snippet that I found in .travis.yml:
python setup.py build_sphinx -b linkcheck -W

But I got this error:
C:\Users\Administrator\Documents\Python Projects\Third-party\sounddevice\doc\index.rst:5:toctree conta
ins reference to document 'CONTRIBUTING' that doesn't have a title: no link will be generated

The command you used doesn't actually build the HTML files, it only checks if all the links are still valid.
Here are the instructions for building the docs: https://github.com/spatialaudio/python-sounddevice/blob/master/CONTRIBUTING.rst

This was fixed in #207.


Top tweets pulls German tweets only

I was thinking about only pulling top tweets regarding the subject I am interested in performing sentiment analysis on. Pulling these kinds of tweets will express sentiment among influencers. This can be a powerful and time-saving feature, but I have no luck with it so far. Every time I use it, a majority of the tweets I pull are in German even though I was searching for top tweets about Trump.
Any help with this issue would be much appreciated.

I solved this problem by modifying the file /got/manager/TweetManager.py
At line 106 there should be a line like this:
"https://twitter.com/i/search/timeline?q=%s&src=typd&max_position=%s"
To have the tweets in English, you can modify this line like this:
"https://twitter.com/i/search/timeline?q=%s&l=en&src=typd&max_position=%s"
Probably for other language you can play by changing "en" with another language.
Let me know if this solve your issue too.


Systemd service state detection fails

Description
Systemd service state detection fails due to a missing double splat here and the options hash as a string is passed to the systemd cli command as a service name which causes it to attempt to resolve the pair of braces to a service name alongside the correct service name.
Chef Version
Chef 17+
Platform Version
Anything systemd. Tried with CentOS, Fedora, Debian, Ubuntu.
Replication Case
Service resource set to disable an enabled service, stop a running service etc. Anything that causes the initialise service state to be incorrect.

I wonder if this also caused another issue. I used to have service "sshd", I had to change them all to "ssh". About a few days ago, it started failing with an error about how it wouldn't enable an alias. Is that related?


OADP-2047: Make data mover dummy pod configurable

/test 4.11-operator-unit-test

/test 4.10-operator-unit-test

/test 4.11-operator-e2e-gcp

To be merged with https://github.com/migtools/volume-snapshot-mover/pull/228