license tool should categorise all third-party deps in the licenses_third_party category

TL;DR
As we move third-party packages sync location from src/third_party (under the buildroot directory) to src/flutter/third_party (under the engine directory), performance of the license aggregation tool will get worse for those working on Flutter engine code.
Importantly, this is entirely a caching/performance issue, the output of the tool is unaffected.
Background
The licence tool includes a performance optimisation that separates our licences into three categories:

Flutter licences
Third-party licences
Fuchsia licences

This performance optimisation does not affect the licences eventually emitted to our licence file. What it does do is use change detection and caching to recompute the licence file only for code that changed, and pull the other categories from the cached copy. In this way, changes to checked-in code in the engine only re-trigger Flutter licence aggregation, and not the much-slower third-party licence aggregation, where no changes occurred. Changes to third-party code trigger the slower third-party aggregation, but not (for example) Fuchsia aggregation.
Today, flutter/third_party actually falls under Flutter licenses rather than third-party licences. This has been non-problematic because historically that code consisted of Flutter-authored code like libtxt that was authored by us, but independent of the rest of the system, as well as forks of third-party code like third_party/accessibility, which are maintained by the Flutter team. Neither was subject to significant churn and neither added much run time to that licenses_flutter category.
Problem description
As we progress on merging the buildroot to the engine and moving third-party dependencies (synced via the DEPS file) to pull to src/flutter/third_party rather than src/third_party, this code will increase the set of code categorised into the licenses_flutter category, and decrease (and eventually eliminate) code categorised into the licences_third_party category, thus stepwise undoing the current performance optimisation. Again, this does not affect the final set of licences, but will significantly increase script run time for anyone changing engine code.
To maintain the current performance gains I propose that we categorise code under src/flutter/third_party into the licenses_third_party category. If we find that we're actively working on any of the code checked into that directory and CI time is problematic, we could add an exceptions list that moves the affected code back into the faster-to-compute licenses_flutter bin.

Breadcrumb for where we break out the categories:
https://github.com/flutter/engine/blob/4b02631b59bf071e967f7bfc4c6a949b43c51e14/tools/licenses/lib/main.dart#L2098-L2111

/cc @Hixie. +1, thanks for doing this Chris!

Quick summary: right now we just break out licence "bins" by the top-level directory under the buildroot (src). That was a reasonable(-ish) strategy when we instituted it (at the time, flutter/third_party was really just libtxt), and will be a reasonable strategy once the buildroot is gone (flutter/third_party will be the full third_party).
Ideally, what I think we want during the migration is the ability to selectively exclude directories from one bin and put them in another. Maybe just make the current implicit mapping of top-level directory -> bin a little more explicit by pulling out a function, and supporting the idea of overrides for specific paths. Something like an overrides list where we just say flutter/third_party -> third_party_licences, then add exclusions/additions optional named params to the licence crawl function.

With the repo merge on the way, I've unsassigned myself. Once everything is landed, someone (maybe me) will likely want to pick this up again.


Correctly handle new lines in CSV validation script

Correctly handle new lines in CSV validation script
Attempting to fix Github Action errors found where the CSV file new lines are not interpreted correctly.

If newline='' is not specified, newlines embedded inside quoted fields will not be interpreted correctly, and on platforms that use \r\n linendings on write an extra \r will be added. It should always be safe to specify newline='', since the csv module does its own (universal) newline handling.
https://docs.python.org/3/library/csv.html#csv.reader

We see that in the Google spreadsheet, there are some values that have new lines values in them.
Example failed run: https://github.com/CodeWithAloha/Hawaii-Zoning-Atlas/actions/runs/8231035064

Closing -- This might not have been the correct problem


Does t9n work well with meteor 1.3?

Hi there,
I am trying to use t9n with my project. It is developed base on meteor 1.3 beta.8, and I am having trouble make t9n work in it. T9n.setLanguage is placed in the lop-level outside Meteor.startup like this
T9n.setLanguage("zh_cn");

Meteor.startup(function () {
...
})

Project can run with no problem, however, the error messages from accounts-password package are not translated. For example, when I try to register using an existed email, I still got this message "Email already exists."
I'm wondering if meteor-accounts-t9n works with Meteor 1.3? If so, what might be the reason that caused it not working in my project?
Thanks.

Meteor 1.3 is not tested yet and I'm sorry right now I don't know what the problem might be.

@softwarerero  Thanks for your quick reply. I'll give it another try and if I have any luck with it, I'll post the result here.

Today I tested with 1.3-rc.8, this works without errors. Although I have not looked if something has changed in accounts-password. Maybe you can retest and let me know what results you get.

Hi @softwarerero, thanks for that! I'll give it a try again and let you know how it turns out.

I'm having the same problem with <IP_ADDRESS>, has anyone found the problem too?

Sorry for the delay. I can confirm it is working fine for Meteor <IP_ADDRESS>.
I am using it like this to get the error translation. Is it the correct to use it?
T9n.get('error.accounts.'+error.reason),


⚠ Bofrost.be has degraded performance

