Add more individual conviction factories

Story: https://trello.com/c/Ru4rQKsv/57-dc-write-real-multiple-conviction-examples
Follow up on #425
Usage example:

FactoryBot.create(:disclosure_check, :with_prison_sentence)
FactoryBot.create(:disclosure_check, :with_prison_sentence, :with_conviction_bail)

FactoryBot.create(:disclosure_check, :youth, :with_bind_over)
FactoryBot.create(:disclosure_check, :adult, :with_bind_over)

FactoryBot.create(:disclosure_check, :adult, :with_sexual_harm_order)
FactoryBot.create(:disclosure_check, :adult, :with_bind_over)

 [DC] Create factories to ease testing multiple convictions

 [DC] Create factories to ease testing multiple convictions


ValueError: Unknown component: endpoint_resolver

I'm seeing a very sporadic error which I'm hoping someone here can explain.  See stack trace below.  This is happening less than 5 times a day on a site that's getting maybe a million requests a day, so it's pretty rare, but I'd like to understand what's going on and see if there's a way to fix it.  I should also mention that the EC2 instance this code runs on has an IAM role associated with it, and gets its creds automatically through that mechanism.
Any idea what might be going wrong here?  Thanks.
$ pip freeze | grep boto
boto3==0.0.19
botocore==1.0.0b1
File "/home/ubuntu/nasuni/nasuni/utils/aws/s3.py", line 82, in list_bucket_contents
bucket = boto3.resource('s3', region_name=settings.AWS_REGION).Bucket(bucket)
File "/usr/local/lib/python2.7/dist-packages/boto3/init.py", line 87, in resource
return _get_default_session().resource(_args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/boto3/session.py", line 270, in resource
aws_session_token=aws_session_token, config=config)
File "/usr/local/lib/python2.7/dist-packages/boto3/session.py", line 192, in client
aws_session_token=aws_session_token, config=config)
File "/usr/local/lib/python2.7/dist-packages/botocore/session.py", line 833, in create_client
endpoint_resolver = self.get_component('endpoint_resolver')
File "/usr/local/lib/python2.7/dist-packages/botocore/session.py", line 741, in get_component
return self._components.get_component(name)
File "/usr/local/lib/python2.7/dist-packages/botocore/session.py", line 857, in get_component
raise ValueError("Unknown component: %s" % name)
ValueError: Unknown component: endpoint_resolver

Could you tell us a little more about what the code is doing?  Is this being run in a multithreaded context?  Could you share any additional code that demonstrates this issue?

Yes, it's running within mod_wsgi under Apache in a multi-threaded context.
In high traffic situations with the boto library (not boto3) I saw problems where every so often attempts to query the metadata service to get the IAM role assigned to an EC2 instance would fail, causing very weird errors.  This kind of feels like the same thing.

Based on the traceback, it looks like you're creating a session and then creating a bucket.  One thing worth pointing out is that while clients are thread-safe, we recommend either using a session per thread, or having the main thread create a session and have a resource per thread (http://boto3.readthedocs.org/en/latest/guide/resources.html?highlight=threaded#multithreading).  The Session object, particularly it's initialization, isn't currently thread safe.

@jamesls - thanks for the update and sorry for my slow response.  I don't think I'm creating a session and then creating a bucket, but perhaps I'm wrong.  Here's the line of code from the traceback which occasionally causes an error:
bucket = boto3.resource('s3', region_name=settings.AWS_REGION).Bucket(bucket)
This is running within mod_wsgi in daemon mode, so it's within a multi-threaded environment, however this code runs within the local context of a thread.
...
Actually, I just read the boto3 code and it looks like within the boto3 library it's calling _get_default_session(), which is definitely going to be accessed by multiple threads simultaneously and thus hit the the thread-safety problems you are talking about.  Looks like I'll need to change my code to something where I create a Session object explicitly and then use it, rather than the API which I was using which creates the Session automatically.
Thanks for the pointer in the right direction.
Russ

Sounds good.  Let us know if you run into any other issues.

For what it's worth, I think this is the code with the thread safety issue (from botocore/session.py):
    def get_component(self, name):
        if name in self._deferred:
            factory = self._deferred.pop(name)
            self._components[name] = factory()
        try:
            return self._components[name]
        except KeyError:
            raise ValueError("Unknown component: %s" % name)

