Intercooler.ready is executed on document.ready

From documentation I understand that Intercooler.ready should be called on completion of successful DOM load.
However I see that this is also executed on page load, without any AJAX calls whatsoever. This is causing issues with element bindings and is totally unexpected.
See this reproduction:
<html>
<head>
	<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
	<script src="https://cdnjs.cloudflare.com/ajax/libs/intercooler-js/1.2.3/intercooler.js"></script>

	<script>
		Intercooler.ready(function (rootContent) {
			console.log("Intercooler.Ready");
		});
	</script>
</head>
<body>
</body>
</html>

On page load in console you'll see the log output.
Is this an intended behaviour?

I believe it is intended, the initial page load is also a DOM load so it makes sense. Any bindings that need to happen after Intercooler swaps content should also happen when the page first loads.
Can you post a specific example where your having issues? I may be able to help.

@adamstep I was under impression for Inetrcooler.ready to trigger DOM needs to load through Intercooler, not any other way.
So does it mean that DOM loaded through other means will also trigger Intercooler.ready? I'm talking about something like this:
        let request = $.get("~/myEndpoint");
        request.done(function (html: string) {
            $('#reloadme').append(html);
        });

As for concrete proglem, it is element double binding. We have a function that binds all the elements that needs binding, something like BindAllElements(selector) where it goes through selector and does the bindings. On document.ready we call BindAllEmenents('body').
And then every time we reload parts of pages we call BindAllElements('#reloadme').
Now we are trying out Intercooler on small part of our application and do this:
Intercooler.ready(function (rootContent) {
            BindAllElements(rootContent.selector)
    });

When the page is loaded it effectively calls BindAllElements('body') for the second time, after we already done that first binding. Thus causing double bindings on elements.
For now I've worked around like this:
Intercooler.ready(function (rootContent: any) {
        if (rootContent[0].tagName !== "BODY") {
            BindAllElements(rootContent.selector)
        }
    });

But this feels very hacky, hence my question here.

I think this is a case of the docs not matching the intent. The reference page does indeed say " to be run on the top level of all content that is swapped into the DOM by intercooler." However, I've always thought of it as simply meaning "when Intercooler is ready," i.e. Intercooler has processed all the elements on the page (either when first loaded or when swapped in). In your example, I would simply get rid of the document.ready and eliminate the if inside Intercooler.ready.
Can we consider this a documentation bug and fix the wording rather than changing the behavior (which other Intercooler apps already depend on)?

Yeah, this isn't documented that well and needs a fix.
Basically Intercooler.ready is the intercooler replacement for $.ready, except you have to do all initialization within the elt passed in, rather than globally as you would with $.ready.

I wanted to have one place where you did your initialization code for both the initial body load as well as any AJAX calls.

Hi Max.
Maybe I misunderstand your problem but do you mean "binding" of intercooler
elements?.That should happen automatically on page load and you should not
have to do anything as long as you use the "ic" tags. You should use the
method "Intercooler.processNodes" for wiring in elements in the HTML that
you receive in a AJAX request. No need for the Intercooler.Ready method as
I see it.
Anders
On Sat, May 23, 2020 at 7:02 PM chg20<EMAIL_ADDRESS>wrote:

I wanted to have one place where you did your initialization code for both
the initial body load as well as any AJAX calls.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/bigskysoftware/intercooler-js/issues/320#issuecomment-633083056,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AB2AHGFLB4DPLREYOTMRI3TRS7XSXANCNFSM4NIFZORQ
.

Hello Anders,
By element bindings I mean our elements, not Intercooler's. We use KendoUI for datepickers, colourpickers, etc. We need to tell Kendo what should be a datepicker, what should be a colour picker, etc. So we have loads of bits of code that do:
       $selector.find('input.datep').kendoDatePicker({
            format: "dd/MM/yyyy"
        });
        $selector.find('input.datetimep').kendoDateTimePicker({
            format: "dd/MM/yyyy HH:mm"
        });
        $selector.find('input.colorPicker').kendoColorPicker();
        // etc.

When new bits of DOM are loaded we need to execute those binders on the new elemenets, otherwise Kendo does not pick it up. As far as I can see Intercooler.processNodes only deals with Intercooler bindings, nothing external. Hence the usage of Intercooler.ready.
As for replacing $.ready with Intercooler.ready - we can't do that, as we have hundreds of pages where sometimes we are binding page-specific elements retest or rewrite all those pages is not an option.
So if you are saying this is an intended behaviour, we'll just keep what we have with the test for BODY. Unless there is a better way you can suggest.
Thanks for looking into this!

Hi Max.
Now I understand. Yes, I do have a suggestion because in general
Intercooler.ready should be your last resort since it is a general method
and it is called for all intercooler requests.
I suggest that you put the binding code together with the HTML that you
want to bind and which you receive as a response for an intercooler
request. The trick is that the browser automatically executes
I am using this pattern and it works well.
Anders
On Mon, May 25, 2020 at 12:50 PM Max Vasilyev<EMAIL_ADDRESS>wrote:

Hello Anders,
By element bindings I mean our elements, not Intercooler's. We use KendoUI
for datepickers, colourpickers, etc. We need to tell Kendo what should be a
datepicker, what should be a colour picker, etc. So we have loads of bits
of code that do:
   $selector.find('input.datep').kendoDatePicker({
        format: "dd/MM/yyyy"
    });
    $selector.find('input.datetimep').kendoDateTimePicker({
        format: "dd/MM/yyyy HH:mm"
    });
    $selector.find('input.colorPicker').kendoColorPicker();
    // etc.

When new bits of DOM are loaded we need to execute those binders on the
new elemenets, otherwise Kendo does not pick it up. As far as I can see
Intercooler.processNodes only deals with Intercooler bindings, nothing
external. Hence the usage of Intercooler.ready.
As for replacing $.ready with Intercooler.ready - we can't do that, as we
have hundreds of pages where sometimes we are binding page-specific
elements retest or rewrite all those pages is not an option.
So if you are saying this is an intended behaviour, we'll just keep what
we have with the test for BODY. Unless there is a better way you can
suggest.
Thanks for looking into this!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/bigskysoftware/intercooler-js/issues/320#issuecomment-633486350,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AB2AHGDF37W5BFG72MOR2SLRTI5MVANCNFSM4NIFZORQ
.

@baumann74
I see, I'll give this a try, but I sense repeating the binding code on every partial page smells of DRY violation.
Thank you for your time and help on this, very much appreciated!
Cheers,
Max


list of places to advertise on

It might be good to collect a bit of a list of where to advertise the existence of Arkitekt.

https://github.com/pditommaso/awesome-pipeline

Great idea. I think we can come up with a nice catchphrase ;)


Failed to get location updates from motion change event on Android

Your Environment

Plugin version: 4.9.1
Platform: Android
Device OS version: Android 12
Device manufacturer / model: Pixel 4a and Galaxy S10
XCode version:
Capacitor info (npx cap doctor)

💊	Capacitor Doctor	💊

Latest Dependencies:

  @capacitor/cli: 4.5.0
  @capacitor/core: 4.5.0
  @capacitor/android: 4.5.0
  @capacitor/ios: 4.5.0

Installed Dependencies:

  @capacitor/cli: 4.5.0
  @capacitor/core: 4.2.0
  @capacitor/android: 4.2.0
  @capacitor/ios: 4.2.0

Plugin config provided to #ready:

		url: `${Settings.apiUrl()}`,
        autoSync: true,
        // Geolocation Config
        desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH,
        distanceFilter: 10,
        // Activity Recognition
        stopTimeout: 3,
        // Application config
        debug: true, // <-- enable this hear sounds for background-geolocation life-cycle.
        logLevel: BackgroundGeolocation.LOG_LEVEL_VERBOSE,
        stopOnTerminate: false, // <-- Allow the background-service to continue tracking when user closes the app.
        startOnBoot: true, // <-- Auto start tracking when device is powered-up.
        enableHeadless: true,

Expected Behavior
Our server should get location updates for motionchange and geofence events from both iOS and Android when the device is moving or enter/exit the geofence.
Actual Behavior
Our server can get location updates for geofence from iOS and Android, but only get motionchange events from iOS device.
Context
I had both iOS and Android phones with me and took a train for half an hour, I keep getting the debug sound all the way from iOS device but nothing from Android.
Debug logs

Logs
╔═════════════════════════════════════════════
║ DEVICE SENSORS
╠═════════════════════════════════════════════
╟─ ✅  ACCELEROMETER: {Sensor name="LSM6DSR Accelerometer", vendor="STMicro", version=142856, type=1, maxRange=156.9064, resolution=0.0047856453, power=0.17, minDelay=5000}
╟─ ✅  GYROSCOPE: {Sensor name="LSM6DSR Gyroscope", vendor="STMicro", version=142856, type=4, maxRange=34.905033, resolution=0.0012216945, power=0.55, minDelay=5000}
╟─ ✅  MAGNETOMETER: {Sensor name="LIS2MDL Magnetometer", vendor="STMicro", version=262, type=2, maxRange=4915.2, resolution=0.01, power=0.2, minDelay=10000}
╟─ ✅  SIGNIFICANT_MOTION: {Sensor name="Significant Motion", vendor="Google", version=1, type=17, maxRange=1.0, resolution=1.0, power=0.25, minDelay=-1}
╚═════════════════════════════════════════════
11-22 18:05:04.521 DEBUG [HttpService startMonitoringConnectivityChanges]
  🎾  Start monitoring connectivity changes
11-22 18:05:04.558 INFO [TSProviderManager startMonitoring]
  🎾  Start monitoring location-provider changes
11-22 18:05:04.560 DEBUG [HttpService a]
╔═════════════════════════════════════════════
║ 📶  Connectivity change: connected? true
╠═════════════════════════════════════════════

11-22 18:05:04.566 ERROR [b b] HeadlessTask failed to find com.Company.vigilance.BackgroundGeolocationHeadlessTask.java.  If you've configured enableHeadless: true, you must provide a custom BackgroundGeolocationHeadlessTask.java.  See Wiki: https://github.com/transistorsoft/cordova-background-geolocation-lt/wiki/Android-Headless-Mode
11-22 18:05:04.567 ERROR [b a]
  ‼  com.Company.vigilance.local.BackgroundGeolocationHeadlessTask
11-22 18:05:04.576 WARN [b a]
  ⚠  Attempted to post headless event connectivitychange but there are no listeners.
11-22 18:05:04.581 ERROR [b b] HeadlessTask failed to find com.Company.vigilance.BackgroundGeolocationHeadlessTask.java.  If you've configured enableHeadless: true, you must provide a custom BackgroundGeolocationHeadlessTask.java.  See Wiki: https://github.com/transistorsoft/cordova-background-geolocation-lt/wiki/Android-Headless-Mode
11-22 18:05:04.582 DEBUG [HttpService a]
╔═════════════════════════════════════════════
║ 📶  Connectivity change: connected? true
╠═════════════════════════════════════════════

11-22 18:05:04.592 ERROR [b a]
  ‼  com.Company.vigilance.local.BackgroundGeolocationHeadlessTask
11-22 18:05:04.600 WARN [b a]
  ⚠  Attempted to post headless event providerchange but there are no listeners.