In bd93cfa, Bofrost.be (https://www.bofrost.be) experienced degraded performance:

HTTP code: 200
Response time: 965 ms

Resolved: Bofrost.be performance has improved in e141037.


Internal Rancher load balancer mysteriously stops working

Hi there,
I've set up a routing solution with two Rancher load balancers, a public one which, routes traffic from a public port, and an internal one, which does path based routing. I have these in two separate stacks. One of the stacks (the internal one) is portable from environment to environment. The other depends on ports available on the host.
Usually, this works fine, but occasionally the internal load balancer stops working. It becomes unable to route traffic. When I restart it, it starts working again. I don't see anything in the log that indicates the problem. Do you have any suggestions for how to diagnose this?
Here's the rancher LB log. Looks like nothing interesting happens until I restart the service today.
11/25/2015 2:12:17 PMINFO: Updating monit
11/25/2015 2:12:17 PMINFO: Downloading http://<IP_ADDRESS>:8080/v1//configcontent//monit current=
11/25/2015 2:12:17 PMINFO: Running /var/lib/cattle/download/monit/monit-1-d166a713486fe4c0f039e152939d8d3b8ab8e6c2518e13d88f0b7ec68da46109/apply.sh
11/25/2015 2:12:17 PMINFO: ROOT -> ./
11/25/2015 2:12:17 PMINFO: ROOT -> ./etc/
11/25/2015 2:12:17 PMINFO: ROOT -> ./etc/monit/
11/25/2015 2:12:17 PMINFO: ROOT -> ./etc/monit/monitrc
11/25/2015 2:12:17 PMINFO: Sending monit applied 1-d166a713486fe4c0f039e152939d8d3b8ab8e6c2518e13d88f0b7ec68da46109
11/25/2015 2:12:17 PMINFO: Getting haproxy
11/25/2015 2:12:17 PMINFO: Updating haproxy
11/25/2015 2:12:17 PMINFO: Downloading http://<IP_ADDRESS>:8080/v1//configcontent//haproxy current=
11/25/2015 2:12:17 PMINFO: Running /var/lib/cattle/download/haproxy/haproxy-1-02ea5d48cf5da5fc868cc4906e972d5178969de851be5b1e12dc5f3386e18378/apply.sh
11/25/2015 2:12:17 PMINFO: ROOT -> ./
11/25/2015 2:12:17 PMINFO: ROOT -> ./etc/
11/25/2015 2:12:17 PMINFO: ROOT -> ./etc/haproxy/
11/25/2015 2:12:17 PMINFO: ROOT -> ./etc/haproxy/certs/
11/25/2015 2:12:17 PMINFO: ROOT -> ./etc/haproxy/certs/default.pem
11/25/2015 2:12:17 PMINFO: ROOT -> ./etc/haproxy/certs/certs.pem
11/25/2015 2:12:17 PMINFO: ROOT -> ./etc/haproxy/haproxy.cfg
11/25/2015 2:12:17 PMINFO: ROOT -> ./etc/monit/
11/25/2015 2:12:17 PMINFO: ROOT -> ./etc/monit/conf.d/
11/25/2015 2:12:17 PMINFO: ROOT -> ./etc/monit/conf.d/haproxy
11/25/2015 2:12:17 PMINFO: ROOT -> ./etc/default/
11/25/2015 2:12:17 PMINFO: ROOT -> ./etc/default/haproxy
11/25/2015 2:12:17 PMINFO: Sending haproxy applied 1-02ea5d48cf5da5fc868cc4906e972d5178969de851be5b1e12dc5f3386e18378
11/25/2015 2:12:17 PMINFO: HOME -> ./
11/25/2015 2:12:17 PMINFO: HOME -> ./etc/
11/25/2015 2:12:17 PMINFO: HOME -> ./etc/cattle/
11/25/2015 2:12:17 PMINFO: HOME -> ./etc/cattle/startup-env
11/25/2015 2:12:17 PMINFO: ROOT -> ./
11/25/2015 2:12:17 PMINFO: ROOT -> ./etc/
11/25/2015 2:12:17 PMINFO: ROOT -> ./etc/init.d/
11/25/2015 2:12:17 PMINFO: ROOT -> ./etc/init.d/agent-instance-startup
11/25/2015 2:12:17 PMINFO: Sending agent-instance-startup applied 1-557156a6c83b3adc996b56beb2d4469f282a091c31fd17461c90ee76fa7fe6e0
11/25/2015 2:12:17 PMmonit: generated unique Monit id 8acbdc5e5df331e582dfd74eda23a6cf and stored to '/var/lib/monit/id'
11/25/2015 2:12:17 PMStarting monit daemon with http interface at [localhost:2812]
12/7/2015 2:46:40 PM
The system is going down NOW!
12/7/2015 2:46:40 PM
Sent SIGTERM to all processes
12/7/2015 2:46:41 PM
Sent SIGKILL to all processes
12/7/2015 2:46:41 PM
Requesting system reboot
12/7/2015 2:46:59 PMINFO: Downloading agent http://<IP_ADDRESS>:8080/v1/configcontent/configscripts
12/7/2015 2:46:59 PMINFO: Updating configscripts
12/7/2015 2:46:59 PMINFO: Downloading http://<IP_ADDRESS>:8080/v1//configcontent//configscripts current=
12/7/2015 2:46:59 PMINFO: Running /var/lib/cattle/download/configscripts/configscripts-1-f5763391fb7914dcd14001f29ffe28d1167a3bfcc0ee0ec05d2ca9c722103c02/apply.sh
12/7/2015 2:46:59 PMINFO: Sending configscripts applied 1-f5763391fb7914dcd14001f29ffe28d1167a3bfcc0ee0ec05d2ca9c722103c02
12/7/2015 2:46:59 PMINFO: Updating agent-instance-startup
12/7/2015 2:46:59 PMINFO: Downloading http://<IP_ADDRESS>:8080/v1//configcontent//agent-instance-startup current=
12/7/2015 2:46:59 PMINFO: Running /var/lib/cattle/download/agent-instance-startup/agent-instance-startup-2-557156a6c83b3adc996b56beb2d4469f282a091c31fd17461c90ee76fa7fe6e0/apply.sh
12/7/2015 2:46:59 PMINFO: Updating services
12/7/2015 2:46:59 PMINFO: Downloading http://<IP_ADDRESS>:8080/v1//configcontent//services current=
12/7/2015 2:46:59 PMINFO: Running /var/lib/cattle/download/services/services-1-061405f3edd960bfdfe1cfb8447be40eab5b4b608731608e224cc51c5dc30b91/apply.sh
12/7/2015 2:46:59 PMINFO: HOME -> ./
12/7/2015 2:46:59 PMINFO: HOME -> ./services
12/7/2015 2:46:59 PMINFO: Sending services applied 1-061405f3edd960bfdfe1cfb8447be40eab5b4b608731608e224cc51c5dc30b91
12/7/2015 2:46:59 PMINFO: Getting agent-instance-scripts
12/7/2015 2:46:59 PMINFO: Updating agent-instance-scripts
12/7/2015 2:46:59 PMINFO: Downloading http://<IP_ADDRESS>:8080/v1//configcontent//agent-instance-scripts current=
12/7/2015 2:46:59 PMINFO: Running /var/lib/cattle/download/agent-instance-scripts/agent-instance-scripts-1-4b5124bd74cd423f98d57550b481ec77ec3a7135c6a650886ab95c043305d642/apply.sh
12/7/2015 2:46:59 PMINFO: HOME -> ./
12/7/2015 2:46:59 PMINFO: HOME -> ./events/
12/7/2015 2:46:59 PMINFO: HOME -> ./events/config.update
12/7/2015 2:46:59 PMINFO: HOME -> ./events/ping
12/7/2015 2:46:59 PMINFO: Sending agent-instance-scripts applied 1-4b5124bd74cd423f98d57550b481ec77ec3a7135c6a650886ab95c043305d642
12/7/2015 2:46:59 PMINFO: Getting monit
12/7/2015 2:46:59 PMINFO: Updating monit
12/7/2015 2:46:59 PMINFO: Downloading http://<IP_ADDRESS>:8080/v1//configcontent//monit current=
12/7/2015 2:46:59 PMINFO: Running /var/lib/cattle/download/monit/monit-1-d166a713486fe4c0f039e152939d8d3b8ab8e6c2518e13d88f0b7ec68da46109/apply.sh
12/7/2015 2:46:59 PMINFO: ROOT -> ./
12/7/2015 2:46:59 PMINFO: ROOT -> ./etc/
12/7/2015 2:46:59 PMINFO: ROOT -> ./etc/monit/
12/7/2015 2:46:59 PMINFO: ROOT -> ./etc/monit/monitrc
12/7/2015 2:46:59 PMINFO: Sending monit applied 1-d166a713486fe4c0f039e152939d8d3b8ab8e6c2518e13d88f0b7ec68da46109
12/7/2015 2:46:59 PMINFO: Getting haproxy
12/7/2015 2:46:59 PMINFO: Updating haproxy
12/7/2015 2:46:59 PMINFO: Removing haproxy-34-39f1f6bdd2527b0410ecb7df9b0e2ca45693af0171597b58595d57a7c1083aa6
12/7/2015 2:46:59 PMINFO: Downloading http://<IP_ADDRESS>:8080/v1//configcontent//haproxy current=
12/7/2015 2:46:59 PMINFO: Running /var/lib/cattle/download/haproxy/haproxy-59-f2841f471f610f1abdb0bec6ce97912d8d19cd0ea731af73dd3c4ec7be331be2/apply.sh
12/7/2015 2:46:59 PMINFO: ROOT -> ./
12/7/2015 2:46:59 PMINFO: ROOT -> ./etc/
12/7/2015 2:46:59 PMINFO: ROOT -> ./etc/haproxy/
12/7/2015 2:46:59 PMINFO: ROOT -> ./etc/haproxy/certs/
12/7/2015 2:46:59 PMINFO: ROOT -> ./etc/haproxy/certs/default.pem
12/7/2015 2:46:59 PMINFO: ROOT -> ./etc/haproxy/certs/certs.pem
12/7/2015 2:46:59 PMINFO: ROOT -> ./etc/haproxy/haproxy.cfg
12/7/2015 2:46:59 PMINFO: ROOT -> ./etc/monit/
12/7/2015 2:46:59 PMINFO: ROOT -> ./etc/monit/conf.d/
12/7/2015 2:46:59 PMINFO: ROOT -> ./etc/monit/conf.d/haproxy
12/7/2015 2:46:59 PMINFO: ROOT -> ./etc/default/
12/7/2015 2:46:59 PMINFO: ROOT -> ./etc/default/haproxy
12/7/2015 2:47:00 PMINFO: Sending haproxy applied 59-f2841f471f610f1abdb0bec6ce97912d8d19cd0ea731af73dd3c4ec7be331be2
12/7/2015 2:47:00 PMINFO: HOME -> ./
12/7/2015 2:47:00 PMINFO: HOME -> ./etc/
12/7/2015 2:47:00 PMINFO: HOME -> ./etc/cattle/
12/7/2015 2:47:00 PMINFO: HOME -> ./etc/cattle/startup-env
12/7/2015 2:47:00 PMINFO: ROOT -> ./
12/7/2015 2:47:00 PMINFO: ROOT -> ./etc/
12/7/2015 2:47:00 PMINFO: ROOT -> ./etc/init.d/
12/7/2015 2:47:00 PMINFO: ROOT -> ./etc/init.d/agent-instance-startup
12/7/2015 2:47:00 PMINFO: Sending agent-instance-startup applied 2-557156a6c83b3adc996b56beb2d4469f282a091c31fd17461c90ee76fa7fe6e0
12/7/2015 2:47:00 PMStarting monit daemon with http interface at [localhost:2812]

@rzachariah could you please tell me if it stops responding or it just delays your http requests?

@rzachariah is it easy to reproduce? If so, could you please check the following once the issue occurs:

login to the LB instance and try to send a request to any of your backend targets - this is to ensure that the LB instance can reach other instances on the managed network
login to any other instance of the managed network, and try to reach the LB instance 10.42.x.x:[listening port]. This is to ensure LB is accessible by other instances on the managed network.

@sangeethah have you noticed anything like that behavior while running validation tests? If not, we could run a small test:

Setup LB with one backend - nginx for example.
Write a script sending http requests to the LB every second. See if any of the requests got dropped at any point.

@rzachariah If you are still facing this issue, please re-open and provide the details requested above.


Disable ticking and flushing after bootstrapping

cc @robskillington @cw9 @prateek @ben-lerner
This PR disables ticking and flushing after bootstrapping because we observed that it added large load on the cluster, causing commit log queues to back up. Instead we'll let the buffer draining and data flushing happen naturally to spread out the load across the cluster. This has shown to reduce the commit log queue spikes significantly.

Can you leave a comment before merging where you are taking it away from saying something like "a tick and a consequent flush will need to occur until this data is durable on disk, this was too intensive to call directly after a bootstrap however"?

Coverage increased (+0.1%) to 76.686% when pulling 8def778959c01f8b6f678d093cd1f5983a8d5f56 on xichen-disable-ticking-flushing-after-bootstrapping into 1c76163021b7e99f6e7eb83e54a73fb6e738c9a9 on master.

Coverage increased (+0.1%) to 76.692% when pulling be402e9a2259c3d431ce0a988fc985f867ff68c5 on xichen-disable-ticking-flushing-after-bootstrapping into 1c76163021b7e99f6e7eb83e54a73fb6e738c9a9 on master.


ComboBox state isOpen=false despite all conditions fulfilled

🐛 Bug Report
I have a custom ComboBox component in my component library built with react-aria and react-stately.
type ComboBoxProps = { shouldFilter?: boolean } & ComboBoxStateOptions<any>

const ComboBox = React.forwardRef<HTMLInputElement, ComboBoxProps>(
  ({ shouldFilter, ...props }, passedRef) => {
    const { validationState } = props
    // Setup filter function and state.
    const { contains } = useFilter({ sensitivity: 'base' })
    const state = useComboBoxState({
      ...props,
      defaultFilter: shouldFilter ? contains : undefined,
    })

    const inputRef = usePassedRef(passedRef)
    const buttonRef = React.useRef(null)
    const listBoxRef = React.useRef(null)
    const popoverRef = React.useRef(null)

    const { isFocused, focusProps } = useFocusRing({ isTextInput: true })

    const { buttonProps, inputProps, listBoxProps, ...wrapperProps } =
      useComboBox(
        {
          ...props,
          inputRef,
          buttonRef,
          listBoxRef,
          popoverRef,
        },
        state
      )

    const isValid = !validationState || validationState === 'valid'

    console.log('state', state.collection.size, state.isOpen)

    return (
      <FieldWrapper {...mergeProps(wrapperProps, props)}>
        <div className="relative inline-flex">
          <input
            ref={inputRef}
            className={inputStyle(isFocused, isValid) + ' flex-grow'}
            {...mergeProps(focusProps, inputProps)}
          />
          <Button unstyled ref={buttonRef} {...buttonProps}>
            <HeroIcon
              aria-hidden="true"
              icon="chevron-down"
              className="absolute w-3 right-3 top-1/2 -translate-y-1/2"
            />
          </Button>
        </div>
        <Appear show={state.isOpen}>
          <Popover ref={popoverRef} isOpen={state.isOpen} onClose={state.close}>
            <ListBox {...listBoxProps} ref={listBoxRef} state={state} />
          </Popover>
        </Appear>
      </FieldWrapper>
    )
  }
)

And I'm using it in my consumer project with disabled filtering from useComboBoxState hook and manually updating the items to manipulate the content of the popover.
<ComboBox
  ref={ref}
  autoFocus
  aria-label="address"
  placeholder="Search address"
  items={suggestions}
  onSelectionChange={selectSugggestion}
  onInputChange={updateSuggestions}
  shouldCloseOnBlur={true}
  shouldFilter={false}
  onBlur={onBlur}
>
  {(suggestion) => (
    <ComboBox.Item>{suggestion.place_name}</ComboBox.Item>
  )}
</ComboBox>

🤔 Expected Behavior
I'm expecting the popover to show (i.e the state.isOpen variable to change) as soon as the state.collection has any items.
😯 Current Behavior
As soon as I have anything in my defaultItems, the state.collection is updated with the items but the state.isOpen variable does not change until the next re-render.
As is probably apparent from the code, I'm looking up addresses with some API. The consequence is essentially that when I have a suggestion, I update the defaultItems, but the suggestions will not show until i insert another character into the input (e.g a space).
🌍 Your Environment

Software
Version(s)

react-aria
3.20.0

react-stately
3.18.0

Browser
Chrome

Operating System
MacOs

Solved it by enabling the allowsEmptyCollection option in useComboBoxState hook


Problem with successful retrieval of information but download fails with 403

Describe the bug
Retrieving video information from YouTube is successful, but downloading fails with status code 403.
Error Details (Log)
Please refer to https://github.com/ybd-project/ytdl-core/discussions/13

Environment

Video URL: Any URL
@ybd-project/ytdl-core version: latest
Node.js version: Unknown
Operating system: Unknown

Happens to me too, getting 403 since yesterday.

Maybe the following methods may be useful.

set the UserAgent to the request. (Currently no explicitly valid value is set.)
Add a pot parameter to the URL. I heard somewhere that you can add a PoToken to the pot parameter.

If these are valid, they will be implemented in a new version.

Maybe the following methods may be useful.

set the UserAgent to the request. (Currently no explicitly valid value is set.)
Add a pot parameter to the URL. I heard somewhere that you can add a PoToken to the pot parameter.

If these are valid, they will be implemented in a new version.

tried, still not working

I really don't know under what circumstances the 403 is occurring...

I really don't know under what circumstances the 403 is occurring...
Also, does the 403 occur on all client URLs? So far we have confirmed the occurrence with the web client and WebCreator

ios working good, other is not

I really don't know under what circumstances the 403 is occurring...
Also, does the 403 occur on all client URLs? So far we have confirmed the occurrence with the web client and WebCreator

ios working good, other is not

Thanks for the valuable information, I will update the 403 error to select the IOS client.

Version v5.1.6, which addresses this issue, is now available. Please try it to see if it is fixed.

Version v5.1.6, which addresses this issue, is now available. Please try it to see if it is fixed.

Still not working..
[ web ]: The URL for the video did not return a successful response. Got another format.
Reason: Status code: 403
[  DEBUG  ]: [ ios ]: The URL for the video did not return a successful response. Got another format.

If you get this far, it is most likely an IP restriction.
If there is no reason, try specifying the option filter: "audioandvideo". videos with an itag of 18 may work.

Also, does the problem occur at all URLs?

@VenomSA and check your DNS and firewall settings.
I used to have no problem connecting to sources and getting information through node.js, but I spent 2 days to solve the problem with accessing google.
This problem is not solved in any of the ytdl packages and forks.

If you get this far, it is most likely an IP restriction. If there is no reason, try specifying the option filter: "audioandvideo". videos with an itag of 18 may work.

I have like 20 proxies, how could that happen so sudden? I managed to got this working when we last talked - in the issue i opened couple days ago and then it stopped suddenly.
I also tried with "audioandvideo" and it doesn't want to work.

@VenomSA and check your DNS and firewall settings.
I used to have no problem connecting to sources and getting information through node.js, but I spent 2 days to solve the problem with accessing google.
This problem is not solved in any of the ytdl packages and forks.

What do you mean accessing google? Im trying to access an youtube video (audio only)

Hi, the 403 error is not related to ytdl. It shows that we are directly banned by youtube.
When I try to watch videos from youtube, google server does not return the 200 response. I can search, fetch informations but i can't get the video source from google servers. So I am blacklisted. Probably it's the same for other people who have this problem.
Maybe youtube's ban can be bypassable with oauth. I will update here if I try with a new ip

Good news everyone, there is a possibility to bypass this 403 by implementing a proxy in Cloudflare Workers. We are currently planning a v5.1.7 release for this. Please wait.

May I assume that this problem has been solved by the implementation of the proxy?
One concern now is that we just received a phishing report from CloudFlare.

The proxy doesn't seem to be working either

const OPTIONS = {
    // filter: 'audioonly',
    // chunking: true,
    // format: 'lowest',
    originalProxyUrl: 'https://{{domain}}.workers.dev',
}
const ytdl = new YtdlCore({
        poToken: poToken,
        visitorData: visitorData,
        // oauth2: NORMAL_OAUTH2,
        ...OPTIONS
    })
    const info = await ytdl.getBasicInfo(url)
    if (!info) return false;
    const details = info?.videoDetails
    const seconds = details?.lengthSeconds
    if (!seconds) return false;
    if (+seconds > 900) {
        blockedUrls[url] = 'Video is longer than 15 minutes'
        return 'duration'
    }
    const data = ytdl.download(url, {
        // filteringClients: ["tvEmbedded"],
    })
    ```

Same

It works fine on my end with that proxy, so I don't know what is causing it.
At the moment it could be due to the fact that it is processed near the end user.


Bug: Highlight Card Overflow On Small Screen

Describe the bug
When I click a link to a highlight on X or open it in a browser on mobile phone, the highlight card overflow as screenshot below:
Highlight card on X on mobile phone

Highlight card on browser on mobile phone

Steps to reproduce

Open the X app on your phone.
Click the highlight link in a post. Here is an example of a post with a highlight link.
You will see that the card overflows.

Browsers
Chrome
Others
Additional context (Is this in dev or production?)
No response
Code of Conduct

[X] I agree to follow this project's Code of Conduct

Contributing Docs

[X] I agree to follow this project's Contribution Docs

.take

It seems to be working fine on the beta branch.

I wonder if it has anything to do with if we open the link right from X app on mobile phone?
Because if I open it on X from desktop's browser and shrink the page, it doesn't caused any error like this.
Additional information, I'm using Android version 13 (Samsung Galaxy S22).

Hey @adiati98, this has been fixed, but the changes are not deployed to prod yet (they are in beta).
You can visit beta.insights.opensauced.pizza and try reproducing this issue.

Hey @adiati98, this has been fixed, but the changes are not deployed to prod yet (they are in beta).
You can visit beta.insights.opensauced.pizza and try reproducing this issue.

Ah, thanks @takanome-dev 😊 🙏

@adiati98 let us know if it's still present. Otherwise, feel free to close this issue

@takanome-dev can you guide me to reproduce the modal for the card in beta? I have no idea how to do this 😅

You can vis

Head over to https://beta.insights.opensauced.pizza/feed
Click on one highlight post
See if there is an overflow of the card
Test it on both desktop and mobile

@takanome-dev
Clicking anywhere in the post didn't do anything both on desktop and mobile. And clicking the link will take me to the repo.
Below is the screenrecoding of the desktop:

@adiati98, try clicking on the date
https://github.com/open-sauced/app/assets/79809121/72c65d1c-5e60-4d1e-8e82-dcf187d65356

Hi @takanome-dev,
Thank you for walking through it for me! 😄
I've checked both on desktop and mobile, and they aren't overflowing.
So, I'm closing this issue 😊


m2giles for member

@m2giles has had write in bluefin for a while and has been helping across the board in other repos, I'd like to nominate to ublue-os/member.

+1 absolutely an amazing contributor.

:+1: a great help in the Bluefin repo, and will be great to have them helping out in other places!

+1

I love this project.

+1

Invite in your inbox, close this issue after you've accepted! WELCOME.


fatal error: llvm/ADT/SmallString.h: No such file or directory

Brief Description
when building master:
fatal error: llvm/ADT/SmallString.h: No such file or directory
11 | #include <llvm/ADT/SmallString.h>
OS: Windows / OS X / Linux (include version and/or distro)
Ubuntu 20.04
Used headers
N/A
Used settings
Target: MSVC/GCC/Clang
GCC
Other settings
Stack trace or incompilable generated code
(base) PS C:\Users\user\workspace\CppSharp\build> bash ./build.sh generate -configuration Release -platform x64
Archive llvm-0c8f9b-linux-x64-gcc-9-Release.tar.xz already exists.
Using debug LLVM build: /mnt/c/Users/user/workspace/CppSharp/build/llvm/llvm-0c8f9b-linux-x64-gcc-9-Debug
Using release LLVM build: /mnt/c/Users/user/workspace/CppSharp/build/llvm/llvm-0c8f9b-linux-x64-gcc-9-Release
Building configurations...
Running action 'gmake2'...
Done (173ms).
Generating CppSharp build configuration file 'BuildConfig.cs'
Building configurations...
Running action 'vs2019'...
Done (137ms).
(base) PS C:\Users\user\workspace\CppSharp\build> bash ./build.sh -configuration Release -platform x64
Archive llvm-0c8f9b-linux-x64-gcc-9-Release.tar.xz already exists.
Using debug LLVM build: /mnt/c/Users/user/workspace/CppSharp/build/llvm/llvm-0c8f9b-linux-x64-gcc-9-Debug
Using release LLVM build: /mnt/c/Users/user/workspace/CppSharp/build/llvm/llvm-0c8f9b-linux-x64-gcc-9-Release
Building configurations...
Running action 'gmake2'...
Done (180ms).
Generating CppSharp build configuration file 'BuildConfig.cs'
Building configurations...
Running action 'vs2019'...
Done (120ms).
  Determining projects to restore...
  All projects are up-to-date for restore.
make: Entering directory '/mnt/c/Users/user/workspace/CppSharp/build/gmake'
==== Building CppSharp.CppParser (release_x64) ====
AST.cpp
../../../src/CppParser/AST.cpp:11:10: fatal error: llvm/ADT/SmallString.h: No such file or directory
   11 | #include <llvm/ADT/SmallString.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [CppSharp.CppParser.make:138: ../../obj/CppSharp.CppParser/Release/AST.o] Error 1
make: *** [Makefile:54: CppSharp.CppParser] Error 2
make: Leaving directory '/mnt/c/Users/user/workspace/CppSharp/build/gmake'

This is really strange because our CI works fine. Are you sure you haven't made any modifications to the project files after generation?

definitely, I also tried cloning fresh a couple of times and had the same error. I'm sure there's something I overlooked on my end.

Not sure what it could be either..
You can check if the archives for LLVM are properly extracted in the LLVM build path: /mnt/c/Users/user/workspace/CppSharp/build/llvm/llvm-0c8f9b-linux-x64-gcc-9-*
Also check the verbose build output (you can invoke make/build with verbose=true make, it should give you the actual compiler parameters being passed by the makefile. If you can paste it on a gist or something then I can take a look.


Fake drag clientRect to match a custom DragOverlay

First of all, thank you for this amazing Dnd library. Through my search I have been able to customize almost anything I wanted in my project.
I am currently searching a way to fake the clientRect of my draggable component.
I would like to create something like a custom modifier which instead of modifing coordinates, would alter clientRect.
The aim would be to make Dnd interactions match with a custom preview through DragOverlay.
Would it be possible to do so?

found a suitable solution for myself :

added custom Partial in data in useDraggable and useDroppable
created a custom collision function passed to DnDContext
customized collisionRect inside the custom collision function

I don't know if it is really clean but this way i can totally fake drag and droppable rects

@clauderic just came across this issue as we were having problems using a custom preview and the collision detection working correctly.  I feel like this should be documented, no?  It's a relatively easy implementation to customize rectIntersection as an example, but developers don't really know to look for it.  Below is my implementation.
export const detectDragPreviewCollisions: CollisionDetection = args => {
  const dragEl = document.getElementById(domElIdCreators.fieldOverlayEl());
  if (!dragEl) return rectIntersection(args);

  const dragElPreviewRect = dragEl.getBoundingClientRect();
  return rectIntersection({ ...args, collisionRect: dragElPreviewRect });
};


All ic_launcher.png &  ic_launcher_round.png are twice as large as original icon

Hi 👋
Under a folder /assets, I have a file logo.png whose dimensions are 1024 × 1024, as specified in the readme.
I generate my icons with the simple command:
npx capacitor-assets generate --iconBackgroundColor '#eeeeee' --iconBackgroundColorDark '#222222' --splashBackgroundColor '#eeeeee' --splashBackgroundColorDark '#111111'

It generates icons for my android app, however it turns out that icons ic_launcher.png &  ic_launcher_round.png are twice as big as they should be ⬇
(Left version is the default icon provided by Ionic)

Problem is that once deployed on my phone, the icon is too big:

Any idea of what I'm doing wrong?
Thanks in advance

Thanks, this might explain the cropping issue some have reported. Will need to look into it but possibly the sizes are just wrong for Android

Made a fix to this and it will be in the next release. While I have you: one thing I'm struggling with is whether we should transform the image for the legacy icons. For example, should we create a rounded rectangle mask and drop shadow? Or should we have the developer make those changes themselves in the source image?

Fixed in 1.0.14

Looks like there is a last small issue, I tried with the custom mode, and the foreground is smaller that expected:

My folder:
resources/icon-background.png (1024 × 1024)
resources/icon-foreground.png (1024 × 1024)
resources/icon-only.png (1024 × 1024)

My command:
npx capacitor-assets generate --android

Hmm, weird, they look the correct size to me (original capacitor asset on the right)

Could you please try again by your side?
With version 1.0.13 I get ic_launcher_foreground.png ok, but ic_launcher_round.png & ic_launcher.png bigger than it should be.
With version 1.0.14 I get ic_launcher_round.png & ic_launcher.png ok, but ic_launcher_foreground.png smaller than it should be.


Enable update checks per default

What should we do?
Invert the update checks feature toggle and enable update checks to be carried our per default.
Why should we do it?
Preparation for v3.6.0 release.

Child of https://github.com/camunda/camunda-modeler/issues/1541

Closed by #1643
Server-side features are implemented during Christmas period.


[stable/prometheus] Fix default non-HA state for alert-manager statefulset

Signed-off-by: Tuan Anh Nguyen<EMAIL_ADDRESS>
Is this a new chart
No

NOTE: We're experiencing a high volume of PRs to this repo and reviews will be delayed. Please host your own chart repository and submit your repository to the Helm Hub instead of this repo to make them discoverable to the community. Here is how to submit new chart repositories to the Helm Hub.

What this PR does / why we need it:
Since enableMeshPeer is false by default, cluster.listen-address should be an empty string (https://github.com/prometheus/alertmanager/blob/master/README.md#high-availability) so HA is disabled by default
Which issue this PR fixes
(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged)

fixes #22229

Special notes for your reviewer:
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

[x] DCO signed
[x] Chart Version bumped
[x] Variables are documented in the README.md
[x] Title of the PR starts with chart name (e.g. [stable/mychartname])

@tuananhnguyen-ct
Could you bump the chart version to latest please? Thank you.
/assign

/ok-to-test

/lgtm


This a new file for Test purpose

a pull request for adding a new file, named "test.md".

test only


Update to cluster config object

I noticed that the default for the cluster layer is still assigning cluster_resolution not cluster: {resolution} to be in line with the new method of assignment using a cluster object.
I also added the assignment to first check for a cluster object and use the values from within that, otherwise to use the older legacy method values.
I added a console warning if the old method is used to tell the developer to update to use cluster:{}

I added the warning to this PR. https://github.com/GEOLYTIX/xyz/pull/690


fix: pass empty env to lock file scripts

what bug was this a fix for?  this change broke renovation of our repo that uses private npm modules :-(  Will open a ticket.

We were having weird yarn problems and env was one explanation. It also seemed a wise security measure too, ie not to risk leaking secrets to third party scripts. Anyway sorry for the inconvenience and please describe in the issue what specific variables you're needing and I'll consider how best to fix.

I see.  https://github.com/singapore/renovate/issues/851


[release-4.14] NO-ISSUE: Upgrade osbuild copr version to 97 and 102

/lgtm

/label  backport-risk-assessed
/label cherry-pick-approved
/label jira/valid-bug

/label backport-risk-assessed


Unable to add id of to JsonObject

i can't add "id"  to a jsonobject field. i need this:
{
id: 1,
name: "Джамшид",
surname: "Джураев",
login: "djamik123",
password: "djamik123"
}
instead i get this: without id
{
name: "Джамшид",
surname: "Джураев",
login: "djamik123",
password: "djamik123"
}

From the documentation:

Since the id property value is meant to be generated by database, it is protected from the user of being able to manually specify it as well as letting the case classes have such a property.
So, instead of
case class Artist ( id : Long, name : String )

you should use
case class Artist ( name : String )

and let SORM take care of id property management for you.


Exoplayer

When integrate with exo player it show black screen.
Can you solved it.

Thanks for your feedback, I will double-check the issue and will reply soon

I has been integrate with exoplayer it working well by using surfaceview in the fragment.

@Nak9009
Can you send me your exoplayer setup?
I have integrated exoplayer into my application, every try works fine, you can see an example
Thank you

Im follow your code it show black screen while using Exoplayer PlayerView.
Im trying to fix black screen by using Exoplayer surfaceview it work but no control button.
Thank you

How to use dragview in fragment?

Why framtop resize?


modal shell by not creating functions dynamically

This changes how modal shell works. Instead of creating a function dynamically from exec_cmd, keep the original function definition, but set a flag on it that tells the container entrypoint to run exec_cmd inside the container instead.
Note: broke out a minor part of this change into #674 to be deployed first – should make it easier to test this change against prod.

FYI ran all the integration tests and they pass (although we don't have any integration tests for shell, so maybe it's not that much of a guarantee)

@prbot approve


BigramTagger not tagging tokens

I am trying to create a custom BigramTagger the following way:
>>> from nltk.tag.sequential import BigramTagger
>>> model = {'abcd abcd': 'y', 'efgh efgh': 'm'}
>>> bitager = BigramTagger(model=model)
>>> bitager.tag(['abcd abcd', 'efgh efgh'])
[('abcd abcd', None), ('efgh efgh', None)]

I'm using nltk version 3.6.2. Am I doing something wrong or this might be a bug?

A BigramTagger will choose a token's tag based on the token's string and the previous token's tag. This information must then also be included in the model, for it to be useful. I believe your interpretation is that a BigramTagger is a mapping from a string containing both the previous and current token string, to the tag?
This is not the case. Let me show you how to use the model for a BigramTagger. It is a dictionary of the following structure:
{
    ((prev_tag), tok_string): tok_tag,
    ...
}

Assuming that "abcd abcd" is 1 token (unlikely!), and "efgh efgh" is also 1 token, and the former tags to "y" iff it is at the start of the sentence, while the latter tags to "m" if it follows a token tagged as "y", then the model becomes:
{
    ((), 'abcd abcd'): 'y',
    (('y',), 'efgh efgh'): 'm'
}

If we use this, it works perfectly:
from nltk.tag.sequential import BigramTagger
model = {((), 'abcd abcd'): 'y', (('y',), 'efgh efgh'): 'm'}
bitagger = BigramTagger(model=model)
out = bitagger.tag(["abcd abcd", "efgh efgh"])

outputs
[('abcd abcd', 'y'), ('efgh efgh', 'm')]

However, I recognise that such a model dict is annoying to make. Luckily, you can just tell NLTK to make (train) one for you. All you would need is a list of tagged sentences.
In the example I made, you have one sentence, with 2 tokens. These are already tagged, so the sentence would be:
[("abcd abcd", "y"), ("efgh efgh", 'm')]

A list of these sentences would then be
[[("abcd abcd", "y"), ("efgh efgh", 'm')]]

as we only have one sentence. This can now be used like this:
from nltk.tag.sequential import BigramTagger
train = [[("abcd abcd", "y"), ("efgh efgh", 'm')]]
bitagger = BigramTagger(train=train)
out = bitagger.tag(["abcd abcd", "efgh efgh"])

However, I recognise that you're likely not intending for e.g. "abcd abcd" to be 1 token, so I'll give an example of how the BigramTagger is meant to be used:
from nltk.tag.sequential import BigramTagger
from nltk.corpus import brown

# Get all but the last 100 of the tagged sentences, and last 100 tagged sentences respectively
train = brown.tagged_sents()[:-100]
test = brown.tagged_sents()[-100:]
# A sample tagged sentence (train[0]) is:
# [('The', 'AT'), ('Fulton', 'NP-TL'), ('County', 'NN-TL'), ('Grand', 'JJ-TL'), ('Jury', 'NN-TL'), ('said', 'VBD'), ('Friday', 'NR'), ('an', 'AT'), ('investigation', 'NN'), ('of', 'IN'), ("Atlanta's", 'NP$'), ('recent', 'JJ'), ('primary', 'NN'), ('election', 'NN'), ('produced', 'VBD'), ('``', '``'), ('no', 'AT'), ('evidence', 'NN'), ("''", "''"), ('that', 'CS'), ('any', 'DTI'), ('irregularities', 'NNS'), ('took', 'VBD'), ('place', 'NN'), ('.', '.')]

# Train tagger with all but 100 tagged sentences.
tagger = BigramTagger(train)

# Get a sample untagged sentence
untagged_sentence = brown.sents()[0]
print(f"Input sentence : {untagged_sentence}")
tagged = tagger.tag(untagged_sentence)
print(f"Tagged sentence: {tagged}")

accuracy = tagger.evaluate(test)
print(f"Accuracy: {accuracy * 100:.4f}% between 100 test sentences")

This outputs:
Input sentence : ['The', 'Fulton', 'County', 'Grand', 'Jury', 'said', 'Friday', 'an', 'investigation', 'of', "Atlanta's", 'recent', 'primary', 'election', 'produced', '``', 'no', 'evidence', "''", 'that', 'any', 'irregularities', 'took', 'place', '.']
Tagged sentence: [('The', 'AT'), ('Fulton', 'NP-TL'), ('County', 'NN-TL'), ('Grand', 'JJ-TL'), ('Jury', 'NN-TL'), ('said', 'VBD'), ('Friday', 'NR'), ('an', 'AT'), ('investigation', 'NN'), ('of', 'IN'), ("Atlanta's", 'NP$'), ('recent', 'JJ'), ('primary', 'NN'), ('election', 'NN'), ('produced', 'VBN'), ('``', '``'), ('no', 'AT'), ('evidence', 'NN'), ("''", "''"), ('that', 'WPS'), ('any', None), ('irregularities', None), ('took', None), ('place', None), ('.', None)]
Accuracy: 19.7816% between 100 test sentences

As you can see, the tagger may tag to None, and then keep tagging to None. This is because the BigramTagger tags based on the previous tag as well as the current string. If it has never seen that combination before, it will tag to None. Once that is done, the next token's previous tag will also be None, and the model likely doesn't have an answer when the previous token's tag is None.
This is why the BigramTagger is rarely used standalone. A considerably more common scheme is the following, and it is one I would recommend:
from nltk.tag.sequential import BigramTagger, DefaultTagger, UnigramTagger
from nltk.corpus import brown

# Get all but the last 100 of the tagged sentences, and last 100 tagged sentences respectively
train = brown.tagged_sents()[:-100]
test = brown.tagged_sents()[-100:]

def_tagger = DefaultTagger('NN')
uni_tagger = UnigramTagger(train, backoff=def_tagger)
bi_tagger = BigramTagger(train, backoff=uni_tagger)

accuracy = bi_tagger.evaluate(test)
print(f"Accuracy: {accuracy * 100:.4f}% between 100 test sentences")

This outputs:
Accuracy: 88.7442% between 100 test sentences

In this scheme, we first attempt to apply the BigramTagger. If that is unsuccessful, we apply the UnigramTagger (which doesn't take into account the previous word's tag), and if that one fails too (e.g. if it's a new word), then it simply tags using the DefaultTagger('NN'), which sets the tag to be "NN".
I hope this has been helpful.

Thank you for the detailed answer. It seems I was defining the model structure in a wrong way after upgrading nltk to 3.6.2.
I thought the model can still be declared like I did.


Minimize XmlTextReader customization.

Reference Issue

What does this implement/fix? Explain your changes.

Minimize XmlTextReader customization.
This will behave the same as XmlTextReader.
Any other comments?

This PR will help resolve issue #604.

@mrbean-bremen
Please check this PR as soon as possible.

@mrbean-bremen
Thanks !!


RSA key pair and Web Cryptography API compatibility

I have two questions about RSA key generation.

The function RSA.generateKey( bitlen, pubexp )  generates a private RSA key. But how do I get the public key then?
The return value of RSA.generateKey( bitlen, pubexp ) is an Array of 8 Uint8Array`s (maybe because of the chinese remainder algorithm?). Is there a way to transform these Arrays to a CryptoKey (importKey) to make it compatible to the Web Cryptography API (and vice versa)?

The key returned from RSA.generateKey(...) is a tuple of bigints [ n, e, d, p, q, dp, dq, qi ].
Public key components are the first two elements [ n, e ].
You can transform it into the "jwk" format compatible with WebCrypto importKey with the next pseudo-code snippet:
var jwk = {
    kty: "RSA",
    alg: "RS256",                      // Your desired JWA algorithm
    ext: true,                              // Is key extractable or not
    key_ops: [ "sign", "verify" ], // Array of supposed key usages

    // Public key components
    e: "AQAB",                          // The "e" component, public exponent, spec restricts is to the only value, 65537
    n: base64url_encode( key[0] ),

    // Private key components
    d: base64url_encode( key[2] ),
    p: base64url_encode( key[3] ),
    q: base64url_encode( key[4] ),
    dp: base64url_encode( key[5] ),
    dq: base64url_encode( key[6] ),
    qi: base64url_encode( key[7] ),
};

BTW, do you really need to generate RSA key with asmcrypto once you suppose it to be used with WebCrypto?

Thank you for your quick response and help ;) It seems to work...see this fiddle.
As you can see, I used the function asmCrypto.bytes_to_base64() to encode the bytes to Base64 format. As I saw in the source code, bytes_to_base64 uses btoa() which is not url safe. But it seems not be a problem for the quick fiddle test (maybe later?!).
I want to use asmcrypto as fallback if WebCrypto is not available. So it could be possible that a user generates a key and encrypts data with WebCrypto and later comes back with another browser which doesn`t WebCrypto (IE 10, Firefox in WebWorker, ..). Then asmcrypto should be used to decrypt the data.
So I don´t really want to generate the RSA key with asmcrypto and use it right after with WebCrypt ;)


Book Dash

Had a wonderful catch-up with @AoifeHughes today about Book Dash today! We reviewed the background and process for Book Dash, in preparation for June 2024.
Completed (not complete - the full to-do is on the issue!)

[x] Applicant: Hub host
[x] Applicant: Expression of Interest for Planning Committee
[x] Email templates
[x] Calendar invites
[x] Zoom registration forms
[x] Application
[x] Slack channels

Issue: https://github.com/the-turing-way/the-turing-way/issues/3520


minimap lines on world map have the wrong position on interface sizes != "Normal"

small:

normal:

large:

larger:

this also messes with quest markers you set, curiously leading to a marker in two locations (top left one is correct)


Request: XIaomi Aqara switches support

Hello,
Xiaomi has four wall mount switches that would be an awesome addition to this device handler.
there has been some work done but it seems to be dead right now.
https://community.smartthings.com/t/xiaomi-aqara-zigbee-switch-dth-help-needed/82072
Do you think that you will add support for theese switches?

i'm one of person who is waiting the Xiaomi Wall Switch will be supported.


Fix crash in example

For some reason got crash on iPhone 6 plus (8.3)
comment out initialVelocity setter fixes this issue. Of course, it's not a proper solution, just want to point to this crash.
CircleMenu[10725:1299086] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[CASpringAnimation setInitialVelocity:]: unrecognized selector sent to instance 0x174035720'
But I not understand, why it's not available..

thanks

@ober01 any thought, why it don't works on device, but works in Simulator?


Updated description of "-SearchBoxPlaceholderText" parameter

Type

[x] Content Fix

What is in this Pull Request ?
Updated description of -SearchBoxPlaceholderText parameter & some minor fixes.

Thanks @ganesh-sanap , your changes have been merged.


[ci skip] adding user @djhoese

Hi! This is the friendly automated conda-forge-webservice.
I've added user @djhoese as instructed in #41.
Merge this PR to add the user. Please do not rerender this PR or change it in any way. It has [ci skip] in the commit message to avoid pushing a new build and so the build configuration in the feedstock should not be changed.
Please contact conda-forge/core to have this PR merged, if the maintainer is unresponsive.
Fixes #41

I'm a maintainer of pykdtree now (I made the 1.3.5 release that the other PR was created for). We could also add @mraspaud to the maintainers if he doesn't mind.

Doesn't seem like the "ci skip" is doing anything.

Doesn't seem like the "ci skip" is doing anything.

I will skip when the PR is merged, not here

Adding automerge for you, welcome aboard @djhoese!

I'm good with being a maintainer

Hi! This is the friendly automated conda-forge-linting service.
I wanted to let you know that I linted all conda-recipes in your PR (recipe) and found some lint.
Here's what I've got...
For recipe:

There are too few lines.  There should be one empty line at the end of the file.

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.


Add new CitA outreach centres

152 new locations which will require Twilio redirects in place before this can be merged.
All the addresses went through the geocoder without error and the spreadsheet had values for booking_location_id supplied which we have to assume correspond to the correct booking locations.
The title values are a bit wooly, will we go through them @andrewgarner ?

I'll have a stab at cleaning up the titles. Where possible we should remove mentions of specific organisations as we have with the current locations.

Bravo @andrewgarner.
As discussed, we'll hold off buying new Twilio numbers and creating new redirects until after we've done a cost/benefit analysis of this approach on Monday.

All comments addressed. Happy for me to rebase and merge?

Do it :+1:


Add Working with a document

Hey ! Let's implement from the Arangodb documentation -> Working with a Document

[x] read a single document

[x] read document header

[x] create document

[x] replace document

[x] update document

[x] removes a document

From our work on documents we saw the need for updating some of the existing code regarding request and response. Therefore the todolist for this PR gets also updated

[x] update how we do request to the server to have more flexibility for adding headers and other options on a request

[x] update how we handle response from the server

Same as previously, each item is implemented with code and unit test :)
I see that I got some previous commits. No worries. I ll hard push on my branch later when stuff will be ready.
Let's go !

I remade my changes. My build for document_url was missing collection name in it

Actually I don't quite understand why arangoDB offers API on document. I think almost all the features in docuemnt API can be achieved by AQL query.
But it is good to fulfill these API.

I agree with you. I also use AQL myself directly because it gives more freedom/flexibility to do stuff.  But when there is no need for it,  it turned out that I used the document  instead of AQL to earn a little time and less code. It depends I think about the use we do of it.
By the way, do you it is fine with document_base_url ?

Sure. This is an internal API, and names for them are not that important as long as it is clear enough.

Since we did update develop, should I merge my branch from it or should I continue my work on it ?

I perfer rebase current branch from develop, since I enable CI build on PR. And if there is confilct, it's advised to resolve it early. Though I think the chance of confilct is quite small.

Well, I made the Rebase and used the awesome cherry-pick . Then i made push force, since it is my own branch, it is ok right ?

I saw that your doc comments are nice and justified. Did you do it manually or did you use some tool for this ?

Nightly rustfmt can format doc comment. I use stable by default, but sometimes switch to nightly only to utilize the doc format features in nightly rustfmt.
I think this line is to be blamed for. It's wierd, sometimes the server return status 2 and pass the test, while this time it is 4. You might find the test passed if you push to github next time with the exact same code. In fact, that is what happened now. The CI test on PR fail the test but in your own repo it does pass the test, while the two test run the exactly same code. I recommend not to run this line of test under mmfiles.

Okay,  Maybe there is some behavior of ArangoDB that we do not know of.
Thank you for your explanations !!!!

Hello ! the last commit is very much a draft. I have an issue that I do not succeed to solve.
When running the test I got this

---- test_post_create_document stdout ----
Err(Serde(Error("missing field `error`", line: 0, column: 0)))
thread 'test_post_create_document' panicked at 'assertion failed: `(left == right)`: succeed create a document

Diff < left / right > :
<false
>true

', tests/collection.rs:1:1

It seems there is an issue with deserialization/mapping of the error coming from Arangodb. Strangely, I got the document created on my DB:
I also did not find the field "error" in the ClientError & ArangoErrors struct, so I am not sure what is happening.

Hum, I did 3 force pushes because of some tiny mistake I do. I hope it is fine as long it is on my personal branch.

Well, I was implementing overwriteMode when I suddenly saw that I was on 3.7 page -> dev instead of 3.6 ->  stable on the doc.
So I decided to add a feature "dev" and try conditional compilation to see. My IDE complains about DocumentIndertOptions but not about what we have in Collection for some reason, but the unit test for not(dev) works fine.
We need to do what we did for mmsfile in order to test the unit test for dev. There is not priority on it by the way since it is not stable but is dev. I ll add a todo on the unit test. I consider create_document implemented for stable.

Well, it seems from the doc, that we can use options on the header of the request to read a document depending of the versioning.
Should we try to change the header or should I forget about this functionality ?
I did not find a way to change the header with Url.

Well, it seems from the doc, that we can use options on the header of the request to read a document depending of the versioning.
Should we try to change the header or should I forget about this functionality ?
I did not find a way to change the header with Url.

Sorry for the late response. I think we can just add this funtionality, and add a line in doc stating that only effective v3.7. Don't need a feature gate, I suppose arango server will simply drop unrecognized header.
Headers are not part of the URL, and instead should be set on the client, in our case self.session.

Yes you are right. I tried to use 3-7 or 3.7 as a name but I got compile error. I will try to figure out what to use.
Thank you again for your feedback :)

Is it really necessary? When an older version of arangoDB get unrecognized parameter, I suppose the server will simply ignore it. If this is true, then there is no need to add a feature gate on this.
When it is unavoiable, I suggest 3_7 or arango37 as the feature gate name. What do you think?

Hey, yes actually, maybe it is not necessary if the stuff just get ignored.
But we might still need it for unit -test. I will work this out. Having stuff just for unit test is maybe not this smart. On the other hand, I am not sure how to manage typing correctly without using the feature gate thing.

Well,
I took the time to read our discussion from yesterday and work on it:)
From what we said, I succeed to make the following changes :
1 - Removed preffix _ from doc and insert_options
2 - Use T instead of Document
3 - Removed debug from method create_document
4 - Renamed dev feature gate to arango3_7
I failed to :
1 - Removed DeserielizedOwned Trait bound. This is because of the from_str from Serde, it need to have it. The compiler requires it despite my try to do without it.
I did not build the document by ourself as suggested . Because I think it needs to be done by DocumentResponse since it is written in arangoDB API documentation that the document is built depending of insert_options -> returnNew/returnOld on the db server side.
Also it feels healthier when the user expect the doc from the db to actually give him the doc from the db as mentioned :)
Now i will work on the header stuff :)
Thanks you again a lot for your feedback. I think we are going on the right way :)

Well,
I am trying to add something so we can add a header with ClientExt trait when doing a request. Maybe having a builderRequest could be nice like they have in Reqwest.
I have some question as usual :P first,
On reqwest.rs we have this
#[cfg(feature = "reqwest_blocking")]
use ::reqwest::blocking::Client;
#[cfg(feature = "reqwest_async")]
use ::reqwest::Client;
use http::header::HeaderMap;
use url::Url;

use crate::client::ClientExt;

use super::*;

#[derive(Debug, Clone)]
pub struct ReqwestClient(pub Client);

My IDE complains that we have Client 2 times and that we should put an alias.
1 - Should I use an alias for one of them ?
For some reason, I do not have autocomplete and type checking inside this file. I cannot get the methods from Request regarding the requestBuilder.
2 - Do you know why ?
Thank you for your precious guidance !

Glad to see your great work! Thank you SO much!

1 - Removed DeserielizedOwned Trait bound. This is because of the from_str from Serde, it need to have it. The compiler requires it despite my try to do without it.
I did not build the document by ourself as suggested . Because I think it needs to be done by DocumentResponse since it is written in arangoDB API documentation that the document is built depending of insert_options -> returnNew/returnOld on the db server side.

I agree with you that deserialize the response to Document<T> is a better choice.

My IDE complains that we have Client 2 times and that we should put an alias.
1 - Should I use an alias for one of them ?
For some reason, I do not have autocomplete and type checking inside this file. I cannot get the methods from Request
regarding the requestBuilder.
2 - Do you know why ?

This code is fine and can compile without error. The reason why it complanits 2 Client is because here actually defined two different Client, each compiles under a feature gate. Since these two feature gate can be set on at the same time, only one Client is available at most. So just ignore this IDE  errors and don't use alias, or you will break the code.

Thank you so much for your explanations !!!
I understand now :D

I am thinking about how to implement the way to set header(s) for a single request. Maybe I could write it the way they did in reqwest so it looks like this when we use it
self.session
.set_header("If-Match",_rev)
.get(url, "")

I would like to avoid changing the methods like this :
let resp: Document<T> = serde_json::from_str(self.session.get(url, "",headers).await?.text())?;

As I understand I need to write in the ClientExt trait.
What do you think?

I am thinking about how to implement the way to set header(s) for a single request. Maybe I could write it the way they did in reqwest so it looks like this when we use it
self.session
.set_header("If-Match",_rev)
.get(url, "")

I would like to avoid changing the methods like this :
let resp: Document<T> = serde_json::from_str(self.session.get(url, "",headers).await?.text())?;

As I understand I need to write in the ClientExt trait.
What do you think?

You are right. This work has to be done in the ClientExt trait.
But should me do this like reqwest with a RequestBuilder, or set_header should affect all the request from self.session?  The later can be easier to implement.

From what I saw in the arangojs library, the header is added for a single request. So it means more work to do. But I am happy to do it so it should be fine :)

Hello,
I am just making draft right now because I saw that I need to rebase but I have a bug that I do not understand, so I did not wanted to lose my changes ;)
With the code I am adding in client/mod.rs, I start to get this kind of  information from the compiler

error[E0308]: mismatched types
  --> src/client/mod.rs:14:1
   |
14 | #[maybe_async::maybe_async]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected type parameter `AsyncTrait`, found `&AsyncTrait`
   |
   = note: expected type parameter `AsyncTrait`
                   found reference `&AsyncTrait`
   = help: type parameters must be constrained to match other types
   = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters

error[E0277]: the trait bound `http::header::name::HeaderName: std::convert::From<std::string::String>` is not satisfied
  --> src/client/reqwest.rs:15:1
   |
15 | #[maybe_async::maybe_async]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<std::string::String>` is not implemented for `http::header::name::HeaderName`
   |
   = help: the following implementations were found:
             <http::header::name::HeaderName as std::convert::From<&'a http::header::name::HeaderName>>
             <http::header::name::HeaderName as std::convert::From<http::header::name::Custom>>
             <http::header::name::HeaderName as std::convert::From<http::header::name::HdrName<'a>>>
             <http::header::name::HeaderName as std::convert::From<http::header::name::StandardHeader>>
   = note: required because of the requirements on the impl of `std::convert::Into<http::header::name::HeaderName>` for `std::string::String`
   = note: required because of the requirements on the impl of `std::convert::TryFrom<std::string::String>` for `http::header::name::HeaderName`