If two threads evaluate the "name in" check to True, only one will successfully pop on the next line.  The other will fail.  Seems like putting a lock around this section would fix things.
In the meantime I'm putting this in my startup code under a lock:
boto3.setup_default_session()
boto3.DEFAULT_SESSION._session.get_component('data_loader')
boto3.DEFAULT_SESSION._session.get_component('event_emitter')
boto3.DEFAULT_SESSION._session.get_component('endpoint_resolver')
boto3.DEFAULT_SESSION._session.get_component('credential_provider')

from what I read it seems there is still a bug if you create a session per thread due to the global session.  So shouldn't this bug be re-opened?

I ran into this and @russellneufeld 's "meantime" solution worked for me. Thank you. I was having the issue when making requests in parallel using asyncio

btw, even with @russellneufeld 's fix, I ran into huge memory consumption with ~100 threads when running under linux with python 3.4.2 (OSX was OK, ~250MB.  I since switched to aio-s3 and it runs really well with 300+ async workers with ~50MB footprint. Our enhancements to that are in https://github.com/tailhook/aio-s3/pull/9. I've since been contemplating switching to https://github.com/jettify/aiobotocore

This is for my future self who will come looking at this issue in the future:
Wrap boto3 initialization in a thread lock [1]

https://github.com/getsentry/sentry/commit/f58ca5eef79a8fc1091703d72611e8e3e63b34a0


Loads to blank window...

Hi and thanks for this interesting project.
I just tried installing this from AUR package into arch linux x86_64. However, when launching this from within a Hyprland (wayland native DE/compositor) I get a blank white window and nothing further happens even if waiting several minutes. If I launch this from the command line, I get two lines of welcome text (forget exactly what it says), blank window opened, but then silence.
In use at time of bug report:
Hyprland 0.45-2
Kernel 6.6.61-lts
Let me know what other debugging steps you would like for me to try....
Checklist of other stuff I could try, and will cross these off when I have tried them.

Compiling from source
Gnome or KDE Plasma on wayland
Gnome or KDE Plasma on X11

Hi there!
Thanks for reporting this issue. It seems like you’ve installed a version of the app from an unofficial AUR package created by a third party (maintainer zxp19821005). Unfortunately, I wasn't aware of this package, and it may not be fully compatible with your setup, which could be causing the issue you're experiencing.
I'd recommend trying to compile the app from source instead. This method is more reliable and should work without the issues you're facing with the AUR package.
If you're still interested in using an AUR package, I’m planning to add official AUR support in the next update to ensure better compatibility and proper packaging.
Thanks for your understanding, and feel free to reach out if you have further questions!

Tried it again after removing the AUR package for geforce-infinity, git clone your repo, fresh install of npm from Arch extra repository. Unfortunately, I did get the same blank window results. However, I did get a bit more debug info. The two pop-up boxes came up after I accidentally closed the launching removal session, so those might possibly be spurious reports.

Glad to hear about your plans to add an AUR/pkgbuild for this. Always best when the maintainer maintains that too. Let me know when it's ready to test and I'll give it a shot.