11-22 18:05:04.604 ERROR [b b] HeadlessTask failed to find com.Company.vigilance.BackgroundGeolocationHeadlessTask.java.  If you've configured enableHeadless: true, you must provide a custom BackgroundGeolocationHeadlessTask.java.  See Wiki: https://github.com/transistorsoft/cordova-background-geolocation-lt/wiki/Android-Headless-Mode
11-22 18:05:04.622 ERROR [b a]
  ‼  com.Company.vigilance.local.BackgroundGeolocationHeadlessTask
11-22 18:05:04.626 WARN [b a]
  ⚠  Attempted to post headless event connectivitychange but there are no listeners.
11-22 18:05:04.631 DEBUG [b prune]
  ℹ  PRUNE -1 days
11-22 18:05:04.632 ERROR [b b] HeadlessTask failed to find com.Company.vigilance.BackgroundGeolocationHeadlessTask.java.  If you've configured enableHeadless: true, you must provide a custom BackgroundGeolocationHeadlessTask.java.  See Wiki: https://github.com/transistorsoft/cordova-background-geolocation-lt/wiki/Android-Headless-Mode
11-22 18:05:04.633 ERROR [b a]
  ‼  com.Company.vigilance.local.BackgroundGeolocationHeadlessTask
11-22 18:05:04.636 WARN [b a]
  ⚠  Attempted to post headless event terminate but there are no listeners.
11-22 18:05:05.597 INFO [HttpService flush]
  ℹ  HttpService is busy
11-22 18:05:05.598 INFO [HttpService flush]
╔═════════════════════════════════════════════
║ HTTP Service (count: 0)
╠═════════════════════════════════════════════

11-22 18:11:35.585 DEBUG [BackgroundGeolocationPlugin load]
11-22 18:11:35.630 DEBUG [LifecycleManager onStart] ☯  onStart
11-22 18:11:35.636 DEBUG [LifecycleManager onResume] ☯  onResume
11-22 18:11:35.640 INFO [HttpService flush]
╔═════════════════════════════════════════════
║ HTTP Service (count: 0)
╠═════════════════════════════════════════════

11-22 18:11:36.433 INFO [GeofenceDAO destroy]
  ✅  Company
11-22 18:11:36.436 INFO [GeofenceDAO create]
  ✅  Company
11-22 18:11:36.443 DEBUG [TSGeofenceManager d] ℹ  Persist monitored geofences: [BBB, CCC, Lucern HB, AAA, DDD, Zug HB, Zurich HB]
11-22 18:11:36.477 DEBUG [TSConfig d] ℹ   Persist config, dirty: [debug, desiredAccuracy, enableHeadless, extras, headers, headlessJobService, logLevel, params, schedule, startOnBoot, stopOnTerminate, stopTimeout, url]
11-22 18:11:36.477 INFO [GeofenceDAO destroy]
  ✅  BBB
11-22 18:11:36.490 DEBUG [TSConfig d] ℹ   Persist config, dirty: [debug, desiredAccuracy, enableHeadless, headers, headlessJobService, logLevel, params, startOnBoot, stopOnTerminate, stopTimeout, url]
11-22 18:11:36.497 INFO [GeofenceDAO destroy]
  ✅  AAA
11-22 18:11:36.499 INFO [GeofenceDAO create]
  ✅  AAA
11-22 18:11:36.503 DEBUG [c g]
  ℹ  LocationAuthorization: Permission granted
11-22 18:11:36.504 INFO [HttpService flush]
╔═════════════════════════════════════════════
║ HTTP Service (count: 0)
╠═════════════════════════════════════════════

11-22 18:11:36.507 DEBUG [TSGeofenceManager d] ℹ  Persist monitored geofences: [CCC, Lucern HB, DDD, Zug HB, Zurich HB]
11-22 18:11:36.514 INFO [GeofenceDAO destroy]
  ✅  CCC
11-22 18:11:36.516 INFO [GeofenceDAO create]
  ✅  CCC
11-22 18:11:36.519 DEBUG [HttpService startMonitoringConnectivityChanges]
  🎾  Start monitoring connectivity changes
11-22 18:11:36.523 DEBUG [TSGeofenceManager d] ℹ  Persist monitored geofences: [Lucern HB, DDD, Zug HB, Zurich HB]
11-22 18:11:36.527 DEBUG [DeviceSettings startMonitoringPowerSaveChanges]
  🎾  Start monitoring powersave changes
11-22 18:11:36.530 INFO [GeofenceDAO destroy]
  ✅  DDD
11-22 18:11:36.532 INFO [GeofenceDAO create]
  ✅  DDD
11-22 18:11:36.532 INFO [HeartbeatService stop]
  🔴  Stop heartbeat
11-22 18:11:36.536 DEBUG [TSGeofenceManager d] ℹ  Persist monitored geofences: [Lucern HB, Zug HB, Zurich HB]
11-22 18:11:36.539 DEBUG [c h]
  ℹ  LocationAuthorization: Permission granted
11-22 18:11:36.543 INFO [GeofenceDAO destroy]
  ✅  Zurich HB
11-22 18:11:36.546 INFO [GeofenceDAO create]
  ✅  Zurich HB
11-22 18:11:36.555 DEBUG [TSGeofenceManager d] ℹ  Persist monitored geofences: [Lucern HB, Zug HB]
11-22 18:11:36.566 INFO [GeofenceDAO destroy]
  ✅  Lucern HB
11-22 18:11:36.568 INFO [GeofenceDAO create]
  ✅  Lucern HB
11-22 18:11:36.573 DEBUG [AbstractService start]
  🎾  LocationRequestService [eventCount: 1]
11-22 18:11:36.575 INFO [SingleLocationRequest startUpdatingLocation]
  🔵  [SingleLocationRequest start, action: 1, requestId: 1]
11-22 18:11:36.576 DEBUG [TSGeofenceManager d] ℹ  Persist monitored geofences: [Zug HB]
11-22 18:11:36.578 DEBUG [AbstractService finish] ⚙  finish LocationRequestService [eventCount: 0, sticky: true]
11-22 18:11:36.581 INFO [GeofenceDAO destroy]
  ✅  Zug HB
11-22 18:11:36.583 INFO [GeofenceDAO create]
  ✅  Zug HB
11-22 18:11:36.592 DEBUG [TSGeofenceManager d] ℹ  Persist monitored geofences: []
11-22 18:11:36.775 DEBUG [TSLocationManagerActivity execute] locationsettings
11-22 18:11:36.802 DEBUG [TSLocationManagerActivity stop] eventCount: 0
11-22 18:11:36.846 DEBUG [TSGeofenceManager$e run] evaluation buffer timer elapsed
11-22 18:11:36.849 ERROR [TSLocationManager getLastLocation]
  ‼  Failed to get last location: com.google.android.gms.tasks.zzw@a4fb356
11-22 18:11:36.876 DEBUG [TSLocationManagerActivity onDestroy]
11-22 18:11:38.918 DEBUG [AbstractService start]
  🎾  LocationRequestService [eventCount: 1]
11-22 18:11:38.923 INFO [LocationRequestService handleLocationResult]
╔═════════════════════════════════════════════
║ motionchange LocationResult: 1
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 47.186000,8.520016 hAcc=15.246 et=+1d8h20m25s582ms alt=489.3999938964844 vAcc=2.2197466 vel=0.16108112 bear=336.0412 {Bundle[{}]}], age: 1029ms, time:<PHONE_NUMBER>893

11-22 18:11:38.932 INFO [TSLocationManager onSingleLocationResult]
  🔵  Acquired motionchange position, isMoving: false
11-22 18:11:38.933 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 15.246
11-22 18:11:38.941 DEBUG [AbstractService finish] ⚙  finish LocationRequestService [eventCount: 0, sticky: false]
11-22 18:11:38.947 DEBUG [AbstractService onDestroy]
  🔴  LocationRequestService stopped
11-22 18:11:38.998 DEBUG [TSGeofenceManager$f$a a] ℹ  GeofencingClient addGeofences
11-22 18:11:38.999 DEBUG [TSGeofenceManager d] ℹ  Persist monitored geofences: [Company, BBB, AAA, CCC, DDD, Zurich HB, Lucern HB, Zug HB]
11-22 18:11:39.000 DEBUG [TSGeofenceManager$f$a a]
╔═════════════════════════════════════════════
║ TSGeofenceManager monitoring 8/8
╠═════════════════════════════════════════════
╟─ 🎾  Company
╟─ 🎾  BBB
╟─ 🎾  AAA
╟─ 🎾  CCC
╟─ 🎾  DDD
╟─ 🎾  Zurich HB
╟─ 🎾  Lucern HB
╟─ 🎾  Zug HB
╚═════════════════════════════════════════════
11-22 18:11:39.028 DEBUG [AbstractService start]
  🎾  GeofencingService [eventCount: 1]
11-22 18:11:39.032 INFO [GeofencingService handleGeofencingEvent]
╔═════════════════════════════════════════════
║ Geofencing Event: ENTER
╠═════════════════════════════════════════════
╟─ AAA
╚═════════════════════════════════════════════
11-22 18:11:39.034 DEBUG [TSGeofenceManager setLocation] isMoving: false | stateChanged: false | timerExpired: false | elapsed: -1370 | d: 0.62692136
11-22 18:11:39.040 DEBUG [LocationRequestService handleLocationResult] SingleLocationRequest 1 isFinished? true
11-22 18:11:39.040 DEBUG [TSGeofenceManager setLocation] isMoving: false | stateChanged: false | timerExpired: false | elapsed: 0
11-22 18:11:39.040 DEBUG [AbstractService finish] ⚙  finish LocationRequestService [eventCount: 0, sticky: false]
11-22 18:11:39.061 INFO [b persist]
  ✅  INSERT: 8ced35fb-eb38-4b0c-ab11-b2189c6f9364
11-22 18:11:39.068 INFO [HttpService flush]
╔═════════════════════════════════════════════
║ HTTP Service (count: 1)
╠═════════════════════════════════════════════

11-22 18:11:39.075 DEBUG [AbstractService finish] ⚙  finish GeofencingService [eventCount: 0, sticky: false]
11-22 18:11:39.104 DEBUG [AbstractService start]
  🎾  BackgroundTaskService [eventCount: 1]
11-22 18:11:39.105 INFO [BackgroundTaskManager$Task start] ⏳ startBackgroundTask: 1
11-22 18:11:39.111 DEBUG [b first]
  ✅  Locked 1 records
11-22 18:11:39.112 INFO [HttpService a]
  🔵  HTTP POST: 8ced35fb-eb38-4b0c-ab11-b2189c6f9364
11-22 18:11:39.213 INFO [HttpService$h onResponse]
  🔵  Response: 200
11-22 18:11:39.214 DEBUG [b destroy]
  ✅  DESTROY: 8ced35fb-eb38-4b0c-ab11-b2189c6f9364
11-22 18:11:39.218 INFO [BackgroundTaskManager$Task stop] ⏳ stopBackgroundTask: 1
11-22 18:11:39.219 DEBUG [AbstractService finish] ⚙  finish BackgroundTaskService [eventCount: 0, sticky: false]
11-22 18:11:39.221 DEBUG [AbstractService onDestroy]
  🔴  BackgroundTaskService stopped
11-22 18:11:39.581 DEBUG [AbstractService onDestroy]
  🔴  GeofencingService stopped
11-22 18:11:40.218 INFO [TSScheduleManager oneShot]
  ⏰ Scheduled OneShot: TERMINATE_EVENT in 10000ms (jobID: -1708771588)