error: aborting due to 2 previous errors; 2 warnings emitted

PS : by the way, I saw that dev got updated, should I rebase from it ?  :)

Well, I solved the first one by using a .clone() on the client passed in the builder. Make sens that the compiler was not happy .
We need to improve my code. also regarding the mod.rs . I am very unsure about it.

Thank you for your great effort!!!
You don't necessariry need to rebase. You can add your work as is and rebase right before merging into dev. But again, it's good to resolve conflicts early. The updated dev fixs the constant test failure of mmfiles feature gate, and also run blocking code test first, which should give exactly the line that fail the assertion. Again, it's up to you whether to rebase early.
The error you got should originate from code block below this proc macro. The problem is the compiler doesn't point to the right place the cause compile failure. This is quie bad that all errors are attributed to the proc macro instead of exact code block. Sadly, I don't know how to fix it, which means making proc macros transparent to errors.
I am willing to help. Thank you!!

Thank you for your message :)
Haha so nice we are improving the test stuff , good job :+1:

The error you got should originate from code block below this proc macro. The problem is that rust compiler doesn't point to the right place. This is quie bad that all errors are attributed to the proc macro instead of exact code block. Sadly, I don't know how to fix it, which means making proc macros transparent to errors.

I thought it was my IDE that was sucky, I guess this is the trade off with new ecosystem like rust. I hope they will fix it soon :)
Thank you !
Few questions might come soon :)
PS : The thing with the rebase now is that I ll have a lot of cherry pick to do :D

