Timeout for a list of remote DNS servers

I have thhe list of dns servers in a remoteDnsServers array. First of them is my internal corporate DNS.
Sometimes it fails to respond within the required time and other external dns (e.g., <IP_ADDRESS>) answered, so I got  unexpected results.
It would be better to be able to prioritize the list of remote DNS servers or/and set a timeout for each server to avoid such issues. Can you please suggest a solution or configuration that can help me achieve this?

Hey @dmekhov ,

It would be better to be able to prioritize the list of remote DNS servers or/and set a timeout for each server to avoid such issues

That's the currently behavior, I think the issue here is that DPS remote solver timeout was set to 300 ms, as 3.13.x it's 10s respecting common timeout used by other DNS clients.
Can you give a try at 3.13.1 and check if your issue is fixed?

@mageddo thanks, I'll test it on weekdays.

@mageddo
No, unfortunately I still have this problem (seems not so often).
Maybe I can enable some kind of debug mode for catch that (with targeting to some network or something else, to exclude extra logs)?

last logs (with grep rancher - example of errored page) on the issue moment
dps-1  | 13:31:32.222 [Thread-8       ] DEB c.m.d.server.dns.RequestHandlerDefault            l=76   m=solve0                          status=solved, currentSolverTime=0, totalTime=21, solver=SolverLocalDB, req=rancher.corp.intra.lan, res=rancher.corp.intra.lan.  60  IN  A  <IP_ADDRESS>
dps-1  | 13:31:32.222 [Thread-8       ] DEB c.m.dnsproxyserver.server.dns.solver.SolverCache  l=46   m=lambda$handleRes$0              status=hotload, k=A-rancher.corp.intra.lan, ttl=PT1M, simpleMsg=rancher.corp.intra.lan
dps-1  | 13:31:32.222 [Thread-8       ] DEB c.m.d.server.dns.RequestHandlerDefault            l=48   m=solve                           status=solved, kind=udp, time=21, res=rancher.corp.intra.lan.  60  IN  A  <IP_ADDRESS>
dps-1  | 13:31:32.223 [Thread-8       ] DEB com.mageddo.dnsproxyserver.server.dns.UDPServer   l=58   m=handle                          status=success, query=rancher.corp.intra.lan, res=rancher.corp.intra.lan.  60  IN  A  <IP_ADDRESS>, serverAddr=/<IP_ADDRESS>, clientAddr=/<IP_ADDRESS>:1409, dataLength=512, datagramLength=36
dps-1  | 13:31:32.246 [Thread-24      ] DEB c.m.d.server.dns.solver.SolverCachedRemote        l=31   m=lambda$handle$0                 status=remoteHotLoading, query=rancher.corp.intra.lan
dps-1  | 13:31:32.250 [Thread-24      ] DEB c.m.dnsproxyserver.server.dns.solver.SolverCache  l=46   m=lambda$handleRes$0              status=hotload, k=9819a672-0fc4-4917-be17-77eb3ea19a5a-rancher.corp.intra.lan, ttl=PT5M, simpleMsg=rancher.corp.intra.lan
dps-1  | 13:31:32.250 [Thread-24      ] DEB c.m.d.server.dns.RequestHandlerDefault            l=76   m=solve0                          status=solved, currentSolverTime=3, totalTime=27, solver=SolverCachedRemote, req=rancher.corp.intra.lan, res=rancher.corp.intra.lan
dps-1  | 13:31:32.250 [Thread-24      ] DEB c.m.dnsproxyserver.server.dns.solver.SolverCache  l=46   m=lambda$handleRes$0              status=hotload, k=6887361b-0873-409f-9859-370eacfa5af9-rancher.corp.intra.lan, ttl=PT20S, simpleMsg=rancher.corp.intra.lan
dps-1  | 13:31:32.250 [Thread-24      ] DEB c.m.d.server.dns.RequestHandlerDefault            l=48   m=solve                           status=solved, kind=udp, time=49, res=rancher.corp.intra.lan
dps-1  | 13:31:32.250 [Thread-24      ] DEB com.mageddo.dnsproxyserver.server.dns.UDPServer   l=58   m=handle                          status=success, query=rancher.corp.intra.lan, res=rancher.corp.intra.lan, serverAddr=/<IP_ADDRESS>, clientAddr=/<IP_ADDRESS>:46542, dataLength=512, datagramLength=36

then if I push f5 button on page with error, no new logs (because of wrong browser cache)
logs after reset browser cache:
dps-1  | 13:39:06.310 [Thread-22      ] DEB c.m.d.server.dns.RequestHandlerDefault            l=76   m=solve0                          status=solved, currentSolverTime=0, totalTime=22, solver=SolverLocalDB, req=rancher.corp.intra.lan, res=rancher.corp.intra.lan.  60  IN  A  <IP_ADDRESS>
dps-1  | 13:39:06.310 [Thread-22      ] DEB c.m.dnsproxyserver.server.dns.solver.SolverCache  l=46   m=lambda$handleRes$0              status=hotload, k=A-rancher.corp.intra.lan, ttl=PT1M, simpleMsg=rancher.corp.intra.lan
dps-1  | 13:39:06.310 [Thread-22      ] DEB c.m.d.server.dns.RequestHandlerDefault            l=48   m=solve                           status=solved, kind=udp, time=23, res=rancher.corp.intra.lan.  60  IN  A  <IP_ADDRESS>
dps-1  | 13:39:06.310 [Thread-22      ] DEB com.mageddo.dnsproxyserver.server.dns.UDPServer   l=58   m=handle                          status=success, query=rancher.corp.intra.lan, res=rancher.corp.intra.lan.  60  IN  A  <IP_ADDRESS>, serverAddr=/<IP_ADDRESS>, clientAddr=/<IP_ADDRESS>:18391, dataLength=512, datagramLength=36
dps-1  | 13:39:06.337 [Thread-15      ] DEB c.m.d.server.dns.solver.SolverCachedRemote        l=31   m=lambda$handle$0                 status=remoteHotLoading, query=rancher.corp.intra.lan
dps-1  | 13:39:06.340 [Thread-15      ] DEB c.m.dnsproxyserver.server.dns.solver.SolverCache  l=46   m=lambda$handleRes$0              status=hotload, k=97fb6655-34da-45e3-aad5-3db3cdd38fef-rancher.corp.intra.lan, ttl=PT5M, simpleMsg=rancher.corp.intra.lan
dps-1  | 13:39:06.340 [Thread-15      ] DEB c.m.d.server.dns.RequestHandlerDefault            l=76   m=solve0                          status=solved, currentSolverTime=4, totalTime=30, solver=SolverCachedRemote, req=rancher.corp.intra.lan, res=rancher.corp.intra.lan
dps-1  | 13:39:06.340 [Thread-15      ] DEB c.m.dnsproxyserver.server.dns.solver.SolverCache  l=46   m=lambda$handleRes$0              status=hotload, k=7f064daf-6aa4-4e29-b053-04643ffd5480-rancher.corp.intra.lan, ttl=PT20S, simpleMsg=rancher.corp.intra.lan
dps-1  | 13:39:06.340 [Thread-15      ] DEB c.m.d.server.dns.RequestHandlerDefault            l=48   m=solve                           status=solved, kind=udp, time=53, res=rancher.corp.intra.lan
dps-1  | 13:39:06.340 [Thread-15      ] DEB com.mageddo.dnsproxyserver.server.dns.UDPServer   l=58   m=handle                          status=success, query=rancher.corp.intra.lan, res=rancher.corp.intra.lan, serverAddr=/<IP_ADDRESS>, clientAddr=/<IP_ADDRESS>:7005, dataLength=512, datagramLength=36

because of wrong browser cache ... res=rancher.corp.intra.lan.  60  IN  A  <IP_ADDRESS>

isn't the right address for rancher? Looking at these logs everything seems to be working great.  Do you know what address it's supposed to be? Maybe you can do some tests with the problematic hostname trying to solving it using DPS then testing it directly on your local DNS.
$ nslookup rancher.corp.intra.lan <IP_ADDRESS>

$ nslookup rancher.corp.intra.lan <dps-address>

isn't the right address for rancher?

Yes, it is correct address.
<IP_ADDRESS> - is stored in DPS config for this domain.
However, sometimes the browser starts use another "external" address and caches it. (maybe dps doesn't respond at the requested moment 0_o). I use DPS docker host IP (<IP_ADDRESS>) as my main dns server in the network manager (I use ubuntu as the host system).
I tried to dig some domains in loop script with 5 sec delay, but couldn't catch the error.

But if I use nslookup directly to <IP_ADDRESS> - all is ok

Address: x.x.x.x (some external IP)

That was the right or wrong ip? nslookup didn't used DPS dns in this case...

@mageddo, thanks for being with me! ;)

Can you show the following files content so I can understand the resolution order?

cat /etc/resolv.conf

nameserver <IP_ADDRESS>
nameserver <IP_ADDRESS>
nameserver <IP_ADDRESS>
nameserver <IP_ADDRESS>

cat /var/run/systemd/resolve/resolv.conf

nameserver <IP_ADDRESS>
nameserver <IP_ADDRESS>
nameserver <IP_ADDRESS>

What error you see at the browser?

ERR_CONNECTION_CLOSED - when my browser tried to send request to wrong (public) ip adress (whitch drops by firewall)
so nslookup without specific dns - returns external (not expected, wrong) ip
I use Ubuntu 22.04.1 (5.19 kernel)

Can you provide the command you are using to start DPS?

I use docker-compose without specific cmd attribute
  dns:
    restart: always
    image: defreitas/dns-proxy-server:3.14.5
    volumes:
        - /var/run/docker.sock:/var/run/docker.sock
        - ./dns/config.json:/app/conf/config.json
        - /etc/:/host/etc
    labels:
        traefik.frontend.rule: "Host:dns.${LOCAL_DOMAIN_ZONE}"
        traefik.port: "5380"
    ports:
        - ${DOCKER_IP}:53:53/udp
    networks:
        dns:
          ipv4_address: <IP_ADDRESS>

But if I use nslookup directly to <IP_ADDRESS> - all is ok
...
so nslookup without specific dns - returns external (not expected, wrong) ip

Okay... So if you do specify <IP_ADDRESS> or <IP_ADDRESS>  (DPS) at nslookup then rancher.corp.intra.lan will solve to the correct IP, right? The DNS server capable to solve rancher.corp.intra.lan is <IP_ADDRESS> ?
My best bet is that the root cause is that DPS doesn't support recursion yet then resolvconf program is giving up and trying the next dns server, it isn't working well though.
I'm looking at recursion feature to understand how difficult it's to implement.

I did some reads and tests, #392 is really supposed to fix your issue, please read the issue , I've added some examples there, anyway 3.15.1-snapshot is out, can you give it a try and bring a feedback?

@mageddo thanks!
I've updated the app and will test it. At least the error message ("recursion not available") is gone for default requests.

Seems like it worked?

@mageddo
Hmm, that's hard to say. (but yes, msg "recursion not available" is gone)
It looks like the reason is not only dps, but in combination with some other problem.
Perhaps something has changed in the chrome browser, or in my system, I'll try to test it on FF next week.
Anyway, with your latest fixes, it's a lot better, and I'm get this problem 1-2 times a day. (On the first dps v3 builds it was very often)
Yesterday I tried to roll back to v2, and got the same problem a couple of times.
And the fact that the dns record for the domain rancher.corp.intra.lan I have directly in the dps config (i.e. this is not a long response from an remote dns, but for some other reason chrome requested another dns, not dps).
I think you can close this issue, at least the result is not worse than in the v2 builds.  Thanks ;)
If I have some new information I will post here or in new issue. ;)