11-22 18:11:40.303 DEBUG [LifecycleManager onPause] ☯  onPause
11-22 18:11:40.307 DEBUG [LifecycleManager onStop] ☯  onStop
11-22 18:11:50.275 INFO [ScheduleEvent onOneShot]
╔═════════════════════════════════════════════
║ ⏰ OneShot event fired: TERMINATE_EVENT
╠═════════════════════════════════════════════

11-22 18:11:50.277 DEBUG [TerminateEvent$a a]
  ℹ  TERMINATE_EVENT ignored (MainActivity is still active).
11-22 19:14:46.223 DEBUG [LifecycleManager onStart] ☯  onStart
11-22 19:14:46.230 DEBUG [LifecycleManager onResume] ☯  onResume
11-22 19:14:46.242 INFO [HttpService flush]
╔═════════════════════════════════════════════
║ HTTP Service (count: 0)
╠═════════════════════════════════════════════

Here's the log includes TSLocationManager
11-22 18:04:37.641 DEBUG [TSLocationManagerActivity execute] locationsettings
11-22 18:04:37.711 DEBUG [TSLocationManagerActivity stop] eventCount: 0
11-22 18:04:37.775 ERROR [TSLocationManager getLastLocation]
  ‼  Failed to get last location: com.google.android.gms.tasks.zzw@16a4782
11-22 18:04:37.807 DEBUG [TSLocationManagerActivity onDestroy]
11-22 18:04:39.311 INFO [TSLocationManager onSingleLocationResult]
  🔵  Acquired motionchange position, isMoving: false
11-22 18:04:39.312 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 18.393

That not a complete and unedited log that I want to see.

Here's the complete log file
background-geolocation-pixle4a.log

"trackingMode": 0,

Show me your code.  Your logs show the plugin is in the geofences-only mode (ie: .startGeofences().).  You should not expect location-tracking with that mode.

.startGeofences() = monitor geofences only.
.start() = tracking location + geofences.


Update dependencies, fix initialization of OpenGL on OSX

depends on https://github.com/RenderKit/openvkl/pull/31


Only allow access to a specific directory and sub-directories

Would it be possible to restrict file chooser to only access a specific directory and sub-directories only rather than the entire system directory? The reason for this is that I am developed a web app that allows users to select and display geospatial data. The web app can be deployed to a web server. It would be a security risk if users are allowed to browse the entire system directory of a web server.
https://user-images.githubusercontent.com/5016453/103163498-a447c700-47cc-11eb-97d7-a8be4e2ad4d2.mp4

Sounds like a good idea. I'll see about adding that as an option.