So truth be told I am not at all familiar with wayland and arch yet but I want to try them sometime. So my help might not be the best yet but here are a few suggestions that might resolve the issue:
1. Ensure libnotify is installed:
This should only affect notifications (like not appearing), but it's worth checking in case there are any issues with the app's notification system. You can try reinstalling or verifying the installation of libnotify.
2. Check if the settings.cfg file exists:
Please look in the ./config/geforce-infinity folder to see if a settings.cfg file is there. When I tested without this file, it did cause a blank screen for around 15 seconds. It should be created automatically, but there may be permission issues or something else blocking it from being generated. You can try manually creating an empty settings.cfg to see if that helps.
3. Debugging with Developer Tools:
Please add the line mainWindow.webContents.openDevTools(); to your local main.js createWIndow function after the  mainWindow.setMenuBarVisibility(false); line to see if the issue is just a full blank screen or nvidia not loading. Please if it shows share any errors present in the console.
Also try pressing Crtl+I (if you haven't tried that already) to see if the custom sidebar shows!
4. As a last resort:
If none of these steps fix the problem, I suggest trying to run the app on a different desktop environment (like GNOME or KDE Plasma)  using X11 instead of Wayland just like you suggested. This should work more reliably with Electron apps, as Wayland can sometimes cause compatibility issues with them as I've read some issues today.

Arch is my favorite distro for a ton of reasons. Hyprland is still very much in development, but it is incredibly lightweight, flexible, etc.

libnotify 0.8.3-1 is installed from arch package.

~/.config/geforce-infinity/settings.cfg exists. Dir and file owner and group are my user, permissions are drwx------ for the directory and -rw-r--r-- for the file. Contents of that file are pretty simple:

{
  "autofocus": false,
  "notify": true,
  "rpcEnabled": true,
  "informed": true
}

Added that line, did npm start, and wow actual window contents this time (and of course the debug console on the side). Commented that line back out, and GeForceNow still seems to load without that line. Computers: where the definition of insanity does not apply.....................................

I will keep using it for another day or two, and close this if I cannot get the bug to recur....


Export TtmlTextParser to public api

Have you read the FAQ and checked for duplicate open issues?
Yes
What version of Shaka Player are you using?
v2.5.9
Please ask your question
Hi,
We are using the default TtmlTextParser for TTML captions. Recently we faced new requirements in the logic of our app that require changes in the parsing TTML captions logic. The default parser almost suits our needs so we still want to use it instead of creating our own plugin. Is it possible to export TtmlTextParser parseMedia and parseInit methods to the public API? So with the help of composition, we can add new logic and still use the existent functionality of TtmlTextParser.

Should be no problem to export the text parser plugins.

Great! Thanks!
Is it possible to cherry-pick these changes to shaka v2.5.10?

Absolutely.

awesome! thank you


remove confusing comment

Hi @fluidvanadium I think this is kinda' against the wrong branch since we're working against spent_2024...  how do you propose that we handle it?  Is it already fixed on that branch?


chore:add support for custom path at start

Add MIT license
Custom path for nested path handling (had to add ../.. instead of just . to correctly reference path in nested structure

Thank you!
I published a new version with your fix -<EMAIL_ADDRESS>

Thanks for the help

Thanks for the help


[Deps] Switch to slf4j-reload4j

What changes were proposed in this pull request?

Replace slf4j-log4j12 with slf4j-reload4j.
Change dependency scope to runtime.

Why are the changes needed?
Eliminate this warning from maven:
[WARNING] While downloading org.slf4j:slf4j-log4j12:1.7.36
  This artifact has been relocated to org.slf4j:slf4j-reload4j:1.7.36.

Does this PR introduce any user-facing change?
No.
How was this patch tested?
CI.

Codecov Report

Merging #508 (9e3eee9) into master (3ba56c5) will increase coverage by 0.75%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master     #508      +/-   ##
============================================
+ Coverage     59.75%   60.51%   +0.75%
+ Complexity     1765     1633     -132
============================================
  Files           205      192      -13
  Lines         11527    10251    -1276
  Branches       1033      911     -122
============================================
- Hits           6888     6203     -685
+ Misses         4233     3672     -561
+ Partials        406      376      -30

Impacted Files
Coverage Δ

...preduce/task/reduce/RssRemoteMergeManagerImpl.java

...pache/hadoop/mapreduce/task/reduce/RssShuffle.java

.../hadoop/mapreduce/task/reduce/RssEventFetcher.java

...apache/hadoop/mapreduce/v2/app/RssMRAppMaster.java

...java/org/apache/hadoop/mapred/SortWriteBuffer.java

...pache/hadoop/mapreduce/task/reduce/RssFetcher.java

...g/apache/hadoop/mapred/SortWriteBufferManager.java

...mapreduce/task/reduce/RssInMemoryRemoteMerger.java

...n/java/org/apache/hadoop/mapreduce/RssMRUtils.java

...n/java/org/apache/hadoop/mapreduce/MRIdHelper.java

... and 3 more

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


Add Species Distribution Modeling Tutorial

I have completed writing the tutorial "Species Distribution Modeling with Google Earth Engine" previously accepted in #776.

Thanks for fixing the issues that came up during automated checks! All have passed. I should be able to review by the end of next week.

@osgeokr you've done an amazing job! This is one of the best tutorials I reviewed and the analyses is really useful. Thank you!
I left some comments that are mostly nits about code formatting and style and a couple suggestions for alternative implementations. You should be able to see comments in context using the ReviewNB links above.
Common formatting and style nits:

Aim for 80 char line length (some are too long)
Aim for consistency with variable name (best to use snake_case)
Remove all outputs

The Black Python code formatter is good for line length fixing - there is a command line version (I don't think it works on notebooks though), but there is a UI for it that is nice for copy/paste as few blocks of code: https://black.vercel.app/
Please address the comments or reply to them for discussion or clarification. Once all the comments are addressed, please commit your changes and I'll look again.
Thanks,
Justin

Thank you sincerely for your meticulous review! Working on the tutorial has enhanced my understanding of GEE, for which I am grateful. I have quickly gone through all the reviews you provided and have no further objections, so I will proceed to revise and commit the changes accordingly. I believe it will be possible within this week.

I have committed the updated file with the modifications to the comments you provided. Thanks a lot!

@osgeokr - thank you for the updates! I should be able to look in the next few days.

 Everything looks great - nice job! Next, the files will be pulled into Google and the page will be built and hosted on DevSite. It might be another week before it is live. I'll post the link in the PR when the page is finally published.

@jdbcode I am truly happy to play a small role in the Earth Engine Community! I sincerely appreciate all your help in this regard!

Congratulations, the page is live! Here is the link: https://developers.google.com/earth-engine/tutorials/community/species-distribution-modeling
You can also find it on the tutorial explorer page: https://developers.google.com/earth-engine/tutorials/community/explore#python_api_tutorials
And in the left navigation panel table of contents.
Thank you so much for the excellent tutorial and supporting the Earth Engine developer community!
Please let me know if you see any issues, you can also make any changes with another pull request. One thing I noticed is that the page building procedure did not generate static images from the geemap outputs. For instance, you can see them in this tutorial (https://developers.google.com/earth-engine/tutorials/community/imad-tutorial-pt1). I'll try to figure out what is going wrong.


[DO NOT MERGE] [WIP] temporary solution to non js_content profiling

Proposed changes
We hit an issue where the profiler doesn't work well with workflows that are not just js_content.  If the workflow is split up between js_set and the like, we don't have a way of persisting data between event handlers.
This is a quick and dirty solution that does two things:

Provides a new method pushEventSync that just spits out the event to the logs immediately like so:

    {
    "type": "profiler:event",
    "payload": {
      "request_id": "c38254aa6509a46562c3a2a18c247391",
      "event": "js_var",
      "meta": {
        "function": "varfunc1",
        "action": "standalone",
        "created_at_ms":<PHONE_NUMBER>551
      },
      "raw_stats": {
        "size": 47600,
        "nblocks": 3
      }
    }
  }

In the logs, the summary is now purely a json object that looks like this:

   {
    "type": "profiler:summary",
    "payload": {
      "request_id": "0c955b7d228d04b35fca4c22512967dc",
      "cluster_size": 32768,
      "page_size": 512,
      "begin": {
        "req_start_ms":<PHONE_NUMBER>551,
        "size": 47600,
        "nblocks": 3
      },
      "end": {
        "req_end_ms":<PHONE_NUMBER>551,
        "size": 47600,
        "nblocks": 3
      },
      "growth": {
        "size_growth": 0,
        "nblocks_growth": 0
      },
      "elapsed_time_ms": 0,
      "events": []
    }
  }

Provides a new cli command log2json that will filter down the json emitted to the logs into an array of objects of type profiler:event or profiler:summary both having a payload key.  Just run:
log2json /tmp/dev.log filtered.json

Then you'll get a json file like this:
[
  {
    "type": "profiler:event",
    "payload": {
      "request_id": "1ba8d5f6dce0a703709c767ab313679b",
      "event": "main_func",
      "meta": {
        "foo": "bar",
        "created_at_ms":<PHONE_NUMBER>450
      },
      "raw_stats": {
        "size": 47600,
        "nblocks": 3
      }
    }
  },
  {
    "type": "profiler:event",
    "payload": {
      "request_id": "1ba8d5f6dce0a703709c767ab313679b",
      "event": "js_var",
      "meta": {
        "function": "varfunc1",
        "action": "standalone",
        "created_at_ms":<PHONE_NUMBER>450
      },
      "raw_stats": {
        "size": 47600,
        "nblocks": 3
      }
    }
  },
  {
    "type": "profiler:summary",
    "payload": {
      "request_id": "1ba8d5f6dce0a703709c767ab313679b",
      "cluster_size": 32768,
      "page_size": 512,
      "begin": {
        "req_start_ms":<PHONE_NUMBER>450,
        "size": 47600,
        "nblocks": 3
      },
      "end": {
        "req_end_ms":<PHONE_NUMBER>451,
        "size": 47600,
        "nblocks": 3
      },
      "growth": {
        "size_growth": 0,
        "nblocks_growth": 0
      },
      "elapsed_time_ms": 1,
      "events": []
    }
  }
]

Sample setup
Usage of this setup requires some extra steps which are:

Init using js_set of the profiler to "start the clock"
Creation of a js_var to hold the request id
Usage of pushEventSync passing in the request id from js_var

The complications around the request id come from an issue I was having in test where r.variables.request_id was giving different values.  I plan to submit this as a bug to the njs project once I make sure it's not user error on my part.
nginx.conf

worker_processes  1;

load_module modules/ngx_http_js_module.so;
error_log /tmp/dev.log debug;

events {
    worker_connections  1024;
}

http {
    js_import script from script.mjs;
    include       mime.types;
    default_type  application/json;

    # This stores the request id from the init of the profiler
    # For some reason it's changing if I just reference it in njs code
    js_var $static_request_id;

    # A refernce to this var inits the profiler to produce the summary
    # and populate `$static_request_id`
    js_set $request_id_profiler script.initProfiler;

    server {
       listen       4000;

       location / {
        js_set $my_var script.varfunc1;
        js_content script.main;
       }
    }
}

script.mjs
// you'll need to change this for your setup
import profiler from "./node_modules/njs-memory-profiler/index.mjs";

function main(r) {
  // This is important because referencing this inits the profiler.
  // We need to make sure this variable is only referenced once and at the very beginning of the request
  // Multiple references are leading to multiple request ids being generated for some reason.
  r.error(`Init: ${r.variables.request_id_profiler}`);

  profiler.pushEventSync(
    "main_func",
    { foo: "bar" },
    r,
    r.variables.static_request_id
  );

  r.return(200, `Hello World: ${r.variables.my_var}`);
}

function initProfiler(r) {
  const p = profiler.init(r);
  // To avoid more invocations, we bind the request id to a variable defined with `js_var`
  r.variables.static_request_id = p.requestId;
  return p.requestId;
}

function varfunc1(r) {
  profiler.pushEventSync(
    "js_var",
    { function: "varfunc1", action: "standalone" },
    r,
    r.variables.static_request_id
  );
  return "valuevarfunc1";
}

export default { main, varfunc1, initProfiler };

Checklist
Before creating a PR, run through this checklist and mark each as complete.

[ ] I have written my commit messages in the Conventional Commits format.
[ ] I have formatted the code using prettier (npx prettier -w .)
[ ] I have read the CONTRIBUTING doc
[ ] I have added tests (when possible) that prove my fix is effective or that my feature works
[ ] I have checked that all tests pass after adding my changes
[ ] I have updated necessary documentation
[ ] I have rebased my branch onto main

Proper implementation of this in https://github.com/4141done/njs-memory-profiler/pull/12


Support use of t.end as callback.

Binds all Test.prototype methods to current test.
Checks for truthy error as first argument to Test.prototype.end.

Closes #180.

Looks good to me. @vdemedes @jamestalmage ?

Except suggestions in comments, everything is good.

Also note we're opting for checking & printing error before checking if .end has been called more than once. This is how tape does it and I think it makes sense as the error message + stack is going to be more helpful messaging than simply 'called end more than once'. They'll get this message too, but only after they fix the actual source of the error.

What happens if you have a plan and call t.end?

I don't know, but we probably should have a test for it.

@timoxley looking at the code again I'm pretty sure you are going to get a bad error message if you use plan and end with this.
Please write a test that does this:
test(t => {
  t.plan(1);
  t.ok(1);
  t.end(new Error('you should get this error message, not a plan count error'));
});

And check the message of the thrown exception.

@timoxley I think it's down to that one if statement and another test ensuring your use ifError does not generate a plan count error message.

Hey @timoxley, could you please fix this suggestion (https://github.com/sindresorhus/ava/pull/181#discussion-diff-44397790), so that we can merge it in? Thanks!

Closed via https://github.com/sindresorhus/ava/commit/403a28c8cebf9a8ff736aaaf2c4cb79ca30c5a47
Thanks @timoxley!


iOS keyboard doesn't autocorrect

On iOS, the keyboard doesn't use the native OS autocorrect, so typos are retained and not corrected like in other apps.

Implemented, will be available later today or tomorrow on the app!


Remove yarn offline setup

Since we are not publishing packages, we can probably remove the yarn offline configuration.

I'm going to mark this one as invalid and close, my initial understanding of yarn offline was flawed.
We should keep this to speed up builds for local dev environments as well as CI. Additionally, an internet connection won't be needed to work on the project locally.


COMP: Include itkMacro.h instead of itkExceptionObject.h

To address
/home/matt/src/ITK/Modules/Core/Common/include/itkExceptionObject.h:19:2:
error: "Do not include itkExceptionObject.h directly,  include
itkMacro.h instead."
when building against ITK Git master.

Thank you Matt! I think it's great to be able to build elastix against the latest ITK Git master revision, and I see your pull request also builds fine with our CI (using the original ITK 5.0.0 release version).

Oops, I just pressed the "Merge pull request" button, while I should have selected "Rebase and merge"! Now we have two commits (one for your patch and one for my merge), instead of one!  :open_mouth:
Related to our discussion last year: https://discourse.itk.org/t/two-ways-to-get-an-accepted-patch-into-the-master-branch/1456

Thanks for the review and merge @N-Dekker !


Make Spark module in Legion available to RSDG

Code for module file is in /home/ucgajhe/modulefiles/spark
Needs to be pushed to a fork of https://github.com/UCL-RITS/rcps-modulefiles.
Then send to @ikirker to review for merge to the main module files once we're happy.
Code for installer script is in /home/ucgajhe/software/spark and in https://github.com/jamespjh/rcps-buildscripts/tree/master/spark-files and https://github.com/jamespjh/rcps-buildscripts/blob/master/spark-2.0.1-install

And the spark client code is in the spark branch of this repo.


make auditor less network-heavy on each pub/sub request

Currently the auditor scans the entire staging repo "responsible" for a promotion to prod for every single incoming pub/sub event. This can get very heavy if the staging repo is large and/or the staging repo has tons of images. This has resulted in hitting the network API limits (quota limits) against GCR, where the staging repos reside.
There are two optimizations to do:

don't scan the entire staging repo, but instead only the subdirectory containing the image-that-was-promoted.
make the auditor process pub/sub messages in batch mode --- that is, only read staging repos every 20 seconds or some such, regardless of the number of pub/sub messages received in-between

The first item should be good enough as a temporary stopgap, and should be straightforward to implement. The 2nd item is more difficult as it changes how the auditor behaves (and requires introducing new concurrency designs).

/remove lifecycle/stale

/remove lifecycle/stale

Oops
/remove-lifecycle stale

Oops
/remove-lifecycle stale

/assign @tylerferrara


Busgnag notify sync (running in a CLI script)

Hi, I have a node.js application with a couple of CLI scripts and I would like to know if it's possible to run the Bugsnag.notify sync.
example:
config/bugsnag
import Bugsnag from '@bugsnag/js'
import BugsnagPluginExpress from '@bugsnag/plugin-express'

const bugsnagClient = Bugsnag.start({
  apiKey: 'xpto'
    ......
  })
}
export default bugsnagClient

import bugsnag from '../../config/bugsnag'

const func = async () => {
  try {
    console.log('Start')
    // Do stuff
    bugsnag.notify('This is a test')
    process.exit(0)
  } catch (error) {
    // wait to notify (sync)
    bugsnag.notify(error)
    process.exit(1)
  }
}
; (async () => {
  await func()
})()

Best regards
Diogo

Hey @diogopms, Bugsnag.notify() is synchronous by standard. If you run it within an async function, it will be synchronous within that function (your CLI script). But not synchronous with the caller (your Node.js application). Can you please clarify what you're aiming to do here?

Hi @xander-jones, thanks for the feedback.
The issue was not related with the bugsnag-js lib but the bugsnag.notify was not working when you have a process.exit(0) (i don't know why :( )
not working:
import 'dotenv/config'
import bugsnag from '../../config/bugsnag'

const func = async () => {
  bugsnag.notify('New error')
  console.log('End')
  process.exit(0)
}

;(async () => {
  await func()
})()

I will remove the process.exit(0) for now, from the CLI script do you suggest a better way to handle this CLI script?

Hey @diogopms, to clarify: notify() is asynchronous, but it’s not async – it will return immediately but do the work to send later. So, when you call process.exit(0) immediately after bugsnag.notify() it will always exit before the notification has been sent.
If you'd like to exit the process after calling bugsnag.notify(), you can use a callback as follows:
Bugsnag.notify(error, null, () => process.exit(0))

The signature of notify in Javascript is notify(error, onError, callback). Sorry for the mis-steer, but hope this helps you out. Let us know if you have any other questions 😄


Cannot create a new prompt

Report
On a new self hosted docker-compose up, I cannot create a new prompt.  I can create projects, users, environments but prompts fails with error
Variable "$data" got invalid value { name: "Testing", integrationId: "openai", projectId: "clnlnlmky0004qs0iju0tr5yk" }; Field "integrationId" is not defined by type "CreatePromptInput".

Expected behavior
Create the prompt correctly, it worked perfectly a while ago.
Steps to reproduce the problem
1.spin up new environment
2.create new proyect
3.try to create a ne Prompt
Logs (if applicable)

Pezzo version
main
How do you use Pezzo?
Docker Compose

Thanks for reporting @deadsunrise - will try to reproduce and come back. Can you check and see if you have any logs in the Pezzo Server?

Hi @deadsunrise I am not able to reproduce this issue. Are you using Pezzo in development mode (so only spinning up the Pezzo infra via docker-compose) or the entire stack including the Server and the Client?
Try doing the following:

Delete any running Pezzo container
Delete any Pezzo volume
Run docker-compose pull
Run docker-compose up

And then try again. Let me know how it went.

Hi Ariel, I was trying to follow https://docs.pezzo.ai/introduction/docker-compose
I think I had old versions and the compose pull did the trick and updated some old container. I've nuked everything and restarted the process again and now it seems to be working perfectly.
How is the update process supposed to be made? can I help documenting it?
Thanks for your help

@deadsunrise For sure, feel free to submit a pull request. You'll need to fork the repo, clone your fork, then make the changes in the docs (you can find it in docs/), commit, push, and create a pull request so we can merge it back into Pezzo.
I'd be happy to include it as a Hacktoberfest contribution if you choose to do that. If you do, do sign up at Hacktoberfest.


Update vpn-device-tunnel-config.md

Adding the support statement for NRPT usage with device tunnel as discussed with PG.

sign-off

@kaushika-msft I don't have access to edit this without creating a child PR, but a couple of tweaks to the last sentence would help:
Device tunnel does not support Force tunnel. You must configure it as Split tunnel.

#sign-off

@eross-msft , can you merge this PR? It's been stuck for quite a while.

@eross-msft Thanks!


BAEL-2142

One example Java class for the article about "indexOf to find all occurrences of a word in a String ".

Closing this one as it is superseded by #5397


Building on Linux hangs build when printing GCC version.

In the file target/app/make/app_make_linux.gmk the section:
        @$(ECHO) GCC version...
	@$(CC) -xc++ -E -v -

hangs waiting for input because of the trailing '-'.  I have removed the trailing dash and the command no longer hangs, though it does give a warning about the options.

Sorry about the late response. The Linux build has not been kept up to date, and this is a bit of an error on my side. I will try to look into this.

We could consider replacing this witj the simpler short form of the command...
@$(CC) -v

That actually fixes up the problem quite nicely.

Great! Thank you for your report and for the help. If you like, you could issue a pull request for the changes you made? But this is completely optional. Best regards, Chris

A pull request has been issued.

Done. Thank you for the contribution.