It's not your IDE's fault. The exact same error was throwed in Github Action. That's why I think this wierd stuff comes from the compiler.
If you find it hard to rebase, then merge into dev instead. It's preferred to use rebase whenever possible, but if the work to rebase require a lot of tedious work, then use merge and save your time.
PS: please have a look at my opinion/suggestion about the ClientRequestBuilder and ClientExt design choice.

It's not your IDE's fault. The exact same error was throwed in Github Action. That's why I think this wierd stuff comes from the compiler.

Ok

If you find it hard to rebase, then merge into dev instead. It's preferred to use rebase whenever possible, but if the work to rebase require a lot of tedious work, then use merge and save your time.

Ok

PS: please have a look at my opinion/suggestion about the ClientRequestBuilder and ClientExt design choice.

I ll do it now :)
Thank you so much for your help !!!!

My commit style: moved ClientResponse impl near struct feels dirty because in the previous one I removed it by mistake. I ll redo it

Well I made the update.

Currently we use a custom ClientResponse for http response. Let's migrate to http::Response intead.

My bad. It should be try_into().unwrap() instead of into().

I took this code from reqwest unit test
  #[test]
   fn convert_from_http_request() {
       let http_request = HttpRequest::builder().method("GET")
           .uri("http://localhost/")
           .header("User-Agent", "my-awesome-agent/1.0")
           .body("test test test")
           .unwrap();
       let req: Request = http_request.into();
       assert_eq!(req.body().is_none(), false);
       let test_data = b"test test test";
       assert_eq!(req.body().unwrap().as_bytes(), Some(&test_data[..]));
       let headers = req.headers();
       assert_eq!(headers.get("User-Agent").unwrap(), "my-awesome-agent/1.0");
       assert_eq!(req.method(), Method::GET);
       assert_eq!(req.url().as_str(), "http://localhost/");
   }