So it seems that everything is ok with ff.
Even if ff also have some short issues with resolving it doesn't cache wrong dns.
It's not very convenient for me to change main browser to ff, but for now I have to (at least for internal services).

Okay, maybe #386 might help you. I expect  it to be released in the next weeks.

@mageddo
I found that crome dns client now works in asynchronous mode, and it's configurable with a flag chrome://flags/#enable-async-dns (default: true in current versions).
So when I disable it - everything became fine.
Now I finaly resolved my problem
but still (about reason of this issue) it's can be for some performance issue - in async mode (when it is enabled) somehow external dns like <IP_ADDRESS>/<IP_ADDRESS>/etc answered faster than dps and chrome use that answer

Thanks @dmekhov , I'll take a look

My chrome version is 111.0.5563.146
Try to search dns on chrome://flags page? Maybe it have otther name on Mac?
(Now it calls Async DNS resolver, previously it was Built-in Asynchronous DNS according to google)

To keep only DPS in /etc/resolv.conf and configure the others servers in DPS
Use systemd-resolved (it will be the only nameserver at /etc/resolv.conf) and configure additional dns servers (including DPS) on /etc/systemd/resolved.conf ref1

Hi, I tried to use this way on new ubuntu instalation (23.04), and have some issues now
I set my DPS IP (<IP_ADDRESS>) in network manager and in /etc/systemd/resolved.conf
In DPS config my first DNS is DNS in VPN network, the second one is <IP_ADDRESS>
So if I try to call any resource (ping google.com for example) but my VPN connection isn't active - DPS is waiting it and retturn timeout
Am I configured something wrong? (should I open new issue for that?)

@dmekhov  I see, DPS doesn't have a remote DNS circuit breaker feature to automatically disable/re-enable remote servers when the come offline or online again.
I've opened https://github.com/mageddo/dns-proxy-server/issues/415 for that feature, for now you will have to manually disable the VPN remote server. I consider it's not too complex to implement.


docs: add gitlab-ci section to troubleshooting

What kind of change does this PR introduce?
Docs update for troubleshooting.md, related to GitlabCI
Did you add tests for your changes?
Not applicable
If relevant, did you update the documentation?
Yes. New section ## Running Puppeteer on GitlabCI
Summary
Adding explanatory section with detailed manual on how to launch puppeteer on GitlabCI. I was looking for any case or manual guide how to fix my issue, was looking through gh issues, stackoverflow and other places. I found lots of relevant info, but nothing concrete. Seems like troubleshooting document should include this section for one of the most usable CI. Let's save a couple of hours for those who want to use puppeteer on GitlabCI
Does this PR introduce a breaking change?
No breaking changes.

@jrandolf am I supposed to do something else here, or just wait for workflow approval?


On the tutorial #09 the function transfer_values_cache results in "Aborted (core dumped)"

I dunno, it just crashes. When I first ran it juypter notebook just crashed without giving me that error. I had to run it in the terminal to get that error. I'm using aws. I'm using the deep learning image and I'm using tensorflow-gpu.

my aws instance ran out of disk space.


Better support for react-native