@giswqs I'm almost done implementing this but I had one question.
Would you like the value displayed next to the buttons when applying the selection to show a stripped version of the path? For example, if the top_folder is set to /home/jdoe, should a selection for /home/jdoe/folderA/file.txt display the full path or a stripped down version like /jdoe/folderA/file.txt (so it doesn't hint at the underlying folder structure on the web server)?
The value returned by the selected property will always return the full path of course.

@crahan Thanks for working on this. I think the stripped version of the path is a better choice for reducing security risk.

I've released an intermediate version with the fix for https://github.com/crahan/ipyfilechooser/issues/38. One additional question as I've been trying to solution this is if the selected path and filename values returned by the widget should be the full path on the server or the restricted value?
For example, if /var/www/application/ is the top_folder value the user can not navigate past, would selecting /data/example.txt in the widget return /var/www/application/data/example.txt as the selected value or /data/example.txt?
It sounded from your request that you would want to have everything restricted and hidden as much as possible as to not allow the users to navigate around the web server or give away any information regarding the server's folder structure beyond the restricted folder. My assumption is that these requirements extend to the actual value returned by the widget as well.
Please let me know if anything is unclear.

Many thanks for the fix! v0.4.3 works like a charm. Regarding the file path, it is fine to return the full path as long as the user cannot navigate past the restricted directory. I would prefer the full path /var/www/application/data/example.txt as the selected value because I need it to be passed into other functions for further processing. Thanks.

I made a video tutorial for using ipyfilechooser with ipyleaflet. https://youtu.be/wxUZiWnHrhw
https://user-images.githubusercontent.com/5016453/114407146-1c68ab80-9b76-11eb-8d3a-5ceffd7cd98e.mp4

Hi @giswqs, I've finally finished implementing this feature and a test version of the code can be found in the https://github.com/crahan/ipyfilechooser/tree/root_folder branch.
When you specify a sandbox_path parameter the pathlist dropdown and label will show a sandboxed or shortened version of the selected path and navigating to a folder beyond the sandbox_path is not possible anymore. However, .selected, .value, and selected_path will still return the full path.
Without the sandbox parameter:

With the sandbox_path parameter:

If you have some time to test and confirm all is working as you'd expect, that would help a lot as this was a rather large change.

With the sandbox functionality I also added restrictions to using \, / at the start and end of filenames, as well as ..\ and ../ anywhere inside filenames to ensure users can not use the filename field to create a path that would map to a folder outside of the sandbox.

@crahan Thanks a lot for implementing this. It works as expected when passing the sandbox_path during the filechooser creation. It would be even better if the sandbox_path can be set after the filechooser has been created. See the example below. I am not sure if it is feasible and how difficult it is to implement it. In my video demo above, the filechooser has been created in advance for the users using os.getcwd() as the initial path. It would be nice if users can set the sandbox_path afterwards because it would be challenging for users to modify the GUI source code.
https://colab.research.google.com/drive/1C4GpAhe8_bKd14En3Kh975eElL_D9rOB?usp=sharing
fc3 = FileChooser('/content/sample_data')
fc3.sandbox_path = '/content'  #no effect
fc3

That should be no problem.  I'm thinking to:

throw an exception when a filechooser object is created with a path and sandbox_path that don't align
trigger a warning when either property is changed on an existing filechooser object which results in path and sandbox_path not to align anymore and then leave the current value unchanged

The root_folder branch has been updated with the option to update the sandbox_path on an existing filechooser.
Please note that doing so will first check if the default_path and new sandbox_path value can work together (one falls under the other). If not, then it throws an error and the assignment will fail. If both paths work together then the new sandbox_path is set and the filechooser is reset. This can be done at any time, so before or after the filechooser is displayed in the notebook.
Similar checks have been added for other properties as well to ensure path and filename parameters are valid prior to updating filechooser object properties with those values.

Thanks for the quick implementation. It seems to work well if sandbox_path is set before filechooser is displayed. However, if sandbox_path is set after the filechooser is displayed and users already select a filepath outside the sandbox_path, the filechooser might still show the system directory. I also got the index out of bound errors at first try, but I could not reproduce it when trying to taking the screencast.
https://colab.research.google.com/drive/1C4GpAhe8_bKd14En3Kh975eElL_D9rOB?usp=sharing

OK, I can reproduce the error now.

Interesting. Changing the sandbox_path is supposed to reset the filechooser, verify sandbox_path and default_path can work together (and throw an error if they are not aligned), and clear the current selection. I'll test some more, but in the meantime can you confirm you're testing with commit 6fc806b?
Thanks again for helping to test this!

Yes, I pulled the latest commit. You can test it here https://colab.research.google.com/drive/1C4GpAhe8_bKd14En3Kh975eElL_D9rOB?usp=sharing

The colab link seems to fail to run the reset() function. I tried calling fc4.reset() which should reset the filechooser to its original state, but that's not executing on the colab link you provided. Locally it appears to execute as expected.
As updating the sandbox_path value calls reset(), I'm thinking that's where things are failing. Below is a screen recording using similar initialization code as your example which tests both the reset() function and updating sandbox_path.
I'm somewhat baffled as to why it's failing.
https://user-images.githubusercontent.com/172588/132713695-b50ce3b5-16d6-4d92-926f-e555c8a370b1.mov

It might be because Colab uses a different security model. Colab sometimes behaves differently than Jupyter notebook. This is not a big deal. As long as it works fine with Jupyter, we are good. I look forward to incorporating this into my packages once you have a new release. Many thanks for implementing this!

Is there any way for you to run a quick test on a local Jupyter notebook or lab instance just to confirm it's working well in that scenario?

Yes, it works as expected.

Thank you for confirming. I'm adding a few more smaller items like configurable folder icons and then I'll push out a new release. The release after that will focus on swapping out os.path for pathlib and writing some proper documentation.

v0.6.0 has been released and is now available from PyPi and Conda-forge. It includes the ability to restrict navigation up to a specific folder (by specifying a sandbox_path) and a number of additional enhancements and bug fixes. Please see https://github.com/crahan/ipyfilechooser/releases for details.

Awesome! Thanks a lot for implementing this.


Service Request: Spellcheck (dotnet/maui)

Service Request: Spellcheck Automation
ℹ This is an archival item to capture a past request that I implemented according to these standards.
Prerequisites
This service is currently only a good fit in certain situations.

[x] The docs are in Markdown or similar format.
[x] The docs are written in English.

Request Information:

Repository URL: https://github.com/dotnet/maui
Are you one of the maintainers of this repository? N/A

Or, link to where spellcheck is discussed for the repository: N/A

About Your Docs Setup

For Implementers or Would-be Implementers

[x] Implement according to the implementation guide
[x] Paste the PR link in the description or comments here
[x] Be sure you comment here along the way if you find anything challenging; we can use that to improve our process.

Completed: https://github.com/dotnet/maui/pull/10774


Missclaffication of .jsm files as being of Java code (should be javascript)

Can be reproduced here https://github.com/oshybystyi/Linguist-jsm-misclassification-bug .
I checked https://github.com/github/linguist/blob/master/lib/linguist/languages.yml - and .jsm is related to javascript (I use those files in firefox extensions, example here).

This is because of the modeline. You can tell Linguist to consider this file as JavaScript with a .gitattributes file:
*.jsm linguist-language=Java

We're having many users with Java modelines on their JavaScript files. I'll see if we can do something (maybe it would be worth having an exception for this particular modeline...).

@pchaigno, I've just copied the first modeline from some firefox module (like [PdfJs](https://dxr.mozilla.org/mozilla-central/source/browser/ex tensions/pdfjs/content/PdfJs.jsm)) not realizing of what it does.
Don't think that it makes sence to implement the exceptions for that.
So mark this bug as 'invalid'.

I've just copied the first modeline from some firefox module (like PdfJs) not realizing of what it does.

It's actually used for Emacs and Vim syntax highlighting.
Is this issue resolved then?

Is this issue resolved then?

Yes, thanks.


Frame offsets like in offsets.txt to Friday Night Funkin, pls?

Frame offsets like in offsets.txt to Friday Night Funkin, pls?

Hi! I'm sadly not familiar with Friday Night Funkin nor the offset.txt you do mention, can you elaborate please?

Hi! I'm sadly not familiar with Friday Night Funkin nor the offset.txt you do mention, can you elaborate please?
Offsets for each individual frame, pls?

Offsets x and y for each individual frame, pls?

Hi! I'm sorry for not responding, as other things have been a priority.
You already can change each individual frame offset, simply click on an image and once selected change the offset using the arrow symbols, like in this video:


Changing default configs

Summary of Changes

Added flags for setting the object detection model & path in preparation for switching the model
Changed the default simulator town to 1 since the official pylot Docker container does not currently have town 7 included. Town 7 is a part of the additional maps package which needs to be imported separately.

LGTM!


Created training notes

I have made .md file of training that I have gained

Approved
These are just her training notes.


Track the forge and reception time of ChainSync headers

The network team wants to know how much time there is between the forging of a block and the reception of the corresponding header via the ChainSync protocol.
Since slot to time conversions depend on the ledger state, we can't just provide a SlotNo -> UTCTime function. Instead, we'll need a valid LedgerState/View with which we can convert the slot of a header to a RelativeTime. If we combine that with the RelativeTime at which we received the header (using SystemTime), we can compute the time between these two events.
The ChainSync client will then expose this information about the candidates by exposing AnchoredFragments of Timed (Header blk).
Note that not all headers on candidate fragments will have been received over the network, e.g., when we connect to a peer with exactly the same chain as us, none of these headers will have been received from the network. In these cases, we won't be able to provide the time between the two events.

@karknu I'm picking this up from Thomas. Thanks for the prompt.
My first high-level question: Thomas's work here sofar will provide the time the header was most recently received. EG if our peer switches away from chain A to some chain B and then later switches to another chain C that extends A, each header H that is on both A and C will have later reception times on the candidate C than they did on the candidate A.
Is that appropriate for your use case? Fair warning: if you say "no", then I'll have to think much harder.

It would not be appropriate, I'd prefer a no-value to wrong value for a header we received again.
There are two use cases for this.

Monitoring block propagation time. This should be an instantiations conversion from SlotNo to UTCTime. This metric will give feedback to SPOs, helping them decide if it is feasible for them to run their operation with a given ISP + HW setup. #2923 is an example where this would help.
Ranking Peers for P2P. Peers will be ranked based on how often they are the first to present us with a new header within a moving window. This doesn't require a SlotNo to UTCTime conversion, just away to track the recv time per header per peer.

Thanks for clarifying. I'll do some studying and design and reply back, perhaps schedule a call etc.

@karknu Edsko and I discussed this today. We iterated really quickly, trying to determine both what we could easily give you and also what data seemed most meaningful. EG We could report "the first time (relative to H's forge slot) if any that we received the header H since the last connection restart" on a whole-node and/or per-peer basis. But that would require adding some new state, which we'd like to avoid as much as possible, especially since it's not obvious how to sufficiently bound the growth of that particular cache in a clearly useful and sound way.
So we iterated from there, bouncing between alternative implementations and alternative outputs (eg the above delay). We think we came up with something solid.
Would you confirm whether the below is sufficient for your Network-side needs? Thanks.
If this is too much text or too far off-base, we should have a call.
Context
The fundamental user need: What is the probability that blocks I forge will end up on the chain?
Concretization to this ticket: If I receive a block too late, then I'll forge a small fork, which has a lower chance of ending up on the ultimate chain. So I want to monitor my incoming delays, so I can assess my own network/hardware configuration and/or to penalize/favor peers.
The "magic number" so to speak is the average of 20s between active slots: I need to receive the latest block, forge on it, and send my new block, all soon enough that it reaches the next leader with high probability within that average 40s window. (I haven't double-checked my logic in that last sentence, but I think the main idea is right and clear enough.)
This ticket is motivated by that; our overall goal here is to calculate a statistic or vector thereof that characterizes the incoming block propagation delays, on both a whole-node and per-peer basis. (I'm naively assuming incoming delay is correlated with outgoing delay --- I haven't considered how to separately measure outgoing delays. I suppose we could estimate round-trip delays for blocks that we forged...)
Mechanism
I'll make our proposal and then try to justify it.
For a sliding window of the last N slots behind the wallclock, for each slot, we'll record the reception time of the first tip header that inhabited that slot, if any.
A tip header is any header that arrives as a RollForward message that also reports that that header is the tip of the peer's own latest selection. In other words, it's when the two RollForward arguments have the same hash.
https://github.com/input-output-hk/ouroboros-network/blob/60175c64673bb449ff5c500d4319c8ba6a7d8ea2/ouroboros-network/src/Ouroboros/Network/Protocol/ChainSync/Type.hs#L89-L95
Loosely, the array is Vector (Maybe Time) and of fixed length N. Thus it's crucially bounded. N on scale of minutes? Hours?
Remark. It's possible that the peer will extend its chain by multiple blocks in rapid succession (eg if it made a relatively long fork switch), and so we'll only identify the latest of them as a tip header. This incompleteness seems fine, unless we're never caught up to them -- we haven't considered how likely that will be under nominal circumstances. We did observe that a peer that is bulk syncing might rarely send us its tip header, but we'd actually want to penalize such a peer, right?
Justification
We're assuming that the arrival time of a tip header is an accurate indicator of that header's propagation delay. This seems uniquely true for tip headers; any other arrival of a header is not necessarily the first time we've seen it. Moreover, focusing on tip headers from slots near the wall clock gives us propagation delays of recent headers. That's what (we think) the node ultimately cares about when monitoring its network capabilities and when ranking peers.
The differences from the previous design:

We are not reporting on a per-header basis but instead per slot. This seems like an acceptable change, and in particular it seems to correctly handle the consequences of the peer jumping back and forth between neck-and-neck chains.

We might not report for every slot. In other words, every tip header arrival is the first time that header has arrived from the peer, but not every header first arrives as a tip header. This incompleteness seems OK, considered this data is ultimately input to a statistic anyway.

Number of headers per minute is technically unbounded, while number of slots per minute is fixed by definition. This means the buffer size is determined solely by how much recent time we want to consider when computing performance statistics.

We could store the min and also the max propagation delay per-slot. Or also an average, etc. There is flexibility here, as long as the memory size is statically bounded.

We can maintain the N-slot array of propagation delays per-peer and merge them via piecewise min. So we have both node-wide (for SPO insight metrics) and per-peer statistics (for peer selection), via simple composition.

We can no longer re-use the candidate fragments themselves to communicate this delay info to the Network layer.

The main similarity to the previous design is that we'll still need an up-to-date EpochInfo in order to convert each recent slot to a current time, so we can subtract it from the recorded reception times to compute each individual propagation delay (eg the min and/or max for that non-empty slot).

I think that the proposal should work, but I'd like to separate  the responsibilities between consensus, network and tracing.
How about:

Consensus provides a facility that can calculate the header propagation delay or block propagation delay. It should be possible to calculate the header propagation delay from chainsync's MsgRollForward and from tipsample's MsgNextTipand MsgNextTipDone . It should be possible to calculate the block propagation delay for blockfetch's MsgBlock . Consensus holds no state mapping headers, blocks or slot numbers to receive time or delay.
Tracing provides a counter which tracks the block propagation delay. That is the block propagation time calculated at the time addFetchedBlock is called. Tracing keeps some state to only report the minimum delay per slot number.
Network tracks recent header and block propagation delay along with ΔQ metrics per peer. In case of duplicate propagation values per slot only the smallest value is kept. This structure will provide peer ranking information for the governor.

Yes, great pushback. I'm got carried away when I wrote this one:

We can no longer re-use the candidate fragments themselves to communicate this delay info to the Network layer.

I'm unfamiliar with TipSample -- didn't even realize that mini protocol existed until just now.
But yes, we can at least start with the Consensus Layer's ChainSync client annotating some headers in the candidate fragments with their observed header propagation delay, specifically those that arrived as a tip header. I need to consider Block Fetch -- eg if it'll need the same restriction to tips.

@karknu I have a branch which ultimately provides a Maybe Data.Time.NominalDiffTime for each header on the fragment; it's Just if the header arrived as the "tip" of the peer sending it, Nothing otherwise, as we motivated above.
On my branch, I currently discard that when I pass the header fragments to BlockFetch, since I haven't updated BlockFetch at all.
Do you know what the expected interface is for BlockFetch to receive these delays?
Do you want me to make this branch available so you can experiment with it now?

Do you know what the expected interface is for BlockFetch to receive these delays?

I would prefer an extra function to blockFetchClient which looked something  something like:
blockDelay :: HasHeader block => block -> m DiffTime

Do you want me to make this branch available so you can experiment with it now?

Yeah. With this data we can provide extra metrics which will be usefull for SPOs.

I would prefer an extra function to blockFetchClient which looked something something like:
blockDelay :: HasHeader block => block -> m DiffTime

I don't think block -> m DiffTime will be viable for the above proposal. EG that'd require m to maintain some cache that maps blocks to their reception time.
My branch currently anticipates that we'd expand readCandidateChains to something like STM m (Map peer (AnchoredFragment (header, Maybe Data.Time.NominalDiffTime))).
https://github.com/input-output-hk/ouroboros-network/blob/59e71cb54669aac35df9747bd3037d09b8f63f6b/ouroboros-network/src/Ouroboros/Network/BlockFetch.hs#L140

Do you want me to make this branch available so you can experiment with it now?

Yeah. With this data we can provide extra metrics which will be usefull for SPOs.

I'll rebase it and share the branch name with you within the next 10 hours.

From my answer above "Consensus holds no state mapping headers, blocks or slot numbers to receive time or delay.".
I'm not interested in a consensus maintained cache that can provide recv times for blocks.

@karknu -- based on my above comment, I wonder: did PRs #2988 #2995 resolve this Issue? Should we Close it? (I've mostly paged this workstream out during our intervening focus on Alonzo and neglected to write an update here back when it was all fresh.)

@nfrisby Yes, we have have what we needed for our peer ranking metric.

Thanks 👍    Closing.


Refactor sgl-kernel build

Motivation
Involve all ops into one target. Reduce redundant build code.

I’ll help review today


VM::init_loadpath won't work with static builds

When choosing to compile with RUBY_STATIC flag the test for class::vm::VM::init_loadpath fails.

Fixing this may fix #44

This is the failures I get when running tests on my machine with a static build.
failures:

---- src/class/string.rs - class::string::RString::is_valid_encoding (line 530) stdout ----
thread 'src/class/string.rs - class::string::RString::is_valid_encoding (line 530)' panicked at 'test executable failed:

dyld: lazy symbol binding failed: Symbol not found: _rb_encdb_declare
  Referenced from: /opt/rubies/ruby-2.5.3/lib/ruby/2.5.0/x86_64-darwin18/enc/encdb.bundle
  Expected in: flat namespace

dyld: Symbol not found: _rb_encdb_declare
  Referenced from: /opt/rubies/ruby-2.5.3/lib/ruby/2.5.0/x86_64-darwin18/enc/encdb.bundle
  Expected in: flat namespace

', librustdoc/test.rs:367:17
note: Run with `RUST_BACKTRACE=1` for a backtrace.

---- src/class/string.rs - class::string::RString::from_bytes (line 110) stdout ----
thread 'src/class/string.rs - class::string::RString::from_bytes (line 110)' panicked at 'test executable failed:

dyld: lazy symbol binding failed: Symbol not found: _rb_encdb_declare
  Referenced from: /opt/rubies/ruby-2.5.3/lib/ruby/2.5.0/x86_64-darwin18/enc/encdb.bundle
  Expected in: flat namespace

dyld: Symbol not found: _rb_encdb_declare
  Referenced from: /opt/rubies/ruby-2.5.3/lib/ruby/2.5.0/x86_64-darwin18/enc/encdb.bundle
  Expected in: flat namespace

', librustdoc/test.rs:367:17

---- src/class/vm.rs - class::vm::VM::init_loadpath (line 53) stdout ----
thread 'src/class/vm.rs - class::vm::VM::init_loadpath (line 53)' panicked at 'test executable failed:

dyld: lazy symbol binding failed: Symbol not found: _rb_encdb_declare
  Referenced from: /opt/rubies/ruby-2.5.3/lib/ruby/2.5.0/x86_64-darwin18/enc/encdb.bundle
  Expected in: flat namespace

dyld: Symbol not found: _rb_encdb_declare
  Referenced from: /opt/rubies/ruby-2.5.3/lib/ruby/2.5.0/x86_64-darwin18/enc/encdb.bundle
  Expected in: flat namespace

', librustdoc/test.rs:367:17

failures:
    src/class/string.rs - class::string::RString::from_bytes (line 110)
    src/class/string.rs - class::string::RString::is_valid_encoding (line 530)
    src/class/vm.rs - class::vm::VM::init_loadpath (line 53)

test result: FAILED. 181 passed; 3 failed; 3 ignored; 0 measured; 0 filtered out

The problem is not related to the particular missing symbol mentioned in the stacktrace above.
Actually, any VM::require call to require a .bundle (osx) or .so (linux) will raise an exception for missing symbols, which live in libruby.

The Ruby programming language's source code decides which symbol names to export publicly and which ones remain private.  Sometimes these are even OS specific as can be seen from #49 .
rb_encdb_declare is defined here: Ruby - ruby/encoding.c#L353 and used in the internal header here Ruby - ruby/internal.h#L1410 which means that we won't have access to it.  The text encoding database is either available to be included, or included, by calling ruby_init_loadpath which is available publicly and that method calls out to ruby_init_loadpath_safe here Ruby - ruby/ruby.c#L562 in which you can see has many C preprocessor conditionals which I suspect is causing this issue for static linking for us.
Without the ruby_init_loadpath giving us access to the source code available from Ruby - ruby/encoding.c we have only very limited use of text encodings which is also somewhat OS dependent and I believe typically includes the following from miniinit.c.
https://github.com/ruby/ruby/blob/4444025d16ae1a586eee6a0ac9bdd09e33833f3c/miniinit.c#L42-L49
We could re-implement the code that we've been excluded from in Rust for static linking but that may be a lot of work.  If this were done we'd conditionally compile this code based on the RUBY_STATIC env.
Basically we need to get what isn't working in our loadpath during static builds to work.  There's no telling how simple or difficult this is with my current knowledge or Ruby's C code and C programming in general.

Thanks for the writeup. My knowledge of Ruby internals and build process is quite limited as well, but this makes sense and definitely help me better understand the issue. I’ll keep investigating and keep you posted if I find anything.

Something I've noticed: if I try to require another lib such as zlib, I get
dyld: lazy symbol binding failed: Symbol not found: _rb_define_attr
  Referenced from: /opt/rubies/2.3.3/lib/ruby/2.3.0/x86_64-darwin16/zlib.bundle
  Expected in: flat namespace

However, rb_define_attr is not part of internal.h but ruby.h 🤔

Something I've noticed: if I try to require another lib such as zlib

Did you make sure the flags you passed in were the absolute last item printed from build.rs ?  Because if the flags are early it messes things up.

I may be missing something. I did not change build.rs to pass new flags. Also RbConfig::CONFIG['LIBS'] returns -lpthread -lgmp -ldl -lobjc on my machine, if that's what you are referring to.
What I'm alluding to is these failures on the static builds when trying to require("zlib").
This is just an example to illustrate that it might not be related to internal.h as you mentioned, unless I'm mistaken somewhere, which is strongly possible.

No you're right. I was mistaken.  LIBS comes out to "-lpthread -lgmp -ldl -lcrypt -lm " on my machine.

Would it be helpful to look at how Helix solved this? (if they ever did)
https://github.com/tildeio/helix
My (limited) understanding is that Helix tried to solve basically the same problem that Rutie does. So maybe one could borrow techniques from them.
Or maybe reach out to @wagenet or @chancancode and see if they have any advice.


For reproducibility, save versions of the tools we are using.

We should also dump nodes after they are created for comparison later.


Two items are selected in webconfigurator reporting

In the webconfigurator two items are selected, but just one is shown. I guess only one can be showed in the reporting screen, so it seems the orange selection color is not taken away from items which are selected before.  This seems to happen only once, after clicking around a few times the problem disappears.
OS: Windows 10
Chrome: Version 53.0.2785.116 m (64-bit)
Edge: 38.14393.0.0

timeout


Etcd protocol buffer storage support

#10
This is a small PR that implements initial support for marshaling/unmarshaling protocol buffers to etcd key/value storage with create, get, and delete operations. This PR does not close the issue. Subsequent PRs will wrap the object so that metadata (such as version) is also encapsulated by the storage object, and will add more storage operations (such as put).
Verification
$ cd data/storage/etcd
$ go test -v

Just a clarification note, it will wrap it with the database(etcd) metadata

Yes, we're talking about things like createdIndex, modifiedIndex ... the type of metadata used in a distributed k/v store for reasoning about ordering in the presence of concurrent updates.


Added update Pin method for archive notes

Description

Added update Pin method for archive notes

Fixes #356

Type of change
Please delete options that are not relevant.

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Documentation update
[ ] Tests update

Checklist

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] My changes generate no new warnings
[x] New and existing unit tests pass locally with my changes
[x] I have maintained a clean commit history by using the necessary Git commands
[x] I have checked that my code does not cause any merge conflicts

Screenshots (if applicable)
https://github.com/user-attachments/assets/bb00a59e-d07d-45e2-8664-d758e6f6ce3a

@yashmandi @theashikagupta  : Can you please review this?


Use new "type" field in mapping.json to determine how to parse the filetype

Right now we use a case to handle the filetypes. This should be updated to get the type field in mappings.json and use that to determine how to convert the UMM

Resolved by https://github.com/DemiCloud/universal-media-metadata/commit/2fddc0f05c6dc5a457b4558e3432e8d28d60f2de


libgfortran issue downstream

Since the mamba upgrade in October, I see the following concretization issue in my downstream project:
The reported errors are:
- Encountered problems while solving:
-   - package fftw-3.3.10-nompi_h427eb53_101 requires libgfortran5 >=9.4.0, but none of the providers can be installed

My project is a plain C/C++ project:
https://github.com/conda-forge/warpx-feedstock/pull/33
and and declares the FFTW dependency here:
https://github.com/conda-forge/warpx-feedstock/blob/fe5437ec5282ebdbf4e43af96b8a894e26debb31/recipe/meta.yaml#L43
Should we try to rerender the feedstock and see if this solves it?

Sounds reasonable. Do you want to try?

Thanks! Yes, PR in #81 :)


Opae-sdk: fix fpgainfo events sysfs path

Signed-off-by: anandaravuri<EMAIL_ADDRESS>

Coverage remained the same at 65.489% when pulling bf7587ae797cb257aa955c194d7515c569bc60d2 on aravuri/fix_fpgainfo_events_sysfs into 2b8fcbfcf068518ad89442e65703fd5d915ac672 on master.


Fixes binary search of non-existing elements in an NSArray.

This PR fixes the behaviour of the indexOfObject:inSortedRange:options:usingComparator: method when searching for a non-existing element, with either the NSBinarySearchingFirstEqual or NSBinarySearchingLastEqual option set.
The previous implementation was throwing an exception in that case.
This one returns NSNotFound, exactly like OS X, and iOS.

Hi @bSr43, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
The agreement was validated by Microsoft and real humans are currently evaluating your PR.
TTYL, MSBOT;

:clock1:

@ms-jihua the tests have been moved.

:shipit:


[Bug] loading of keyboard_list.json fails with CERT_DATE_INVALID response

Describe the Bug
When trying to access the config.qmk.fm/#/ webpage, the initial fetch of the keyboard lists JSON fails.

Additional Context?
Have tried numerous times over the day to access and tried to access from different machines, as well. Same result.

Duplicate of https://github.com/qmk/qmk_configurator/issues/1093


[Bug] Worker with generic input and output is not supported

Hi there!
There was work done last year to enhance the Worker to be able to execute functions with generic input/output, instead of Task/TaskResult: https://github.com/conductor-sdk/conductor-python/pull/116
This PR missed a line. It creates an execute_function_input which is either task or task.input_data, based on whether the function expects a Task or not, but it consumes task instead of execute_function_input on L66, thereby forgetting what it knew about the function's input parameter type.
L66 should read:
task_result.output_data = self.execute_function(execute_function_input) instead of
task_result.output_data = self.execute_function(task).

Hi @george-kirkman this is addressed in the latest version now.


EC2 detach_network_interface should return error when removing the primary network interface

Hi,
It seems that when calling detach_network_interface on the primary network interface (at index 0), AWS throws this error:
botocore.exceptions.ClientError: An error occurred (OperationNotPermitted) when calling the DetachNetworkInterface operation: The network interface at device index 0 and networkCard index 0 cannot be detached.
However, moto does allow it which results in an exception being thrown when calling describe_instances afterwards:
    @property
    def private_ip(self) -> Optional[str]:
>       return self.nics[0].private_ip_address
E       KeyError: 0

..\..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\site-packages\moto\ec2\models\instances.py:240: KeyError

@bblommers I can take a look


Navigation background colour HEX values

Navigation background colour should be -> #38598a

I'll fix this in my header changes

Created a pull request, I think Patrick needs to make some changes for this to be merged properly


Add Bitwise Shift Left Token at translator frontend

Implement the BITWISE_SHIFT_LEFT token to recognize the << operator for performing left bitwise shifts.

@Raghav-2903 will be working on this issue


Fix for MWAA Lambda Trigger Error: Ensuring Compatibility with Airflow Versions >=2.6.3

Issue #, if available:
Export dag returns "botocore.errorfactory.TaskTimedOut: An error occurred (TaskTimedOut) when calling the SendTaskFailure operation: Task Timed Out: 'Provided task does not exist anymore'"
Step function returns an error on run:

Description of changes:
Code has to be improved to handle versions from 2.5.1 (and downwards) and this is a conditional for upwards starting with 2.6.3.
⚠ Changing this will stop working for 2.5.1 (and previous versions).⚠
It happens if you use a MWAA >= 2.6.3. I managed to make it work with export MWAA_ENV_VERSION=2.6.3 with dags from the PR#59.
The problem resides in the "Common" Lambda, which requires a tweak:
❗Broken block for 2.6.3 (around line 13.441 in index.js):
  async triggerDag(dagName, configuration) {
    const triggerResult = await this.execute(`dags trigger ${dagName}`, configuration);
    if (!triggerResult.stdOut.includes("triggered: True")) {
      throw new Error(`Dag [${dagName}] trigger failed with the following error: ${JSON.stringify(triggerResult)}`);
    }
    return triggerResult;
  }

✅ Fixed:
  async triggerDag(dagName, configuration) {
    const triggerResult = await this.execute(`dags trigger -o json ${dagName}`, configuration);
    if (!triggerResult.stdOut.includes('"external_trigger": "True"')) {
      throw new Error(`Dag [${dagName}] trigger failed with the following error: ${JSON.stringify(triggerResult)}`);
    }
    return triggerResult;
  }

The Lambda runs the /aws_mwaa/cli  call with dags trigger which requires an additional -o json and the condition for "external_trigger": "True".
Looking at this document between versions https://airflow.apache.org/docs/apache-airflow/2.6.3/cli-and-env-variables-ref.html#trigger shows that:
# 2.5.1
airflow dags trigger [-h] [-c CONF] [-e EXEC_DATE] [-r RUN_ID] [-S SUBDIR]
                     [-v]
                     dag_id

# 2.6.3
airflow dags trigger [-h] [-c CONF] [-e EXEC_DATE] [--no-replace-microseconds]
                     [-o table, json, yaml, plain] [-r RUN_ID] [-S SUBDIR]
                     [-v]
                     dag_id

From 2.6.3 adds extra [-o table, json, yaml, plain] parameter which is defaulted to table. This breaks the Lambda conditional and throws the "botocore.errorfactory.TaskTimedOut: An error occurred (TaskTimedOut) when calling the SendTaskFailure operation: Task Timed Out: 'Provided task does not exist anymore'" error, which is misleading...

By checking the Lambda log, I saw that the call indeed returns a table that breaks the "token" with this format.

If you want to see what are all the possible outputs of this -o parameter looks like, take a look at this document to invoke the DAG locally: https://docs.aws.amazon.com/mwaa/latest/userguide/call-mwaa-apis-cli.html#create-cli-token-curl
CLI_JSON=$(aws mwaa --region YOUR_REGION create-cli-token --name YOUR_ENVIRONMENT_NAME) \
  && CLI_TOKEN=$(echo $CLI_JSON | jq -r '.CliToken') \
  && WEB_SERVER_HOSTNAME=$(echo $CLI_JSON | jq -r '.WebServerHostname') \
  && CLI_RESULTS=$(curl --request POST "https://$WEB_SERVER_HOSTNAME/aws_mwaa/cli" \
  --header "Authorization: Bearer $CLI_TOKEN" \
  --header "Content-Type: text/plain" \
  --data-raw "dags trigger YOUR_DAG_NAME") \
  && echo "Output:" \
  && echo $CLI_RESULTS | jq -r '.stdout' | base64 --decode \
  && echo "Errors:" \
  && echo $CLI_RESULTS | jq -r '.stderr' | base64 --decode

With this tests, I managed to debug the lambda call locally, and the problem resides on: /aws_mwaa/cli which behaves differently nowadays.
After adding the -o json parameter and the "external_trigger": "True" conditional, it works just like with the 2.5.1 😎👌🔥

Take care!

Thank you, @onisim-iacob! We will get this reviewed along with #59.

Hi @crupakheti
Thanks for the code. I was not able to fix the tests due to the change in the code (I will need some help on that). To deploy the new lambdas on AWS, Node14 is no longer available, so I update it to Node18 in mwaa-common-stack.ts, mwaa-polling-stack.ts, mwaa-resuming-stack.ts  (latest with available project packages is Node18).
Additionally I updated this block with the conditional for the JSON response for ``
  async triggerDag(dagName: string, configuration?: Record<string, string>): Promise<DagsCliResult> {
    const semVer = this.environmentVersion.split('.');

    let command = '';
    let resultIncludes = '';
    if (+semVer[0] <= 2 && +semVer[1] <= 5) {
      command = `dags trigger ${dagName}`;
      resultIncludes = 'triggered: True';
    } else {
      command = `dags trigger -o json ${dagName}`;
      resultIncludes = '"external_trigger": "True"';
    }

    const triggerResult = await this.execute(command, configuration);
    if (!triggerResult.stdOut.includes(resultIncludes)) {
      throw new Error(`Dag [${dagName}] trigger failed with the following error: ${JSON.stringify(triggerResult)}`);
    }
    return triggerResult;
  }

The packages.json from the Lambda folder, was also pointing to the latest version of the packages. For me the fix was to set the same versions as the main packages.json.
This PR also includes the change for #59. I also added the "2.6.3" DAGs with a fix on "export" for DAG_RUN_SELECT query, which made the DAG rerun the export upon restoring (check comment on DAG).
KR,

Hi @crupakheti
PR with fix for tests approved. All yours!
Thanks!


add RegisterTCP method for services

This PR add RegisterTCP method for existing services to support gRPC over TCP.

containerd client uses regular GRPC to communicate with services. I guess this will need a TCP client. Can you add more clarity what problem did you encounter with GRPC?

See https://github.com/containerd/containerd/issues/1324
If you have an issue with an existing use case, please open an issue describing the problem and solutions can be discussed there. This is intentionally not allowed today, so closing this for now.

containerd client uses regular GRPC to communicate with services. I guess this will need a TCP client. Can you add more clarity what problem did you encounter with GRPC?

Thank you for your prompt reply.
We are developing container product using containerd in our private network. But we don't want to deploy and maintain another daemon on every host. That's why I want to use GRPC over TCP.
I found TCP config(gRPC and ttRPC) in containerd's configfile. After debugging for a long time, I found there's no implementation in services. It's a littile confused for developers who need to use GRPC over TCP.
Could you please add document about TCP API available status? I think it's gonna be helped.

See #1324
If you have an issue with an existing use case, please open an issue describing the problem and solutions can be discussed there. This is intentionally not allowed today, so closing this for now.

Thank you for your promot reply. I will existing use case carefully before createing PR next time.


feat(VirtualTable): enable columns resize

Add resize for "Version" column in Nodes table - little native resize triangle near right bottom corner.

The table could be reviewed in UI here: https://nda.ya.ru/t/aL9co3Y674WeyY
To enable VirtualTable turn on "Use table with data load on scroll for Nodes and Storage tabs " experiment in settings.

add min-width for column and overflow: ellipsys for cells plz


Biome and Noise stuff

Maps NoiseSampler, PerlinNoiseSampler, OctavePerlinNoiseSampler, SimplexNoise, OctaveSimplexNoiseSampler, BiomeSource, EntitySpawnGroup

There's mapping name conflicts here, see log
Mapping source name conflicts detected:
  fd METHOD a (()Lxv;) -> [fd/method_1781, fd/getBiomeSource]
  ew METHOD a (()Lxv;) -> [fd/method_1781, ew/getBiomeSource]
  xp METHOD a (()Lxv;) -> [fd/method_1781, xp/getBiomeSource]

getBiomeSource is most likely named by different classes that have some sort of inheritance conflict or something like that

i don't see any issue with my PR, i mapped BlockView#method_1781 method name to getBiomeSource, none of inheritors have methods with same name except the one, which is implemented as part of implementing the interface

also, it builds just fine

use local maven and try using your mapping in intellij on b1.7.3, that's where I got the error


A hacky way to package ruby sources with vendor/bundle

This PR adds ruby_package_zip rule which grabs the sources, runs bundler into vendor/bundle folder and zips it all up.
It's cheating because it's downloading external resources not in a repository rule, but a regular one.
It's also using zip and bundle in the $PATH.

Not merging this as it breaks bazel design principles and downloads third party resources during the build time.


CUDA error: too many resources requested for launch

I want to use OpenPCDet v0.3 on a NVIDIA Jetson TX2 with the following specifications:
Ubuntu 18.04
JetPack 4.4
CUDA 10.2
CuDNN 8.0
Python 3.6.9
pytorch 1.6.0
spconv 1.2.1
All the 3D object detection methods which relies on spconv (SECOND, PartA2 etc.) failed due to a CUDA error RuntimeError: CUDA error: too many resources requested for launch. The other methods, like PointRCNN or PointPillars worked properly. Does anyone know how to solve this issue?
Thanks
Traceback (most recent call last):
  File "extract_bb.py", line 146, in <module>
    main()
  File "extract_bb.py", line 116, in main
    pred_dicts, _ = model.forward(data_dict)
  File "/home/nvidia/MTh_meyj/Software/OpenPCDet/pcdet/models/detectors/voxel_rcnn.py", line 11, in forward
    batch_dict = cur_module(batch_dict)
  File "/home/nvidia/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/home/nvidia/MTh_meyj/Software/OpenPCDet/pcdet/models/backbones_3d/spconv_backbone.py", line 147, in forward
    x = self.conv_input(input_sp_tensor)
  File "/home/nvidia/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/home/nvidia/.local/lib/python3.6/site-packages/spconv/modules.py", line 134, in forward
    input = module(input)
  File "/home/nvidia/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/home/nvidia/.local/lib/python3.6/site-packages/spconv/conv.py", line 199, in forward
    outids.shape[0], self.algo)
  File "/home/nvidia/.local/lib/python3.6/site-packages/spconv/functional.py", line 94, in forward
    algo=algo)
  File "/home/nvidia/.local/lib/python3.6/site-packages/spconv/ops.py", line 120, in indice_conv
    int(inverse), int(subm), algo)