Our version of reqwest is 0.10.0 and the
The latest version has  TryFrom<http::Request<T>> for Request but not the one we are using.
Should I update the version of the package on this PR ?

Our version of reqwest is 0.10.0 and the latest version has TryFrom<http::Request<T>> for Request but not the one we are using.
Should I update the version of the package on this PR ?

I search for a while and file the TryFrom<http::Request<T>> trait implementation is added from reqwest v0.10.4. Let's update the Cargo.toml to 0.10.4 and that's enough. cargo will automatically use the latest reqwest.

ok :)

As suggested, I made the merge because there were so many commits to cherry pick lol. Also my IDE is failing when I try to rebase with its interface for some reason. Stuff seems fine now between dev and the PR. I will take a look on http::Response :)

Wow nice, of course !

Well, I am working on the migration to http::Response
I was wondering if we should still keep the body of every request as &str  like http::resquest<&str> or if we should use generic type T.
I tried to make it with T but then reqwest was complaining about some bound trait with the try_into.
Also now the response will be like response<String> when I use & str.
What do you think ? I will commit once I have something compiling :)

I have updated the dev branch. The last commit should help correctly deserialize error response related to document. With this commit, use deserialize_response to create document

Well, I am working on the migration to http::Response
I was wondering if we should still keep the body of every request as &str like http::resquest<&str> or if we should use generic type T.
I tried to make it with T but then reqwest was complaining about some bound trait with the try_into.
Also now the response will be like response<String> when I use & str.
What do you think ? I will commit once I have something compiling :)