Hi guys,
it could be great to use AppState (https://reactnative.dev/docs/appstate) for revalidateOnFocus and NetInfo (https://github.com/react-native-community/react-native-netinfo) for revalidateOnReconnect, errorRetryInterval, loadingTimeout when running in react-native context.
Any advice with that? im handling revalidations manually for this cases.
Thanks !!!

I propose a solution for it
Situation
now we have
web "online" event for detecting network connect state;
web "visibilitychange" and "focus" event for detecting focus state;
Implementation
we can encapsulate them as default configs in swr config. i.e.
const defaultIsVisible = () => isdocumentvisible() && isonline()
const defaultFocusDetector = (revalidate) => {
   // this function is overridable by configuration
   if (window.addEventListener) {
     window.addEventListener('...', revalidate, ...)
     // ...
   }
}

const defaultNetworkConnectionDetector = (onConnect) => {
   .... // this function is overridable by configuration
}

config.networkConnectionDetector = defaultNetworkConnectionDetector;
config.focusDetector = defaultFocusDetector;
config.isVisible = defaultIsVisible;

default handlers are for web only, but you can override them through swr configuration setting
and we pass the revalidate or reconnect handlers to them
in use-swr.ts we can do
if (!IS_SERVER && config.networkConnectionDetector && config.revalidateOnReconnect) {
  config.networkConnectionDetector(reconnect = softRevalidate)
}

in config.ts we could also setup focus detector
// focus revalidate
let eventsbinded = false
if (typeof window !== 'undefined' && defaultConfig.focusDetector && !eventsbinded) {
  const revalidate = () => {
     if (!config.isFocusing()) return
    ...
  }
  defaultConfig.focusDetector(revalidate)
  // only bind the events once
  eventsbinded = true
}

Usage
import React, { useEffect, useState } from "react";
import { AppState } from "react-native";
import useSWR from 'swr'

const AppStateExample = () => {
  const [appState, setAppState] = useState(AppState.currentState);

  const { data } = useSWR(key, fetcher, {
     focusDetector(revalidate) {
       AppState.addEventListener("change", revalidate);
         return () => {
           AppState.removeEventListener("change", revalidate);
         }
      }
  })

// ...

Not sure if it's ok to do so. wanna get more feedbacks from community and maintainers. if it's doable I can try to submit a PR for that. cc @shuding

@huozhi great explanation it looks wired but it could work,
little enhancement on usage (reavalidation must ocurr only when foreground imo):
import React, { useEffect, useState } from "react";
import { AppState } from "react-native";
import useSWR from 'swr'

const AppStateExample = () => {
  const [appState, setAppState] = useState(AppState.currentState);
  const { data } = useSWR(key, fetcher, {
    focusDetector(revalidate) {
      const _handleAppStateChange = nextAppState => {
        if (appState.match(/inactive|background/) && nextAppState === "active") {
          console.log("App has come to the foreground!");
          revalidate();
        }
        setAppState(nextAppState);
      };
      AppState.addEventListener("change", _handleAppStateChange);
      return () => {
        AppState.removeEventListener("change", _handleAppStateChange);
      }
    }
  })
}

note: focusDetector need to be recreated in each render to works as expected how useSWR options works in this case?

@outaTiME thanks for the clear example for app state detection.
for errorRetryInterval and loadingTime, they're numbers but related to the network state on slow or fast network. that also could rely on some platform layer API to detect if it's slow. probably we need on more callback for that for react native or other runtime, such as using NetInfoCellularGeneration value from react-native-netinfo.
the idea is to decouple the platform runtime specific part out of swr, like the listeners on window in browser runtime.

It would great if we could use our customised rule to determine when the data needs to be refreshed

I think this issue answers my question:
https://github.com/vercel/swr/discussions/614

Any of you @outaTiME @huozhi working on a PR for that?

there's a RFC to support plugin/middleware pattern in swr to make it more cross-platform adaptive. the APIs are not settled yet and discussions are welcomed. once we had a good form of APIs and certain bahaviors of plugin/middleware, we'll surly start the support for RN ASAP

short-term workaround on RN, with<EMAIL_ADDRESS>you can use the following new options to customized the online, visible states by yourself

config.isOnline
config.isDocumentVisible

// in your react native code
useSWR(key, fetcher, {
  isOnline() { return AppState.currentState === 'active' },
  isDocumentVisible() { return /* write the condition you need for your app or same with config.isOnline() */ }
})

the network connecting state is not customized since getting network info might need 3rd party library support and you can also customize errorRetryInterval and loadingTimeout in config to override the default. let me know if this works for your case or not.

So I assume with 0.3.7 this could also be used in global config?

seems it's more complicated, the latest changes are not enough : (. we need to give swr ability to customize the way to listen on focus/visible/connect events. need more changes on that. will bump here later once we have more support on it.

FWIW, I made useSWRReactNavigation. I just wrote it and haven't tested it in my app yet. Once I test it out I can publish it to NPM.
Usage
const { data, revalidate } = useSWR(key, fetcher)

useSWRReactNavigation({
  revalidate
})

You can also pass options to it:
const { data, revalidate } = useSWR(key, fetcher)

useSWRReactNavigation({
  revalidate
  // optional, defaults copied from SWR
  revalidateOnFocus: true,
  revalidateOnReconnect: true,
  focusThrottleInterval: 5000,
})

Code
import { responseInterface, ConfigInterface } from 'swr'
import { useRef, useEffect } from 'react'
import { AppState } from 'react-native'
import { useNavigation } from '@react-navigation/native'
import NetInfo, { NetInfoState } from '@react-native-community/netinfo'

type Props<Data, Error> = {
  /**
   * Required: pass the `revalidate` function returned to you by SWR.
   */
  revalidate: responseInterface<Data | null, Error>['revalidate']
} & Pick<
  ConfigInterface,
  'revalidateOnFocus' | 'revalidateOnReconnect' | 'focusThrottleInterval'
>

import { Platform } from 'react-native'

/**
 * swr-react-native
 *
 * This helps you revalidate your SWR calls, based on navigation actions in `react-navigation`.
 */
export default function useSWRReactNavigation<Data = any, Error = any>(
  props: Props<Data, Error>
) {
  const {
    revalidate,
    // copy defaults from SWR
    revalidateOnFocus = true,
    revalidateOnReconnect = true,
    focusThrottleInterval = 5000,
  } = props

  if (!revalidate) {
  }

  const { addListener } = useNavigation()

  const lastFocusedAt = useRef<Date | null>(null)
  const fetchRef = useRef(revalidate)
  useEffect(() => {
    fetchRef.current = revalidate
  })

  const previousAppState = useRef(AppState.currentState)
  const previousNetworkState = useRef<NetInfoState | null>(null)

  useEffect(() => {
    // SWR does all of this on web.
    if (Platform.OS === 'web') return

    let unsubscribeReconnect: ReturnType<
      typeof NetInfo.addEventListener
    > | null = null
    if (revalidateOnReconnect) {
      unsubscribeReconnect = NetInfo.addEventListener((state) => {
        if (
          previousNetworkState.current?.isInternetReachable === false &&
          state.isConnected &&
          state.isInternetReachable
        ) {
          fetchRef.current()
        }
        previousNetworkState.current = state
      })
    }

    const onFocus = () => {
      const isThrottled =
        focusThrottleInterval &&
        lastFocusedAt.current &&
        new Date().getTime() - lastFocusedAt.current.getTime() >
          focusThrottleInterval

      if (!isThrottled) {
        lastFocusedAt.current = new Date()
        fetchRef.current()
      }
    }

    const onAppStateChange = (nextAppState: AppState['currentState']) => {
      if (
        previousAppState.current.match(/inactive|background/) &&
        nextAppState === 'active'
      ) {
        onFocus()
      }

      previousAppState.current = nextAppState
    }

    let unsubscribeFocus: ReturnType<typeof addListener> | null = null

    if (revalidateOnFocus) {
      unsubscribeFocus = addListener('focus', onFocus)
      AppState.addEventListener('focus', onAppStateChange)
    }

    return () => {
      if (revalidateOnFocus) {
        unsubscribeFocus?.()
        AppState.removeEventListener('focus', onAppStateChange)
      }
      if (revalidateOnReconnect) {
        unsubscribeReconnect?.()
      }
    }
  }, [
    addListener,
    focusThrottleInterval,
    revalidateOnFocus,
    revalidateOnReconnect,
  ])
}

I'd appreciate help testing it. It listens for 1) network reconnections, 2) app state focus, 3) react navigation focus.
You could also take out the react navigation portion of the code if you don't need that.

@nandorojo Thanks a lot for this useful custom hook! No npm package, yet? 😉
I had to make two changes to make the basics work:

The argument passed to AppState.addEventListener (and AppState.removeEventListener) needs to be change instead of focus, seems like a typo in your version.

...
if (revalidateOnFocus) {
  unsubscribeFocus = addListener('focus', onFocus);
  AppState.addEventListener('change', onAppStateChange);
}

return () => {
  if (revalidateOnFocus) {
    unsubscribeFocus?.();
    AppState.removeEventListener('change', onAppStateChange);
  }
  if (revalidateOnReconnect) {
    unsubscribeReconnect?.();
  }
};
...

new Date().getTime() didn't work as expected for me. It returned seconds. This might be related to anti-fingerprinting settings or simply some other issue. Instead I used Date.now(), but had to change the operator in onFocus. Instead of > use <=. Also, Date.now() has one digit more than usual timestamps, so I needed to multiply focusThrottleInterval by 10

...
const onFocus = () => {
  const isThrottled =
    focusThrottleInterval &&
    lastFocusedAt.current &&
    Date.now() - lastFocusedAt.current <= focusThrottleInterval * 10;

  if (!isThrottled) {
    lastFocusedAt.current = Date.now();
    fetchRef.current();
  }
};
...

One major issue I'm still facing is a duplicate load on first focus, because react-navigation fires an indistinguishable focus event on first and subsequent focuses and swr is already triggering a fetch on first load of the app.

@te-online thanks for finding those issues! I should be able to get it on npm soon.

One major issue I'm still facing is a duplicate load on first focus, because react-navigation fires an indistinguishable focus event on first and subsequent focuses and swr is already triggering a fetch on first load of the app.

If this is always the case, it seems like we could keep track of a focusCount and only trigger it if it's > 1.
Or we could dedupe all mutate calls. Does SWR do that for you?

@nandorojo I found an added focusCount to be working fine. Here's a gist https://gist.github.com/te-online/4eaa564aa02546ea25247d2f079f935e

I finally got around to publishing this to NPM (@nandorojo/swr-react-native)!
The package is a drop-in replacement for SWR, with added support for focus events, reconnection, and react navigation.
Link: https://github.com/nandorojo/swr-react-native
Drop-in usage is as simple as:
- import useSWR from 'swr'
+ import useSWRNative from '@nandorojo/swr-react-native'

Or, you can use it like this:
import { useSWRNativeRevalidate } from '@nandorojo/swr-react-native'

const { data, revalidate } = useSWR(key, fetcher)

useSWRNativeRevalidate({
  // required: pass your revalidate function returned by SWR
  revalidate

  // optional, defaults copied from SWR
  revalidateOnFocus: true,
  revalidateOnReconnect: true,
  focusThrottleInterval: 5000,
})

You might want to use this method if you're using useSWRInfinite, for example.

@te-online thanks for your help testing and fixing this!

With the release of latest swr beta 1.0.0-beta.9, now I'm able to build the RN example with expo.
Please checkout huozhi/swr-rn-example. It provides a simple customization of "focus revalidation" and custom cache usage. I think it could resolve basic problems of RN usage.

For RN I think it'd be more useful if we could register on focus event per useSWR / useSWRInfinite hook to allow focus revalidation per screen, as done in @nandorojo/swr-react-native.
For example, when a user navigates to another screen, it's often useful to revalidate all swr calls in that screen instead of AppState change, which I guess is only possible by calling useFocusEffect per hook in react-navigation.

We update the documentation for using SWR with React Native.

Thanks @huozhi!
One issue for React Native remains: knowing if a particular screen is focused.
That can be solved with my library linked above https://github.com/vercel/swr/issues/417#issuecomment-737420642
Perhaps I can release it as a middleware too (although I think its original implementation would work as a middleware anyway!)
In order for a screen to know if it’s focused, you have a hook like this:
const focused = useIsFocused()
The issue is, you have to call this function within the screen. So the SWRConfig‘s global focus checker doesn’t work, since it’s at the root of the app.
Maybe the middleware is the just the best use case here.

@nandorojo Interesting, thanks for pointing out the limitation of the example! I'll take a look at your library to see how to make the example more resilient. Also feel free to update the swr doc if you have any idea to make the example fit realy world react native app better! 🙏

Here's how the middleware could work (simplified a bit).
function withScreenFocus(useSWRNext) {
  return function useSWRFocus(key, fn, opts) {
    const { addListener } = useNavigation()

    const { revalidateOnFocus = opts.revalidateOnFocus ?? true } = useSWRConfig()
    const swr = useSWRNext(key, fn, opts)

    const { mutate } = swr

    useEffect(() => {
       const remove = addListener('focus', () => mutate())
       return () => remove()
     }, [mutate, addListener])

    return swr
  }
}

Then in your app:
useSWR(key, fn, { use: [withScreenFocus] })

Or, globally:
<SWRConfig value={{ ..., use: [withScreenFocus] }} />

The remaining use-cases seem like they're dealt with in the docs.
The one issue with that middle war is, you're manually calling mutate, rather than using the initFocus API. @huozhi do you see any downsides to this?
An alternative could be to expose a hook-specific initFocus:
function withScreenFocus(useSWRNext) {
  return function useSWRFocus(key, fn, opts) {
    const { addListener } = useNavigation()

    return useSWRNext(key, fn, {
      ...opts,
      initFocus(trigger) {
        const unsubscribe = addListener('focus', () =>  trigger())

        return () => unsubscribe()
      }
    })
  }
}

The only issue with that is, it seemingly overrides the globally-set initFocus, rather than extending it.
<!--

This would require implementing a hook-specific `initFocus`.

One issue with this is, it doesn't seem to "extend" the `initFocus` of the `SWRConfig`. Presumably, you might have an `initFocus` at the root of your app that uses `AppState`, and then you'll want to _extend_ it with this middleware, to allow for both.

For example, say you have this `AppState` listener in the root of your app:

```ts
const provider = new Map()
<SWRConfig
  value={{
    provider: () => provider,
    isVisible: () => true,
    initFocus(callback) {
      let appState = AppState.currentState

      const onAppStateChange = (nextAppState) => {
        if (appState.match(/inactive|background/) && nextAppState === 'active') {
          callback()
        }
        appState = nextAppState
      }

      const subscription = AppState.addEventListener('change', onAppStateChange)

      return () => {
        subscription.remove()
      }
    }
  }}
/>
```

You now want to revalidate from app state triggers, _or_ from screen focuses.

Would we just call the `initFocus` from the root config inside of the hook-specific one (assuming the hook-specific focus is implemented)?

```ts
const { initFocus } = useSWRConfig()

useSWRNext(k, f, {
  initFocus(trigger) {
    const unsubscribe = addListener('focus', () => {
      trigger()
    })

    initFocus?.(trigger)

    return () => unsubscribe()
  }
})
```

But maybe the simplest way to do this.
-→

I think instead of creating it as a middleware, you can create it as a wrapper component (which has SWRConfig inside):
<SWRRNFocus>
  <App/>
</SWRRNFocus>

Which has the initFocus logic inside.

The issue is, you'd need to add this to every single screen. React Navigation tells you if a screen is focused, only within that screen.

I see. The problem of middleware for this case is, every component will try to register an event listener :(
Is there a way to put this on a higher level, e.g. the component entry, and detect if the current focused screen has changed?

Unfortunately not, since React Navigation allows for many nested navigators (stacks inside of tabs, etc) it’s somewhat impossible to know what your navigation scope is from a hook.
I’m not sure what the overhead is of adding a lot of navigation listeners to each component.
My current implementation is to add it sparingly to certain screens using my library linked to here. Maybe I’ll just stick with that, since it doesn’t need to literally update every hook on screen focus.

This is like the similar problem that why we changed from createCache API to option provider + useSWRConfig. For basic single screen view app, global setup is easy like the current example did. And sometimes we find out that it's hard to work with hook based APIs, in this case is useNavigation.
Since hook now is a widely adopted concept in react community, we might need to rethink of the current API to customize focus and reconnect events detection. @nandorojo In short term, I think the 1st one (using mutate API) is a good choice 👍. Long term I'd prefer to polish the API to support hooks more elegantly.

I'm looking through the source code but can't find the code where it calls the unsubscribe function that's returned in initFocus . It seems like it will never get called.
https://github.com/vercel/swr/blob/3285cc4544f4a6611c9328dbeda0dffbcf44d679/src/utils/cache.ts#L57-L58

Yeah @thgh would you mind opening an issue for that? Thanks! We’d like to get it fixed.


Update UG with academic details for add and edit commands

Fix #49

Codecov Report

Merging #50 (46b31ed) into master (af06165) will increase coverage by 0.49%.
The diff coverage is 74.85%.

@@             Coverage Diff              @@
##             master      #50      +/-   ##
============================================
+ Coverage     72.39%   72.89%   +0.49%
- Complexity      409      458      +49
============================================
  Files            71       74       +3
  Lines          1268     1413     +145
  Branches        132      162      +30
============================================
+ Hits            918     1030     +112
- Misses          313      335      +22
- Partials         37       48      +11

Impacted Files
Coverage Δ

.../java/seedu/address/logic/commands/AddCommand.java
92.30% <0.00%> (-7.70%)
:arrow_down:

...va/seedu/address/logic/commands/CommandResult.java
83.33% <0.00%> (-4.91%)
:arrow_down:

src/main/java/seedu/address/model/person/Name.java
80.00% <ø> (ø)

src/main/java/seedu/address/ui/MainWindow.java
0.00% <0.00%> (ø)

src/main/java/seedu/address/ui/PersonCard.java
0.00% <0.00%> (ø)

.../java/seedu/address/model/util/SampleDataUtil.java
36.84% <33.33%> (+11.84%)
:arrow_up:

...ain/java/seedu/address/model/person/AcadLevel.java
75.00% <75.00%> (ø)

...in/java/seedu/address/model/person/AcadStream.java
75.00% <75.00%> (ø)

...c/main/java/seedu/address/model/person/School.java
75.00% <75.00%> (ø)

...c/main/java/seedu/address/model/person/Person.java
92.42% <84.00%> (-3.33%)
:arrow_down:

... and 11 more

Continue to review full report at Codecov.

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


share data between cases

like:

get html page, parse csrftoken
request with csrftoken

how to share between two cases? or just make into one case with logical

now we can use the share_cookie save-a-cookie-then-use-it-in-another-case
but we can't save the response body, parse some data from it then use it in another case

how to ?

https://github.com/wklken/httptest/pull/47


New Post can't be saved

From Web UI,
Posts->+(Add)->SAVE doesn't work. No answer from browser, although console outputs the access The 2016/04/29 - 19:49:24 | 400 |     627.657µs | ::1 |   POST    /admin/editor/post/.  I tested Firefox 44.0 and Chrome 48.0.2564.103.
As far as I tested, the issue happened between these commits:
commit 48d6cca055bfea7729329c6dea5b7448fc71c5f2 worked well.
commit 33dc9a5a40121edba8d8a2d60d61a58fe4a79747 doesn't work.

Thanks. Will take a look at this.

Seems that this is because the user didn't input anything in the slug field, the server responded with an error message but the JS didn't pop up an error notification.
Will fix this in the new admin UI.

@dinever I think we can close this issue, thanks to the new amin UI.

Thanks @nak3!


[firebase_dynamic_links] Creation of dynamic link in the App does not open the already installed app.

Describe the bug
I was trying to create a shorten dynamic link for a unique user inside the app and share it to the whatsapp but when the link is opened it doesn't redirect the user to the app already installed.
To Reproduce
Steps to reproduce the behavior:

Create a deeplink using the DynamicLinkParameters. I have done as follows

Future<Uri> createDynamicLink() async {
    final DynamicLinkParameters parameters = DynamicLinkParameters(
      uriPrefix: '<UriPrefix>',
      link: Uri.parse('<Generated Dynamic Link>'),
      androidParameters: AndroidParameters(
        packageName: '<Package Name>',
        minimumVersion: 19,
        fallbackUrl: Uri.parse('Fallback Url'),
      ),
//      iosParameters: IosParameters(
//        bundleId: 'com.test.demo',
//        minimumVersion: '1',
//        appStoreId: '',
//      ),
    );
    final link = await parameters.buildUrl();
    final ShortDynamicLink shortenedLink =
        await DynamicLinkParameters.shortenUrl(
      link,
      DynamicLinkParametersOptions(
          shortDynamicLinkPathLength: ShortDynamicLinkPathLength.unguessable),
    );
    return shortenedLink.shortUrl;
  }

Create the Link using the above function will give a link.
If I open that link in the browser it will say the link not found. and if i open that link in the android it will take me to play store and it will say the item not found since the app is not registered in the playstore even though the app is installed in the device.

Expected behavior
The app should be opened in the installed app. If it is not installed then it should go to the play store.
Flutter doctor
Run flutter doctor and paste the output below:
C:\Flutter\flutter\bin\flutter.bat doctor --verbose
[√] Flutter (Channel stable, v1.12.13+hotfix.9, on Microsoft Windows [Version 10.0.18362.778], locale en-US)
    • Flutter version 1.12.13+hotfix.9 at C:\Flutter\flutter
    • Framework revision f139b11009 (5 weeks ago), 2020-03-30 13:57:30 -0700
    • Engine revision af51afceb8
    • Dart version 2.7.2

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at C:\Users\Vipin Malik\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.2
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
    • All Android licenses accepted.

[√] Android Studio (version 3.6)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 45.1.1
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)

[!] VS Code (version 1.43.2)
    • VS Code at C:\Users\Vipin Malik\AppData\Local\Programs\Microsoft VS Code
    X Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[√] Connected device (1 available)
    • Redmi Note 4 • 243fd8e10604 • android-arm64 • Android 7.0 (API 24)

! Doctor found issues in 1 category.
Process finished with exit code 0

Please see step 5 from here: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_dynamic_links#handle-received-dynamic-links


BACKPORT: libnetwork: processEndpointCreate: Fix deadlock between getSvcRecords and processEndpointCreate

References https://github.com/moby/moby/pull/42545

Warning
libnetwork was moved to https://github.com/moby/moby/tree/master/libnetwork
libnetwork has been merged to the main repo of Moby since Docker 22.06.
The old libnetwork repo (https://github.com/moby/libnetwork) now only accepts PR for Docker 20.10,
and will be archived after the EOL of Docker 20.10.

reference PR: https://github.com/moby/moby/pull/42545
I've attempted to preserve the original author of the commit for full credit to them for the solution in this PR.
One person commented in the PR that they are hitting this on 20.10; I am also hitting this issue on 20.10.10 and it would be amazing if this could be merged and included in the next v20 point release!
Please let me know if there is anything I can do to help get this merged and included in the next point release.

CI failures are unrelated, but I opened https://github.com/moby/libnetwork/pull/2671 to fix

Did a quick rebase, as https://github.com/moby/libnetwork/pull/2671 was merged


preserveAspectRatio is incorrect and not configurable

Describe the bug
When using mkdocs-exporter plugin to export to PDF, the process errors during PDF creation saying:
preserveAspectRatio has invalid value "true"

To Reproduce
Steps to reproduce the behavior:

Install the mkdocs-exporter
Export a page to PDF that has a puml diagram
Check logs
See error

Expected behavior
The error should not appear and the preserveAspectRatio attribute of the svg should be configurable using the skinparam option provided by plantuml e.g.
@startuml
skinparam preserveAspectRatio xMinYMid slice
@enduml

See valid options for attribute here.
Additional context
The issue seems to be a hard override here:
https://github.com/MikhailKravets/mkdocs_puml/blob/master/mkdocs_puml/puml.py#L126C27-L126C46

Suggestion:
Perhaps just remove the line that is forcing it to "true"

Hi @dev-artisan, thanks for raising this issue!
If we remove a preserveAspectRatio propetry from SVG, diagrams will not be correctly displayed in web-site (by default). Perhaps, it'll be better to  embed an aspect ratio settings in puml itself. I'll research this problem a bit more.

Suggested solution in the below pull request:
https://github.com/MikhailKravets/mkdocs_puml/pull/45


openssl to decrypt via command line?

if I was using node_encrypt() function what would be the equilivent linux tool to decrypt the hash on the command line?
example:
$key_hash = node_encrypt('super_secret')
exec{'run register':
   environment => ["HASH_VALUE=${key_hash}"]
   command => "rhn_register --password `openssl -decrypt \$HASH_VALUE`"
}

Actually, if the face supported decrypt I could just call puppet face.  Would you accept a pull request for decrypt function to the face?


SDMMC Update with DMA access

Overview
This reworks the internal bits of the SDMMC usage within libdaisy to work using the SDMMC's dedicated IDMA instead of working on a polling-based system, and adds configuration for common settings (clock powersave, clock speed, and buswidth for saving pins).
This should accomplish the following things:

The issues related to using the SD Card while audio is running should be  resolved.
The performance  of the SD Card via FatFS has been maximized to provide something usable for streaming audio, etc.
Configuration is available to support different bus widths for limited pinout devices, and speed for specific use cases or layouts.

Available Configuration
Currently  SDMMC1 is the only supported peripheral, and the pin mapping is fixed.
BusWidth can be set to 4 bits or 1 bit (if saving pins is more important than bandwidth)
Speed has a  qualitative scale that maps to the following frequencies:

Name
Frequency

SLOW
400kHz

MEDIUM_SLOW
12.5MHz

STANDARD
25MHz

FAST
50MHz

VERY_FAST
100MHz

Note: VERY_FAST setting is technically above the spec for 3v3-based transmission using SD Card. I have tested it on the Daisy Field, and found it to be quite stable, but ymmv.
User-facing code changes
This does break the previous SdmmcHandler::Init() function as it was. It adds a required Config struct, but that is the only breaking changes.
To adapt any previous code:
// before:
sdhandler.Init();

// now:
SdmmcHandler::Config cfg;
cfg.Defaults();
sdhandler.Init(cfg);

Other notes
The System clock tree has been edited to facilitate the frequencies. The only other thing affected by this was the SDRAM, which should still be operating  at 100MHz (the max frequency of the FMC). Though, some more testing and validation for this should be done.
I am still working through the following tests:

[x] Reading all file info from root directory
[x] Writing to a test file before audio starts
[x] Reading back and verifying the written  file while audio is playing
[x] Writing another file while audio is running.
[x] Streaming audio directly from SD card

Confirmed smooth playback at default audio settings down to 400kHz 4-bit, or 12.5MHz 1-bit (400kHz 1-bit is too slow for streaming audio).

[x] Writing audio to file while playing back audio (i.e. record a wav file).
[ ] Read and Write to file with audio limitations (i.e. Can you do a looper that operates mostly off of the SD Card with working buffers).

Did quite a bit more testing, and am going to add a few utility classes (that are currently in the FieldSampler branch of the DaisyExamples repo). But everything seems to be working well. The utility classes so far are:
WaveTableLoader - loads a .wav file as wavetables and stores to internal RAM
WavWriter - can record a wav file from the audio callback (i.e. streaming audio to the SD Card).
The test I had running most recently would load a bank of wavetables from a .wav file, save it to RAM, and then allow you to record a .wav file (up to 32-bit 96kHz) of fiddling with the knobs of the wavetable synth.
Saving files tested upto about 32MB so far, and there's no audible glitch in audio during the longer operations like f_sync or f_lseek . So I'm feeling pretty good about evertying.

Currently the templated WavWriter includes "fatfs.h" in libdaisy by default. This does add a bit more build complexity to every project. So we may want to change the format of how it's working. We could use a user-supplied buffer instead of a template (like with the WaveTableLoader.

I had a look at the Datasheet - Pages 133-134 outline the Frequencies and rise times to be expected at different capacitance and voltage.
If I understand the Datasheet correctly, the following mapping should cover most cases:

Speed
GPIO_SPEED

LOW
GPIO_SPEED_FREQ_LOW

MEDIUM_SLOW
GPIO_SPEED_FREQ_MEDIUM

STANDARD
GPIO_SPEED_FREQ_HIGH

FAST
GPIO_SPEED_FREQ_VERY_HIGH

VERY_FAST
GPIO_SPEED_FREQ_VERY_HIGH

I tested this pretty extensively a couple of months ago with a microsd card reader breakout on a breadboard. I was able to access the card reliably at 12.5MHz using the

@recursinging oh nice, I had seen that page a long time ago, and could not for the life of me remember where it was. Thanks for sharing!
you're correct it looks like the mapping you mentioned should work. I'll be doing a patch soon to make the Default configuration part of the constructor for the Config struct. So I'll add this when I do that.

Is there an expectation that WavWriter should work on patch? It looks like the default WavWriter setup doesn't call out needing to mount the sd card. When i mount the sd card currently, I typically see things hang when attemping a f_open for the file to save to

seems like i had two problems:

WavWriter file operations need to be done in the main loop (Sample can be called on audio thread, but write and file open/save should be in main loop)
ExFat didn't work correctly for the sd card i had. Reformatting to FAT got things working.

FWIW, this sd card wave recorder is awesome. Thanks for adding this feature!


repository type [s3] does not exist

I am working with s3 index backup. I created one s3 bucket, installed the repository-s3, and added the access_key and secret.
it's not working when I am creating the repository using devtool.
Please look at the query.
PUT _snapshot/my-s3-repository
{
"type": "s3",
"settings": {
"bucket": "my-s3-bucket",
"base_path": "my/snapshot/directory"
}
}
it's giving the following error
ABC repository type [s3] does not exist

Thanks @dipenpatel235 for sharing the issue.

it's not working when I am creating the repository using devtool.

Can you please share more details around the devtool ? How are you creating the S3 bucket, bucket policy etc. Please ensure the bucket has appropriate access policies.
You can find step by step guide in below documentation
https://opensearch.org/docs/latest/opensearch/snapshots/snapshot-restore#register-repository

Hello @dreamer-89,
I have provided the step-by-step details that I have done.

create the s3 bucket
install the s3-repository plugin in all the nodes.

sudo ./bin/opensearch-plugin install repository-s3

provide access key and secret key to all the nodes.

sudo ./bin/opensearch-keystore add s3.client.default.access_key
sudo ./bin/opensearch-keystore add s3.client.default.secret_key

reload all node settings using this dev tool query.

POST _nodes/reload_secure_settings

I have tried to create a repository using devtool query and get the error that repository type [s3] does not exist.

PUT _snapshot/my-s3-repository
{
"type": "s3",
"settings": {
"bucket": "my-s3-bucket",
"base_path": "my/snapshot/directory"
}
}

@dipenpatel235 thanks for the steps.
Trying to understand, when did you run ./bin/opensearch and when did you install the plugin?
Plugins should always be installed first and then run opensearch.

Thanks @saratvemulapalli.
I can indeed confirm the above statement. I was able to reproduce the issue if I start OpenSearch before installing the plugin.
I was able to fix it by first installing the plugin, configuring it and then starting OpenSearch.

@saratvemulapalli we have already installed s3 plugin of that.

@dipenpatel235 could you drop your logs when you start the node?
Here is mine which clearly loads respository-s3 plugin:
[2022-09-22T17:38:52,796][INFO ][o.o.i.r.ReindexPlugin    ] [ip-172-31-42-176] Unable to find any implementation for RemoteReindexExtension
[2022-09-22T17:38:52,847][INFO ][o.o.j.JobSchedulerPlugin ] [ip-172-31-42-176] Loaded scheduler extension: reports-scheduler, index: .opendistro-reports-definitions
[2022-09-22T17:38:52,851][INFO ][o.o.j.JobSchedulerPlugin ] [ip-172-31-42-176] Loaded scheduler extension: opendistro_anomaly_detector, index: .opendistro-anomaly-detector-jobs
[2022-09-22T17:38:52,852][INFO ][o.o.j.JobSchedulerPlugin ] [ip-172-31-42-176] Loaded scheduler extension: opendistro-index-management, index: .opendistro-ism-config
[2022-09-22T17:38:52,858][INFO ][o.o.p.PluginsService     ] [ip-172-31-42-176] loaded module [aggs-matrix-stats]
[2022-09-22T17:38:52,858][INFO ][o.o.p.PluginsService     ] [ip-172-31-42-176] loaded module [analysis-common]
[2022-09-22T17:38:52,858][INFO ][o.o.p.PluginsService     ] [ip-172-31-42-176] loaded module [geo]
[2022-09-22T17:38:52,859][INFO ][o.o.p.PluginsService     ] [ip-172-31-42-176] loaded module [ingest-common]
[2022-09-22T17:38:52,859][INFO ][o.o.p.PluginsService     ] [ip-172-31-42-176] loaded module [ingest-geoip]
[2022-09-22T17:38:52,859][INFO ][o.o.p.PluginsService     ] [ip-172-31-42-176] loaded module [ingest-user-agent]
[2022-09-22T17:38:52,859][INFO ][o.o.p.PluginsService     ] [ip-172-31-42-176] loaded module [lang-expression]
[2022-09-22T17:38:52,859][INFO ][o.o.p.PluginsService     ] [ip-172-31-42-176] loaded module [lang-mustache]
[2022-09-22T17:38:52,859][INFO ][o.o.p.PluginsService     ] [ip-172-31-42-176] loaded module [lang-painless]
[2022-09-22T17:38:52,860][INFO ][o.o.p.PluginsService     ] [ip-172-31-42-176] loaded module [mapper-extras]
[2022-09-22T17:38:52,860][INFO ][o.o.p.PluginsService     ] [ip-172-31-42-176] loaded module [opensearch-dashboards]
[2022-09-22T17:38:52,860][INFO ][o.o.p.PluginsService     ] [ip-172-31-42-176] loaded module [parent-join]
[2022-09-22T17:38:52,860][INFO ][o.o.p.PluginsService     ] [ip-172-31-42-176] loaded module [percolator]
[2022-09-22T17:38:52,860][INFO ][o.o.p.PluginsService     ] [ip-172-31-42-176] loaded module [rank-eval]
[2022-09-22T17:38:52,860][INFO ][o.o.p.PluginsService     ] [ip-172-31-42-176] loaded module [reindex]
[2022-09-22T17:38:52,860][INFO ][o.o.p.PluginsService     ] [ip-172-31-42-176] loaded module [repository-url]
[2022-09-22T17:38:52,861][INFO ][o.o.p.PluginsService     ] [ip-172-31-42-176] loaded module [systemd]
[2022-09-22T17:38:52,861][INFO ][o.o.p.PluginsService     ] [ip-172-31-42-176] loaded module [transport-netty4]
[2022-09-22T17:38:52,861][INFO ][o.o.p.PluginsService     ] [ip-172-31-42-176] loaded plugin [opensearch-alerting]
[2022-09-22T17:38:52,861][INFO ][o.o.p.PluginsService     ] [ip-172-31-42-176] loaded plugin [opensearch-anomaly-detection]
[2022-09-22T17:38:52,862][INFO ][o.o.p.PluginsService     ] [ip-172-31-42-176] loaded plugin [opensearch-asynchronous-search]
[2022-09-22T17:38:52,862][INFO ][o.o.p.PluginsService     ] [ip-172-31-42-176] loaded plugin [opensearch-cross-cluster-replication]
[2022-09-22T17:38:52,862][INFO ][o.o.p.PluginsService     ] [ip-172-31-42-176] loaded plugin [opensearch-geospatial]
[2022-09-22T17:38:52,862][INFO ][o.o.p.PluginsService     ] [ip-172-31-42-176] loaded plugin [opensearch-index-management]
[2022-09-22T17:38:52,862][INFO ][o.o.p.PluginsService     ] [ip-172-31-42-176] loaded plugin [opensearch-job-scheduler]
[2022-09-22T17:38:52,862][INFO ][o.o.p.PluginsService     ] [ip-172-31-42-176] loaded plugin [opensearch-knn]
[2022-09-22T17:38:52,862][INFO ][o.o.p.PluginsService     ] [ip-172-31-42-176] loaded plugin [opensearch-ml]
[2022-09-22T17:38:52,863][INFO ][o.o.p.PluginsService     ] [ip-172-31-42-176] loaded plugin [opensearch-notifications]
[2022-09-22T17:38:52,863][INFO ][o.o.p.PluginsService     ] [ip-172-31-42-176] loaded plugin [opensearch-notifications-core]
[2022-09-22T17:38:52,863][INFO ][o.o.p.PluginsService     ] [ip-172-31-42-176] loaded plugin [opensearch-observability]
[2022-09-22T17:38:52,863][INFO ][o.o.p.PluginsService     ] [ip-172-31-42-176] loaded plugin [opensearch-performance-analyzer]
[2022-09-22T17:38:52,863][INFO ][o.o.p.PluginsService     ] [ip-172-31-42-176] loaded plugin [opensearch-reports-scheduler]
[2022-09-22T17:38:52,863][INFO ][o.o.p.PluginsService     ] [ip-172-31-42-176] loaded plugin [opensearch-sql]
[2022-09-22T17:38:52,864][INFO ][o.o.p.PluginsService     ] [ip-172-31-42-176] loaded plugin [repository-s3]

@kotwanikunal
Here you can check In my cluster repository S3 plugin loaded successfully please check it.
[2022-09-27T09:21:04,108][INFO ][o.o.j.JobSchedulerPlugin ] [cordinator] Loaded scheduler extension: opendistro_anomaly_detector, index: .opendistro-anomaly-detector-jobs
[2022-09-27T09:21:04,133][INFO ][o.o.j.JobSchedulerPlugin ] [cordinator] Loaded scheduler extension: reports-scheduler, index: .opendistro-reports-definitions
[2022-09-27T09:21:04,134][INFO ][o.o.j.JobSchedulerPlugin ] [cordinator] Loaded scheduler extension: opendistro-index-management, index: .opendistro-ism-config
[2022-09-27T09:21:04,136][INFO ][o.o.p.PluginsService     ] [cordinator] loaded module [aggs-matrix-stats]
[2022-09-27T09:21:04,136][INFO ][o.o.p.PluginsService     ] [cordinator] loaded module [analysis-common]
[2022-09-27T09:21:04,136][INFO ][o.o.p.PluginsService     ] [cordinator] loaded module [geo]
[2022-09-27T09:21:04,136][INFO ][o.o.p.PluginsService     ] [cordinator] loaded module [ingest-common]
[2022-09-27T09:21:04,137][INFO ][o.o.p.PluginsService     ] [cordinator] loaded module [ingest-geoip]
[2022-09-27T09:21:04,137][INFO ][o.o.p.PluginsService     ] [cordinator] loaded module [ingest-user-agent]
[2022-09-27T09:21:04,137][INFO ][o.o.p.PluginsService     ] [cordinator] loaded module [lang-expression]
[2022-09-27T09:21:04,137][INFO ][o.o.p.PluginsService     ] [cordinator] loaded module [lang-mustache]
[2022-09-27T09:21:04,137][INFO ][o.o.p.PluginsService     ] [cordinator] loaded module [lang-painless]
[2022-09-27T09:21:04,138][INFO ][o.o.p.PluginsService     ] [cordinator] loaded module [mapper-extras]
[2022-09-27T09:21:04,138][INFO ][o.o.p.PluginsService     ] [cordinator] loaded module [opensearch-dashboards]
[2022-09-27T09:21:04,138][INFO ][o.o.p.PluginsService     ] [cordinator] loaded module [parent-join]
[2022-09-27T09:21:04,138][INFO ][o.o.p.PluginsService     ] [cordinator] loaded module [percolator]
[2022-09-27T09:21:04,138][INFO ][o.o.p.PluginsService     ] [cordinator] loaded module [rank-eval]
[2022-09-27T09:21:04,139][INFO ][o.o.p.PluginsService     ] [cordinator] loaded module [reindex]
[2022-09-27T09:21:04,139][INFO ][o.o.p.PluginsService     ] [cordinator] loaded module [repository-url][2022-09-27T09:21:04,139][INFO ][o.o.p.PluginsService     ] [cordinator] loaded module [transport-netty4]
[2022-09-27T09:21:04,140][INFO ][o.o.p.PluginsService     ] [cordinator] loaded plugin [opensearch-alerting]
[2022-09-27T09:21:04,140][INFO ][o.o.p.PluginsService     ] [cordinator] loaded plugin [opensearch-anomaly-detection]
[2022-09-27T09:21:04,140][INFO ][o.o.p.PluginsService     ] [cordinator] loaded plugin [opensearch-asynchronous-search]
[2022-09-27T09:21:04,140][INFO ][o.o.p.PluginsService     ] [cordinator] loaded plugin [opensearch-cross-cluster-replication]
[2022-09-27T09:21:04,140][INFO ][o.o.p.PluginsService     ] [cordinator] loaded plugin [opensearch-index-management]
[2022-09-27T09:21:04,141][INFO ][o.o.p.PluginsService     ] [cordinator] loaded plugin [opensearch-job-scheduler]
[2022-09-27T09:21:04,141][INFO ][o.o.p.PluginsService     ] [cordinator] loaded plugin [opensearch-knn][2022-09-27T09:21:04,141][INFO ][o.o.p.PluginsService     ] [cordinator] loaded plugin [opensearch-observability]
[2022-09-27T09:21:04,141][INFO ][o.o.p.PluginsService     ] [cordinator] loaded plugin [opensearch-performance-analyzer]
[2022-09-27T09:21:04,141][INFO ][o.o.p.PluginsService     ] [cordinator] loaded plugin [opensearch-reports-scheduler]
[2022-09-27T09:21:04,142][INFO ][o.o.p.PluginsService     ] [cordinator] loaded plugin [opensearch-security]
[2022-09-27T09:21:04,142][INFO ][o.o.p.PluginsService     ] [cordinator] loaded plugin [opensearch-sql][2022-09-27T09:21:04,142][INFO ][o.o.p.PluginsService     ] [cordinator] loaded plugin [repository-s3]

Thanks,
Dipen.

@dipenpatel235 thanks for the logs.
I do see: [cordinator] loaded plugin [repository-s3].
I am really surprised why type s3 error is showing up.
Do you mind turning on debug logs and try registering the snapshot repo?


Is the back button from the Mollie checkout customizable

Hi,
Is there a way to configure the back button from the Mollie checkout ?
I tried setting the first_payment.redirect_url in the config/cashier.php to a custom page mywebsite.com/test
And when clickin on the ‹ Previous website link from the Mollie checkout, it redirects me to that page. Same if I complete the payment.
Is there a way to configure a different url when click on that back button ?
I tried to see if some request data was sent to that test page to see if I could redirect if it was a back or a complete but nothing is there.
I was thinking about the webhook that handle the first_payment but this url is called by the mollie server, and if failed emits a FirstPaymentFailed but even listening to it will not help me redirect the user after clicking on that link from the Mollie checkout.
Am I missing something ?
Could it be possible to have a cancel_url in the config next to the redirect_url at some point ?
Thanks in advance for your help

Hi,
Mollie supports only one redirectUrl, whatever the payment state is.
Best practice is to grab the payment status from the Mollie API in your controller and proceed from there.
$payment = mollie()->payments->get($paymentId);
// switch($payment->status)


Regression Defect - gps of learning tpd and etb reports

Dial Resouce - GPS Of learning

Click on any leged cards map is not showing properly

Usage outside state info is not showing  in both TPD and ETB usage of GPS

This issue is not covered in v5.0 and to be analyzed

@htvenkatesh @pandutibil - request you to address this bug with next steps.

Dial Resource program is not consider in the current version


Port triangle example from gfx to wgpu-rs

Changed

Port triangle example from gfx to wgpu-rs.

Removed

Remove all dev-dependencies on old versions of gfx and glutin.

Closes #74.
Fixes #109.

CI is failing because the Rust version defined in renderdoc-rs-circleci-dockerfile is too old (build logs). We will need to bump the minimum supported Rust version (MSRV) in the Docker container in order to unblock this PR.


The description of ServicePrincipalNames is not correct

Though the issue has been marked as "Closed" on https://github.com/MicrosoftDocs/windows-powershell-docs/issues/246 I can still see the description of the ServicePrincipalNames as originally reported on that issue.
As title:
-ServicePrincipalNames
Use the DateTime syntax when you specify this parameter. Time is assumed to be local time unless otherwise specified. When a time value is not specified, the time is assumed to 12:00:00 AM local time. When a date is not specified, the date is assumed to be the current date.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 22bb7107-c501-6b6f-1f6a-dcb66c65b703
Version Independent ID: b73926ab-2463-30a9-ccc9-7038fbcd98f3
Content: Set-ADServiceAccount (addsadministration)
Content Source: docset/windows/addsadministration/set-adserviceaccount.md
Product: w10
Technology: powershell-windows
GitHub Login: @coreyp-at-msft
Microsoft Alias: coreyp

@officedocsbot assign @e0i

@officedocsbot assign @e0i

@juanirm The issue is under investigation. Thank you for providing this feedback.

Solved for all 6 files in PR #1080

@dariomws306 @get-itips @tseward
Peer review needed for this PR. Thanks.

I think in this example the second dash should be removed:
-ServicePrincipalNames**-**@{Add="SQLservice\accounting.corp.contoso.com:1456"};{Remove="SQLservice\finance.corp.contoso.com:1456"}
In set-adserviceaccount.md you should add the yaml table below the parameter description.

@dariomws306 can you specify where are those changes needs to be added?

The dash should be removed on all the articles.
And yaml table here:
docset/windows/addsadministration/set-adserviceaccount.md

@dariomws306  you are right sir, that was a typo ...

@dariomws306  the Recommendations are already on the PR #1080

Thanks! Good work!

Sorry @j0rt3g4, I think you should apply the dash update also on new-adserviceaccount.md.
Also I see that you have modified parameter type from HashTable to String on Set-ADServiceAccount.md, you should leave them as HashTable there (String is ok on Net-ADServiceAccount.md).
Thanks!

@dariomws306  Sure thing, it's done.

@j0rt3g4 Did you revert type to Hashtable on set-adserviceaccount.md?

No o haven't change that

No

Apologies, I have put the PR review request in the issue instead of the PR :man_facepalming:

@dariomws306  @e0i It's done

@juanirm
Upon your feedback, We have updated the content with relevant changes accordingly.
Thank you for bringing this issue to attention.

@officedocsbot close

I am sorry to say this but I can still see the issue on the page.
https://docs.microsoft.com/en-us/powershell/module/addsadministration/Set-ADServiceAccount?view=win10-ps
If you go to the "-ServicePrincipalNames" explanation section it is still saying the "Date format" text.
Have you checked this before closing?

@juanirm The corrections are done via continuous integration that they could take days to be merged into the public content, please be patient, and let us know if after a week the content is still not visible.
Thank you for your feedback.

@juanirm  If you check the ".md" file at https://github.com/MicrosoftDocs/windows-powershell-docs/blob/master/docset/windows/addsadministration/set-adserviceaccount.md#-serviceprincipalnames
you will realize that the content is already changed there, the only missing part is "continuous integration" to merge the content into the public that would be done in the following days. 👍

Fair enough, I thought that the closing included the full CICD pipe. I'll close it then. 👍

It closes the issue but it should be fully updated soon :)


/tasks/{taskId}/ack always return false

I'm following the add-idents developer lab here and I don't seem to get the ack task step working.
Question 1 - call to /tasks/{taskId}/ack with correct task id always returns false. Why?
Question 2 - (probably because I always get false as the response) I don't see any changes or effect on Workflow UI being reflected. Is that expected?
Question 3 - What does this ack step do exactly? I ended up just skipping this step entirely and the workflow worked fine. The task just changes from SCHEDULED to IN_PROGRESS after polling, and from IN_PROGRESS to COMPLETED after the mocked worker return response. Therefore, I'm confused if the ack call in the middle does anything at all.
For example, here is my response from task polling in this step
{
    "taskType": "add_idents",
    "status": "IN_PROGRESS",
    "inputData": {
        "identType": "animation",
        "contentId": "my_unique_content_id"
    },
    "referenceTaskName": "add_idents_by_type",
    "retryCount": 0,
    "seq": 3,
    "pollCount": 1,
    "taskDefName": "add_idents",
    "scheduledTime":<PHONE_NUMBER>353,
    "startTime":<PHONE_NUMBER>830,
    "endTime": 0,
    "updateTime":<PHONE_NUMBER>830,
    "startDelayInSeconds": 0,
    "retried": false,
    "executed": false,
    "callbackFromWorker": true,
    "responseTimeoutSeconds": 180,
    "workflowInstanceId": "eaa3f523-9f0d-4426-b3f8-36d45a5d78cf",
    "workflowType": "add_netflix_identation",
    "taskId": "8452fcf4-f016-4da3-96a2-ea797068af4e",
    "callbackAfterSeconds": 0,
    "outputData": {},
    "workflowTask": {
        "name": "add_idents",
        "taskReferenceName": "add_idents_by_type",
        "inputParameters": {
            "identType": "${workflow.input.identType}",
            "contentId": "${workflow.input.contentId}"
        },
        "type": "SIMPLE",
        "decisionCases": {},
        "defaultCase": [],
        "forkTasks": [],
        "startDelay": 0,
        "joinOn": [],
        "optional": false,
        "taskDefinition": {
            "createTime":<PHONE_NUMBER>480,
            "createdBy": "",
            "name": "add_idents",
            "retryCount": 3,
            "timeoutSeconds": 300,
            "inputKeys": [],
            "outputKeys": [],
            "timeoutPolicy": "TIME_OUT_WF",
            "retryLogic": "FIXED",
            "retryDelaySeconds": 10,
            "responseTimeoutSeconds": 180,
            "inputTemplate": {},
            "rateLimitPerFrequency": 0,
            "rateLimitFrequencyInSeconds": 1
        },
        "defaultExclusiveJoinTask": [],
        "asyncComplete": false,
        "loopOver": []
    },
    "rateLimitPerFrequency": 0,
    "rateLimitFrequencyInSeconds": 0,
    "workflowPriority": 0,
    "iteration": 0,
    "taskDefinition": {
        "present": true
    },
    "loopOverTask": false,
    "queueWaitTime": 710477,
    "taskStatus": "IN_PROGRESS"
}

And then I made the ack call which responded with false
curl --location --request POST 'http://localhost:8080/api/tasks/8452fcf4-f016-4da3-96a2-ea797068af4e/ack' \
--header 'Content-Type: application/json'

@balloonio Yes, we can deprecate the endpoint. We may not be able to completely remove it in minor version upgrade though. Thanks for following through. We can make this change or we'd appreciate a PR too.

@kishorebanala Cool, I will create a PR and subscribe you guys

Can I ask quesiton why Acking is considered as obsolete? Is it because when clients ack unintentionally their tasks and they will become hanging forever?

If this is not required anymore why the supplied clients still do that? The Python client doesn't work for sure as it expects true on Ack action

@SuperMasterBlasterLaser The semantic of acking a task was removed to reduce the number of round trips required for a worker to start processing a task and thereby reducing the failure points.
@jansonz The ack semantic was removed from the Java client in #1470 . We are actively welcoming contributions from the community to help us maintain the Python and Go clients (which were community contributions). Please feel free to submit a PR with the required changes.


Enable autodetection for pyc files

Now, if a file has a parseable python magic number it's considered
as pyc file no matter what a name it has.
Fixes: https://github.com/fedora-python/marshalparser/issues/3

@hroncok Do you think that this approach of detection of pyc file is reliable?

Do you think that this approach of detection of pyc file is reliable?

Yes. It is not future proof, but we will need to update the magic numbers in the future anyway.

Do you want to take another look? If so, no rush.

No need, the code looks good, tests pass, thanks. Merge at will.


64 bit bytebuffer operations ?

hi, im checking out swift for a jvm migration of mmap dependent features.
i have 2 questions:
does       public var capacity: Int
abide Swift provides an additional integer type, Int , which has the same size as the current platform's native word size: On a 32-bit platform, Int is the same size as Int32 . On a 64-bit platform, Int is the same size as Int64. ?
does swift NIO make memory mapped file channels relatively maintainable ?
thanks
edit: i read through the code, i don't see any direct pointer operations or mapped regions that would accompany.
iiuc swift can go ahead and access underlying handles and native pointers required by shmem/mmap; something absent from jvm options.

closing based on relevance to my situation.


remove python 2 as supported language

Remove from tests
Remove six as dependency
support python +3.6

We forget to remove futures


isort config test

Description

Linked issue(s)/Pull request(s)

issue_number

Type of Change

[ ] Non-breaking bug fix
[ ] Breaking bug fix
[ ] New feature
[ ] Test
[ ] Doc update
[ ] Docker update

Related Component

[ ] Simulation toolkit
[ ] RL toolkit
[ ] Distributed toolkit

Has Been Tested

OS:

[ ] Windows
[ ] Mac OS
[ ] Linux

Python version:

[ ] 3.6
[ ] 3.7

Key information snapshot(s):

Needs Follow Up Actions

[ ] New release package
[ ] New docker image

Checklist

[ ] Add/update the related comments
[ ] Add/update the related tests
[ ] Add/update the related documentations
[ ] Update the dependent downstream modules usage

Codecov Report

Merging #182 into v0.1 will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             v0.1     #182   +/-   ##
=======================================
  Coverage   72.49%   72.49%
=======================================
  Files          86       86
  Lines        4064     4064
=======================================
  Hits         2946     2946
  Misses       1118     1118

Flag
Coverage Δ

unittests
72.49% <ø> (ø)

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

Continue to review full report at Codecov.

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


Ruby: bundler is not taken into account

Your environment

vim version: 8.0.648
Syntastic version: 3.8.0-63 (Vim 800, Darwin)

Expected behavior
Existing Gemfiles should be taken into account when running ruby linters.
Actual behavior
Existing Gemfiles are ignored when running linters. This does not just makes for distracting warnings when a project lags behind the latest bundler installed but altogether disables them since some newer versions can outright bail out when they don't know anymore about some deprecated config file structure. Being able to handle multiple Gemfile (possibly in nested directories) is important for monorepos and vendoring.
Steps to reproduce the problem
mkdir -p repro/{foo,bar}
cd repro
cat > foo/foo.rb <<'EOF'
if 42 == answer
  # there should not be a linter warning above
  # but a Style/YodaCondition is raised
end
EOF
cat > bar/bar.rb <<'EOF'
if 42 == answer
  # there should be a Style/YodaCondition linter warning above
end
EOF
cat > foo/Gemfile <<'EOF'
source 'https://rubygems.org'

gem 'rubocop', '~> 0.46.0'
EOF
cat > bar/Gemfile <<'EOF'
source 'https://rubygems.org'

gem 'rubocop', '~> 0.49.0'
EOF
(cd foo; bundle install)
(cd bar; bundle install)
vim foo/foo.rb bar/bar.rb
# now look at foo.rb and bar.rb
# nested variants include foo being inside bar as well as bar being inside foo

Please read the FAQ.

This is not meant to deal with different versions of ruby but call the proper version of the checker. the use case falls in neither of those two paragraphs (which seem to have been loosely copy-pasted from the python one and don't really make sense for ruby but I sort of get the point):

A. Install a Ruby version manager such as rvm or rbenv, activate the environment for the relevant version of Ruby, and install in it the checkers you want to use. Set g:syntastic_ruby_checkers accordingly in your vimrc, and run Vim from the virtual environment.
If you're starting Vim from a desktop manager rather than from a terminal you might need to write wrapper scripts around your checkers, to activate the virtual environment before running the actual checks. Then you'll need to point the relevant g:syntastic_ruby__exec variables to the wrapper scripts.

From your terse answer I suppose the suggested fix is to write a wrapper script that will find the correct version of the checker from the file's path and execute it. Turns out this wrapper exists and is invoked as bundle exec <checker> when called from the file's dirname. I thought it would be nice if Syntastic could handle that by itself.

This is not meant to deal with different versions of ruby but call the proper version of the checker.

However, the same approach would also solve your problem.

seem to have been loosely copy-pasted from the python one and don't really make sense for ruby

Please feel free to suggest a better phasing, that doesn't remotely ressemble the answer for Python, and makes complete sense for Ruby.

Turns out this wrapper exists and is invoked as bundle exec <checker> when called from the file's dirname.

Changing the command line of the checkers is described in the manual (cf. :h syntastic-config-makeprg):
let g:syntastic_ruby_rubocop_exe = 'bundle exec rubocop'

And then you'll need to make sure you run Vim from the right directory, either with an autocmd, or by setting autochdir.
Or, as noted in the FAQ, you could write a shell script that takes care of all relevant details, and point syntastic to it.

I thought it would be nice if Syntastic could handle that by itself.

Syntastic is a generic framework that deals with 240+ checkers.  It largely doesn't care about the contents of your files.  Making exceptions for specific filetypes is not really something it can afford.  Running out of the box for all possible situations is neither possible nor desirable.  For this reason, you (i.e. the user) are supposed to be familiar with Vim scripting, and use that knowledge to configure Vim and syntastic  to run checkers in a way that makes sense for your projects.  Perhaps you can find some Ruby-specific plugin than can run rubocop the right way without user intervention; syntastic doesn't aim to go there.

Please feel free to suggest a better phasing, that doesn't remotely ressemble the answer for Python, and makes complete sense for Ruby.

OK I'll do this in a PR.

Syntastic is a generic framework that deals with 240+ checkers. It largely doesn't care about the contents of your files. Making exceptions for specific filetypes is not really something it can afford. Running out of the box for all possible situations is neither possible nor desirable. For this reason, you (i.e. the user) are supposed to be familiar with Vim scripting, and use that knowledge to configure Vim and syntastic to run checkers in a way that makes sense for your projects.

A sensible approach. What do you think about adding the very statement you made to README.md (with possibly some light changes to adjust it to the context), which would establish the scope of the project in an unambiguous way?

PR is at #2052.


flask-restx 0.3.0 doesn't work with flask 2.0

Looks like we hit flask's release spot: flask 2.0 was released earlier
today two hours ago, which are within the window in which we released a
new MAX Base version after test. Fix flask < 2.0 for now.

The branch build failed but it doesn't matter -- it was caused by us having exceeded Docker hub rate limit. The pull request build passed and it is ready to be merged.


Sunglasses don't scale correctly

Small issue, sunglasses don't work well with weird scaling. Here's an example:

(btw the sunglasses are really fun)

Yep, thanks for pointing out. Will try to fix soon!

This is totally an issue, but not planning to fix it before replacing the page. Thanks though.


slave node error when execute flushall command on master node

when execute "flushall" command on master, slave node repeatly log error like this:
[2015/10/24 19:45:39] <IP_ADDRESS>:58183 "sync 3" 0 [invalid sync logid 3 > 0 + 1]

https://github.com/siddontang/ledisdb/blob/master/ledis/ledis.go#L174-L179  here is problem, flushall clear commit id and logid, but slave node doesn't clear. is it known problem?

hi @FlamingTree , as I knew, if the sync failed, slave will try another full sync later, if not, this may be a problem.
of you can send slaveof instead to fix it?

I read flushall command implementation, found it does not log deletion write, nor send flushall command to slave, but it clean master's logid, cause master's logid less than slave's. maybe better solution is send flushall to slave, but i don't know how to~

https://github.com/FlamingTree/ledisdb/commit/f781c8e9d8fd088c2fc7d96ae39a7713130be86e  I try to fix it. I will send a PR if it's ok. but it's insignificant because rarely use.


Add CHP defaults logic for size_class based on avg heating load

Replicate REopt_API reo.views.chp_defaults logic for selecting a CHP size class based on several criteria, mostly the average total heating load (Space + DHW). Also select CHP.prime_mover if none given based on existing_boiler.production_type.

Closed in https://github.com/NREL/REopt.jl/pull/144.


Question for how to implement interactive demo

Thanks for sharing your great work!
I'd like to test a customized dataset using your interactive demo.
I'm wondering if there is a sample code or project that you can share or I can refer to for implementing the interactive demo as yours.
Thanks for your reply in advance!

You can refer to HuggingFace demo.

@huangjy-pku
Hello, I'm trying to test the LEO-Demo app, but there's a key error for 'LOG_ACCESS_TOKEN' as below.
Do you know how to solve it?
~/embodied-generalist/LEO-Demo$ python app.py
.gitattributes: 100%|
README.md: 100%|
generation_config.json: 100%|
pytorch_model.bin.index.json: 100%|
special_tokens_map.json: 100%|
config.json: 100%|
tokenizer_config.json: 100%|
tokenizer.model: 100%|
pytorch_model-00002-of-00002.bin: 100%|
pytorch_model-00001-of-00002.bin: 100%|
Fetching 10 files: 100%|
Loading checkpoint shards: 100%|
leo_noact_hf.pth: 100%|
Traceback (most recent call last):
  File "~/embodied-generalist/LEO-Demo/app.py", line 5, in <module>
    from utils import *
  File "~/embodied-generalist/LEO-Demo/utils.py", line 51, in <module>
    access_token = os.environ['LOG_ACCESS_TOKEN']
  File "~/miniconda3/envs/groupfree/lib/python3.10/os.py", line 680, in __getitem__
    raise KeyError(key) from None
KeyError: 'LOG_ACCESS_TOKEN'

This is a particular key that I need to launch the demo but have kept private. You can modify this or simply remove it according to your demand.


Fix routes and services offset with kong 1.0.x

Fixes #39

@kevholditch this PR is ready for review. Thank you.

I have fixed the merge conflicts and merged in, thanks for the contribution

Thank you!

@kevholditch the fix seems not to be in the master branch...
I have fix the merge conflicts.

@secat sorry I think sorted the other one, can you open this PR again and I'll merge it

@kevholditch I have open a new PR #59 with the fix and resolved merge conflicts


Add refmt to Try Reason website?

I though Reason's pretty printer was one of the coolest aspects of Reasons, but it doesn't seem to be available on the website. Any blockers?

@rickyvetter's working on some doc site revamp. Soon!


Rose pine/master

Check https://github.com/anuraghazra/github-readme-stats/pull/892 for correct colour contrast according to the WCAG AAA standards.

Theme preview (bot)
title_color: #9CCFD8 | icon_color: #C3A6E6 | text_color: #FAF4ED | bg_color: #1f1d29
Link: https://github-readme-stats.vercel.app/api?username=rickstaa&title_color=9CCFD8&icon_color=C3A6E6&text_color=FAF4ED&bg_color=1f1d29&show_icons=true

Hi thanks for the theme contribution, please read our theme contribution guidelines

We are currently only accepting color combinations from any vscode theme or which has good color combination to minimize bloating the themes collection.

Also note that if this theme is exclusively for your personal use then instead of adding it to our theme collection you can use card customization options

Read our contribution guidelines for more info


Ability to show exported variables only when viewed within their scene

This PR adds a new annotation to GDScript, @export_if_root, which when placed after an @export annotation, causes the annotated property to only show in the inspector if the node is the root of the current scene. This is useful for hiding irrelevant information when editing nested scenes.
There is a discussion thread at https://github.com/godotengine/godot-proposals/discussions/10017 and a formal proposal at https://github.com/godotengine/godot-proposals/issues/10024. More details about the reasoning behind the feature are provided there (especially in the proposal). Before merging anything, I think it may be wise for us to refine the syntax.

Bugsquad edit, closes: https://github.com/godotengine/godot-proposals/issues/10024

This is technically not a review, but I can tell you right now that you should add documentation for PROPERTY_USAGE_SHOW_IF_ROOT. But perhaps you want to wait until you iron out the other details. I'll also make a post in the proposal shortly.

There's some formatting errors, please run formatting and add to documentation before we can run CI on this

I can certainly do that! For the documentation specifically, should I go ahead and write up the documentation for the implementation as it is currently, even if the details (such as the name of the annotation) are likely to change before being merged in?

You should at least generate them, but you can leave a temporary description until things are decided on

Alrighty, thanks! Will try to get those done today then 😄

I feel this annotation is far too specific, I can think of few cases when I'd want something to show up only when the node is the root
Honestly I'd personally be more interested in when it isn't the root but instead is in an instanced scene, that makes far more sense to me
But I feel this is far too specific and also far too easy to work around in custom code to warrant a custom annotation, you can simply do this with _validate_property and EditorInterface.get_edited_scene_root() (though that might not work easily in exported projects, but that's something to solve with other features like editor only compiled code, not something against that workaround)

I'm not sure at which point it's acceptable to take a proposal and try to implement it

There really isn't any limit for that, the only thing to consider is that you might be wasting time if you try to implement a proposal before it's gotten good support and ends up rejected because it's not in high enough demand, or having to redesign it multiple times because the discussion changes and other details are focused on
So beyond that letting a proposal sit until some stronger consensus has been reached it's up to you, but jumping on a proposal before it's been discussed deeply enough can risk making a PR when the discussion would otherwise have led to dismissing the idea or some workaround being found or some different solution being decided on

Closing this as there's not a lot of interest in it, and/or if the private access modifier ends up going forward, a similar function could potentially be a part of that.


Revert "Fix a legacy TODO"

Reverts flutter/flutter#77454
This has caused some internal failures.

Going to manually merge this since it is a revert.


[Feature] Vim editor Pop-up like the one in the SurfingKeys Browser Extension

The SurfingKeys Browser Extension has a feature where you can open a little vim editor to edit your text and then have it inserted into the text box. Having something like this would be pretty neat for things that aren't in the browser.
The current edit mode can be somewhat awkward, buggy and doesn't feel as good as an actual vim editor (which is to be expected) or something like the little pop up editor from SurfingKeys.
I genuinely have no idea if it would be even possible to have something like that everywhere on the OS nor how well it would actually perform compared to the one in SurfingKeys, but I figured it's worth mentioning in case you want to look into it/consider adding something like that.
Either way I appreciate your work, thanks!

I'm not considering implementing that feature at this time but will consider it when we have more contributors in this project.
Currently, there are several alternative software available.

Text Editor Anywhere (Windows)
vim-anywhere (Mac/Linux)
firenvim

Thanks.


fix: command options and choices doesn't syncs

About
This pull request fixes bug command options/choices doesn't syncs when you tryies to add/update/remove options/choice.
Reason of this bug is in overriding _command variable on line 259.
Also this pr removes useless return data
Checklist

[ ] I've ran pre-commit to format and lint the change(s) made.
[x] I've checked to make sure the change(s) work on 3.8.6 and higher.
[ ] This fixes/solves an Issue (If existent):.

resolves #

I've made this pull request for/as: (check all that apply)

[ ] Documentation
[ ] Breaking change
[ ] New feature/enhancement
[x] Bugfix

Was this tested properly
I adds, updates, deletes options and choices in all kinds(maybe?) of commands(groups and subcommands) and it works fine.


Greetings, code format and one other workflow not running

Describe the bug
The workflows are not running
To Reproduce
Steps to reproduce the behavior:

I think we need to update the workflowa

Expected behavior
Maybe it is because of tokens
Screenshots

The workflow we are using for Greetings has some issues in its code. So, I suggest using EddieHubCommunity/gh-action-community gh-action instead of the current one. What your thoughts on this @Adarsh-jaiss ?


Annotations on plot

Annotations on plot

@FBRTMaka YOu wanna review this at all?

@DanielJMaher sure can!

@DanielJMaher , @birdage ; just quick verifications of those items and should be good to go!

merged with dans ok


Add topics to pubspec.yaml

Topics helps users on pub.dev discover packages, and related packages.
You can see a list of topics here.
You can also make your own topics.
Topics are added to pubspec.yaml as follows:
topics:
 - my-topic
 - some-other-topic

See also: https://dart.dev/tools/pub/pubspec#topics

... and released :)


React boilerplate web page

Components to create

header
footer
layout components that renders footer and header
wrap each route in a layout components


Server is online but no performance statistics being reported

I see a previous post which is similar in nature to this one, but not quite the same. This seems to occur for Minecraft and Minecraft Spigot, but I'll be honest in stating that I haven't tested this for other games.
In a few situations, it appears as if the performance statistics simply stop reporting for certain servers. It works fine for other servers running on the same host. This has occurred a few times for different servers. In my case, the indicator in the top left is still green and the server is still online and functional. Restarting the server resolves the issue.
These are the last lines in the console:
[09:32:07] [Server thread/INFO]: Starting GS4 status listener
[09:32:07] [Query Listener #1/INFO]: Query running on <IP_ADDRESS>:25574
[09:32:07] [Server thread/INFO]: Timings Reset
000008_378b981c:~$

It's the same issue, go ahead and tag onto that issue. 😁


Dropping error vector during compilation

What is wrong?
I noticed while looking into one of Alex's recent fuzzer bugs that we're ignoring parser errors. The following file will make it past the parser just fine when running the CLI:
https://github.com/g-r-a-n-t/fe/blob/d3d9e7815750687dc3fa5b0a422253b4427d0f2a/agroce_399.fe#L1-L5
while a parser test on the same module
https://github.com/g-r-a-n-t/fe/blob/d3d9e7815750687dc3fa5b0a422253b4427d0f2a/parser/tests/cases/parse_ast.rs#L171-L177
will return the following (correct) errors:
---- parse_ast::invalid_parse stdout ----
error: missing colon in contract definition
  ┌─ invalid_parse:2:11
  │
2 │ contract o
  │           ^ expected `:` here

error: function definition requires a list of parameters
  ┌─ invalid_parse:4:13
  │
4 │     pub def e->(u256,bool,address)
  │             ^ function name must be followed by `(`
  │
  = Note: if the function `e` takes no parameters, use an empty set of parentheses.
  = Example: def e()
  = Note: each parameter must have a name and a type.
  = Example: def e(my_value: u256, x: bool)

error: missing colon in function definition
  ┌─ invalid_parse:4:35
  │
4 │     pub def e->(u256,bool,address)
  │                                   ^ expected `:` here

How can it be fixed
Looks like we're just dropping the errors. As a matter of fact, now that I'm looking, this is the case. We're not doing anything with the errors vector.

@g-r-a-n-t I'm guessing I should restart all my fuzzers based on this fix, right?  Between the new parser (for old fuzzers I've had running a month or two) and this, corpuses built up so far are probably not that helpful.

I think that might be appropriate..
Btw, I have question. Are you filtering out unimplement! and todo! panics?

Yes, if the phrase "not implemented" or "not yet implemented" appears in the failure output, I drop it during triage.

Question for you:  if you have two tests in different parts of the tree with identical names, can I assume they are the same thing?  I think that's true now, but I don't want to make the assumption if not.  On the other hand, if I put both in, it wastes some time during fuzzer startup processing both.

can I assume they are the same thing?

Yes, I'd say so.

Yes, if the phrase "not implemented" or "not yet implemented" appears in the failure output, I drop it during triage.

Ok, cool.
It's starting to look like those should be considered bugs, or at least not implemented should be. For example, if a tuple is not lowered and gets to the Yul pass, the compiler will crash with not implemented. I think this is the most appropriate error, since we could implement that transformation, but chose not to. Hitting an unimplemented! in this case is definitely a bug. There are other situations like this.
I'll need to go over the codebase some more and make sure we handle non-bugs differently, but after that, I think you can disable that filter.

Sounds good, ping me when you're ready to open the floodgates :)
On Wed, May 12, 2021 at 10:18 AM Grant Wuerker @.***>
wrote:

can I assume they are the same thing?
Yes, I'd say so.
Yes, if the phrase "not implemented" or "not yet implemented" appears in
the failure output, I drop it during triage.
Ok, cool.
It's starting to look like those should be considered bugs, or at least not
implemented should be. For example, if a tuple is not lowered and gets to
the Yul pass, the compiler will crash with not implemented. I think this
is the most appropriate error, since we could implement that
transformation, but chose not to. Hitting an unimplemented! in this case
is definitely a bug. There are other situations like this.
I'll need to go over the codebase some more and make sure we handle
non-bugs differently, but after that, I think you can disable that filter.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/ethereum/fe/issues/402#issuecomment-839953923, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAHMJCEAOXZVZSQ6XKDWXA3TNKZ75ANCNFSM44TL3KMA
.

--
Alex David Groce
School of Informatics, Computing, and Cyber Systems
Northern Arizona University

Any special instances can probably be handled be my adding an exemplar that
raises the genuinely harmless no implemented to my triage corpus of
"known-closed" bugs.
On Wed, May 12, 2021 at 10:22 AM Alex Groce @.***> wrote:

Sounds good, ping me when you're ready to open the floodgates :)
On Wed, May 12, 2021 at 10:18 AM Grant Wuerker @.***>
wrote:

can I assume they are the same thing?
Yes, I'd say so.
Yes, if the phrase "not implemented" or "not yet implemented" appears in
the failure output, I drop it during triage.
Ok, cool.
It's starting to look like those should be considered bugs, or at least not
implemented should be. For example, if a tuple is not lowered and gets
to the Yul pass, the compiler will crash with not implemented. I think
this is the most appropriate error, since we could implement that
transformation, but chose not to. Hitting an unimplemented! in this case
is definitely a bug. There are other situations like this.
I'll need to go over the codebase some more and make sure we handle
non-bugs differently, but after that, I think you can disable that filter.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/ethereum/fe/issues/402#issuecomment-839953923, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAHMJCEAOXZVZSQ6XKDWXA3TNKZ75ANCNFSM44TL3KMA
.

--
Alex David Groce
School of Informatics, Computing, and Cyber Systems
Northern Arizona University

--
Alex David Groce
School of Informatics, Computing, and Cyber Systems
Northern Arizona University


Jsonix should warn about naming collisions in modules

Continued from highsource/jsonix#13.

See also #114. Mappings were generated with naming collisions.


Android 5 Asus ZenFone 2 blocking push notifications when app close

Hi guys,
I use this plugin and it works very well for Samsung, Lenovo, Nexus, HTC.
But when I tested it on ASUS ZenFone I did not received push notification when app is offline. Then I need go to manager autorun and must enabled push for my app.
I want to know, there are some of permission in AndroidManifest to enable push when app is offline by default, without custom enabled?

@YaroslavG sorry, no idea and I have no access to that device.

I have an ZenFone too and the manager autorun is really a problem. Most of users want to save battery, so they blocks services on apps...

+1
Any solution for this case?
Thanks

@dludvig no, there is not. If the user blocks the service that receives push notifications then there is nothing I can do in this plugin. Perhaps take a look at https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/PAYLOAD.md#huawei-and-xiaomi-phones as there may be a setting on the phone in question that will enable users to whitelist your app.


pixi autocompletions: compdef undefined on zsh

Checks

[X] I have checked that this issue has not already been reported.

[X] I have confirmed this bug exists on the latest version of pixi, using pixi --version.

Reproducible example
/
Issue description
I sat next to someone trying out pixi and after running the install, starting zsh said compdef undefined.
I think this might be an issue in our autocompletion code - removing autocompletions solved it.
Expected behavior
/

Not sure if we should fix this our that the user should update its installation:
This would fix it for them.  https://unix.stackexchange.com/a/477909
We could also change the behavior for zsh so that it puts the completions in a file and add that file to the $fpath But that is a little more steps to update that file when the pixi version changes.
https://github.com/clap-rs/clap/issues/2479#issuecomment-845312113

I experienced the same issue on a recent macOS with zsh, it seems plausible that it would suffice to add the two lines
autoload -Uz compinit
compinit

just before
compdef _pixi pixi

in the output of
eval "$(pixi completion --shell zsh)"

I added these two lines in ~/.zshrc just before  eval "$(pixi completion --shell zsh)" and it solved my issue.


Quiltification

We love Quilt!

BTW a few things to note:

I temporarily removed the inclusion of Gravity Changer as it wasnt included in prod (But the mods it JIJed were) for some reason
Gravity Changer needs its update on Modrinth


Minor fixes in docs

Fixes https://github.com/nlohmann/json/issues/1620, fixes https://github.com/nlohmann/json/issues/1621, fixes https://github.com/nlohmann/json/issues/1622, fixes https://github.com/nlohmann/json/issues/1623.

Pull request checklist
Read the Contribution Guidelines for detailed information.

[ ]  Changes are described in the pull request, or an existing issue is referenced.
[ ]  The test suite compiles and runs without error.
[ ]  Code coverage is 100%. Test cases can be added by editing the test suite.
[ ]  The source code is amalgamated; that is, after making changes to the sources in the include/nlohmann directory, run make amalgamate to create the single-header file single_include/nlohmann/json.hpp. The whole process is described here.

Please don't

The C++11 support varies between different compilers and versions. Please note the list of supported compilers. Some compilers like GCC 4.7 (and earlier), Clang 3.3 (and earlier), or Microsoft Visual Studio 13.0 and earlier are known not to work due to missing or incomplete C++11 support. Please refrain from proposing changes that work around these compiler's limitations with #ifdefs or other means.
Specifically, I am aware of compilation problems with Microsoft Visual Studio (there even is an issue label for these kind of bugs). I understand that even in 2016, complete C++11 support isn't there yet. But please also understand that I do not want to drop features or uglify the code just to make Microsoft's sub-standard compiler happy. The past has shown that there are ways to express the functionality such that the code compiles with the most recent MSVC - unfortunately, this is not the main objective of the project.
Please refrain from proposing changes that would break JSON conformance. If you propose a conformant extension of JSON to be supported by the library, please motivate this extension.
Please do not open pull requests that address multiple issues.

Coverage remained the same at 100.0% when pulling 0c214949f5eefaf420e8994e1192b70e9a8fc339 on nickaein:fix-docs into 17c0849a6311543806352660eb2b351c861a291a on nlohmann:develop.

🔖 Release item
This issue/PR will be part of the next release of the library. This template helps preparing the release notes.
Type

[ ] ✨ New Feature
[ ] 🐛 Bug Fix
[ ] ⚡ Improvement
[x] 🔨 Further Change
[ ] 🔥 Deprecated function

Description

Fixed links in the README.