BrokerMetadataEventManager, {Broker,Topic}RecordProcessor implementations

Thanks for this, @rondagostino!  It's a good start.
Keep in mind, the events that we're dealing with here are the ones from KIP-631: BrokerRecord, IsrChange, ConfigRecord, etc.  So unfortunately we won't just have anything like UpdateMetadataRequest (that RPC is going away).
I guess we could try to transform the KIP-631 records into UpdateMetadataRequests, but doing the reverse transfomration might be more forward-looking, since UMR is going away eventually.  Or, another approach would be to have separate update paths for UMR and the KIP-631 records.
I think eventually we will need the offsets of these records.  @hachikuji , what's the best way to get this?

@cmccabe @hachikuji I currently recalculate the MetadataSnapshot every time we process a TopicRecord within a batch.  I believe I can avoid doing that.  Let me add that, and then would be a good time fora review.

@cmccabe @hachikuji This is now ready for a formal review.  Unit test coverage is 86%.  I will work on the next ticket in a separate PR, so I will not modify this one going forward except to respond to review comments.

Thanks for working on this, @rondagostino !  Very ambitious.
I'd like to understand a little bit more about what role the Basis stuff plays.  It seems to be part of an effort to make the changes transactional (or maybe I'm misunderstanding...)  But maybe we can do this an easier way?  I was thinking maybe we could just identify which records needed to be sent to which listeners, and then send each listener a list.
So if we have records A, B, and C in the batch, maybe we determine that A and B go to listener 1, and B and C go to listener 2.  Then each listener just gets a List[ApiMessage] which they can apply.
The code won't mutate the records, so it's fine for multiple listeners to get the same record.  So then in that case, you don't need to create a Basis, etc. but you can just apply a list of records all at once.
Maybe I'm misunderstanding something about Basis, though... this is just my initial thought after not much research into the PR.

@cmccabe Yes, Basis makes things "transactional" in the sense that the processor applies the message(s) you give it to a basis that you provide, and the processor returns a new basis that contains the changes it made.  Then the metadata event manager writes the basis when it's done (or it hands the basis to other processors so they apply their changes on top of that basis, and then the manager writes all the changes together at the end).
So the flow is the BrokerMetadataEventManager accepts  aBrokerMetadataEvent to be enqueued:
/**
 * A batch of messages from the metadata log
 *
 * @param apiMessages the batch of messages
 * @param lastMetadataOffset the metadata offset of the last message in the batch
 */
final case class MetadataBrokerMetadataEvent(apiMessages: List[ApiMessage], lastMetadataOffset: Long) extends BrokerMetadataEvent

Then the manager sends it to its MetadataEventProcessor for processing:
trait MetadataEventProcessor {
  def processStartup(): Unit
  def process(apiMessages: List[ApiMessage], lastMetadataOffset: Long): Unit
  // note the absence of processShutdown(); see ShutdownEvent above for why it does not exist.
}

The default implementation of the event processor is BrokerMetadataEventProcessor.  It looks at the batch and sends the messages out to the various individual ApiMessageProcessor implementations.
Here's the trait for the individual processors (what I think you are referring to as "listeners", but let me know if you are referring to something else):
trait ApiMessageProcessor {
  /**
   * Process a single message
   *
   * @param brokerMetadataBasis the basis upon which to process the record
   * @param apiMessage the record to process
   * @return the resulting basis
   */
  def process(brokerMetadataBasis: BrokerMetadataBasis, apiMessage: ApiMessage): BrokerMetadataBasis

  /**
   * Process a list of messages
   *
   * @param brokerMetadataBasis the basis upon which to process the records
   * @param apiMessages the records to process
   * @return the resulting basis
   */
  def process(brokerMetadataBasis: BrokerMetadataBasis, apiMessages: List[ApiMessage]): BrokerMetadataBasis = {
    // The default behavior is to process each message individually.
    var basis = brokerMetadataBasis
    apiMessages.foreach(apiMessage => basis = process(basis, apiMessage))
    basis
  }
}

We could eliminate the transactional capability and have the individual processors (aka listeners) apply the changes directly.  The code would be more straightforward.  The new trait might look something like this:
trait ApiMessageProcessor {
  /**
   * Process a single message
   *
   * @param apiMessage the record to process
   */
  def process(apiMessage: ApiMessage): Unit

  /**
   * Process a list of messages
   *
   * @param apiMessages the records to process
   */
  def process(apiMessages: List[ApiMessage]): Unit = {
    // The default behavior is to process each message individually.
    apiMessages.foreach(apiMessage => process(apiMessage))
  }
}

The key questions is, of course, do we need an ability to apply a batch of messages from the metadata log in an all-or-nothing fashion with the ability to abandon the entire batch if anything in the batch fails to process?  If not, then something like Basis is not required and I can remove it.

Thanks, @rondagostino.  This is looking pretty good with the latest revisions.
One thing I was wondering about is, don't we sometimes want to register a listener that intercepts multiple types of record?  For example, it seems like the TopicRecordProcessor would probably also want to handle addPartition events (that show up as partition records).  They're going to be very, very similar to events that add a topic.
So really maybe it's more like the MetadataCacheListener, and it handles all the records that cause a change in the metadata cache?  I think BrokerRecord, IsrChange, PartitionRecord, TopicRecord will all change the MetadataCache, and it might be cleaner just to have one listener that handles all of them.  We can always have multiple listeners registered for a type -- for example, IsrChange probably also needs to hook up with the replication code, in case we got removed from an ISR we were in.
We could have something like the listeners declaring all the types of records they care about, and then the queue using that to build a map from event type to a list of listeners.
Off the top of my head we might break it down like this:
AccessControlRecord -> a listener that updates the Authorizer cache
BrokerRecord -> a listener that updates the MetadataCache
ConfigRecord -> a listener that updates our cached configuration stuff (well probably, a manager that is responsible for caching all dynamic configs)
FenceBrokerRecord -> metadata cache, replication manager
IsrChange -> metadata cache, replication manager
PartitionRecord -> metadata cache, replication manager
TopicRecord -> metadata cache, replication manager
Hmm...

@cmccabe I was going to work on PartitionRecord and IsrRecord next, in a separate PR.  That'll probably make what you are referring to above apparent to me.  I think we have a couple of options.

Review/merge this PR as it stands now, and evolve the code as required with the Partition/IsrRecord PR
Expand this PR to include Partition/IsrRecord and review it once that is integrated -- including any appropriate adjustments as alluded to above.

What do you think?

LGTM


move grammar to a JS variable

we don’t have filesystem access in a browser env
there is also a way to generate the grammar JSON, but then we would need a build step

it's even possible to remove jison completely after generating the parser: http://zaa.ch/jison/docs/#using-the-generated-parser

hmm, this actually doesn't work. Looking at a different solution.


update to hide detail listing initially

Closes #39

Regression testing of aetimelines has been completed in all browsers and no issues were found.


Increase number of unit numbers available for OMP file opening

Needs testing and approval by @rthedin before merging
Feature or improvement description
We were having problems with the !OMP directives around high resolution file reading in AWAE.f90. Since the file reading starts with a call to GetNewUnit before starting the opening, parallel calls to GetNewUnit could result in the same unit number handed out to two processes.  The first process would open the file and start reading, but then the second process would open a different file with the same unit number causing read errors for both processes as they attempted to read the same file at the same time.
To resolve this, an optional start unit number is added to GtNewUnit.  This optional argument is propagated up through to the calls within the !OMP loop where a N*100 is used as the starting unit number for the search (where N is the turbine number).  Theoretically this will solve the parallel file reading issue from AWAE.
Routine changes:
GetNewUnit