RuntimeError: CUDA error: too many resources requested for launch

For the solution, see this Issue.
https://github.com/traveller59/spconv/issues/362


Release/4.0.0

:white_check_mark: Build TheIdServer 4.3.0.build.1830 completed (commit https://github.com/Aguafrommars/TheIdServer/commit/e54f860845 by @semantic-release-bot)


Question about DeltaLM's vocabulary size.

Describe
Model I am using (UniLM, MiniLM, LayoutLM ...) DeltaLM:
I used the spm model, dicts and checkpoint wich is given in the repo and followed the steps. But when I started to fine-tune in my data, I met the vocabulary size issue. Just like blow:
File "~/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1406, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for XLMTDecoderVariantModel:
size mismatch for decoder.embed_tokens.weight: copying a param with shape torch.Size([250104, 1024]) from checkpoint, the shape in current model is torch.Size([250008, 1024]).
size mismatch for decoder.output_projection.weight: copying a param with shape torch.Size([250104, 1024]) from checkpoint, the shape in current model is torch.Size([250008, 1024]).
Could you kindly help check it?
Thanks,
Wuleizi

Hi @wuleizi ,
Thanks for reporting the issue. This is because Deltalm contains some extra special tokens in the vocabulary. I have fixed it by automatically adjusting the vocabulary to fit in different settings (#393 ).
Thanks,
Shuming

Thanks Shuming.


New HA 2022.4.5 API breaks integration

HA introduced changes to the API where were deleted several constants.
https://github.com/home-assistant/core/commit/7fbe1dbc99b7cdf503820d2d0356090766ae1f7e
@49jan Do you have any plans to update your integration?

Thanks for your feedback.
I am currently busy with some projects. I expect to prepare the update for HA 2022.4.5 in 2 weeks.

@letovlive Version 1.1 should also work with the newer HA version.


TorchModuleWrapper directly calls to .forward

Hi,
The TorchModuleWrapper class directly calls to the torch module .forward of the wrapped torch module, I do not know if this is intentional, but calling the forward and not __call__ skips some torch code that is useful - it has hooks, it handles some interaction with dynamo in more. (I discovered it when some hooks stopped running)
This line:
https://github.com/keras-team/keras/blob/d5a452155a415d5fcbe568eb2a8441f64e57aa90/keras/utils/torch_utils.py#L113
Could probably be:
return self.module(*args, **kwargs)

If there is a good reason to avoid the __call__ , then all good (What is the reason?)
But, it might be just an oversight, and trivially fixable. (the unit tests on  keras/utils/torch_utils_test.py pass with the change).
Thanks!

Thanks for the report. This was just an oversight. I fixed it.


error in source after publish to google play

I get this error when I run the video ,
when I change the resolution it works.
what is this problem ?

Most probably it's a source error, like when you choose the same quality again does it work?
From what I am seeing it's not a package bug it's a source bug.
Btw nice layout for the controls, I think the package should add more layouts as defaults, to make it easier on people that don't want to make custom layouts ,if you want to add it to the package, let me know or open a pr for it

when I re select same quality it work , only first time.

Most probably it's a source error, like when you choose the same quality again does it work?
From what I am seeing it's not a package bug it's a source bug.
Btw nice layout for the controls, I think the package should add more layouts as defaults, to make it easier on people that don't want to make custom layouts ,if you want to add it to the package, let me know or open a pr for it

thanks for mentioning the layout I overwrite the controls , I hope to help but with this project I am using Get package as statement management, so shifting to another one will take time , I can start open an pr for those layouts when I finished , I published it yesterday but suddenly this error come up after publishing (it occurs on bundle version when I use release apk all things fine).

when I re-select same quality it work , only first time doesn't.

lets check
in debug everything works correctly right?
you are using video_player? did you try to enable media_kit?
does only happen at first launch of any video in app, or any video will get this error and you have to choose another quality (if only first video in general (it may be video_player problem))
can you share code so i can test with you (even if private)?

Most probably it's a source error, like when you choose the same quality again does it work?
From what I am seeing it's not a package bug it's a source bug.
Btw nice layout for the controls, I think the package should add more layouts as defaults, to make it easier on people that don't want to make custom layouts ,if you want to add it to the package, let me know or open a pr for it

thanks for mentioning the layout I overwrite the controls , I hope to help but with this project I am using Get package as statement management, so shifting to another one will take time , I can start open an pr for those layouts when I finished , I published it yesterday but suddenly this error come up after publishing (it occurs on bundle version when I use release apk all things fine).

the layout doesn't need to use get, just the placement of the slider and the other widgets is good. (like the package needs to only include the placements of the widgets and people can customize however they like)

when I re-select same quality it work , only first time doesn't.

lets check
in debug everything works correctly right?
you are using video_player? did you try to enable media_kit?
does only happen at first launch of any video in app, or any video will get this error and you have to choose another quality (if only first video in general (it may be video_player problem))
can you share code so i can test with you (even if private)?

let me try to reproduce the issue from my debug session then tell you , I am not using media_kit bc of the problem of re-seeking drawing not smooth 🥹 ( the problem of seek not painting )
even if I share the code to you ( the source is over private ip that only belongs to ISP )

Didn't we solve the seeking problem?

when I re-select same quality it work , only first time doesn't.

lets check
in debug everything works correctly right?
you are using video_player? did you try to enable media_kit?
does only happen at first launch of any video in app, or any video will get this error and you have to choose another quality (if only first video in general (it may be video_player problem))
can you share code so i can test with you (even if private)?

let me try to reproduce the issue from my debug session then tell you , I am not using media_kit bc of the problem of re-seeking drawing not smooth 🥹 ( the problem of seek not painting )
even if I share the code to you ( the source is over private ip that only belongs to ISP )

Didn't we solve the seeking problem?

it has one or two frame and it jumps ( looks weird ) that's why I am not using it .

Yeah that's due to my workaround, will check if I can make it better

I fixed the problem the issue was when I defining video format manually , I used dash type for videos then the issue occurs

Oh, glad you got it fixed


Feat/447 - UI toolkit and theme updates

Related issues 🔗
Closes #447
Description ℹ
A description of what this PR does. This should be non-dev readable. Technical stuff should go in the technical section below.
Demo 📺
Gif/video/images of new/corrected functionality if applicable
Technical 👨🔧
Details of technical implementation that reviewers may need to be aware of, if applicable.

do you think we may be able to squeeze a fix for the theme switcher issues in this PR?
this happens only in the charts and Trades atm


[snowflake] implement snowflake connection interface

Summary

Implement the most basic interfaces necessary to run a simple malloy query on snowflake
Write basic tests to check we can run an sql query and a malloy query via connection interface

Test Plan
[nix-shell:~/code/malloy2]$ npx jest --runInBand packages/malloy-db-snowflake
 PASS  packages/malloy-db-snowflake/src/snowflake_connection.spec.ts
  db:Snowflake
    ✓ runs a SQL query (940 ms)
    ✓ runs a Malloy query (1808 ms)

 PASS  packages/malloy-db-snowflake/src/snowflake_executor.spec.ts
  db:SnowflakeExecutor
    ✓ verifies batch execute (793 ms)
    ✓ verifies stream iterable (352 ms)

Test Suites: 2 passed, 2 total
Tests:       4 passed, 4 total
Snapshots:   0 total
Time:        5.688 s
Ran all test suites matching /packages\/malloy-db-snowflake/i.

Current dependencies on/for this PR:

main

PR #1

PR #2

PR #3   👈

This stack of pull requests is managed by Graphite.

Merge activity

Nov 9, 12:34 PM: @pavanka started a stack merge that includes this pull request via Graphite.


Extract common settings code for all F1 devices

On top of https://github.com/mck1117/wideband/pull/161

mmmmmmmmerge conflict

@mck1117 resolved.


[FEA] Utilize a built devcontainer image for the CI runner

One downside of using devcontainers currently is they don't provide the exact same environment that the CI runner uses. So its possible to get errors in CI that do not show up locally due to different versions, configs, etc.
We can utilize the devcontainer CLI to export images that we could then use for the CI runner. This would eliminate many differences between the CI environment and the environment developers use.

This goes along with the #rapidsai/devcontainers work we've been doing. I'm looking forward to getting a prototype of this up and running. :+1:


Unit test "pkg/registry/client_test.go" is using "gcloud"

make unit fails if you are not logged in go gcloud. I think this is an odd prerequisite for an unit test.
To isolate the error, run
go test pkg/registry/client_test.go

It produces the error (unless you are logged in to gcloud)
ERROR: (gcloud.auth.docker-helper) There was a problem refreshing your current auth tokens: ('invalid_grant: Invalid JWT Signature.', '{"error":"invalid_grant","error_description":"Invalid JWT Signature."}')
Please run:

  $ gcloud auth login

to obtain new credentials.

If you have already logged in with a different account:

    $ gcloud config set account ACCOUNT

to select an already authenticated account to use.
ERROR: (gcloud.auth.docker-helper) There was a problem refreshing your current auth tokens: ('invalid_grant: Invalid JWT Signature.', '{"error":"invalid_grant","error_description":"Invalid JWT Signature."}')
Please run:

  $ gcloud auth login

to obtain new credentials.

If you have already logged in with a different account:

    $ gcloud config set account ACCOUNT

to select an already authenticated account to use.
2021/06/24 10:38:22 http: superfluous response.WriteHeader call from command-line-arguments_test.testClient.func2.2.1 (client_test.go:119)
--- FAIL: TestClient (2.95s)
    --- FAIL: TestClient/TestClient (2.95s)
        --- FAIL: TestClient/TestClient/Fetch/#Identifer/includes_digest_if_repoName_does_not_have_a_digest (1.19s)
            client_test.go:40:
                	Error Trace:	client_test.go:40
                	            				spec.go:300
                	            				spec.go:281
                	            				spec.go:257
                	            				parser.go:133
                	Error:      	Received unexpected error:
                	            	error getting credentials - err: exit status 1, out: ``
                	Test:       	TestClient/TestClient/Fetch/#Identifer/includes_digest_if_repoName_does_not_have_a_digest
        --- FAIL: TestClient/TestClient/Fetch/#Identifer/includes_digest_if_repoName_already_has_a_digest (0.83s)
            client_test.go:48:
                	Error Trace:	client_test.go:48
                	            				spec.go:300
                	            				spec.go:281
                	            				spec.go:257
                	            				parser.go:133
                	Error:      	Received unexpected error:
                	            	error getting credentials - err: exit status 1, out: ``
                	Test:       	TestClient/TestClient/Fetch/#Identifer/includes_digest_if_repoName_already_has_a_digest
FAIL
FAIL	command-line-arguments	3.350s
FAIL

Some follow up questions:

Why is a unit test using gcloud at all?
How does this work in `CI/CD? Are you logged in for the unit tests?

I think you just ran across a problematic test. The test itself does not require gcloud but, will attempt to read a public image on gcr using the default keychain (you local creds) because you have gcloud installed locally that attempted to auth with gcloud even though it is uncessary.
I have created https://github.com/pivotal/kpack/pull/749 which removes the dependency on gcr and no longer uses the default keychain.

Closed via: https://github.com/pivotal/kpack/pull/749


clarify how altitude can be used in the data models

it can be used through GeoJSON. Latest versions of Orion allow it as a third component of the coordinates array


Fixed PreTrainedModel.from_pretrained(...) not passing cache_dir to PretrainedConfig.from_pretrained(...)

See #863
It's not a beautiful solution, but neither is the practice of modifying incoming parameters via pop. 🤷♂

Indeed thanks. We'll subsume this PR with #866 which add a few other stuff.
I agree with you on the pop pattern. We'll move away from this when the first one of these two events happens: (i) google stop open-sourcing interesting new models or (ii) google stop using python 2 internally ;)

Okay! :+1:


CS5490 Energy Meter Circuit Design Questions

Hello, firstly I would like to thank you for the library you created and post you shared on the energy meter you designed, you helped us a great deal with those. On to the topic, We are trying to create a smart plug much like yours and using cs5490 for the measurement part.
While trying to understand the board design you shared, I failed to understand a few points so I wanted to ask you about it,

1-Voltage pins seem to have both ends on ground (N and ground), shouldn't one of them be on line(L)?
2-The ground you placed between R4 shunt resistor and F1 20A fuse, was it to protect the board in case there is no load or does it have another function that I could not comprehend
3-When we measure voltage values we multiply it with a value based on the voltage divider. But for we do not know that how can we calculate the factor that is multiplied with current measurements. If we are using a 0.01-ohm shunt resistor, then how the calculation should be.

Hello! Glad that you liked. So, to be honest, I took this image from another project. The most complete one I found at least. take a look, it may have some other good info there.
I worked mainly in the software, that means that maybe I'm not the best person to be asked those questions, but since I'm also intersted I'll try to answer anyway!

Voltage pins you mean the voltage measure pins ( 6,7 )? or the CS5490 power supply ( 11, 10 )?

About the GND location next to shunt, here I have some explanation that Vytautas sent me some time ago and maybe can clarify a little bit:

(I presume that you are using a shunt resistor for current sensing)
Layout and topology are extremely critical !
The CS5490 circuitry must have its own isolated and independent ground (analog ground).
No strong currents should ever circulate through the analog ground.
The analog ground must be connected to the load circuit in a  SINGLE  point.
The voltage divider's termination resistor and all input filter capacitors should be connected as close as possible to that point.
That point should be the physical shunt terminal that is connected to the mains NEUTRAL.
Keep the mains LINE as far as possible from the CS5490 circuitry.
If practical, it's convenient to shield the input circuits from noise.
Consider the three cases shown in the figure.
CASE 1
It is the best solution. There is no common-mode voltage and the current sample is directly applied to the sense inputs.
CASE 2
The current sample is directly applied to the sense inputs,   but the CS5490 has to make an extra effort to get rid of the common-mode voltage and the final reading will depend on how well this job is done.
CASE 3.
The common-mode voltage disappears by connecting  I-  to B instead of A. The system behaves as if the shunt was larger (RS' = RS + RAB)
The current reading will be greater than the actual current, but this could be corrected by reducing the Gain of the current channel.
There is however a catch in this "solution" :  A good quality shunt resistor retains its value (RS) over time and temperature changes, but the same cannot be said about the value of RAB and hence the current reading will depend on the stability of RAB.

The idea is: the 0.01 ohm shunt resistor gave you an output of instant +250mV (for example)
if you look the datasheet:

6.6.30  Instantaneous Current (I) – Page 16, Address 2
value in the range of -1.0 > value >1.0
and

It means that (If the I gain is 10) the current should be V = R*I that is 250mV = 0.01Ohm * I that is I = 25A

Or you can measure the current with something else, take the values, compare with CS5490 values and calibrate using those numbers. Ex: 1A -> 0.10 and 2A -> 0.20 means you should do something like this:
double instantI =  line.getInstV();
Serial.print(" The current is: ");
Serial.println( instantI * 10 );

PS: I cant remember right now if the output 1 means exactly 250mV with gain 10, or if there is any other remaks.

Issue closed. Assuming problem is solved


Define security contact and allow our team to release

Description

Plugin: https://github.com/jenkinsci/active-directory-plugin
Adding people as releasers and security contact , as pre-approved out of the band by @fbelzunc.

Submitter checklist for changing permissions

Always

[x] Add link to plugin/component Git repository in description above

For a newly hosted plugin only

[ ] Add link to resolved HOSTING issue in description above

For a new permissions file only

[ ] Make sure the file is created in permissions/ directory
[ ] artifactId (pom.xml) is used for name (permissions YAML file).
[ ] groupId / artifactId (pom.xml) are correctly represented in path (permissions YAML file)
[ ] Check that the file is named plugin-${artifactId}.yml for plugins

When adding new uploaders (this includes newly created permissions files)

[x] Make sure to @mention an existing maintainer to confirm the permissions request, if applicable
[x] Use the Jenkins community (LDAP) account name in the YAML file, not the GitHub account name
[ ] All newly added users have logged in to Artifactory at least once

Merge permission to GitHub repository

[ ] Check this if newly added person also needs to be given merge permission to the GitHub repo. If needed, it can be done using an IRC bot command. Make sure to check that the $pluginId Developers team has Write permissions or above while granting the access.

👍 Good to me :-)

Great, thank you Félix!


The title slide is showing the wrong product name and the date is missing

Issue in ./help/content-management/manage-author-use-fragments.md

Fixed


NuGet repository does not accept symbol packages

Description
We updated to 1.22.2, and it looks like Gitea is now responding HTTP 400 to symbol package pushes.
Gitea Version
1.22.2
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
This is the output in Jenkins

Text Form

13:12:42  [out] $ dotnet.exe nuget push --api-key ******** --source http://<IP_ADDRESS>/api/packages/{org}/nuget/index.json *.nupkg --skip-duplicate --symbol-api-key ********
13:12:43  warn : You are running the 'push' operation with an 'HTTP' source, 'http://<IP_ADDRESS>/api/packages/{org}/nuget/index.json'. Non-HTTPS access will be removed in a future version. Consider migrating to an 'HTTPS' source.
13:12:43  Pushing {package}.2024.925.1310.nupkg to 'http://<IP_ADDRESS>/api/packages/{org}/nuget'...
13:12:43  warn : You are running the 'push' operation with an 'HTTP' source, 'http://<IP_ADDRESS>/api/packages/{org}/nuget/'. Non-HTTPS access will be removed in a future version. Consider migrating to an 'HTTPS' source.
13:12:43    PUT http://<IP_ADDRESS>/api/packages/{org}/nuget/
13:12:43    Created http://<IP_ADDRESS>/api/packages/{org}/nuget/ 170ms
13:12:43  Your package was pushed.
13:12:43  Pushing {package}.2024.925.1310.snupkg to 'http://<IP_ADDRESS>/api/packages/{org}/nuget/symbolpackage'...
13:12:43  warn : You are running the 'push' operation with an 'HTTP' source, 'http://<IP_ADDRESS>/api/packages/{org}/nuget/symbolpackage/'. Non-HTTPS access will be removed in a future version. Consider migrating to an 'HTTPS' source.
13:12:43    PUT http://<IP_ADDRESS>/api/packages/{org}/nuget/symbolpackage/
13:12:43    BadRequest http://<IP_ADDRESS>/api/packages/{org}/nuget/symbolpackage/ 9ms
13:12:43  error: Response status code does not indicate success: 400 (Bad Request).
13:12:43  .NET Command Completed - Exit Code: 1

Git Version
No response
Operating System
No response
How are you running Gitea?
Windows Service
Database
None

Which version did you upgrade from? Can that version work for you?

I unfortunately can't, but I took a look at Gitea's code, and it looks like it gives 400 if the package is "bad" in some way, such as a missing PDB. I took a look inside the generated snupkg and indeed, there's no PDB inside. This makes sense as we switched to embedded PDBs (<DebugType>Embedded</DebugType>), so I think this was just a PEBKAC on my part.


Documentation should clarify that keepalive is supported in async client only

This documentation page https://websockets.readthedocs.io/en/stable/topics/keepalive.html mentions about ping_interval and ping_timeout arguments which are only related to async version. I can not find something similar to this
https://github.com/python-websockets/websockets/blob/44ccee17c519ea1397ee28a8ac3a7d7685cd0b89/src/websockets/asyncio/connection.py#L718-L722
in sync version. Thank you!

Yes it isn't implemented in the sync version (yet). I'll add it to the docs.

FYI: https://websockets.readthedocs.io/en/stable/reference/features.html is an up-to-date list of which implementation supports which features.

These tables are awesome! It clarifies all the points. It would be nice to have it near the implementations list where the developer should choose which one to pick. We have that list right on the main page https://websockets.readthedocs.io/en/stable/index.html

Don’t worry about the opening and closing handshakes, pings and pongs

This statement also could lead to misunderstanding in the sync version until automatic ping and pongs are not implemented
I am glad that this feature will come to a sync version as well. Thank you!

It would be nice to have it near the implementations list

Added in d62e4237.

I am glad that this feature will come to a sync version

For clarity, I don't have a timeline for this — and I'm a bit afraid of adding a new thread for each connection — but it's on my TODO for the project.


Search for minecraft folder in correct location for Linux

I also restructured the coded to use a foreach loop to search possible paths

Any chance of merging this?

Any chance of merging this?

Abandoned.


arm64, malloc: Support 64KB pages

Hi,
This is my attempt to fix the issues I was having running go on 64KB pages on my Seattle board, #147 . As is evident from my patch, I am not a go programmer ;-). Please do tidy this up if it needs it. Also, if there is already a 64KB fix out there that I've missed, then please sling it my way and I would be happy to test it here.
Cheers,
Steve
On arm64 we can run with 64KB pages as well as 4KB pages.
Unfortunately, the memory allocator in go assumes pages are of size 4KB
and we run into problems such as:
runtime: address space conflict: map(0x4000001000) = 0x3ff7e090000
fatal error: runtime: address space conflict
This patch increases the _PageShift to 16 for arm64 and also beefs up
the _StackCacheSize to one page for arm64.
I have tested this patch on an AMD Seattle system running 64KB pages
and 4.0-rc5 kernel as well as an APM Mustang system running 4KB pages
and 3.19 kernel.
I don't know why this hasn't arisen in PowerPC, perhaps a lucky set
of addresses back from mmap? Perhaps this patch could be extended for
PowerPC too if need be?
Signed-off-by: Steve Capper<EMAIL_ADDRESS>

Thanks for taking a pass on this, it's not really enough, some more bits are missing, but thanks.

Steve, would you be able to contribute a 64k page size builder to the build
dashboard, build.golang.org ?

Hi guys, thanks for your feedback. I'll step back to testing :-).
@davecheney, how does one contribute a builder? Does the machine have to be dedicated, or is it enough to schedule a job somewhere that can check in with build.golang.org?

Start here, https://github.com/golang/go/wiki/DashboardBuilders
email<EMAIL_ADDRESS>for a builder key,
let me know if you get stuck
On Sat, Mar 28, 2015 at 2:17 AM, stevecapperlinaro<EMAIL_ADDRESS>
wrote:

Hi guys, thanks for your feedback. I'll step back to testing :-).
@davecheney https://github.com/davecheney, how does one contribute a
builder? Does the machine have to be dedicated, or is it enough to schedule
a job somewhere that can check in with build.golang.org?
—
Reply to this email directly or view it on GitHub
https://github.com/4ad/go/pull/148#issuecomment-86971542.


JBPM-10147 Added script to auto create Quartz tables

JIRA: https://issues.redhat.com/browse/JBPM-10147

How to replicate CI configuration locally?

Build Chain tool does "simple" maven build(s), the builds are just Maven commands, but because the repositories relates and depends on each other and any change in API or class method could affect several of those repositories there is a need to use build-chain tool to handle cross repository builds and be sure that we always use latest version of the code for each repository.
build-chain tool is a build tool which can be used on command line locally or in Github Actions workflow(s), in case you need to change multiple repositories and send multiple dependent pull requests related with a change you can easily reproduce the same build by executing it on Github hosted environment or locally in your development environment. See local execution details to get more information about it.

How to retest this PR or trigger a specific build:

a pull request please add comment: Jenkins retest this
a full downstream build please add comment: Jenkins run fdb

How to backport a pull request to a different branch?

In order to automatically create a backporting pull request please add one or more labels having the following format backport-<branch-name>, where <branch-name> is the name of the branch where the pull request must be backported to (e.g., backport-7.67.x to backport the original PR to the 7.67.x branch).

NOTE: backporting is an action aiming to move a change (usually a commit) from a branch (usually the main one) to another one, which is generally referring to a still maintained release branch. Keeping it simple: it is about to move a specific change or a set of them from one branch to another.

Once the original pull request is successfully merged, the automated action will create one backporting pull request per each label (with the previous format) that has been added.
If something goes wrong, the author will be notified and at this point a manual backporting is needed.

NOTE: this automated backporting is triggered whenever a pull request on main branch is labeled or closed, but both conditions must be satisfied to get the new PR created.

This is only for h2 I assume. What about the other DB? Besides, this script is already present in ./ddl-scripts/h2

Hmm... I hadn't noticed those scripts in ./ddl-scripts.
Yeah, I think I misunderstood https://quarkus.io/guides/quartz#creating-quartz-tables. That script might be for that specific guide.


add convoy-gluster Volumes Rancher Panel

Can not mount convoy-gluster drive
Log: level=fatal msg="open /host/var/run/docker/execdriver/native: no such file or directory"
Stack convoy-gluster:
docker-compose.yml and rancher-compose.yml
compose.zip
Stack GlusterFS Server:
docker-compose.yml and rancher-compose.yml
GlusterFS_Serber.zip

Useful
Info

Versions
Rancher v1.5.3 Cattle: v0.177.10 UI: v1.5.8

Access
localauth admin

Orchestration
Cattle

Route
service.containers

Docker
v1.12.5

convoy-gluster was deprecated long ago, I wouldnt expect this to work with anything newer than rancher 1.1.x


DOC-3601 Harness Cloud build credit FAQs

Add Harness Cloud billing and build credits to subscriptions and licenses page.
Add links from What is Harness CI (Harness Cloud) and Use Harness Cloud Build Infrastructure (Build credits)

Please check the Execution Link of the Pipeline for the Website Draft URL. This is located in the Preview Step and also is available in #hdh_alerts. E.g Website Draft URL: https://unique-id--harness-developer.netlify.app

Please check the Execution Link of the Pipeline for the Website Draft URL. This is located in the Preview Step and also is available in #hdh_alerts. E.g Website Draft URL: https://unique-id--harness-developer.netlify.app