For request, it's fine to stick with Request or Request<&str>. I prefer the latter one as it can avoid heap allocation. But I doubt a heap allocation is unavoidable in async code.
For response, I think Response<String> suffices. But if you can make Response<T> works, that's great.

Hello !
Thank you for the update :)
As you predicted, I could not avoid the Request<String>. Basically, I got a complain about life time because the conversion from http::reqwest does outlive the &str . I tried to fixed it with some <'a> to say how long the reference should live , but I cannot specify lifetime with  fn try_from(req: HttpRequest<T>) and it said it could not infer from it.
So I did use <String> for now. I will try the <T> again and see if I can get somewhere by playing with lifetime.
I will also work on the methods for document by using your nice example :)

If I want to use <T> in request instead of <String> & <&str> I will need to add many trait bound and the code is only gonna get more complex.
So yes, <String> seems to be enough for now :)  , what do you think ?

Well, I think we are almost ready :)
This is a big PR :)

That is a mistake. There is no point. I will fix it.

Can we use key instead of _key here? Thank you.

Yes sure. I used _key, because it is the name of the property on the doc.

This pattern to match every query is quite annoying. Can we use a library to help serialize into query string, e.x. serde_qs?

I am gonna look at it :)

What's the point to wrap all field into Option? If I am correct, that's becuase all fields are optonal. We can even go with every field set to None.
If this is the case, I suggest use a builder pattern and mark every field as private to avoid access. Use typed_builder to help construct a builder type for this struct.

Hoo yeah, that is a nice idea I am gonna try it :)

Can we use key instead of _key here? Thank you.

Yes sure. I used _key, because it is the name of the property on the doc.

Oh, I don't know that. Then I agree with your idea that to use _key instead of key to inconsistent with arangoDB

Hello !
From our discussion yesterday, I will improve the following points
1 - Use builder pattern for options
2 - Improve the query string pattern with serde_qs
3 - Improve DocumentResponse
4 - Update correctly the unit test and use expect("should creata a collection for test, but it already exists").

Would you like to explain the consideration that all fields are wrapped in Option? I don't think the server can returned a reponse with arbitrary combination of the 4 fiedls. If you would like to divide into cases that indicate a new docuemnt or updated document, use Enum instead. And use a constom deserialization, see Response as example.

Because depending of the query parameters we set in the request, we may or not have the field in the response and I thought that having a generic DocumentResponse was enough for now since it behaves more or less the same way for every CRUD operations.
Ex here from the official doc that explains how query parameters determine how the response looks like.