Increased maximum unit from 1024 to 64k (likely won't be an issue since most times where more than 1024 files are needed will be on supercomputers where the unit number limit is really high)
optional argument for starting unit number.  Defaults to old behaviour when not present. ReadLowResWindFile
optional argument for starting unit number.  Defaults to old behaviour when not present. ReadHighResWindFile
optional argument for starting unit number.  Defaults to old behaviour when not present. AWAE UpdateStates
call to ReadHighResWindFile includes nt*100 as the start unit number

Related issue, if one exists
There may be several FAST.Farm issues related to this, but it is unknown at the moment.
Impacted areas of the software
FAST.Farm AWAE module file reading of high-res VTK files inside the !OMP directive in UpdateStates
Additional supporting information

Closing this in preference of the simpler solution in #2340


cmake: Toolchain abstraction: Abstraction of compiler warning flags

The intent here is to abstract Zephyr's dependence on toolchains,
thus allowing for easier porting to other, perhaps commercial, toolchains
and/or usecases.
No functional change expected.

Part of #16031

@andrewboie The reasons for the split into the separate files, instead of just one, are:

To keep as much visible as possible from the CMakeLists.txt, here mostly the -DW macros.
To keep in line with the way the previous toolchain abstractions has been implemented, for example the optimization and cpp dialect flags, just to mention a few.
and to make it possible to keep common flags in one file and more specific ones in another. This to limit the number of files which requires change in cases where the flags needs update, thus change one file instead of many.

@andrewboie The reasons for the split into the separate files, instead of just one, are:

To keep as much visible as possible from the CMakeLists.txt, here mostly the -DW macros.
To keep in line with the way the previous toolchain abstractions has been implemented, for example the optimization and cpp dialect flags, just to mention a few.

We have optimization settings for a single toolchain spread across multiple files? Where?

and to make it possible to keep common flags in one file and more specific ones in another. This to limit the number of files which requires change in cases where the flags needs update, thus change one file instead of many.

This is needlessly confusing, if I want to see or modify the warning options for GCC I should not have to dig through 3 different small files, put all the warning options for GCC in one file please

@andrewboie The dw macros I can move to the warning_base file, as they are common to current toolchains. I was referring to separation into dw macros and placing them into a separate file, regarding the optimization and cpp dialect flags.
Concerning the extended warning flags, they really need to be in a separate file, otherwise all of the flags common to most toolchains needs repeat in the toolchain(s) which need add of a few flags. See difference between the extended flags for cpp and clang. This means that x files needs edit, instead of one, which is less desirable than having to look into two files for the warning flags.

@daor-oti can you please rebase against the latest master? @mped-oticon and @aescolar can help out I am sure

@carlescufi Sure thing, sorry for the inconvenience.

Hi @andrewboie , It would seem @daor-oti has addressed your concerns, would you be so kind as to take another look, or dismiss your review?


Added LOCAL_PEERPID/LocalPeerPid sockopt for macos

macOS has a badly documented LOCAL_PEERPID sockopt that can be used to retrieve the PID of the connected peer.

@asomers absolutely. I added a test and changelog entry.

I added ios to the conditional compilation and seems like the tests pass.


Installation on rPI (Node V11.1)

Just tried to install on brand new rPI 3 b+. Got the following almost at the end of installation.(entire screen output)
pi@raspberrypi:~ $ git clone https://github.com/SignalK/signalk-server-node.git
Cloning into 'signalk-server-node'...
remote: Enumerating objects: 101, done.
remote: Counting objects: 100% (101/101), done.
remote: Compressing objects: 100% (88/88), done.
remote: Total 7063 (delta 36), reused 33 (delta 11), pack-reused 6962
Receiving objects: 100% (7063/7063), 6.97 MiB | 85.00 KiB/s, done.
Resolving deltas: 100% (4513/4513), done.
pi@raspberrypi:~ $ cd signalk-server-node
pi@raspberrypi:~/signalk-server-node $ npm install
(node:4565) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
npm ERR! Error: Method Not Allowed
npm ERR!     at errorResponse (/usr/share/npm/lib/cache/add-named.js:260:10)
npm ERR!     at /usr/share/npm/lib/cache/add-named.js:203:12
npm ERR!     at saved (/usr/share/npm/node_modules/npm-registry-client/lib/get.js:167:7)
npm ERR!     at FSReqWrap.oncomplete (fs.js:135:15)
npm ERR! If you need help, you may report this entire log,
npm ERR! including the npm and node versions, at:
npm ERR!     http://github.com/npm/npm/issues
npm ERR! System Linux 4.14.79-v7+
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! cwd /home/pi/signalk-server-node
npm ERR! node -v v8.11.1
npm ERR! npm -v 1.4.21
npm ERR! code E405
npm ERR! fetch failed https://registry.npmjs.org/lint-staged/-/lint-staged-8.1.1.tgz
npm ERR! fetch failed https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz
npm ERR! fetch failed https://registry.npmjs.org/compression/-/compression-1.7.3.tgz
npm ERR! fetch failed https://registry.npmjs.org/spdy/-/spdy-4.0.0.tgz
npm ERR! fetch failed https://registry.npmjs.org/baconjs/-/baconjs-1.0.1.tgz
npm ERR! fetch failed https://registry.npmjs.org/express/-/express-4.16.4.tgz
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /home/pi/signalk-server-node/npm-debug.log
npm ERR! not ok code 0

Your npm is extremely old for some reason:

npm ERR! npm -v 1.4.21

https://github.com/SignalK/signalk-server-node/blob/master/raspberry_pi_installation.md

yea, re-install everything from scratch.It works now. Thank you


Let the configuration keys be configurable

Use this query to search for the most popular feature requests.
Is your feature request related to a problem? Please describe.
Configuration keys are hard-coded and are an issue when, for example, the password is stored in a Key Vault, when its name is not MicrosoftAppPassword
Describe the solution you'd like
Change the ConfigurationServiceClientCredentialFactory to make the configuration keys configurable.
Describe alternatives you've considered
Extending the class wouldn't work and it would be advantageous to keep the logic of this class intact.

Hi @vbossica,
Thank you for the suggestion. At this time, we are not planning to make this change in the SDK. However, you are of course completely free to modify and/or extend the framework as you see fit for your implementation.


1 RenderIndex can be tied to 1 or multiple RenderDelegates?

https://graphics.pixar.com/usd/files/Siggraph2019_Hydra.pdf, page 12 says mulitple.
renderIndex.h says single HdRenderDelegate.

That is a good point, and I believe the code documentation is correct for now, and the presentation is out of date. Specifically, GetRenderDelegate states:

Currently, a render index only supports connection to one type of render delegate, due to the inserted information and change tracking being specific to that delegate type.


audio quality changes - starts minimal echoing

Description
I have never noticed this, but a few customers of mine have mentioned that the audio quality changes. When investigating I noticed that the audio seems to be totally off.
Steps to reproduce
http://clooud.co/media/bad-club-mix-916 play in the browser and then download the file and play in your local player. It is more noticeable starting around 1:00 to 1:12.
When I use the HTML5 audio player or disable wavesurfer the audio plays as desired.
Any ideas on what could cause this?
Additional Information
Please include any additional information necessary here. Including the following:
versions
videojs/wavesurfer
videojs 5.19.2 and videojs-wavesurfer's responsive branch.
browsers
Chrome 58
OSes
macOS

@Chinese1904 are you familiar with ffmpeg? It comes with a tool called ffprobe that analyzes the audio file. Can you run ffprobe on the audio file and paste the output here?

Thanks for the quick response!
Sure it is:
ffprobe bad-club-mix-916.mp3
ffprobe version 3.3 Copyright (c) 2007-2017 the FFmpeg developers
  built with Apple LLVM version 8.1.0 (clang-802.0.42)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/3.3 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-libfreetype --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --disable-lzma --enable-vda
  libavutil      55. 58.100 / 55. 58.100
  libavcodec     57. 89.100 / 57. 89.100
  libavformat    57. 71.100 / 57. 71.100
  libavdevice    57.  6.100 / 57.  6.100
  libavfilter     6. 82.100 /  6. 82.100
  libavresample   3.  5.  0 /  3.  5.  0
  libswscale      4.  6.100 /  4.  6.100
  libswresample   2.  7.100 /  2.  7.100
  libpostproc    54.  5.100 / 54.  5.100
Input #0, mp3, from 'bad-club-mix-916.mp3':
  Metadata:
    album_artist    : David Guetta & Showtek
    title           : Bad (Club Mix)
    comment         : dirrtyremixes.com / rmxlvrs.com
    genre           : Underground / Club / Progressive
    encoded_by      : masspool djs promo music dj pool
    artist          : David Guetta (and Showtek feat Vassy)
    composer        : `
    album           : Bad - Remixes
    date            : 2014
  Duration: 00:04:31.15, start: 0.025056, bitrate: 321 kb/s
    Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 320 kb/s
    Metadata:
      encoder         : LAME3.99r
    Stream #0:1: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 320x320 [SAR 72:72 DAR 1:1], 90k tbr, 90k tbn, 90k tbc
    Metadata:
      comment         : Cover (front)

David Guetta! No, I can't help you in that case.

Just kidding, it's MP3. With coverart. Can you convert it to another format, e.g. .wav and see if it still happens?

I converted it via ffmpeg -i bad-club-mix-916.mp3 song.wav and it started sounding really "bad". Haha
I also tried converting it with -acodec pcm_u8 -ar 22050 and same result :(

I've tested it on firefox/ubuntu 16.04 and it immediately, from the 1st second, starts playback of 2 tracks on top of eachother. Your JS creates multiple instances is my guess.

Wow, sorry for your time. I have been looking at the wrong cause for the longest time. Thank you so much @thijstriemstra !

I had the same issue. For those who can't follow what is going on:
Instead of using the regular embedding code with sources,:
(function (window, videojs) {
if (player) {player.dispose()} else {var player}
var player = window.player = videojs('myPlayer',{
sources: [{
src: 'myaudio.mp3', type: 'audio/mp3'
}],
controls: true,
you have to remove the line with sources:[....] and only indicate the src in the plugins: waversurfer options. Otherwise, the audio file is loaded twice triggering an ever so slight delay between the two which gets worse when you replay the audio or move around in the timeline. Sound may triple or qua-triple that way.


Set ansible_become for the OSEv3 group

What does this PR do?
Because openshift-ansible requires root on the cluster nodes, but it
doesn't explicitly set it in the playbooks (like we do), let's set it
in our inventory instead of requiring to pass --become to
ansible-playbook.
That will simplify the installation steps as well as let us include
the provisioning and openshift-ansible playbooks in a single playbook.
How should this be manually tested?
Run end to end without passing --become to the openshift-ansible byo playbook (i.e. like it says in the readme now).
Is there a relevant Issue open for this?
Provide a link to any open issues that describe the problem you are solving.
Who would you like to review this?
cc: @bogdando @Tlacenka  PTAL

It works for me :) And I agree that it is useful for including openshift-ansible playbooks.


Add way to get updated status for a specific Torrent

Adds a GetStatus(Torrent) method to get updated stats about the progress of a Torrent

Pull Request Test Coverage Report for Build 82

23 of 33 (69.7%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+1.2%) to 44.282%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

rtorrent/rtorrent.go
23
33
69.7%

Totals

Change from base Build 79:
1.2%

Covered Lines:
333

Relevant Lines:
752

💛  - Coveralls


Determinate Progress Bar - numberbox improvements

Is this a totally new sample, an addition to an existing sample page, or a modification of an existing sample page?

[ ] New sample
[ ] Addition to existing sample
[x] Modification to existing sample

If this is an addition/modification to an existing sample page, which one?
ProgressBar
Describe the sample

The NumberBox with spin buttons could be improved by:
letting you press up even when there is no number in the box
- this could be fixed by setting the number to 0 by default
- note: when you type 0 in to that box, you have to un-focus on the box for it to be applied.
and by letting you press and hold on the spin buttons
Is your sample request related to a problem? Please describe it

Additional context

Regarding your second point about value not being applied when typing, this seems to be by design.


Train model on MNIST

Mode training on MNIST, achieve (Train-accuracy=0.8868562, Time cost=57.118s) v.s. python (Train-accuracy=0.942483, Time cost=57.206s). There's probably some bug in the implementation. I am trying to figure it out.
MXDataIter modification
Symbol::toJson

Maybe check the RNG? Thanks for completing EvalMetric! LGTM!


🌐 Add Japanese translation for docs/ja/docs/tutorial/dependencies/sub-dependencies.md

This PR translates the tutorial/dependencies/sub-dependencies.md to Japanese.
Please review tutorial/dependencies/sub-dependencies.md.
~Issue #1571 generates a new directory to support Japanese.
PR #1656 generates a new directory for tutorial.~
PR #1957 generates a new directoru for dependencies in tutorial.
I will fix dependency after ~#1571, #1656 and~ #1957 are merged.

@tokusumi
Thanks for your reveiw!!
Please check it out.

📝 Docs preview for commit 734d90227f0382a0bc67ee541889a41d8badf423 at: https://6499c4ed4a9646007dd7a740--fastapi.netlify.app

As this was made by @SwftAlpc and approved by @tokusumi, champions of the Japanese translations, I'm gonna merge this right away. 🚀  Thank you! ☕


WRKLDS-1231: csv: skip all supported versions

We need to skip all supported versions to maintain the upgrade path.

/override ci/prow/e2e-aws-operator


Address failing tests in CI

The tests test_add_year.py::test_add_year_cli and test_add_year.py::test_add_year start to fail seemingly randomly in various PRs on different OS e.g. here. Looking deeper, failing test are using pandas==1.4.0, passing tests are using e.g. pandas==1.1.5. With upgrading pandas to 1.4.0 locally these errors can be replicated, while with version 1.1.5 the test succeed.

The fundamental cause here is code that's not compatible with current pandas; the failing CI is only a symptom. The offending lines are: https://github.com/iiasa/message_ix/blob/1df3619a5223194171cc55197f65858ba62f16f2/message_ix/tools/add_year/init.py#L849-L851
ValueError: cannot set using a list-like indexer with a different length than the value

NB #494 was started to simplify these very long methods that mostly duplicate upstream features and are also quite slow, but I lacked clear tests for the expected behaviour for some combinations of arguments.

The fundamental cause here is code that's not compatible with current pandas;

Yes, was already checking where and how to adapt the code. Thank you for linking the PR!

https://github.com/iiasa/message_ix/pull/557#issuecomment-1048604890

It looks like there were several regressions related to pd.DataFrame.loc fixed in pandas 1.4.1: https://pandas.pydata.org/pandas-docs/stable/whatsnew/v1.4.1.html#fixed-regressions.

i.e. perhaps this is only with pandas 1.4.0 precisely.


please contact on discord if need more info: CASH#4989

Related Safe Addresses

Reasoning
After synchronize the above listed addresses, the addresses was funded by a single wallet in which same amount of ETH (0.001eth) were sent on different occasion to the addresses. the funding address is 0x20c05CF93223E39d75B6266b4044E2e5C588d089
Methodology
I used the traditionally method of searching transactions information on ether scan through address filtering. The proof that is, the transaction hash of each address will be listed below
The transaction hash of the following addresses;

0xa7ddf931092e03b3fdf3ac6711da1492ab4dbcc3e2b1493dc4473c710651cd7d
0xedb8edd94c24127d321952d2cf281aae0994a4a2949eaef4a01b5484944cd94e
0xf1d07f4e5429731723088155a7915436504422ffb2510458869d5d69df803bd4
0x540b9bb8e0fa1efdc467d019fe0117898cf22e1c4f624b459330caed40b3b6eb
0x6a0fc99094ebb8e057cb79684a694f1efd6b12cca157334095ee350b8f744cdb
0xd3f866aadfebbdd227690a504b2f5e2fda88e7ca3caa01e932e5c98d887a4c57
0x87c4a237d6d76121026c0b2e432ccfc01f3e084c61d24dab502273de3fa1d84c
0x32733eb29b82bca3759c230b19359bda0f2670499b36e563373370c22c0eb569
0x262ad036daee24c0dc576ec7509af1933cd4c320edd8124a5b2dc83a463923a4
0x37dc58f0836c87e0a6c75cd9a811cff4a650ddef37b2e74d0b837f48acfd17f8
0xb7ef00cfa5a7e97dddfe2594d7d87f7463fa83fee5682ba92e847f9ad4596631
0x7b784efb8979108b32a967205ab5577e6b23447438efe6d081d53eb39a5e32e5
0xaefbad3921a60c503eb2440af08777eb8363b592e4456be5237e2ebb59d3cc17
0x4f96e28fa298844669fcf709136a369cff6b1950283cf738674439ba7b6390f0
NOTE: There is work in progress.
SAFE SYBIL.xlsx

Safe Address

No Safe addresses have been provided. Closing since it doesn't meet the content requirements.


Incorrect overview for container package

Incorrect overview for container package

Hey @JonasBakys0 we would to make it more suitable.

Cool, can I try it? Can you assign me to this issue?


Prometheus metric labels

We are using Falco-exporter for prometheus metrics and Falco sidekick for it's AWS integration. But since Falco sidekick also exposes the falco_events metric we could use that and stop running Falco-exporter. But the metric from Falco sidekick is missing some essential labels like k8s_pod_name and k8s_ns_name.
Is it possible to add the same labels as in Falco-exporter?

Hello,
There was an issue with these labels, we fixed it and it will be available in upcoming release: https://github.com/falcosecurity/falcosidekick/blob/94fb46953627111e18b06b01d892d91d96807dd1/stats_prometheus.go#L45

Neat! I actually forgot to update the issue. The labels on audit events are different from other events, they don't have the k8s.pod.name and k8s.ns.name fields so the metrics end up without any specification to which pod/resource.
And i was comparing metrics from audit events with the metrics from falco-exporter.
Also in falco-exporter the metrics for audit events lack labels

These labels are not present in event from falco, for some rules we have ka.target.namespace, we might consider to add them.

audit logs have a different format, and labels which appear in falco events depends of fields used in the output of the rule.

@Annegies I forgot to mention it in 2.22.0 release, but it should be fixed now. Rules which use k8s.ns.name and k8s.pod.name in their outputs, will have these labels in Prometheus metrics.
See https://github.com/falcosecurity/falcosidekick/blob/94fb46953627111e18b06b01d892d91d96807dd1/handlers.go#L109
Tell me if everything works as expected for you. 🙏

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Provide feedback via https://github.com/falcosecurity/community.
/lifecycle stale


Merge in keystore_password in target server.env if present

Signed-off-by: Scott Kurz<EMAIL_ADDRESS>Fixes #1096
Note the change is a no-op if you have either a server.env in configDir or a serverEnvFile parm configured.

Thx for the review @cherylking  .. will wait to get more opinions:  @yeekangc @ericglau  if this change seems OK.

Also, if we make this change here, then we need to update Gradle the same way.

@cherylking I think it'd be OK to fix this in Maven, merge, open a ci.gradle issue but fix later.   I don't think anyone would soon complain about this as an inconsistency across Maven vs. Gradle.    I know .. there's always the risk that it just sits there and doesn't get done.   But what do you think?

Gradle issue:  https://github.com/OpenLiberty/ci.gradle/issues/587


pyogrio.errors.DataSourceError: No driver registered

We've been hitting into an issue on pyogrio not being able to detect GDAL drivers in our Sphinx docs build CI since two weeks ago (https://github.com/GenericMappingTools/pygmt/issues/3301), with errors like:

pyogrio.errors.DataSourceError: No driver registered.
pyogrio.errors.DataSourceError: Could not obtain driver: OGR_GMT (check that it was installed correctly into GDAL)

We're using geopandas=1.0.1 (pyhd8ed1ab_0) and pyogrio=0.9.0 (py312h8ad7a51_0) installed from conda-forge, which includes the OGR_GMT driver (installed in GDAL=3.9.0 (py312h86af8fa_5)). This issue has been very hard to reproduce, because things work when we test things directly, but fail when running the scripts with sphinx-build. E.g. this code example:
import geopandas as gpd
import pyogrio

pyogrio.list_drivers()
gdf = gpd.read_file(
    "https://www2.census.gov/geo/tiger/TIGER2015/PRISECROADS/tl_2015_15_prisecroads.zip",
    engine="pyogrio",
)

would consistently produce a pyogrio.errors.DataSourceError: No driver registered error when ran as part of sphinx-build:
{}
ERROR 4: No driver registered./lines... [ 85%] roads.py

Traceback (most recent call last):
  File "/home/user/mambaforge/envs/pygmt/lib/python3.12/site-packages/sphinx_gallery/gen_rst.py", line 975, in execute_code_block
    is_last_expr, mem_max = _exec_and_get_memory(
                            ^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/mambaforge/envs/pygmt/lib/python3.12/site-packages/sphinx_gallery/gen_rst.py", line 807, in _exec_and_get_memory
    mem_body, _ = call_memory(
                  ^^^^^^^^^^^^
  File "/home/user/mambaforge/envs/pygmt/lib/python3.12/site-packages/sphinx_gallery/gen_rst.py", line 1594, in _sg_call_memory_noop
    return 0.0, func()
                ^^^^^^
  File "/home/user/mambaforge/envs/pygmt/lib/python3.12/site-packages/sphinx_gallery/gen_rst.py", line 728, in __call__
    exec(self.code, self.fake_main.__dict__)
  File "/home/user/Documents/github/pygmt/examples/gallery/lines/roads.py", line 22, in <module>
    gdf = gpd.read_file(
          ^^^^^^^^^^^^^^
  File "/home/user/mambaforge/envs/pygmt/lib/python3.12/site-packages/geopandas/io/file.py", line 294, in _read_file
    return _read_file_pyogrio(
           ^^^^^^^^^^^^^^^^^^^
  File "/home/user/mambaforge/envs/pygmt/lib/python3.12/site-packages/geopandas/io/file.py", line 547, in _read_file_pyogrio
    return pyogrio.read_dataframe(path_or_bytes, bbox=bbox, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/mambaforge/envs/pygmt/lib/python3.12/site-packages/pyogrio/geopandas.py", line 261, in read_dataframe
    result = read_func(
             ^^^^^^^^^^
  File "/home/user/mambaforge/envs/pygmt/lib/python3.12/site-packages/pyogrio/raw.py", line 196, in read
    return ogr_read(
           ^^^^^^^^^
  File "pyogrio/_io.pyx", line 1239, in pyogrio._io.ogr_read
  File "pyogrio/_io.pyx", line 219, in pyogrio._io.ogr_open
pyogrio.errors.DataSourceError: No driver registered.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/user/mambaforge/envs/pygmt/lib/python3.12/site-packages/sphinx/cmd/build.py", line 332, in build_main
    app = Sphinx(args.sourcedir, args.confdir, args.outputdir,
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/mambaforge/envs/pygmt/lib/python3.12/site-packages/sphinx/application.py", line 268, in __init__
    self._init_builder()
  File "/home/user/mambaforge/envs/pygmt/lib/python3.12/site-packages/sphinx/application.py", line 339, in _init_builder
    self.events.emit('builder-inited')
  File "/home/user/mambaforge/envs/pygmt/lib/python3.12/site-packages/sphinx/events.py", line 97, in emit
    results.append(listener.handler(self.app, *args))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/mambaforge/envs/pygmt/lib/python3.12/site-packages/sphinx_gallery/gen_gallery.py", line 616, in generate_gallery_rst
    ) = generate_dir_rst(src_dir, target_dir, gallery_conf, seen_backrefs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/mambaforge/envs/pygmt/lib/python3.12/site-packages/sphinx_gallery/gen_rst.py", line 539, in generate_dir_rst
    intro, title, (t, mem) = generate_file_rst(
                             ^^^^^^^^^^^^^^^^^^
  File "/home/user/mambaforge/envs/pygmt/lib/python3.12/site-packages/sphinx_gallery/gen_rst.py", line 1211, in generate_file_rst
    output_blocks, time_elapsed = execute_script(
                                  ^^^^^^^^^^^^^^^
  File "/home/user/mambaforge/envs/pygmt/lib/python3.12/site-packages/sphinx_gallery/gen_rst.py", line 1116, in execute_script
    execute_code_block(
  File "/home/user/mambaforge/envs/pygmt/lib/python3.12/site-packages/sphinx_gallery/gen_rst.py", line 988, in execute_code_block
    except_rst = handle_exception(
                 ^^^^^^^^^^^^^^^^^
  File "/home/user/mambaforge/envs/pygmt/lib/python3.12/site-packages/sphinx_gallery/gen_rst.py", line 664, in handle_exception
    func(  # needs leading newline to get away from iterator
  File "/home/user/mambaforge/envs/pygmt/lib/python3.12/site-packages/sphinx/util/logging.py", line 184, in warning
    return super().warning(
           ^^^^^^^^^^^^^^^^
  File "/home/user/mambaforge/envs/pygmt/lib/python3.12/logging/__init__.py", line 1930, in warning
    self.log(WARNING, msg, *args, **kwargs)
  File "/home/user/mambaforge/envs/pygmt/lib/python3.12/site-packages/sphinx/util/logging.py", line 131, in log
    super().log(level, msg, *args, **kwargs)
  File "/home/user/mambaforge/envs/pygmt/lib/python3.12/logging/__init__.py", line 1962, in log
    self.logger.log(level, msg, *args, **kwargs)
  File "/home/user/mambaforge/envs/pygmt/lib/python3.12/logging/__init__.py", line 1609, in log
    self._log(level, msg, args, **kwargs)
  File "/home/user/mambaforge/envs/pygmt/lib/python3.12/logging/__init__.py", line 1684, in _log
    self.handle(record)
  File "/home/user/mambaforge/envs/pygmt/lib/python3.12/logging/__init__.py", line 1700, in handle
    self.callHandlers(record)
  File "/home/user/mambaforge/envs/pygmt/lib/python3.12/logging/__init__.py", line 1762, in callHandlers
    hdlr.handle(record)
  File "/home/user/mambaforge/envs/pygmt/lib/python3.12/logging/__init__.py", line 1022, in handle
    rv = self.filter(record)
         ^^^^^^^^^^^^^^^^^^^
  File "/home/user/mambaforge/envs/pygmt/lib/python3.12/logging/__init__.py", line 858, in filter
    result = f.filter(record)
             ^^^^^^^^^^^^^^^^
  File "/home/user/mambaforge/envs/pygmt/lib/python3.12/site-packages/sphinx/util/logging.py", line 478, in filter
    raise exc
sphinx.errors.SphinxWarning:
../examples/gallery/lines/roads.py unexpectedly failed to execute correctly:

or produce the expected output when ran directly in a Python script or Jupyter notebook:

{'FITS': 'rw',
 'PCIDSK': 'rw',
 'netCDF': 'rw',
 'PDS4': 'rw',
 'VICAR': 'rw',
 'JP2OpenJPEG': 'r',
 'PDF': 'rw',
 'MBTiles': 'rw',
 'TileDB': 'rw',
 'BAG': 'rw',
 'EEDA': 'r',
 'OGCAPI': 'r',
 'ESRI Shapefile': 'rw',
 'MapInfo File': 'rw',
 'UK .NTF': 'r',
 'LVBAG': 'r',
 'OGR_SDTS': 'r',
 'S57': 'rw',
 'DGN': 'rw',
 'OGR_VRT': 'r',
 'Memory': 'rw',
 'CSV': 'rw',
 'NAS': 'r',
 'GML': 'rw',
 'GPX': 'rw',
 'LIBKML': 'rw',
 'KML': 'rw',
 'GeoJSON': 'rw',
 'GeoJSONSeq': 'rw',
 'ESRIJSON': 'r',
 'TopoJSON': 'r',
 'Interlis 1': 'rw',
 'Interlis 2': 'rw',
 'OGR_GMT': 'rw',
 'GPKG': 'rw',
 'SQLite': 'rw',
 'WAsP': 'rw',
 'PostgreSQL': 'rw',
 'OpenFileGDB': 'rw',
 'DXF': 'rw',
 'CAD': 'r',
 'FlatGeobuf': 'rw',
 'Geoconcept': 'rw',
 'GeoRSS': 'rw',
 'VFK': 'r',
 'PGDUMP': 'rw',
 'OSM': 'r',
 'GPSBabel': 'rw',
 'OGR_PDS': 'r',
 'WFS': 'r',
 'OAPIF': 'r',
 'EDIGEO': 'r',
 'SVG': 'r',
 'Idrisi': 'r',
 'XLS': 'r',
 'ODS': 'rw',
 'XLSX': 'rw',
 'Elasticsearch': 'rw',
 'Carto': 'rw',
 'AmigoCloud': 'rw',
 'SXF': 'r',
 'Selafin': 'rw',
 'JML': 'rw',
 'PLSCENES': 'r',
 'CSW': 'r',
 'VDV': 'rw',
 'GMLAS': 'r',
 'MVT': 'rw',
 'NGW': 'rw',
 'MapML': 'rw',
 'GTFS': 'r',
 'PMTiles': 'rw',
 'JSONFG': 'rw',
 'MiraMonVector': 'rw',
 'TIGER': 'r',
 'AVCBin': 'r',
 'AVCE00': 'r',
 'HTTP': 'r'}
        LINEARID      FULLNAME RTTYP  MTFCC  \
0<PHONE_NUMBER>968  Puainako Exd     M  S1200
1<PHONE_NUMBER>286   Puanako Exd     M  S1200
2<PHONE_NUMBER>860  Puainako Exd     M  S1200
3<PHONE_NUMBER>576     Keaau Byp     M  S1200
4<PHONE_NUMBER>669     Keaau Byp     M  S1200

                                            geometry
0  LINESTRING (-155.11039 19.69256, -155.1107 19....
1  LINESTRING (-155.14804 19.68121, -155.14938 19...
2  LINESTRING (-155.1566 19.68084, -155.15641 19....
3  LINESTRING (-155.0313 19.62267, -155.03204 19....
4  LINESTRING (-155.02989 19.61407, -155.02981 19...

My guess is that the GDAL drivers are not being registered properly somehow. This was supposedly fixed in https://github.com/geopandas/pyogrio/pull/145 (see also https://github.com/geopandas/pyogrio/issues/144), but there might be certain cases where the loading doesn't happen correctly? We have a workaround right now that forces the driver load like so:
import pyogrio

pyogrio.core._register_drivers()

but given that _register_drivers is a private method, we would prefer not to rely on it. We're opening this issue to try to figure out where the GDAL driver loading logic might be failing even after #145. Unsure if putting GDALAllRegister() back in _io.pyx and/or _ogr.pyx would help, or if there is another solution we can try.

Thanks for the report!  This is a tricky one, and appears to be an order of operations, possibly loading issue loading the GDAL library multiple times from different packages (e.g., pyogrio, rasterio).
I can reproduce locally by installing a Conda env based on your environment.
I'm seeing that it appears to work properly at first and then fail later.  To test this, I edited the geopandas/io/file.py::__read_file_pyogrio to print drivers after importing pyogrio.
When I run the equivalent of your make html (with logging): PYGMT_USE_EXTERNAL_DISPLAY="false" sphinx-build -b html -d _build/doctrees -j auto . _build/html  -v I see that it first successfully loads all drivers when running examples/gallery/maps/choropleth_map.py.  It then runs examples/gallery/maps/tilemaps.py and I see warnings about rio, which suggests that it is loading rasterio somewhere in the stack at that point.  After that, it runs examples/gallery/lines/roads.py and now lists no drivers before crashing.
If I run the failing file directly:
PYGMT_USE_EXTERNAL_DISPLAY="false" python examples/gallery/lines/roads.py
It loads all drivers successfully and works as expected.
If I comment out the contents of examples/gallery/maps/tilemaps.py and then run sphinx-build again (above command), then roads.py is successful.  So - something in tilemaps.py is causing GDAL loading to get messed up.
I've isolated the problematic line that changes the behavior of loading drivers in pyogrio.  If we import pyogrio and list drivers before this, they are as expected.  If we import pyogrio after this line, no drivers are loaded.
I don't use xarray, so I'm not able to go much further down this rabbit hole.  Based on what I'm seeing, this isn't an error that is caused directly by pyogrio (though please follow up here if you discover otherwise).  It seems to be based on multiple libraries loading GDAL differently and then based on order of operations, seems to be leaving the drivers available in GDAL in a bad state when subsequent packages try to load GDAL.

@snowman2 do you have any ideas about what might be causing this order of operations driver loading issue based on rioxarray?  It seems that loading GDAL drivers works fine in pyogrio before a call to rioxarray, and then does not work properly afterward.  That is, if rioxarray is called before pyogrio, we don't get drivers from GDAL, but if it is called after, then things work properly.

rioxarray imports rasterio. Did you try importing rasterio before/after pyogrio?

Here is a much smaller working example (compared to building the PyGMT documentation) to reproduce the issue:
import geopandas as gpd

gdf = gpd.read_file("https://www2.census.gov/geo/tiger/TIGER2015/PRISECROADS/tl_2015_15_prisecroads.zip")

import pygmt

fig = pygmt.Figure()
fig.tilemap(region=[-157.84, -157.8, 21.255, 21.285], projection="M12c", zoom=14, frame="afg")
fig.show()

gdf = gpd.read_file("https://www2.census.gov/geo/tiger/TIGER2015/PRISECROADS/tl_2015_15_prisecroads.zip")

Importing rasterio first works fine (as does simply importing rioxarray).
Thanks for the smaller example @seisman .
It looks like an offending section in pygmt/src/tilemap.py is this one (if I comment it out, your example works as expected):
with Session() as lib:
        with lib.virtualfile_in(check_kind="raster", data=raster) as vingrd:
            lib.call_module(
                module="grdimage", args=build_arg_list(kwargs, infile=vingrd)
            )

Thanks so much @brendan-ward for taking the time to debug this! Your comment at https://github.com/geopandas/pyogrio/issues/448#issuecomment-2219139470 makes a lot of sense, I did notice how the first choropleth_map.py example worked fine, but roads.py didn't, but didn't realize how tilemaps.py in the middle was possibly causing issues.
@seisman, it seems like GMT might also be calling GDALAllRegister (e.g. at https://github.com/GenericMappingTools/gmt/blob/804d7674b890fe0e83411b1083ddbb2128b49847/src/gmt_gdalread.c#L721), would the interaction between pyogrio/GMT/rasterio(GDAL) be causing issues?

it seems like GMT might also be calling GDALAllRegister (e.g. at https://github.com/GenericMappingTools/gmt/blob/804d7674b890fe0e83411b1083ddbb2128b49847/src/gmt_gdalread.c#L721), would the interaction between pyogrio/GMT/rasterio(GDAL) be causing issues?

It's likely. Here is an even smaller example to reproduce it, without calling the Figure.tilemap/load_tile_map method/function. So it means it's not directly related to rioxarray/rasterio. To me, it seems as long as grdimage is called, it crashes:
import geopandas as gpd

gdf = gpd.read_file("https://www2.census.gov/geo/tiger/TIGER2015/PRISECROADS/tl_2015_15_prisecroads.zip")

import pygmt

fig = pygmt.Figure()
fig.grdimage("@earth_day_01d")
fig.show()

gdf = gpd.read_file("https://www2.census.gov/geo/tiger/TIGER2015/PRISECROADS/tl_2015_15_prisecroads.zip")

The upstream documentation says (https://gdal.org/api/raster_c_api.html#_CPPv415GDALAllRegisterv):

This function should generally be called once at the beginning of the application.

but apparently, it's called multiple times even in GMT.

@joa-quim I'm wondering if you could provide any insights in the issue since you wrote the GDAL-stuff in GMT.

I don't think GMT calls GDALAllRegister() multiple times but confess that I don't remember the effect of doing so. In GMT, for each call off GDALAllRegister() there should be a correspondent call to gmtlib_GDALDestroyDriverManager, that has this curious remark (which, again, I don't remember anymore why it had to be so)
/* Cannot close connection to GDAL if calling environment expect it to be open */

I didn't quite understand where is the crash. In GMT, or in gpd.read_file? Could it be that GMT closes the driver manager and geopandas expects it to be still open? Also needs to be checked, does PyGMT calls activate the API->external condition? GMT.jl does.

@joa-quim Thanks for your explanations and providing the link to gmtlib_GDALDestroyDriverManager. It's super helpful.
The actual cause of the issue is that:

pyogrio first calls GDALAllRegister() to register the drivers
GMT may call GDALAllRegister again (I guess it's fine), and then close GDAL, which unregister the drivers
then in pyogrio, we see the error No driver registered because GDAL ss already closed by GMT.

Then the solution is to let GMT not close GDAL, which can be done by adding the GMT_SESSION_NOGDALCLOSE flag when creating a session.
As shown in https://github.com/GenericMappingTools/pygmt/pull/3305, it works well after adding the GMT_SESSION_NOGDALCLOSE flag. So I think we can close the issue.

Thanks everyone, closing as this has been fixed in https://github.com/GenericMappingTools/pygmt/pull/3672.


Unbookable dates

There seems to be a bug regarding unbookable dates:
http://sentry.prod-prisonvisits.dsd.io/default/default/group/2308/
NoMethodError
undefined method `[]' for nil:NilClass
/lib/schedule.rb:7:in `initialize'
/app/controllers/deferred/slots_controller.rb:8:in `new'
/app/controllers/deferred/slots_controller.rb:8:in `edit'

So after investigation:
https://github.com/ministryofjustice/prison-visits/blob/master/app/controllers/deferred/slots_controller.rb#L9
references visit.prisoner.prison_name and if this is nil we get this exception.
One way the user can cause this to happen:

Start a new session, fill in the service.
On the review page click edit against the prisoner details.
Blank the prison name, press continue.
You will get an error message. However the prison name is cleared from the session.
Use back/forward buttons to navigate to the slot picker.

Do you agree this issue is now resolved? I've raised a new issue for the user side of this.

Yep happy to track it in a new issue now that we know the root cause :smile:


Got project to build under VS & XS

Master didn't build for me initially. Project reference paths didn't resolve. It's building now so I thought I'd submit a PR.

Fixed under new commits


Disable the focus trap for report page context menu

Details

This PR fixes the issue where focus was being restored back to the message once the context menu closed. It disables this focus trap by blurring the element immediately after right click.
Fixed Issues

$ https://github.com/Expensify/App/issues/14148
PROPOSAL: https://github.com/Expensify/App/issues/14329#issuecomment-1439041180
Tests

Go to any chat

Send any long message (10000+ characters)
Send few message after long message
Right click on long message
Press copy to clipboard or touch outside to close the context menu

[x] Verify that no errors appear in the JS console

Offline tests

QA Steps

Go to any chat
Send any long message (10000+ characters)
Send few message after long message
Right click on long message
Press copy to clipboard or touch outside to close the context menu

[x] Verify that no errors appear in the JS console

PR Author Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for the expected offline behavior in the Offline steps section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[x] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

[ ] Android / native
[ ] Android / Chrome
[ ] iOS / native
[ ] iOS / Safari
[x] MacOS / Chrome / Safari
[x] MacOS / Desktop

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is correct English and approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] I verified that if a function's arguments changed that all usages have also been updated correctly
[x] If a new component is created I verified that:

[x] A similar component doesn't exist in the codebase
[x] All props are defined accurately and each prop has a /** comment above it */
[x] The file is named correctly
[x] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[x] The only data being stored in the state is data necessary for rendering and nothing else
[x] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[x] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[x] All JSX used for rendering exists in the render method
[x] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)

[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

Screenshots/Videos

Web

https://user-images.githubusercontent.com/30054992/220768340-77de246b-6d80-4001-ad08-a7d9b2477487.mov

Desktop

https://user-images.githubusercontent.com/30054992/220768509-09a133b8-a1a0-44e9-9f21-380b08dafd12.mov

@chiragsalian @eVoloshchak One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@eVoloshchak I've gone through this again and I think that removing PressableWithoutFocus is not a good idea here. PressableWithoutFocus does not have any secondary interaction defined in it. If you do a right click on a PressableWithoutFocus, you'll see that a native context menu opens up. However, with PressableWithSecondaryInteraction, if you do a right click on it, the native context menu does not open. Instead, the handler provided for longPress gets triggered. We can add a property to disable this for PressableWithSecondaryInteraction but I think that will kill the whole purpose of this component. Please let me know what you think about this and I can edit the PR after that.

@allroundexperts, good catch!
I can observe this behavior too. In that case you can edit the PR, I'll start going through the checklist shortly

@allroundexperts, good catch! I can observe this behavior too. In that case you can edit the PR, I'll start going through the checklist shortly

Awesome. I've updated the PR.

@allroundexperts, looks like you need to merge with main, there's something weird with the commits

@allroundexperts, looks like you need to merge with main, there's something weird with the commits

@eVoloshchak Fixed.

@allroundexperts, you need to check off every checkbox in the checklist.
Also, there should be a video for each platform, even the ones that aren't affected by this change (just to verify everything works as expected)

@allroundexperts, you need to check off every checkbox in the checklist. Also, there should be a video for each platform, even the ones that aren't affected by this change (just to verify everything works as expected)
@eVoloshchak What screen should I show on mobile? Since there is no right click there, what should I show there?

@eVoloshchak What screen should I show on mobile? Since there is no right click there, what should I show there?

You can long-press on a message to trigger the context menu. I've uploaded an iOS video here

@eVoloshchak What screen should I show on mobile? Since there is no right click there, what should I show there?

You can long-press on a message to trigger the context menu. I've uploaded an iOS video here

Got it. Thank you. I'll upload these 👍

🚀 Deployed to staging by https://github.com/Luke9389 in version: 1.2.77-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
failure ❌

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to staging by https://github.com/Luke9389 in version: 1.2.77-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/yuwenmemon in version: 1.2.77-4 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


Use value comparisons instead of reference comparisons in StateChange.isDefaultInstance implementations

What you were trying to do
Solve the original problem (i.e. removal of duplicate SetViewportToSizeOf state changes) #2688 highlighted.
What actually happened
State changes which are value identical to the default state change are not being reported as such to AbstractNode.addDesiredStateChange, its only caller.
How to reproduce

Run the game, load a world.
Check the logs for the generated render task list with SetViewportToSizeOfTask tasks which are identical to the default (reset) state change task (i.e. the SetViewportToSizeOfTask which is run after the node's process task).

Cause
This happens because StateChange.isDefaultInstance incorrectly returns false for all instances of a state change as it performs a reference  comparison instead of a value comparison.
cc @emanuele3d

This issue is redundant. StateChange.isDefaultInstance already exists.

This issue is being reopened with a new purpose.
@rzats I'd like to claim this issue as part of GCI.


fix convert overflow

The returned int32 must be converted to uint32 before casting them to int64 for combination, if the int32 is interpreted as negative signed integer the conversion will be totally wrong, it was probably a design mistake from Microsoft to return IADsLargeInteger High and Low Part as LONG and not ULONG.
You can see here: https://learn.microsoft.com/en-us/windows/win32/api/iads/nn-iads-iadslargeinteger in the example that shows how to convert an IADsLargeInteger to a 64-bit integer the cast to ULONG before convert

Good catch! Cheers!


choreremove unused  doris_max_scan_key_num and max_send_batch_parallelism_per_job conf

Proposed changes
Use SessionVariable to control it, rather than be conf.

run buildall

run p0

run buildall

run p1

run buildall

run cloud_p0


[Bug] arguments for directives are lost when using nautilus

The introspection and query planner is unaware about the arguments for directives. So with nautilus it's currently impossible to use the built-in directives like @include or @skip, since the query planner complains about the if argument being unknown. The introspection query clearly shows the problem.
Version affected: v0.1.19
Expected result:
{
  "directives": [
    {
      "name": "deprecated",
      "description": "Marks an element of a GraphQL schema as no longer supported.",
      "locations": [
        "FIELD_DEFINITION",
        "ENUM_VALUE"
      ],
      "args": [
        {
          "name": "reason",
          "description": "Explains why this element was deprecated, usually also including a suggestion\nfor how to access supported similar data. Formatted in\n[Markdown](https://daringfireball.net/projects/markdown/).",
          "type": {
            "kind": "SCALAR",
            "name": "String",
            "ofType": null
          },
          "defaultValue": "\"No longer supported\""
        }
      ]
    },
    {
      "name": "include",
      "description": "Directs the executor to include this field or fragment only when the `if` argument is true.",
      "locations": [
        "FIELD",
        "FRAGMENT_SPREAD",
        "INLINE_FRAGMENT"
      ],
      "args": [
        {
          "name": "if",
          "description": "Included when true.",
          "type": {
            "kind": "NON_NULL",
            "name": null,
            "ofType": {
              "kind": "SCALAR",
              "name": "Boolean",
              "ofType": null
            }
          },
          "defaultValue": null
        }
      ]
    },
    {
      "name": "skip",
      "description": "Directs the executor to skip this field or fragment when the `if` argument is true.",
      "locations": [
        "FIELD",
        "FRAGMENT_SPREAD",
        "INLINE_FRAGMENT"
      ],
      "args": [
        {
          "name": "if",
          "description": "Skipped when true.",
          "type": {
            "kind": "NON_NULL",
            "name": null,
            "ofType": {
              "kind": "SCALAR",
              "name": "Boolean",
              "ofType": null
            }
          },
          "defaultValue": null
        }
      ]
    }
  ]
}

Current result:
{
  "directives": [
    {
      "args": [],
      "description": "Marks an element of a GraphQL schema as no longer supported.",
      "locations": [
        "FIELD_DEFINITION",
        "ENUM_VALUE"
      ],
      "name": "deprecated"
    },
    {
      "args": [],
      "description": "Directs the executor to include this field or fragment only when the `if` argument is true.",
      "locations": [
        "FIELD",
        "FRAGMENT_SPREAD",
        "INLINE_FRAGMENT"
      ],
      "name": "include"
    },
    {
      "args": [],
      "description": "Directs the executor to skip this field or fragment when the `if` argument is true.",
      "locations": [
        "FIELD",
        "FRAGMENT_SPREAD",
        "INLINE_FRAGMENT"
      ],
      "name": "skip"
    }
  ]
}

This issue is reflected in upstream: https://github.com/nautilus/gateway/issues/152


No OpenID Server found at https://steamcommunity.com/openid

Done everything I could think of........Please help....

could not replicate with the latest version of SteamAuth.
What have you tried already and have you tried updating the steamauth folder?

There is already 3 other issues open with the same title, please close this and comment on one of them.
#237
#239
#240
Also if you could please try some of the suggested fixes in those threads: https://github.com/SmItH197/SteamAuthentication/issues/237#issuecomment-439696757


Update ML model

Initially picked fastest model, but it is not performing well.
Investigating model with balance between speed and quality. Need to test really well. Does a good job on 3x3. It's 25% slower but impact needs to be measured.

Expand current audience to all CTP

misses still there but model is performing better.

Nick is working on grid training, then another round of testing

Determined that 3x3 grids are no-go. All collections up to 4.2.5 have critical misses.
Good news: 2x2 Max solution seems to be viable. Only requirement is to switch to 12m (instead of 8m) at ~50mph+ minimum

i.e. 8m @ <50mph, 12m @ > 50mph

Will figure something out for camera-bridge pending Evan's signoff
Determined 50mph: 60mph = 1mi/min -> Every frame should be processed faster than 0.3s.

If we want everything in <0.3s, we need lower resolution.
12m switch yesterday @ 55mph is hard to sustain for 30+ seconds

Addressing FPS drops in camera today. Filtered the 4.2.5 check for Masaya to validate


Yuuki Yuuna wa Yuusha de Aru: Jukai no Kioku [PCSG00502]

App summary

App name: Yuuki Yuuna wa Yuusha de aru Jukai no Kioku
App serial: PCSG00502
App version: 1.02

Vita3K summary

Version: v0.1.2
Build number: 1854-c74a5c7d
Commit hash: https://github.com/vita3k/vita3k/commit/c74a5c7d2058f53d0970da99ee0ec6acffa2e032

Test environment summary

Tested by: Rich Richie
OS: Windows 10
CPU: AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx
GPU: AMD Radeon(TM) Vega 8 Graphics
RAM: 7 GB

Issues
It blinks yellow screen when loading, and it got stuck in opening movie (it doesn't play)
Screenshots
Log
vita3k.log
Recommended labels

Intro
Video Bug

Disable video p)laying, is ingame

How do I disable video player?

How do I disable video player?

Configuration, setting, emulator, disable video player, but here, using custom config, so right click on game, Custom config, and create, and same, emulator, and uncheck video player

Like that

When I right click the game, there’s no “custom settings” option

When I right click the game, there’s no “custom settings” option

take last build

App Summary

App name: Yuuki Yuuna wa Yuusha de aru Jukai no Kioku
App serial: PCSG00502
App version: 1.02

Vita3K summary

Version: v0.2.0
Build number: 3691
Commit hash: https://github.com/vita3k/vita3k/commit/31826697
CPU backend: Dynarmic
GPU backend: Vulkan

Test environment summary

Tested by: Benjamintoledo
OS: Windows 11
CPU: AMD Ryzen 5 4600G
GPU: AMD Radeon(TM) Graphics (Vega 7 integrated graphics)

Issues

Background error during some dialogues. By rest, perfect.

Screenshots

Log
vita3k.log
Recommended labels

Ingame +


POL-1106 Google Unlabeled Resources Revamp

Description
This is a revamp of the Google Unlabeled Resources policy. From the CHANGELOG:

Added ability to filter resources by Google Project
Added ability to filter resources by Google resource type
Added additional context to incident description
Streamlined code for better readability and faster execution
Policy now requires a valid Flexera One credential

Additionally, some minor tweaks to Dangerfile testing to avoid false positives
Link to Example Applied Policy
https://app.flexera.com/orgs/6/automation/applied-policies/projects/7954?policyId=66281643352c6d87fe314c44
Contribution Check List

[X] New functionality includes testing.
[X] New functionality has been documented in the README if applicable
[X] New functionality has been documented in CHANGELOG.MD

Tested in McAfee account and it provides everything they wanted and more.


Don't generate empty array for

@rprieto , I reckon swagger is right this time. required field cannot be an empty array.
http://json-schema.org/latest/json-schema-validation.html#rfc.section.5.15

Good pickup!


[Question] Why double check IsRepeatOver in SpanShouldKeepJobRunning?

I found that IsRepeatOver was called twice while debugging, but it seems that the results of both calls are the same. Is it enough to keep only one call here?
https://github.com/dotnet/crank/blob/158a5e4ad8e3f971a1a6d98f37cb92a5f28b3b8e/src/Microsoft.Crank.Controller/Program.cs#L1272-L1275

Ok, I submit a PR #572 for it.


Test support: Return WriteRayJobLogs function

Issue link

What changes have been made

Return back WriteRayJobLogs function which will retrieve Ray Job id from RayJob CR and use Ray REST API to retrieve logs for this job to be stored.
Verification steps

N/A
Checks

[x] I've made sure the tests are passing.
Testing Strategy

[ ] Unit tests
[x] Manual tests
[ ] Testing is not required for this change

/approve


Implement fetching balance for Tron

Fixes: #464

do you need to fix unit tests, you can run using makefile: make test


Memory leak: Android.Runtime.IdentityHashTargets and WeakReference when navigating between two or more activities

Android framework version
net8.0-android
Affected platform version
.NET 8.0.402
Description
I noticed this issue on .NET MAUI, and was able to track it down to here, .NET Android Runtime. There appears to be a memory leak when navigating between pages. I created a second activity with a button that when clicked calls Finish(), then in the MainActivity there's another button that navigates to the second activity.
App init, no navigations:

After about 100 navigations:

Steps to Reproduce

Create a new .NET 8 Android application
In activity_main.xml add a button
In MainActivity.cs add the following code to the bottom of OnCreate():

Button buttonToSecondActivity = FindViewById<Button>(Resource.Id.button);buttonToSecondActivity.Click += (sender, e) =>{    var intent = new Intent(this, typeof(SecondActivity));    StartActivity(intent);};

Create a new XML layout called second_activity.xml , and add a button to the page
Create a new activity called SecondActivity and at the bottom of OnCreate() add the following code:

Button buttonBackToMain = FindViewById<Button>(Resource.Id.button2);buttonBackToMain.Click += (sender, e) =>{    Finish();};

Run the app and click the buttons to navigate between the two pages

Here is a repo with these changes and a script to click the buttons for you: [m-script.sh](http://m-script.sh/) — run the app in an emulator, then run that script in your terminal -- https://github.com/mattsetaro/android-memory-leaks
Did you find any workaround?
No response
Relevant log output
No response

I can't help but think its related to this:

@mattsetaro your sample needs to call GC.Collect() at least once in there to be sure it's running in a determistic way:

https://aka.ms/maui-memory-leaks

That being said, I've seen IdentityHashTargets in diffs of .gcdump files and wondered if there was an issue there. Is that the only type you see a problem with? What if you add a GC.Collect() call in the sample?

I believe that this is less a "bug" and more a "this is how things work (for better or worse)."
See also the Xamarin.Android Garbage Collection documentation (which really should be migrated to .NET for Android…)
In broad strokes:

Every Java.Lang.Object subclass holds a JNI Global Reference to its corresponding Java peer.  This JNI Global Reference prevents the Android VM from collecting those instances.

When .NET performs a GC, any Java.Lang.Object subclass instances will be added to the .NET GC Finalization Queue, but not finalized.

During a subsequent GC, all Java.Lang.Object subclasses in the finalization queue are passed to the "GC Bridge", which:

"Copies over" the object graph references of (2) to their corresponding Java peers.
"Toggles" the JNI Global References to JNI Weak Global References.
Kicks off a Java-side GC
"Toggles back" the JNI Weak Global References to JNI Global References
If this "toggle back" results in the NULL pointer, the Java peer was collected, and we inform the .NET GC that the managed peer cal be collected.
If this "toggle back" results in a non-NULL pointer, then the Java peer is still alive, and we inform the .NET GC that the managed peer cannot be collected.

Applying these broad strokes to your sample app:

The AndroidApp2.MainActivity C# instance keeps the Java peer crc64….MainActivity alive.
The AndroidApp2.MainActivity instance will not be collected until (1) multiple .NET GC's occur in which (2) the instance is added to the finalization queue, and (3) the instance is passed to the GC Bridge.
This is likely at least two GCs.
Your app doesn't cause any GCs, at least until you've navigated between the pages a lot.

If this is a concern, there are two things you can do:

Have a GC.Collect() invocation somewhere in your Android lifecycle code.
(Optional) call this.Dispose() within your MainActivity instance when you know that instance will no longer be used from Java code.

@mattsetaro we don't think there is an issue here, but let us know if you have other details. If you can add GC.Collect() calls in your app, and still see things never going away, we could investigate.


Calling function flushAndWait  will always block on it if I not run it on main thread. Under the mac arm64 architecture.

⚠ Issues not using this template will be systematically closed.
Describe the bug
I want to use off-screen rendering to do something. When developing on the Mac platform, for some reason, I must work on non-main thread . Then I found that if I render on a non-main thread, it will be blocked in flushAndWait，This happened to me on Mac, but not on Windows.
To Reproduce
Steps to reproduce the behavior:
the code like this:
void test(){
//do init   engine , scene, render
....
//  do  begin frame ,   readpixel ,  endframe,  flushAndWait
renderer_->beginFrame(swapchain_);
 renderer_->readPixels(....);
renderer_->endFrame(swapchain_);
//block here
engine_.flushAndWait();

}

int main(){
    std::thread work(test);
    work.detach()
    getchar();

    return 0;
}

Expected behavior
hope can   on non-main thread  render image (on mac arm64)
Screenshots
no
Logs
no
Desktop (please complete the following information):

OS: macx  arm64
GPU:
Backend: OpenGL

Additional context

Does this happen with the Metal backend too?

Does this happen with the Metal backend too?

I use   EngineInstance::SelectBackend(open3d::visualization::rendering::EngineInstance::RenderingType::kMetal); to change backend, and next create  swapchain and render. then get this error msg in filament::MaterialParser *filament::createParser(filament::backend::Backend, const void *, size_t):57 reason: the material was not built for the Metal backend .Maybe I need a little time to fix it.

Does this happen with the Metal backend too?

Yes， I use the filament example hellotriangle, just run it on non main thread, it cant work . the code like this:
int test3(int argc, char** argv);
int main(int argc, char** argv) {
     std::thread work(test3, argc, argv);
     work.detach();
     getchar();
     return 0;
}

int test3(int argc, char** argv) {
    App app{};
    app.config.title = "hellotriangle";
    handleCommandLineArguments(argc, argv, &app);
.........
}


Create a class for standalone file

Contains: filename, is_text_file (will be used for search)
Maybe will add file type later

I believe it is better to have each file store its full paths because it takes no effort, but makes it possible to use files independently from directories, also it allows to do some additional checks (like whether the file still really exists)


Start Installation Button Greyed Out

Hi, Amazing work on this.  When I try to install it onto my unit, the update is recognised fine, however the start installation button is greyed out and cannot be pressed.  Please see the image attached.  Is there any way to resolve this?

Hi,
i think thats the wrong Menu. Holt Menu for few seconds. And than you have the  Update Button.
Or. Can you select SD Card above? Sorry i dont have an VW.

Hi, its definitely the update menu.  Accessed by holding menu, selecting update, it then asks the source (SD Card) it then reads the card and shows MIB Toolkit 2.5, and on selecting that the screen above is shown with the start button greyed out.

Ok. Did you Activate the Dev. Menu in 5F ?
Developer mode enabled on module 5F (you need VCDS/OBD11/VCP for this!)

Yes, developer mode is active and I can access the green engineering menu.  Just can't start installation of the toolkit

Thats maybe so easy but do you try click something in the right side PersonalPOI button?

Yes I did, here are the screens that show when you click in.  But the start button doesn't seem to be enabled at any level.

I am wondering what the "I" next to them means

The toolkit is on sd and only one sd card is inside? (FAt32, All Files direct into the SD)
...Strange. On Skoda you have only put install, SD Card and Go...

Do you have any error codes, maybe from a previous firmware installation?
Remove them first.

I did have some errors, cleared them and the button came active.  Thanks so much for your help!  The toolbox worked perfectly, I was able to retrieve the password hashes from the unit that I have been trying to get out for ages.  Do you know the hash algorithm that they use?

how did you menage that ? I mean clear errors ?


[docs] JS API WindowOptions transparent missing

Windows in tauri.conf.json can made transparent, and windows created through the JS API can be as well. However, WindowOptions does not mention a transparent option.
https://tauri.studio/en/docs/api/js/interfaces/window.windowoptions/

Seems like the TS docs is really outdated, what happened @Laegel ?

Docs was updated: https://tauri.studio/en/docs/api/js/interfaces/window.windowoptions/#transparent


allow disabling of weaveDNS advertising/lookup

...while keeping other weave integrations, by setting --weave.hostname=
Addresses a suggestion in #1550.

There is a change in behaviour here, beyond the explicit intention of this PR,  in what value we attempt to register/lookup in DNS. This is a) is unlikely to be relied on by existing users, and b) hard to eliminate:

weave.hostname
{app,probe}.weave.hostname
master
branch

unset
unset
scope.weave.local
scope.weave.local

unset
=

scope.weave.local

=
unset
scope.weave.local

unset
=y
y
y

=x
unset
x
x

=
=

=x
=
x
x

=
=y
y
y

=x
=y
x
y


[WIP] Allow before(:all) blocks to play nicely with rspec-retry

Currently rspec-retry doesn't work in before(:all) blocks; specs will simply fail after one attempt, eg if one passes retry=3 to a bundle exec ...args declaration.
Inherit from RSpec::Core::Configuration to create a new configuration object that overrides the previous functionality.
Add noredink/rspec-retry as a Gemspec dependency.
This should allow rspec-retry to retry in before(:all) blocks.

As this is an issue with rspec-retry, I suggest you target that gem with a solution, I'm afraid we can't accept extensions for 3rd party gems. That said if you find that theres an api you need to make customisation easier feel free to open a PR for that explaining why and what you envision using it for!


Scary bullets

About the PR

Increases the base damage of bullets by Quite A Lot and adds bullet damage falloff (latter is TODO)
TODO:

Bullet damage falloff
Cooler looking bullets (tracers?)

Why / Balance

The original thread I got this PR from, in summary:

People with guns actually have to worry about landing their hits
Warden has to consider who they're handing weapons to
Makes running away from gunfire a real thing, since you cant get shot twice and just walk off to medbay like you didn't just get shot with a rifle

I'm not 100% sure about the slug being 65 damage; the anti-materiel rifle being 120 seems fine-ish to me since I really doubt a crewmember is gonna obtain a Hristov - and if they do, they probably deserve it.
Technical details

Modifies upstream code.
Requirements

[x] I have read and I am following the Pull Request Guidelines. I understand that not doing so may get my pr closed at maintainer’s discretion
[x] I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Changelog

:cl: rain

tweak: Made guns more impactful.
add: Bullets now lose damage over distance - getting shot point blank will be slightly lethal than getting shot from a range!

I'd like to gather some thoughts on this since this turns a vast majority of ballistic weapons from 5-7 shots to 2-3 shots

if you could, do you think you could also make a system to mark if something is "fired" vs just thrust, stabbed or thrown?
Asking because Nairod and I were discussing armour for stabbings vs actual bulletproof vests. Just a system that could see if a hit was from a bullet or not, and then modify the incoming damage depending on if the armour is or isn't bulletproof
this is probably coming off as insane, lmk if you need me to re-write this

TODO: vests, replace bullet damage with bullet velocity, essentially take base of rimworld CE's combat and put it here

I like the idea of this, however I think you should wait until after newmed. I think it is still being worked on.

no longer interested in ss14 development


Application entry file "background.js" does not exist

When I try to to build my app with "yarn build" it starts, but then fails with " Error: Application entry file "background.js" in the "/Users//Documents//Programmierungen/boxorganiser/build/mac/boxorganiser.app/Contents/Resources/app.asar" does not exist. Seems like a wrong configuration."
I can even see how the build directory is created and a main.js file placed inside it, instead of a background.js. But I have no idea how I should react to this.
Error-message:
Error: Application entry file "background.js" in the "/Users/<name>/Documents/<name>/Programmierungen/boxorganiser/build/mac/boxorganiser.app/Contents/Resources/app.asar" does not exist. Seems like a wrong configuration.
    at error (/Users/<name>/Documents/<name>/Programmierungen/boxorganiser/node_modules/app-builder-lib/out/asar/asarFileChecker.js:44:14)
    at /Users/<name>/Documents/<name>/Programmierungen/boxorganiser/node_modules/app-builder-lib/src/asar/asarFileChecker.ts:30:4
    at Generator.next (<anonymous>)
    at /Users/<name>/Documents/<name>/Programmierungen/boxorganiser/node_modules/graceful-fs/polyfills.js:285:20
    at FSReqWrap.oncomplete (fs.js:154:5)
From previous event:
    at _checkFileInArchive (/Users/<name>/Documents/<name>/Programmierungen/boxorganiser/node_modules/app-builder-lib/src/asar/asarFileChecker.ts:36:17)
    at checkFileInArchive (/Users/<name>/Documents/<name>/Programmierungen/boxorganiser/node_modules/app-builder-lib/out/asar/asarFileChecker.js:40:30)
    at /Users/<name>/Documents/<name>/Programmierungen/boxorganiser/node_modules/app-builder-lib/src/platformPackager.ts:409:13
    at Generator.next (<anonymous>)
From previous event:
    at MacPackager.checkFileInPackage (/Users/<name>/Documents/<name>/Programmierungen/boxorganiser/node_modules/app-builder-lib/src/platformPackager.ts:406:110)
    at /Users/<name>/Documents/<name>/Programmierungen/boxorganiser/node_modules/app-builder-lib/src/platformPackager.ts:460:16
    at Generator.next (<anonymous>)
    at /Users/<name>/Documents/<name>/Programmierungen/boxorganiser/node_modules/graceful-fs/polyfills.js:285:20
    at FSReqWrap.oncomplete (fs.js:154:5)
From previous event:
    at MacPackager.sanityCheckPackage (/Users/<name>/Documents/<name>/Programmierungen/boxorganiser/node_modules/app-builder-lib/src/platformPackager.ts:446:92)
    at /Users/<name>/Documents/<name>/Programmierungen/boxorganiser/node_modules/app-builder-lib/src/platformPackager.ts:249:16
    at Generator.next (<anonymous>)
    at runCallback (timers.js:705:18)
    at tryOnImmediate (timers.js:676:5)
    at processImmediate (timers.js:658:5)
From previous event:
    at MacPackager.doPack (/Users/<name>/Documents/<name>/Programmierungen/boxorganiser/node_modules/app-builder-lib/src/platformPackager.ts:167:165)
    at /Users/<name>/Documents/<name>/Programmierungen/boxorganiser/node_modules/app-builder-lib/src/macPackager.ts:88:63
    at Generator.next (<anonymous>)
From previous event:
    at MacPackager.pack (/Users/<name>/Documents/<name>/Programmierungen/boxorganiser/node_modules/app-builder-lib/src/macPackager.ts:80:95)
    at /Users/<name>/Documents/<name>/Programmierungen/boxorganiser/node_modules/app-builder-lib/src/packager.ts:430:24
    at Generator.next (<anonymous>)
    at xfs.stat (/Users/<name>/Documents/<name>/Programmierungen/boxorganiser/node_modules/fs-extra/lib/mkdirs/mkdirs.js:56:16)
    at /Users/<name>/Documents/<name>/Programmierungen/boxorganiser/node_modules/graceful-fs/polyfills.js:285:20
    at FSReqWrap.oncomplete (fs.js:154:5)
From previous event:
    at Packager.doBuild (/Users/<name>/Documents/<name>/Programmierungen/boxorganiser/node_modules/app-builder-lib/src/packager.ts:396:24)
    at /Users/<name>/Documents/<name>/Programmierungen/boxorganiser/node_modules/app-builder-lib/src/packager.ts:366:57
    at Generator.next (<anonymous>)
    at /Users/<name>/Documents/<name>/Programmierungen/boxorganiser/node_modules/graceful-fs/graceful-fs.js:111:16
    at /Users/<name>/Documents/<name>/Programmierungen/boxorganiser/node_modules/graceful-fs/graceful-fs.js:45:10
    at FSReqWrap.args [as oncomplete] (fs.js:140:20)
From previous event:
    at Packager._build (/Users/<name>/Documents/<name>/Programmierungen/boxorganiser/node_modules/app-builder-lib/src/packager.ts:335:133)
    at /Users/<name>/Documents/<name>/Programmierungen/boxorganiser/node_modules/app-builder-lib/src/packager.ts:331:23
    at Generator.next (<anonymous>)
    at runCallback (timers.js:705:18)
    at tryOnImmediate (timers.js:676:5)
    at processImmediate (timers.js:658:5)
From previous event:
    at Packager.build (/Users/<name>/Documents/<name>/Programmierungen/boxorganiser/node_modules/app-builder-lib/src/packager.ts:288:14)
    at build (/Users/<name>/Documents/<name>/Programmierungen/boxorganiser/node_modules/app-builder-lib/src/index.ts:59:28)
    at build (/Users/<name>/Documents/<name>/Programmierungen/boxorganiser/node_modules/electron-builder/src/builder.ts:228:10)
    at then (/Users/<name>/Documents/<name>/Programmierungen/boxorganiser/node_modules/electron-builder/src/cli/cli.ts:46:19)

My package.json:
{
  "name": "boxorganiser",
  "version": "0.0.1",
  "description": "Simple box-organiser",
  "author": "<name>",
  "scripts": {
    "build": "node .electron-vue/build.js && electron-builder",
    "test": "npm run unit && npm run e2e",
    "e2e": "npm run pack && mocha test/e2e",
    "lint": "eslint --ext .js,.vue -f ./node_modules/eslint-friendly-formatter src test",
    "build:clean": "cross-env BUILD_TARGET=clean node .electron-vue/build.js",
    "build:dir": "node .electron-vue/build.js && electron-builder --dir",
    "build:web": "cross-env BUILD_TARGET=web node .electron-vue/build.js",
    "dev": "node .electron-vue/dev-runner.js",
    "electron:build": "vue-cli-service electron:build",
    "electron:serve": "vue-cli-service electron:serve",
    "lint:fix": "eslint --ext .js,.vue -f ./node_modules/eslint-friendly-formatter --fix src test",
    "pack": "npm run pack:main && npm run pack:renderer",
    "pack:main": "cross-env NODE_ENV=production webpack --progress --colors --config .electron-vue/webpack.main.config.js",
    "pack:renderer": "cross-env NODE_ENV=production webpack --progress --colors --config .electron-vue/webpack.renderer.config.js",
    "postinstall": "npm run lint:fix && electron-builder install-app-deps",
    "postuninstall": "electron-builder install-app-deps",
    "unit": "karma start test/unit/karma.conf.js"
  },
  "main": "background.js",
  "dependencies": {
    "axios": "^0.18.0",
    "firebase": "^5.11.0",
    "vue": "^2.5.16",
    "vue-electron": "^1.0.6",
    "vue-router": "^3.0.1",
    "vuex": "^3.0.1",
    "vuex-electron": "^1.0.0"
  },
  "devDependencies": {
    "ajv": "^6.5.0",
    "babel-core": "^6.26.3",
    "babel-eslint": "^8.2.3",
    "babel-loader": "^7.1.4",
    "babel-plugin-istanbul": "^4.1.6",
    "babel-plugin-transform-runtime": "^6.23.0",
    "babel-preset-env": "^1.7.0",
    "babel-preset-stage-0": "^6.24.1",
    "babel-register": "^6.26.0",
    "babili-webpack-plugin": "^0.1.2",
    "cfonts": "^2.1.2",
    "chai": "^4.1.2",
    "chalk": "^2.4.1",
    "copy-webpack-plugin": "^4.5.1",
    "cross-env": "^5.1.6",
    "css-loader": "^0.28.11",
    "del": "^3.0.0",
    "devtron": "^1.4.0",
    "electron": "^2.0.4",
    "electron-builder": "^20.19.2",
    "electron-debug": "^1.5.0",
    "electron-devtools-installer": "^2.2.4",
    "eslint": "^4.19.1",
    "eslint-config-standard": "^11.0.0",
    "eslint-friendly-formatter": "^4.0.1",
    "eslint-loader": "^2.0.0",
    "eslint-plugin-html": "^4.0.3",
    "eslint-plugin-import": "^2.12.0",
    "eslint-plugin-node": "^6.0.1",
    "eslint-plugin-promise": "^3.8.0",
    "eslint-plugin-standard": "^3.1.0",
    "file-loader": "^1.1.11",
    "html-webpack-plugin": "^3.2.0",
    "inject-loader": "^4.0.1",
    "karma": "^2.0.2",
    "karma-chai": "^0.1.0",
    "karma-coverage": "^1.1.2",
    "karma-electron": "^6.0.0",
    "karma-mocha": "^1.3.0",
    "karma-sourcemap-loader": "^0.3.7",
    "karma-spec-reporter": "^0.0.32",
    "karma-webpack": "^3.0.0",
    "mini-css-extract-plugin": "0.4.0",
    "mocha": "^5.2.0",
    "multispinner": "^0.2.1",
    "node-loader": "^0.6.0",
    "node-sass": "^4.9.2",
    "require-dir": "^1.0.0",
    "sass-loader": "^7.0.3",
    "spectron": "^3.8.0",
    "style-loader": "^0.21.0",
    "url-loader": "^1.0.1",
    "vue-cli-plugin-electron-builder": "^1.3.2",
    "vue-html-loader": "^1.2.4",
    "vue-loader": "^15.2.4",
    "vue-style-loader": "^4.1.0",
    "vue-template-compiler": "^2.5.16",
    "webpack": "^4.15.1",
    "webpack-cli": "^3.0.8",
    "webpack-dev-server": "^3.1.4",
    "webpack-hot-middleware": "^2.22.2",
    "webpack-merge": "^4.1.3"
  },
  "build": {
    "productName": "boxorganiser",
    "appId": "de.boxorganiser.app",
    "directories": {
      "output": "build"
    },
    "files": [
      "dist/electron/**/*"
    ],
    "dmg": {
      "contents": [
        {
          "x": 410,
          "y": 150,
          "type": "link",
          "path": "/Applications"
        },
        {
          "x": 130,
          "y": 150,
          "type": "file"
        }
      ]
    },
    "mac": {
      "icon": "build/icons/icon.icns"
    },
    "win": {
      "icon": "build/icons/icon.ico"
    },
    "linux": {
      "icon": "build/icons"
    }
  },
  "license": "MIT"
}

and my main.js:
import Vue from 'vue'
import axios from 'axios'
import firebase from 'firebase'

import App from './App'
import router from './router'
import store from './store'

if (!process.env.IS_WEB) Vue.use(require('vue-electron'))
Vue.http = Vue.prototype.$http = axios
Vue.config.productionTip = false

var firebaseConfig = {
  // just firebase stuff
}
// Initialize Firebase
firebase.initializeApp(firebaseConfig)

/* eslint-disable no-new */
new Vue({
  components: { App },
  router,
  store,
  template: '<App/>'
}).$mount('#app')

Everything works perfectly when I run it in dev mode, but as soon as I switch to build it fails.

Node version: 10.15.3
NPM version: 6.4.1
vue-cli version: 3.7.0
Operating System: Mac os 10.14.4 (18E226)

I really hope, that somebody can help me with that, because I've already put too much work into this project to start all over again. :`(

The main option should have the full path to your file for example ./dist/electron/background.js.
also, make sure to edit the webpack configuration to use background.js too.

Thanks for the quick response, but I'm quite new to electron-vue / webpack, so could you please specify, where and how I can change the configuration to support the background.js. Google couldn't help me with that and in my .electron-vue folder I have following files:

build.js
dev-client
dev-runner
webpack.main.config.js
webpack.renderer.config.js
webpack.web.config.js

or do I somehow specify webpack options in my package.json?
Thanks in advance! :)

If you are new, I advise you not to change any of the default values of the projects.
you need to change the corresponded webpack file depends on what background.js is responsible to do.
if it is a replacement of /src/main/index.js then you should edit webpack.main.config.js and replace every place where index.js is mentioned.
but again, since you are new to electron-vue / webpack, it is much better to keep the default values as is, till you get more information about how electron-vue is using webpack, then you can change anything based on your own preferences.


[5.9][CodeCompletion] Don’t crash when completing in a parameter position that only constraints one of two primary associated protocol types

Explanation: When completing, we call getExistentialType on the contextual type to get a nice and concise description of the contextual parameter’s type that doesn’t contain archetypes and which we can also serialize into a USR so we are able to calculate type relations for code completion results from the code completion cache.
When completing in a position that has a contextual type which only constrains one of two primary associated protocol types, this fails because getExistentialType (which calls getDependentUpperBounds) tries to form a ParameterizedProtocolType, which fails since not all primary associated types have been constrained.
AFAICT the fix here is to just fall back to the default behavior of returning the plain protocol type instead of aborting.
Scope: Anything that calls ArchetypeType::getExistentialType, which isn’t very narrowly-scoped
Risk: Very low, we were always aborting in this before
Testing: Added test case
Issue: rdar://108835466
Reviewer:  @slavapestov on https://github.com/apple/swift/pull/65847

@swift-ci Please test

@swift-ci Please test macOS


Allow single "scope" in JWT without need for JSON array format?

Similarly to #557, some authorisation servers are producing JWTs with single scope, which is not enclosed in an array. IdentityServer3 using .Net JwtSecurityTokenHandler may be an example. Such tokens make DefaultAccessTokenConverter.extractAuthentication and DefaultAccessTokenConverter. extractAccessToken throw an exception because it expects only an array. Can we make the DefaultAccessTokenConverter to cope with a single scope also?

Thanks for the report @vladimirlapacek. This support has been added and is now in master.


bug: WeChat official account cannot be used normally

Expected

Set a second key in WeChat settings and enable QR code login
Scan the QR code to log in
Scan the QR code to log in with authorization or scan the QR code to log in or follow the registration
Jump to enter

Actual

After scanning the QR code to register and log in, the WeChat official account received: The service provided by this official account has failed, please try again later.

Reason
I looked at the source code and my own demo experience and found that it was caused by the following reasons
This is the code for receiving WeChat public account events
func (c *ApiController) HandleOfficialAccountEvent() {
	respBytes, err := ioutil.ReadAll(c.Ctx.Request.Body)
	if err != nil {
		c.ResponseError(err.Error())
		return
	}

	var data struct {
		MsgType  string `xml:"MsgType"`
		Event    string `xml:"Event"`
		EventKey string `xml:"EventKey"`
	}
	err = xml.Unmarshal(respBytes, &data)
	if err != nil {
		c.ResponseError(err.Error())
		return
	}

	lock.Lock()
	defer lock.Unlock()
	if data.EventKey != "" {
		wechatScanType = data.Event
		c.Ctx.WriteString("")
	}
}

wechatScanType = data.Event This line of code is the main one, used to set up listening events
But this code is not called! !
The reason is that the interface information needs to be configured in the WeChat official account!
The configuration method requires a url, including get and post, get is used for verification, and post is used to receive event messages.
Here is the suggested code I gave
beego.Router("/api/webhook", &controllers.ApiController{}, "GET:HandleOfficialAccountEventCheck")

// HandleOfficialAccountEventCheck ...
// @Tag System API
// @Title HandleOfficialAccountEventCheck
// @router /webhook [GET]
func (c *ApiController) HandleOfficialAccountEventCheck() {
	s := c.Ctx.Request.FormValue("echostr")
	atoi, _ := strconv.Atoi(s)
	c.SetData(atoi)
	fmt.Println(atoi)
	c.ServeJSON()
}

Forgot to mention, I am using the test account of WeChat official account. Could it have anything to do with this? However, there is no problem with the demo I built myself.


[Feature]: How to perform cache preheating?

Is your feature request related to a problem? Please describe.
When using GPTcache, I currently have some LLM requests and corresponding answers. I want to cache and preheat them so that the program can directly match when running.
I hope to use similar matching. By default, the sqlite database and the faiss vector library will be built. However, there is no suitable method to put the data I need to preheat into two libraries.
I have tried using the gptcache.update() function for this operation, but the preheated data was only inserted into sqlite, and the faiss was not constructed correctly.
Describe the solution you'd like.
Can you provide an appropriate method for cache preheating operation? Thank you!
Describe an alternate solution.
No response
Anything else? (Additional Context)
No response

maybe you can try to use the cache.import_data(), reference: https://github.com/zilliztech/GPTCache/blob/main/tests/integration_tests/examples/sqlite_faiss_mock/test_example_sqlite_faiss.py


Seriosuly no upgrade for Swift 4.2?

I have migrated my project to Swift 4.2. Now your pod is not working.. seriously man you did not upgrade to Swift 4.2?

Again Man. Xcode 11 is out and we cannot use Swift 3 anymore. I would say this piece of software is DEAD from this month on wards. The developer is not doing anything. USELESS MAN!!!!!!

Upgraded to Swift 5. Please let me know if there are still any issues.
Also, you can always contribute to an open source project by yourself instead of waiting for someone to do it.


exit() throws an error.

Describe the bug
When you execute the exit() function, an error pops up.
To Reproduce
Steps to reproduce the behavior:

Execute the exit() function

Expected behavior
The PyWireframe window closes
Screenshots
The error is
Traceback (most recent call last):
  File "<pyshell#2>", line 1, in <module>
    PyWireframe.exit()
  File "C:\Python37\lib\site-packages\PyWireframe\engine.py", line 38, in exit
    render.bye()
AttributeError: 'Turtle' object has no attribute 'bye'

fixed, should have been turtle.screen.bye()


Api calls not supporting promises.

Hey! Thanks for all your hard work on writing Gigya wrapper for node.js ! :-)
I think will be good to support promises for example
gigya.socialize.getToken(params)
  .then(loginUser)
  .catch(errorHandler)

Yeah, I agree. I'd actually like to refactor this as a breaking change to be promises-only.
For now, you can use bluebird promisify to automatically convert to promises.

@singerxt 6 months later - I just released a new version that supports promises. It also has support for TypeScript definitions! (If you haven't tried TS, I recommend it. A lot.)


Interface for adding contexts with ContextLoader

The ContextLoader can have additional contexts set (see here). To make use of this feature, the CLI and HTTP binaries and config interfaces require updating to allow these to be input.

Subtask of #166.