waitForSync (optional): Wait until document has been synced to disk.
ignoreRevs (optional): By default, or if this is set to true, the _rev attributes in the given document is ignored. If this is set to false, then the _rev attribute given in the body document is taken as a precondition. The document is only replaced if the current revision is the one specified.
returnOld (optional): Return additionally the complete previous revision of the changed document under the attribute old in the result.
returnNew (optional): Return additionally the complete new document under the attribute new in the result.
silent (optional): If set to true, an empty object will be returned as response. No meta-data will be returned for the replaced document. This option can be used to save some network traffic.

But having enum and variant, yes. I definitely need to use more this since it is awesome and it is better to reach perfection than just "good enough"
Thank you for pushing me :)
I am gonna make a better response.

I got it. The possible combination of response is quite complex, though not an arbitrary combination of the 4 fields:

empty if silent
always contain DocumentHeader except for silent response
new, old and _oldRev are optional field that can comes at arbitrary combination

I think your implementation is good, and there is little we can do to improve it.
The only improvement I can think of is that use an Enum to distinguish between silent and else, as well as set header as a necessary field:
enum DocumentResponse{
    Silent,
    Response{header: DocumentHeader, old:Option<T>, new: Option<T>, _old_rev: Option<String>}
}

OMG, I just implemented the new options to create a document. Together typed_builder + serde_qs are so OP. It is like magic.
For typed_builder, the intellisens of my IDE does not work for the typing of methods for some reason.
But anyway, that is so awesome.
I ll update the code soon.

Well, Thank you a lot for your propositions !!!
The code looks much nicer. I like the builder patterns by the way. It is so cool now.
Event if I am still a baby at rust, I can say I love so hard this language xD

Well, that is wierd. I do not see my last commit on the PR.
Anyway, the unit test works and the custom_deserialization too.
My brain is a bit frozen, so I am not sure that the new implementation is better than before. I had to make a lot of code to make it work and added an implementation. The good thing is that we can have more variant.
I kept the header optional for now, but I as you mention it is mandatory, so I should probably remove the option on it.
What do you think about this commit ( when it comes up ) ? I feel I have Overengineered the stuff.
If the commit is ok, I will just remove the Option from the header and continue to improve.

Actually it's a bit redundant. The error has been handled in deserialize_response. And the impl block is redundant that the user can do the match theirselves.
I suggest use the following code:
enum DocumentResponse{
    Silent,
    Response{header: DocumentHeader, old:Option<T>, new: Option<T>, _old_rev: Option<String>}
}

Don't need to create a type to contains all the fields in Response.

Hey ! Thank you for your advices.

And the impl block is redundant that the user can do the match theirselves.

That is true, it is just that it was hard for making the unit test for it with the assert. I actually did not succeed to make the variant work until I do the impl.
I'll try again

Well, I am not sure the commit is a big improvement. Maybe I am missing the point since I am not very familiar with the rust enum yet, but I succeed to rewrite some part of the code and made the test passing.
The clone everywhere looks ugly and I need it because I cannot move rest or map after I use it.
Also I need to make the deserialization manually, otherwise I get Some(null) instead of None.
I agree with you that the user can make the match by themself, but it will be a lot of code to write and repeat especially in the unit test and we will need to use the
By having the implementation, we do save some code lines and time and I feel it more handy this way.
What do you think ? I think I am missing the point

I added some expect message. This functionality is nice :)
Do you think it is fine now or is there anything we can improve in the style of the unit test ?

I know we discussed it lot , but it seems we need still Debug on Document because it is required for trace in different places in code that is outside the scope of the PR.
Is it ok for you we keep it until we fix the stuff later ?

Huhu I succeed to fix the test. I am so happy. I ll put ready for review. Sorry for the flood of messages by the way, I am a over talkative person lol

Hello !
Thank you for your inputs !!
The one about the builder is very clever. I wasn't sure about it, I will give it a try :)
No problem for the Debug, I should have understand it by myself actually.

I will update the options that use the builder pattern with the default. But the DocumentReadOptions do not use it, because it is IfNoneMatch or IfMatch :)

Well, I am happy about these changes.
Thank you a lot for your Inputs, you make me learning so much. I really appreciate it :+1:
Anyway, do you think the DocumentResponse is ok now ?

I think OperationResponse is useless now. What do you think?

Thank you for your feedback :)
I wish OperationResponse was useless. I am using only it there :

/// Gives extra method on the DocumentResponse to quickly check what the server
/// returns
impl<T> DocumentResponse<T> {
    /// Should be true when the server send back an empty object {}
    pub fn is_silent(&self) -> bool {
        match self {
            DocumentResponse::Silent => true,
            _ => false,
        }
    }
    /// Should be true if there is a response from the server
    pub fn has_response(&self) -> bool {
        match self {
            DocumentResponse::Response { .. } => true,
            _ => false,
        }
    }

    /// Should give None or Some(Response)
    pub fn get_response(self) -> Option<OperationResponse<T>> {
        if let DocumentResponse::Response {
            header,
            old,
            new,
            _old_rev,
        } = self
        {
            Some(OperationResponse {
                header,
                old,
                new,
                _old_rev,
            })
        } else {
            None
        }
    }
}

Is there a way I can return these values without a struct ?

I see, the only usage of OperationResponse is in fn get_response(&self).
What about removing get_response and further dividing getter into fn header(&self)->Option<&Header>, fn old(&self)->Option<&T> and etc?
PS: Rustacean tend to use field name for getter and set_xxx for setter. For example, header for a getter and set_header for a setter.

Okay, I try to deserialize into Value and then use as_object_mut()
I got some error because I need to useunwrap() . So I needed to handle the Error. And then I had to add en Err variant in DocumentResponse, otherwise it could not compile.

I see, the only usage of OperationResponse is in fn get_response(&self).
What about removing get_response and further dividing getter into fn header(&self)->Option<&Header>, fn old(&self)->Option<&T> and etc? Since header, old, new, old_rev can be of arbitrary combination, I think this is a reasonable design.
PS: Rustacean tend to use field name for getter and set_xxx for setter. For example, header for a getter and set_header for a setter.

Haa nice catch !
I am gonna try it :)
Thank you for the tip !

I learned how to learn mot the &, the code looks much better now, Thank you for pushing me :+1:

Yes ! You are right. I do not know why, I thought I had to keep it because I was having error, but in fact it was because of something else. I just removed and the tests still pass correctly.

Yeah, right about the variant. I just removed it.
For the error handling, there is no .map_err() on obj.as_object_mut() . I tried to find a way before by using other methods like like unwrap_or_else or map , but I did not find a proper solution.

For the error handling, there is no .map_err() on obj.as_object_mut() . I tried to find a way before by using other methods like like unwrap_or_else or map , but I did not find a proper solution.

My mistake. obj.as_object_mut() returns a Option and I missed a step to convert it to Result with Option::ok_or.
let json = obj.as_object_mut().ok_or(de::Error::invalid_type(Unexpected::Other("not object"), &self))?;

Well, we do not have self in this context but am trying to understand. It seems we need to use the Visitor trait or something like here https://serde.rs/deserialize-map.html
Do you think we should go this far for this case ?

Do you think we should go this far for this case ?

I think no. My point is to raise a serde::de::Error, and there is some way to create a de::Error without the presense of Visitor. You can choose whatever reasonable. For example, de::Error::custom() and etc.

Well, I am sorry but I do not succeed to raise Error with any kind of good code.
For example this break

     let json_result = obj.as_object_mut().ok_or(de::Error::custom);
        if json_result.is_err() {
            json_result   <--- break there
        };

        let json = json_result.unwrap();  <--- break there

I do not understand how .unwrap() does not exist on this Result . Also I am not able to return the error .
I made this code compile but  I do not succeed to test it
     let mut obj = serde_json::Value::deserialize(deserializer)?;
        let json_result = obj.as_object_mut();

        if json_result.is_none() {
            eprintln!(" DESERIALIZATION FAILED");

            return Err(de::Error::custom(
                "DocumentResponse deserialization has failed",
            ));
        }

I think I am missing the point because I am a bit lost on how to manage error properly there.

Thank you for the merge by the way :)

Thank you for your great great work! I can't believe we have come so far. You can refer to the latest commit in develop where I have made the change myself.
I copy it here:
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: Deserializer<'de>,
    {
        let mut obj = serde_json::Value::deserialize(deserializer)?;

        let json = obj
            .as_object_mut()
            .ok_or(DeError::custom("should be a json object"))?;

        if json.is_empty() {
            Ok(DocumentResponse::Silent)
        } else {
            let _id = json.remove("_id").ok_or(DeError::missing_field("_id"))?;
            let _key = json.remove("_key").ok_or(DeError::missing_field("_key"))?;
            let _rev = json.remove("_rev").ok_or(DeError::missing_field("_rev"))?;
            let header: DocumentHeader = DocumentHeader {
                _id: serde_json::from_value(_id).map_err(DeError::custom)?,
                _key: serde_json::from_value(_key).map_err(DeError::custom)?,
                _rev: serde_json::from_value(_rev).map_err(DeError::custom)?,
            };

            let old = json
                .remove("old")
                .map(T::deserialize)
                .transpose()
                .map_err(DeError::custom)?;
            let new = json
                .remove("new")
                .map(T::deserialize)
                .transpose()
                .map_err(DeError::custom)?;
            let _old_rev = json.remove("_old_rev").map(|v| v.to_string());

            Ok(DocumentResponse::Response {
                header,
                old,
                new,
                _old_rev,
            })
        }
    }

Thank you !!!
The code is beautiful :+1:

        let json = obj
            .as_object_mut()
            .ok_or(DeError::custom("should be a json object"))?;

Arf, why I did not think about that lol. So simple :P
Thank you a lot for your guidance.

You are welcome~ :)
Thank you so much!
Would you like to add some examples on document operation?

:)
Yeah sure !


adding  style guide specifics

@tamird pointed out that we do not explicitly state our expectations of voice/tense for the docs. Adding the recommendations to our style guide to prevent future confusion from contributors.

This change is

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/fe316d3bea0adba6e64920413dfe52fc2e16c9e2/


Allow to select specific columns in pivot table

This PR allows to define selection for specific columns of the pivot table:
// User Model
public function friendRequestsFromUser()
{
	return $this->belongsToMany('User', 'friend_requests', 'user_id_from', 'user_id_to')
					 ->select('users.id', 'users.nickname')
			  		 ->selectFromPivot('id', 'user_id_to');
}

Hi, I'm not sure to get the PR but is that different from using withPivot?
According to the doc it's already possible:
$this->belongsToMany('App\Role')->withPivot('column1', 'column2');

Sometimes we don't want select one or both of the column keys (foreign and otherkey) on the pivot table.
The "withPivot" method merges the default column keys with the columns in argument.
The "selectFromPivot" method allows to select freely the columns with/without those default keys on the pivot table. So basically don't include both column keys by default.

Holding off on this for now.


Unable to import Monokai Soda Custom.terminal

I tried to import this theme as it looks pretty cool but I can't. I am not given the option to select it when I go Terminal -> Preferences -> Profiles -> Import
I exported existing themes and am able to Import them. I tried renaming the .terminal file without spaces but no luck. I also made the permissions on the file the same as the ones I was able to export.
I am on Mac OS High Sierra Version 10.13.3

Hi,
I imported but the color didn't change, but it changed in my macbook pro, but it didn't on my iMac.
Anything?

Apparently, I am dumb. User error.
I thought I could just save the file via Right Click, Save As, All Files. Seems doing that saved it as an HTML page with .terminal file type
Cloning the repository and importing works fine.
@spaceforestchu I'd recommend opening a new issue for your issues, I am closing this one.

Glad you figured it out! ENJOY!


tcam-capture permission error

It tries to save a config file in a hardcoded directory that may not exist or you may not have permission to write to.  You have to dig in the code to find out what it is.
Search no longer: "/home/edt/.config/"
May want to change to "./.config", you may have better chance to pass this error and tackle the next one.
Looks like you could save imgs in a preferred directory...but dang if I can find out how to do this!
PLEEEEEEAAAAAASE!!!!!!
Pat.

tcam-capture application is subject to a major rework in the near future.


Exception when saving or rebuilding storyboard.

When I'm changing something in a storyboard file and pressing save or rebuild, I get the following exception:
SnapKit.LayoutConstraint constant is not finite!
Any idea why this might happen? I don't get the exception when I'm using InjectIII without this repo.

Hi, storyboard injection is only just supported these days as it was rather difficult to get working at all. It may work much of the time but the focus is on code injection. When injecting storyboards, always build the project instead of saving the file.

Thanks for the quick response. We are looking to migrate to SwiftUI anyways so this doesn't make that much of a difference I guess.


ViroImage Not Scaling as Expected Using the resizeMode Prop

Environment

Development OS: Linux (Ubuntu 18.04.2 LTS)
Android OS version: 9.0
ViroReact version: 2.16.0
React Native version: 0.59.3
Device: Samsung Galaxy S8

Description
It seems that when I set the resizeMode prop of a ViroImage to 'ScaleToFit' or 'ScaleToFill' the image does not scale as expected.
Here is the original picture:

Keeping in mind that I put some padding, here is the picture with the ScaleToFit resizeMode:

Here is the picture with the ScaleToFill resizeMode:

Here is the render function code showcasing the ScaleToFit bug:
render() {
return (
  <ViroARScene>
    <ViroFlexView style={{flexDirection: 'column', padding: 0.05}}
                  width={1}
                  height={1}
                  backgroundColor={'rgb(26,58,91)'}
                  position={[0, 0, -1]}
                  rotation={[0,0,0]}>
      <ViroImage source={{uri:'https://cdn.pixabay.com/photo/2017/11/13/23/33/landscape-2947094_960_720.jpg'}}
                 style={{flex:1}}
                 resizeMode={'ScaleToFit'}
      />
    {/*'ScaleToFit' and 'ScaleToFill' do not seem to scale properly*/}
    </ViroFlexView>
  </ViroARScene>
)}

Replace ScaleToFit with ScaleToFill to see the other scaling bug.

Hi @Malcolm1998 ,
Thanks for reaching out to us with this issue. I confirm this bug reproduces on android, but works correctly on iOS for version 2.16.0. We're looking to fix this for our next release.
Thanks


Takes over 10 tries to walk 0.0X away

Expected Behavior
Bot should arrive to fort at first/second try
Actual Behavior

Takes so many tries to walk 0.0X away
Steps to Reproduce
Default config :
"max_steps": 5
"walk": 4.16,
Other Information
OS: Windows
Git Commit: 7e608c2ff5367be0e22cdf55228056aad5a0d718
I saw this issue once, yet couldn't find a proper solution for this.

As far as I can tell it's because your bot walks quite slowly. Since it takes so long to walk from A to B there are multiple log entries for the same location.
If you increase the walk speed you wouldn't see the same log entry more than once.
BTW I'd rather see a progress bar than have my log flooded with the current coordinates.

Are you running dev ?
Check the manual: https://github.com/PokemonGoF/PokemonGo-Bot/wiki/Configuration-files
Walk speed is now in km/h.

Raising the walk speed fixed it :)

@BScreen
I brought this up but they removed the progress bar for log population which I think line by line updates causes more population?
The old geolocation updates were better IMO. I'd look at the map to see where I was, as long as I know where point A was and point B was
[2016-07-28 09:34:07] [#] Walking from (40.710519, -74.009057) to (40.710122, -74.00735) for approx. 1.02 minutes
This was my post
https://github.com/PokemonGoF/PokemonGo-Bot/issues/1212

@ayiire
Both the log updates and the progress bar aren't really necessary imo, but I really liked the time estimates. Shame it's been removed in the dev.

This feature has been removed in the dev branch. Please upgrade to the latest dev branch and consider rising the walk speed. Closing this for now.
/closed


Keybindings

Just a suggestion, but adding some keybindings would be really helpful. (I think too few modules use keybindings.)
Having one to cycle the size of all Camera Dock windows would be really great. Also for muting/disabling audio and/or video, etc.

Feature requests on my discord, i forgot to get the disclamer in the repo :p
Hello! It seems you haven't read the Before Posting an issue as indicated at the top of the Repository Readme (https://github.com/theripper93/Levels/blob/v9/ISSUES.md) The Issue has been closed.
If you are reporting a bug, feel free to follow the steps here (https://theripper93.com/#/faq/issues) and reopen the issue with all the relevant information.


[Event Request] page 9126 "Lot Numbers by Bin FactBox"  FillTempTableOnBeforeInsertLotNosByBinBuffer

Hello,
Is it possible to get the following event:
    DeleteAll();

    while LotNosByBinCode.Read do begin
        Init;
        "Item No." := LotNosByBinCode.Item_No;
        "Variant Code" := LotNosByBinCode.Variant_Code;
        "Zone Code" := LotNosByBinCode.Zone_Code;
        "Bin Code" := LotNosByBinCode.Bin_Code;
        "Location Code" := LotNosByBinCode.Location_Code;
        "Lot No." := LotNosByBinCode.Lot_No;
        // DINNL >>
        DINFillTempTableOnBeforeInsertLotNosByBinBuffer(Rec, LotNosByBinCode);
        // DINNL >>
        if Find then begin
            "Qty. (Base)" += LotNosByBinCode.Sum_Qty_Base;
            Modify;
        end else begin
            "Qty. (Base)" := LotNosByBinCode.Sum_Qty_Base;
            Insert;
        end;
    end;
end;

[IntegrationEvent(false, false)]
local procedure DINFillTempTableOnBeforeInsertLotNosByBinBuffer(var LotBinBuffer: record "Lot Bin Buffer"; LotNosByBinCode: query "Lot Numbers by Bin")
begin
end;

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.


Add gradle tasks for cook book examples and make it a tool

After converting the maven project to gradle #877 - we can define gradle tasks to call the existing DMSDK cookbook examples to actually perform operations like a tool rather than serving as a cook book example. Have the customer give in arguments and execute things as a tool

Duplicate of #922


Improve cache deletion on UserTechObserver

Having worked on the following
I feel rather than this it would be better if we only clear the cache for the page the new user will be on - rather than clearing it all.
A very small minor adjustment 😃

Although a useful change, I'm not sure if it will actually improve anything speed wise, so maybe not worth


Add missing cuda 12.1 code

Follow up after: https://github.com/pytorch/vision/pull/7533
should address following error:
https://app.circleci.com/pipelines/github/pytorch/vision/24505/workflows/2bf2728c-971d-478f-8d77-3fcb0a407b60/jobs/1864405

Mention removing 11.6 in the PR description?


Possible renaming of "myEntityManagerFactory"?

This is a possible minor configuration improvement.
While trying to add some entities to the database using the existing EntityManagerFactory, I noticed that renaming the object to entityManagerFactory will better fit autowiring of JPA Repositories if one wants to define new entities.
I renamed this manually in the config file and things went well but I thought it might be a good idea to rename this in the main branch.

I'm not sure I understand the benefit. All of the spring beans that ship with hapi-fhir-jpaserver-base use the naming convention of "my[Foo]", so I think if we change entityManagerFactory, we'd want to change everything else. I mean, I'm not in any way attached to the myFoo naming style (I'm not even sure why I did them that way to be honest) but I feel like that's a pretty sweeping change..

I understand. Like I said this is not a big deal really since one can easily change the names.
The issue is when you use the tag @Repository you can autowire the corresponding JpaRepository --which results in a much cleaner code-- and that will trigger spring to look for a bean named "entityManagerFactory".
This might be configurable in Spring but the default behavior is as such.

This seems reasonable enough. I'll make the switch now.


docs/podman-rm.1.md: delete "Not yet implemented" msg for volume removal

Since this feature appears to be implemented, remove the qualifier.
Signed-off-by: Robert P. J. Day<EMAIL_ADDRESS>

LGTM
/ok-to-test

/approve

/lgtm


Internal type repository

It's public but can only be view by log-in user.

Duplicated to https://github.com/gogits/gogs/issues/2308.


where should submodules be checked out?

If we try to replace two modules in the same repository, the current gohack scheme
of checking out to a single global root won't work well because the two modules
may clash (for example they may well be checked out at different versions).
One possibility might be to detect when there's a clash and use a different
name for the directory that holds the VCS directory. The problem with that
is that names become unpredictable.

If they're in the same root and at compatible versions (that is, if the code within that submodule hasn't changed since the requested version), I'd say leave them in the same repository (and just update replace directives appropriately).
If they're in the same root at incompatible versions, maybe emit an error?

If they're in the same root and at compatible versions (that is, if the code within that submodule hasn't changed since the requested version), I'd say leave them in the same repository (and just update replace directives appropriately).
If they're in the same root at incompatible versions, maybe emit an error?

I'm not entirely sure whether that's a good idea. The error situation you describe will be increasingly likely the larger a program is. It would be frustrating to want to add a printf somewhere in a large program only to be told that it can't be done because of a version clash.
Note that this issue also applies when you've got multiple major versions of a repository. I think it's reasonable to want to hack on both example.com/m and example.com/m/v2 at the same time, but the current approach wouldn't allow that.
I'm currently thinking of checking out all modules to $GOHACK/module/_mod instead of just $GOHACK/module. That way this issue goes away because it's perfectly OK to have example.com/m/_mod and examples.com/m/v2/_mod.
The down side is that you might well want to use the same directory for both. There's always go mod edit --replace for that, I suppose.


consumer ctors

Codecov Report
Patch coverage: 100.00% and project coverage change: +3.05 :tada:

Comparison is base (d5cbfb4) 68.18% compared to head (b67b8cc) 71.23%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #117      +/-   ##
============================================
+ Coverage     68.18%   71.23%   +3.05%
- Complexity       18       20       +2
============================================
  Files             9        9
  Lines            66       73       +7
============================================
+ Hits             45       52       +7
  Misses           21       21

Impacted Files
Coverage Δ

...va/io/github/eocqrs/kafka/consumer/KfConsumer.java
52.63% <100.00%> (+27.63%)
:arrow_up:

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

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

@rultor merge

@rultor merge

@h1alexbel OK, I'll try to merge now. You can check the progress of the merge here

@rultor merge

@h1alexbel Done! FYI, the full log is here (took me 1min)


Not all Spee.ch links work for downloading files

I'm writing a peace of software, it's called VCStudio. And I want to implement an Update system using this channel on LBRY. What I did a week or two ago is a little Markdown reader that would swap the lbry:// to spee.ch/ and download the article about the update. But currently it's not working. Gives either Origin Offline or could not resolve stream URI.
For some articles and some files it works. But for other it doesn't. I think something about this way to retrieving files is broken. Can you please fix it?

Please shoot us an email at<EMAIL_ADDRESS>with which links are not working.

But it's happening at random.

Unfortunately, we would need more reproducible details to help.