Need a way to set what scroll position is saved

Similar to the way you can define a scrollBehavior function on a router instance, I need a way to define how the savedPosition value gets computed/populated. I need to override the default behavior which stores the window's scroll position, and instead store the scroll position of another element.
My application uses a structure where the document/window stays static, and content scrolls inside of a container. Example: http://codepen.io/brad426/pen/pezRge

Hi Brad.
I think this won't be so easy to do since those two things - the scrollposition the router saves right now, and the scrollpostion of an arbitrary element - have not much in common, technically. One works with the popstate event and push() method  of window.history, while the other requires to read and write to a certain DOM elements property.
Also, this functionality is not necessarily tied to router components, but could be useful to all sorts of components, which makes me think that it would be better to do this in a generic plugin/component ...

The scrollBehavior could be an object instead of a function but as @LinusBorg I'm wondering if keeping this behaviour in a component isn't more flexible and reusable

Cool, thanks for your feedback.
I agree that this functionality would be useful to all sorts of components, but I think a lot of people might also find a "global" override useful.
Regarding my example app structure, I'd like to keep the router's functionality exactly as is, i.e. have it call saveScrollPosition whenever a popstate event is triggered, the only change would be to allow a custom handler for saveScrollPosition . Example:
const router = new VueRouter({
  mode: 'history',
  routes,
  saveScrollPosition() {
     let el = document.querySelector('.page-content')
     return { x: el.scrollLeft, y: el.scrollTop }
  }
})

@LinusBorg see my issue's program #1249 , is that possible to realize?

IMO, we should set a scrollEl property in main router config. Thus allowing us to use a specific scroll container for both scrollBehavior and scroll position.
What's everyone's opinion on this?

You don't need special functions for this, before/afterEach would be a much better place to put these kinds of things

It would be nice if we could somehow define from which element we want to save the scroll position.
In the meantime i solved it this way:
<keep-alive>
  <router-view></router-view>
</keep-alive>

const router = new VueRouter({
  mode: 'history',
  routes
})

const scrollableElementId = 'content' // You should change this
const scrollPositions = Object.create(null)

router.beforeEach((to, from, next) => {
  let element = document.getElementById(scrollableElementId)
  if (element !== null) {
    scrollPositions[from.name] = element.scrollTop
  }

  next()
})

window.addEventListener('popstate', () => {
  let currentRouteName = router.history.current.name

  let element = document.getElementById(scrollableElementId)
  if (element !== null && currentRouteName in scrollPositions) {
    setTimeout(() => element.scrollTop = scrollPositions[currentRouteName], 50)
  }
})

I think this would be a pretty good and obvious feature to add :D

@yyx990803 Does vue-router save scroll position of the <router-view> or window?
Also, it seems that vue-router should NOT implement this at all...scrolling a container that is not supported has side-effects (ex safari scroll to top doesnt work) etc.

Those are all unfortunate side-effects but mobile browsers ignoring overflow: hidden sometimes forces us to use another container for scrolling, since the only way around that is setting a wrapper element to position: fixed

On mobile browsers, the browser url bar/back buttons (think mobile safari/chrome) are hidden according to scroll position on the window/body.  If you use overflow: hidden; on the window/body then you have just disabled the browsers ability to show/hide its controls as well as the many other things I mentioned.  What I am saying, really, is that you should avoid disabling scrolling on the body and using position: fixed; to create your own viewport, and try to find another way/use routing or conditionals with transitions if you need to bring in overlays etc.

Any update on this? I want to catch if the savedPosition has been set, and if possible read out the x/y and overrule this. Thanks!

Just as a reference, after some head scratching, here is a pure vue solution (no jquery needed)
In the root component, give the scrolling element a ref property, and pass a scroll_last_position prop to the router-view, containing a callback that restores the last scroll position.

    <keep-alive>
        <router-view :scroll_last_position="scroll_container"></router-view>
    </keep-alive>

Hook in a afterEach route guard so the root element knows when navigation happens. In that route guard, capture the current scroll position of the referenced element and store it for the from route, then restore the old position of the to route.
Also, provide a method for restoring a scroll position.
(This is coffeescript, sorry. I'm confident you can deal with it)
root_component =
    data: () ->
        scroll: 0
        scroll_positions: {}

    created: () ->
        this.$router.afterEach (to, from) =>
            # On each router change, note the current scroll position of the
            # container element for the old route; then change the scroll
            # position to the last remembered position of the new route, if
            # any.
            # The child element then can trigger scrolling to that position
            # by calling its "on_activate" prop.
            this.scroll_positions[from.name] = this.$refs.scrolled.scrollTop
            old_pos = this.scroll_positions[to.name]
            this.scroll = if old_pos then old_pos else 0

    methods:
        scroll_container: () ->
            this.$refs.scrolled.scrollTop = this.scroll

Finally, in the child component, restore the scroll position if wanted:
child_component =
    props:
        scroll_last_position:
            type: Function

    activated: () ->
        this.scroll_last_position()

Just wanted to "encapsulate" @mjl code, considering that this should be implemented in the near future keeping everything together should be easier further down the line.
For any routes you want to remember the position, just add the route name to the remember array.
<template>

    <router-view></router-view>

<template>

Just wanted to "encapsulate" @mjl code, considering that this should be implemented in the near future keeping everything together should be easier further down the line.
For any routes you want to remember the position, just add the route name to the remember array.
<template>

    <router-view></router-view>

<template>

In my website the main body of my site is contained in a div with a navbar layout that prevents body scrolling.
I want general behavior for scroll position that saves position of pages in routing history, but scrolls to the top for new pages.
From my perspective it makes a lot of sense to include a scrollableTarget to the scrollBehavior function in vue-router
scrollBehavior (to, from, savedPosition) {
  return {
    scrollableTarget: 'my-scrollable-element-id',
    x: 0,
    y: 0
  }
}

Since this doesn't exist, there is a fairly straightforward solution that you can implement in your router.afterEach navigation guard. (This solution is based on others' solutions from this thread)
let scrollableElementId = 'my-scrollable-element-id'
let scrollPositions = {}

router.afterEach((to, from) => {
  let scrollableElement = document.getElementById(scrollableElementId)

  if (scrollableElement) {
    // get current state in routing history
    let stateKey = history.state.key

    // If there is a scroll position for this history state id
    // set the scroll position to that saved position
    if (scrollPositions[stateKey]) {
      scrollableElement.scrollTop = scrollPositions[stateKey]
    } else {
      // save scroll position for later
      scrollPositions[stateKey] = scrollableElement.scrollTop

      // scroll to top because it is a new page
      scrollableElement.scrollTop = 0
    }
  }
})

Hello everyone!
What is a current status? Is it implemented? Or need use one of custom workaround proposed above?

I save scroll states of a child component by saving $refs.scrollElement.scrollTop on beforeRouteLeave, and restore it at beforeRouteEnter. This requires the  to be wrapped in  (or to simply have someplace else to store the scroll data, like vuex), so that the scroll data is available for routeBeforeEnter. E.g:
`

Bunch of content

`
I'm fairly certain this method could be made into a plugin of some sort. I hope this helped anyone!

A very simple way to do it in TypeScript:
@Ref() readonly content!: Vue;

scrollPositions: { [index: string]: number }= {};

@Watch("$route")
routeChanged(newRoute: Route, oldRoute: Route) {
  const el = this.content.$el;
  this.scrollPositions[oldRoute.path] = el.scrollTop;
  this.$nextTick(() => (el.scrollTop = this.scrollPositions[newRoute.path]));
}

contain this mixins in your router page.
export default {
beforeRouteLeave (to, from, next) {
const scroller = this.$refs.scroller;
if(scroller) {
if(!window.__scrollOffset) {
window.__scrollOffset = {};
}
window.__scrollOffset[this.$route.fullPath] = {
x: scroller.scrollLeft,
y: scroller.scrollTop
};
next()
}
},
methods: {
setScroll(scroller) {
if(window.__scrollOffset && window.__scrollOffset[this.$route.fullPath]) {
let { x, y } = window.__scrollOffset[this.$route.fullPath];
scroller.scrollLeft = x;
scroller.scrollTop = y;
}
}
},
}
when your page rendered, calling the function to set scroll position.

This behavior would be incredibly useful to get scrolling working without requiring html history usage. And would render libraries such as https://github.com/jeneser/vue-scroll-behavior unnecessary (at least when using html history mode), since we could just use the vue-router behavior to do such.
As a side note, it would be nice if the window.scrollTo(position.x, position.y) line in scroll.js was overridable so that custom scroll libraries could be used instead of scrollTo.

Extending @iBrazilian2 's solution, you can leverage the savedPosition parameter in scrollBehavior to only navigate to the saved position of your scroll element when navigating back (popstate). This seems the most simple solution for default back behavior in vue with a scrollable element that isn't window:
`
// router.js
const scrollableElementId = 'id-of-your-scrollable-element'; // change id
const scrollPositions = Object.create(null);
const router = new VueRouter({
mode: 'history',
routes,
scrollBehavior(to, from, savedPosition) {
const element = document.getElementById(scrollableElementId);
    if (savedPosition && element !== null && to.name in scrollPositions) {
        console.log(
            '%c%s',
            'color:hotpink;',
            'scrollBehavior: navigating back, scroll to saved position',
        );

        element.scrollTop = scrollPositions[to.name];

    } else {
        console.log('%c%s', 'color:hotpink;', 'navigating forward, scroll to top');
        element.scrollTop = 0;
    }

},

});
router.beforeEach((to, from, next) => {
const element = document.getElementById(scrollableElementId);
if (element !== null) {
scrollPositions[from.name] = element.scrollTop;
}
next();

});
`

Here's my solution:

the original suggestion would be a good use case to add, am wondering if this is still being considered?

In my case, Nothing worked for me
but this below worked
`<transition @before-enter="scrollTop" mode="out-in" appear>

methods: {
scrollTop(){
document.getElementById('app').scrollIntoView();
},
}`

When you mode is history, use scrollBehavior. But when you mode is hash, try this one: vue-scroll-behavior

For those who want the scrollBehavior to apply to another element instead of window, there's a way to hack the default behavior. VueRouter use window.pageXOffset and window.pageYOffset to get the position during saving, and calls window.scrollTo to apply the saved position. Therefore it sufficies to override these three:
Object.defineProperty(window, 'pageXOffset', {
	get() { return document.querySelector('main')?.scrollLeft ?? 0; },
});
Object.defineProperty(window, 'pageYOffset', {
	get() { return document.querySelector('main')?.scrollTop ?? 0; },
});
Object.defineProperty(window, 'scrollTo', {
	value: (option: { top: number, left: number }) => {
		let els = document.querySelectorAll('main');
		let el = els[els.length - 1];
		el?.scrollTo(option.left, option.top);
	},
});

In my case, my scroll container is the  element. Notice that in my scrollTo function, I query the last matching element, in order to make it compatible with transitions (in which multiple  elements will co-exist).

The realization I have made that if you use the container to show the data - the scrollBehavior function is no longer something you could rely on.. @MuTsunTsai made a good explanation how you could do some overrides to make it work for you. In my case, however, I find it much easier to just override the scroll position per specific page, since I don't have that many pages anyways.
there is one page that shows the infinite list of items and is using keep-alive directive to cache the contents. On this page I am using
let scrollPosition = 0;
let isShowingCache = true;

onMounted(() => {
  isShowingCache = false;
});

onActivated(() => {
  if (isShowingCache) {
    document.getElementById("content").scrollTop = scrollPosition;
  } else {
    document.getElementById("content").scrollTop = 0;
  }
});

onDeactivated(() => {
  isShowingCache = true;
  scrollPosition = document.getElementById("content").scrollTop;
});

onMounted is only called once the component is initialized the first time, meaning that no data is loaded and we can simply scroll to top. In other cases when the onActivated and onDeactivated are invoked we know that transition between cached page and other components are happening.  The key here is to first detect if the page is cached or not.
On the non-cached pages you simply use:
onMounted(() => {
  document.getElementById("content").scrollTop = 0;
});

One thing I would improve still is adding a composable function instead of repeating the same logic over and over. I haven't gotten that far yet :)

Here is an alternative implementation (inspired by @unamix):
const SCROLL_CONTAINER_ID = 'content';
const scrollPositions = {};

function scrollBehavior(to, from, savedPosition) {
  if (to.fullPath === from.fullPath) {
    return;
  }

  const isNavigationForward = (savedPosition === null);
  const contentEl = document.getElementById(SCROLL_CONTAINER_ID) as HTMLElement;

  console.assert(contentEl !== null, 'Scroll container not found');

  if (isNavigationForward) {
    scrollPositions[from.fullPath] = {
      top: contentEl.scrollTop,
      left: contentEl.scrollLeft
    };
    contentEl.scroll({
      top: 0,
      left: 0
    });
  } else {
    const savedPosition = scrollPositions[to.fullPath];
    if (savedPosition) {
      contentEl.scroll(savedPosition);
    }
    delete scrollPositions[to.fullPath];
  }
};

This implementation relies on a fact that savedPosition is null when user navigates forward and { x: number; y: number; } when the one navigates backward. That's why we don't need to listen to popstate event and define our custom beforeEach navigation guard.

Expanding on @unamix and @kryvonos-v, here's what works for me, including keep-alive lists, etc.
In the keep-alive case it is important to set the scroll to zero when navigating forward, otherwise you get unexpected behavior. To achieve this we have to split the logic into two.
1
Store the scroll position before leaving the route. This can be done easily in a plugin:
plugins/router.ts
export default defineNuxtPlugin(() => {
  const scrollElement = '#scroll-element'
  const scrollPositions = useState('savedScrollPositions', (): Record<string, ScrollPosition> => ({}))
  const router = useRouter()

  router.beforeEach((_to, from, next) => {
    const el = document.querySelector(scrollElement)
    if (el) {
      scrollPositions.value[from.fullPath] = {
        top: el.scrollTop,
        left: el.scrollLeft,
      }
    }
    next()
  })
})

2
Restoring the position when navigating forwards or backward via router options:
app/router.options.ts
import type { RouterOptions } from '@nuxt/schema'

export default <RouterOptions> {
  scrollBehavior(to, _from, savedPosition) {
    const scrollElement = document.querySelector('#scroll-element')
    if (scrollElement) {
      let scrollPosition: ScrollPosition
      if (savedPosition) {
        const savedScrollPositions = useState('savedScrollPositions', (): Record<string, ScrollPosition> => ({}))
        scrollPosition = savedScrollPositions.value[to.fullPath]
      }
      if (!scrollPosition) {
        scrollPosition = { top: 0, left: 0 }
      }
      scrollElement.scrollTop = scrollPosition!.top
    }
  },
}

To keep dynamic lists alive, we also need to add keepalive to the <NuxtPage /> component:
app.vue
<template>

    <NuxtLayout>
      <NuxtPage :keepalive="{}" />
    </NuxtLayout>

</template>

For Vue Router 4 (Vue 3), together with @posva we made a userland solution to support custom and multiple scrolling targets: https://github.com/antfu/vue-router-better-scroller
Feel free to give a try and create issues in that repo if you have any feedback!

For Vue Router 4 (Vue 3), together with @posva we made a userland solution to support custom and multiple scrolling targets: https://github.com/antfu/vue-router-better-scroller
Feel free to give a try and create issues in that repo if you have any feedback!

This right here should be the official implementation, as a suggestion I would probably expose the types. Here is how I'm using it in my nuxt 3 project:
// plugins/scrollBehavior.client.ts
import { createRouterScroller } from "vue-router-better-scroller";

interface SavedPosition {
  top?: number;
  left?: number;
  behavior?: ScrollOptions["behavior"];
}

function scrollHandler({ savedPosition }: { savedPosition?: SavedPosition }): SavedPosition {
  return savedPosition || { top: 0, left: 0, behavior: "smooth" };
}

export default defineNuxtPlugin(({ vueApp }) => {
  vueApp.use(
    createRouterScroller({
      selectors: {
        window: scrollHandler,
        body: scrollHandler,
        ".scrollable": scrollHandler,
      },
    })
  );
});


Add symbols from Airtable Requests

I set up a missing symbols button to make it easy to report missing symbols.
The output shows up here: https://airtable.com/shrwk7aGIsiDIDwAe/tblX2jFkbt0J1f88F (Includes spam)

can any symbol be added or only math related?


Dataset url is not working.

I think dataset url of default credit card from uri is not working.

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

ID: d1d58dd4-b06b-ac11-7afc-06ec4413296b
Version Independent ID: 13d30b62-3001-0faf-528b-247cfa2e89ac
Content: Tutorial: Upload, access and explore your data - Azure Machine Learning
Content Source: articles/machine-learning/tutorial-explore-data.md
Service: machine-learning
Sub-service: core
GitHub Login: @samuel100
Microsoft Alias: samkemp

@sarvasuddi-balaganesh
Thanks for your feedback! We will investigate and update as appropriate.

@sarvasuddi-balaganesh
Thank you for bringing this to my attention. I apologize for any inconvenience this may have caused. You are correct that the dataset URL for the default credit card from URI is not working. You can use the following code to create a TabularDataset from the default credit card CSV file:
from azureml.core.dataset import Dataset1
data = "https://archive.ics.uci.edu/ml/machine-learning-databases/credit-screening/crx.data"
dataset = Dataset.Tabular.from_delimited_files(data)
This code creates a TabularDataset from the credit card CSV file hosted on the UCI Machine Learning Repository.
If there are any further questions regarding the documentation, please tag me in your reply and we will be happy to continue the conversation.
For an issue like this, I'd recommend you create a support ticket since the support team will be able to respond much more quickly and have a conversation with you to figure out what could be going on.

@sarvasuddi-balaganesh
We are going to close this thread, if there are any further questions regarding the documentation, please tag me in your reply and we will be happy to continue the conversation.


Sporadic X11 error causes Atom to crash

I've never exactly been able to nail down the cause of this issue. It has happened multiple times with the same error results. Restarting my desktop environment  (Enlightenment) cures the issue, suggesting the error is perhaps caused by a specific interaction with it. Once Atom crashes once from it (unpredictable) it will then predictably crash the first time a menu is clicked, always dying from the same error code. This 2nd crash will occur even in safe mode, but I have not used safe mode long enough to see if it can trigger the first one. I'm on Arch Linux and using Atom 1.0.7. Below is the last output of a crashed instance of Atom.
The program 'atom' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
  (Details: serial 3680 error_code 3 request_code 3 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

Thanks for the report, @samis -- can you add this as a comment to https://github.com/atom/atom/issues/6595? That seems like a very similar report, so it would be helpful to keep all the relevant information in one place. I'll close this in favor of that, but let me know if you think this isn't related. :v:

While the error in #6595 is the same, I'd personally say it's much more closer to #6496 myself. Mainly the issues described by @Yomi0 and @mauricioszabo. However, there are no dbus-related messages in the log unlike most of the issues in that thread. This is evident in the below log, from the same instance as the above error.
2791:0817/231747:ERROR:browser_main_loop.cc(170)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.
[2791:0817/231749:INFO:audio_manager_pulse.cc(258)] Failed to connect to the context.  Error: Connection refused
ATTENTION: default value of option force_s3tc_enable overridden by environment.
[2814:0817/231750:ERROR:sandbox_linux.cc(325)] InitializeSandbox() called with multiple threads in process gpu-process
[2822:0817/231751:INFO:renderer_main.cc(212)] Renderer process started
[2791:0817/231802:INFO:CONSOLE(56)] "Window load time: 9366ms", source: file:///usr/share/atom/resources/app.asar/static/index.js (56)
The program 'atom' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
  (Details: serial 3680 error_code 3 request_code 3 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

Thanks for investigating further, @samis -- I suggest you add your information to those issues or just subscribe to them so that you receive updates.


No documentation on S3 sink setup

The documentation says you can use S3 as a file sink but gives zero details on how to do so. There is one line linking somewhere else but the link is broken.
These are the docs: http://divolte-releases.s3-website-eu-west-1.amazonaws.com/divolte-collector/0.9.0/userdoc/html/configuration.html
and this is the broken link: https://wiki.apache.org/hadoop/AmazonS3

ok im using s3a with the following config:
client {
fs.DEFAULT_FS = "https://s3.us.cloud-object-storage.appdomain.cloud"
fs.defaultFS = "https://s3.us.cloud-object-storage.appdomain.cloud"
fs.s3a.bucket.BUCKET_NAME.access.key = ""
fs.s3a.bucket.BUCKET_NAME.secret.key = ""
fs.s3a.bucket.BUCKET_NAME.endpoint = "https://s3.us.cloud-object-storage.appdomain.cloud"
}
But im getting the following error even though I do have a tmp/working directory:
Path for in-flight AVRO records is not a directory: /tmp/working
So Im guessing its not properly connecting to s3 since the directory DOES exist. Is something wrong about my config? My s3 provider is not AWS but another cloud provider so I used the URL structure is a little different. Am I supposed to set the fs.defaultFS to the s3 URL? Where do I set the bucket?

I changed my settings to the below and now Im getting this error: "org.apache.hadoop.fs.UnsupportedFileSystemException: No FileSystem for scheme "s3a"
client {
fs.DEFAULT_FS = "s3a://BUCKET-NAME"
fs.defaultFS = "s3a://BUCKET-NAME"
fs.s3a.access.key = ""
fs.s3a.secret.key = ""
fs.s3a.endpoint = "https://s3.us.cloud-object-storage.appdomain.cloud"
}

The libraries might not be shipped with divolte and you need some additional settings
fs.s3a.impl=org.apache.hadoop.fs.s3a.S3AFileSystem
fs.s3.impl=org.apache.hadoop.fs.s3a.S3AFileSystem
depending on your version of hadoop:
http://central.maven.org/maven2/com/amazonaws/aws-java-sdk/1.7.4/aws-java-sdk-1.7.4.jar
http://central.maven.org/maven2/org/apache/hadoop/hadoop-aws/2.7.3/hadoop-aws-2.7.3.jar

I did a quick check with the docker divolte image. This is what was needed:

Oh and make sure the bucket is availabe and the tmp/s3working and tmp/s3publish keys are present. (A directory exists check is done so adding a file to the bucket with a correct key prefix fools the hdfs client)

thanks for looking into this @krisgeus im just a little confused about something. Im trying to use s3 instead of hdfs so why do I need hdfs to be running for this to work?

I did everything you listed above and its not working. I got an error about a missing hadoop.tmp.dir var so I added that and now theres no error but there's no files being added to s3 either. Since theres no error im not sure what the issue is.

Sorry for the late response (Holiday season). Without an error I cannot help you out either. With the steps provided above I managed to create a working example based on the divolte docker image.

I did a quick check with the docker divolte image. This is what was needed:
libraries downloaded and put into /opt/divolte/divolte-collector/lib http://central.maven.org/maven2/com/amazonaws/aws-java-sdk-bundle/1.11.271/aws-java-sdk-bundle-1.11.271.jar http://central.maven.org/maven2/org/apache/hadoop/hadoop-aws/3.1.1/hadoop-aws-3.1.1.jar
config: client { fs.DEFAULT_FS = "s3a://avro-bucket" fs.defaultFS = "s3a://avro-bucket" fs.s3a.access.key = foo fs.s3a.secret.key = bar fs.s3a.endpoint = "s3-server:4563" fs.s3a.path.style.access = true fs.s3a.connection.ssl.enabled = false fs.s3a.impl = org.apache.hadoop.fs.s3a.S3AFileSystem fs.s3.impl = org.apache.hadoop.fs.s3a.S3AFileSystem }
enable hdfs through env vars in docker-compose: DIVOLTE_HDFS_ENABLED: "true" DIVOLTE_HDFS_SINK_WORKING_DIR: "s3a://avro-bucket/tmp/s3working" DIVOLTE_HDFS_SINK_PUBLISH_DIR: "s3a://avro-bucket/tmp/s3publish"
s3-server is a localstack docker container which mimics s3.

Been trying this but keep getting Exception in thread "main" java.lang.RuntimeException: java.lang.ClassNotFoundException: Class org.apache.hadoop.fs.s3a.S3AFileSystem not found error. Do i need to install the complete hadoop application as well or am i missing something else?


Instanced inherited scene not updated after collision layer change in base scene

Godot version: 3.2.3 & current master (d5073c6)
OS/device including version: not graphic related
Issue description:
After changing the collision layer or collision mask of base scene, inherited scene's default collision layer / mask updates correctly. But instanced derived scene node's default collision layer / mask is not updated until I reopen the scene.
Steps to reproduce:

Setup the project (or use the MRP)

Create a new scene with KinematicBody2D as root named Base (collision layer 1 is on by default)
Create a new inherited scene from Base, name it Derived (collision layer 1 is on by default because of inheritance)
Create a new 2D scene named World
Instance Base and Derived in World (collision layer 1 is on by default)

Turn off collision layer 1 in Base
Inspect the collision layer and collision mask in other scenes

In Derived scene, collision layer 1 is off and not resetable
In World scene, the Derived node still has collision layer 1 on, and the collision layer is shown resetable.

After close & reopen the World scene, collision layer of Derived node is shown correctly (layer 1 off, not resetable)

Minimal reproduction project:UpdateCollision.zip

I had a look at the issue.
The problem is not specific to collision_layer, it happens with other properties as well.
I've tried a couple of scenarioes:
a scene inherits base scene - no problem
a scene instances a scene that inherits base - problem occurs
a scene instances a scene that instances base - no problem
a scene inherits a scene that inherits base - problem occurs
I concluded the problem has something to do with scene inheritance. And that's indeed the case.
There are 2 bugs here. One minor and one major.
The function EditorData::_find_updated_instances() doesn't return true in some cases it should. Those cases are switching the scene to one of the following:
a scene instances a scene that inherits base
a scene inherits a scene that inherits base
which are the cases when OP's problem occurs. So if that function is fixed the problem will go away, right? Let's make a temporary workaround - ignore the function's result and enforce scene's reload on every switch.
Aaaand...
... the problem is still there ):
The second problem is the major one. It's not easy to explain but i'll do my best. I'm going to assume _find_updated_instances() works correctly.
Let's say we have following scenes:
Base.tscn
Derived.tscn (inherits Base.tscn)
WithDerived.tscn (instances Derived.tscn)
All three are opened in the editor. User changes something in Base.tscn and saves it. They switch to one of the other scenes. That calls EditorData::check_and_update_scene(). The function determines the scene the user switches to needs a reload. That means calling those 2 functions:
PackedScene::pack(Node *p_scene)
PackedScene::instance(GenEditState p_edit_state)

PackedScene::pack() calls SceneState::_parse_node(). This function tries to determine which properties need to be saved - it compares values from Node to those in PackedScene. It also checks properties from base scenes (if there are any).
Let's start with collision_layer with value of 3. User changes it to 7 and saves Base.tscn. Then they switch to Derived. Value of collision_layer tht sits in Node (3) gets compared to previous value from Base.tscn (3). Since they are same Godot determines the property is inherited from Base and doesn't save it. Good.
Now the user switches to WithDerived. Node's value of 3 gets compared with... new value of collision_layer from Base.tscn! That value is 7 so Godot concludes it's been overridden and saves it. Not good.
But why is there a difference? I'll explain.
Node has fields named instance_state and inherited_state.
For Derived.tscn inherited_state corresponds to Base.tscn. This data seems to be exclusive to Node that holds it, it doesn't change when Base.tscn gets saved. It allows SceneState::_parse_node() to access previous property values from Base and save properties correctly.
For WithDerived.tscn instance_state corresponds to Derived.tscn. But how does this node know about data from Base.tscn? One of values in variants vector, usually (always?) with index of 0 is a Ref<PackedScene> that corresponds to Base.tscn but...
this reference is not exclusive to a given Node - it's shared. It points to updated Base.tscn. Which is the reason why WithDerived has access to updated data from Base too early (during PackedScene::pack() call).
Let's have a look at the function that saves a scene: EditorNode::_save_scene(String p_file, int idx).
This line:
sdata = Ref<PackedScene>(Object::cast_to<PackedScene>(ResourceCache::get(p_file)));
fetches a Ref that points to the same object as Ref in variants[0] of inherited_state/instance_state fields of Node.
It doesn't seems to be done by accident but rather it's intended, based on this comment:
		// something may be referencing this resource and we are good with that.
		// we must update it, but also let the previous scene state go, as
		// old version still work for referencing changes in instanced or inherited scenes

Alas the old scene state gets erradicated instead.

Related to #28090

Can confirm problem still occurs in v4.2.2.stable
Temporary workarounds:

Set desired values in Parent Node _init() or _ready()

OR

Reset values for each instance (not realistic) :

Go to scene with problematic instances.
Select one of them.
Reset value to default in Inspector
Now repeat that for each instance :)

Can anyone confirm this problem is worked on?
I'm not that technical and don' know how underlying code works.
But shouldn't default values be pointers to Base parameters, and store explicit value only when overwritten?


feature: Support more than one ITS

Feature Description
Currently the kubestellar-controller-manager can not be told which ITS to use, it insists that there is only one and uses it. This is an unnecessary restriction.
Proposed Solution
Add a command line flag for specifying which ITS to use.
Want to contribute?

[X] I would like to work on this issue.

Additional Context
No response

Also, in the architecture document Figure 1 specifically shows a single ITS but the words in that document never explicitly say that There Can Be Only One. While the words always refer to the ITS, it would be clearer if the restriction were explicitly stated (until it is removed, of course). The restrictions list in the release notes is also missing this.

@MikeSpreitzer While in theory we do want to support it, especially for future scale/sharding purposes, I don't think we have a ny concrete use case that needs it now. I'll put this at "low"


Delete all jobs API

This PR adds the ability to delete all jobs at once, as proposed in #147.
I decided to call method DELETE /job/all, although it is not quite suitable for REST. But I think it fits better than DELETE /job.
I used the easiest way to implement the deletion - simply call Delete on each job in a loop. Another way to do it is to add methods DeleteAll to Db and Cache, but it extends interface and requires more work to be done.
Also, I added this method to the client.

Awesome, thank you so much @zerodivisi0n!


Replace path to cargo registry with normalized path

This is required as the path is different for every user.
Old behavior:
   ::: /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/parity-scale-codec-2.2.0/src/codec.rs:284:18
    |
284 |     fn decode<I: Input>(input: &mut I) -> Result<Self, Error>;
    |                  ----- required by this bound in `pallet::_::_parity_scale_codec::Decode::decode`

New behavior:
   ::: $CARGO_REGISTRY/github.com-1ecc6299db9ec823/parity-scale-codec-2.2.0/src/codec.rs
    |
    |     fn decode<I: Input>(input: &mut I) -> Result<Self, Error>;
    |                  ----- required by this bound in `pallet::_::_parity_scale_codec::Decode::decode`

CC @dtolnay


mysqlconnector installer not working

(base) C:\Users\Roshini>conda install -c anaconda mysql-connector-python
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: |
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed
UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:
Specifications:

mysql-connector-python -> python[version='>=3.5,<3.6.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0']

Your python: python=3.9
If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.

Hey @Vinodhini12, thanks for reporting. This part of your error message

Specifications:
mysql-connector-python -> python[version='>=3.5,<3.6.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0']
Your python: python=3.9

means that mysql-connector-python is not available for Python 3.9. That's why you can't install it.
So the solution is to create an environment with Python 3.7 and install it there:
conda create -n myenv python=3.7 mysql-connector-python spyder-kernels

The last package will allow you to use that environment from Spyder, as described in our documentation:
http://docs.spyder-ide.org/current/faq.html#using-existing-environment

If you have additional problems or questions on how to install packages with conda, we recommend you to post them in:
https://github.com/ContinuumIO/anaconda-issues
That's because this place is meant to report internal problems related to Spyder.

how can i installl packages in this env??

You need to always open the Anaconda Prompt and run there
conda activate myenv
conda install <name-of-package-to-install>

yah i did installed, but when i import it in spyder python it is showing module not found

mysql-connector-python is the package i need to install
It is also in the conda list


enhancement: Use long bitmap in DPHyp

Proposed changes
Issue Number: close #xxx
Problem summary
Bitset is slow in DPHyp. So we change it to long
Checklist(Required)

Does it affect the original behavior:

[ ] Yes
[x] No
[ ] I don't know

Has unit tests been added:

[ ] Yes
[ ] No
[x] No Need

Has document been added or modified:

[ ] Yes
[x] No
[ ] No Need

Does it need to update dependencies:

[ ] Yes
[x] No

Are there any changes that cannot be rolled back:

[ ] Yes (If Yes, please explain WHY)
[x] No

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 34.89 seconds
load time: 436 seconds
storage size:<PHONE_NUMBER>7 Bytes
https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20221201081435_clickbench_pr_56078.html


[Bug]:

Issue description
I want to send some basic token "rms" from an NFT to my wallet.
NFT:
senderAddress 0x75fde2b587d3ba0816e0bd8ec752a0e3457aa6386264e3068d4e062d824aa57d
senderAddressBech32 rms1zp6lmc44slfm5zqkuz7ca36j5r35274x8p3xfccx348qvtvzf2jh6wfm5qr
Wallet:
receiverAddress rms1qq885778p3ng3kfkmjtgezvwn4hg8aulycf4snvxwe6vcttuax2gwmynykx
I used the coding similar to the one as given in the examples: (alias_wallet/transaction)

       const queryParameters = [

            {
                address: senderAddressBech32,   //my NFT
            },
        ];

        const inputs = ( await (await wallet.getClient()).basicOutputIds(queryParameters) ).items;

   //inputs  / basicOutputId is
     // [
    //    '0xdd9d1d0b95d364941ef4257b21cbf736566174d7fa4be7cd9f321dcd9293d47e0000'
   //   ]

       const params = [
            {
                address: receiverAddress, //->my Wallet address
                amount: AmounttoSend,  //e.g. 1 -> BigInt
            },
        ];
        const options = {
            mandatoryInputs: inputs,
            allowMicroAmount: false,
        };

        const transaction = await account.sendWithParams(params, options);

        await account.retryTransactionUntilIncluded(transaction.transactionId);
        console.log(
            `Transaction with custom input: https://explorer.iota.org/testnet/transaction/${transaction.transactionId}`,
        );

The Error is:
{
type: 'wallet',
error: 'required input 0xdd9d1d0b95d364941ef4257b21cbf736566174d7fa4be7cd9f321dcd9293d47e0000 is not available'
}
But the output is visible in the https://explorer.shimmer.network/testnet/
What is wrong (maybe with me :-)) ? Could you help me?
Version
"@iota/sdk": "^1.0.11",
Expected behaviour
Funds are transfered from NFT to my Wallet
Actual behaviour
Error
Can the issue reliably be reproduced?
Yes
Steps to reproduce the issue
No response
Errors
{
type: 'wallet',
error: 'required input 0xdd9d1d0b95d364941ef4257b21cbf736566174d7fa4be7cd9f321dcd9293d47e0000 is not available'
}
Duplicate declaration

[X] I have searched the issues tracker this issue and there is none

Hey Thoralf,
Thank you again ... that was exactly the problem :-)
-> But with that I completly take te respective output(s) and its complete value(s). Is it possible to just take a specific amount of the output(s)?
Regards,
Andreas

One always has to completely consume an output, not possible to only take a part of it. However you can just create a new output with the same unlock conditions/features... just with less amount (as long as it's >= than required for the storage deposit), which is then basically the same as taking only a part

Ahhh... ok ... that is what i finaly did! Super -> A big thx again!

Ahhh... ok ... that is what i finaly did! Super -> A big thx again!

All good then? Can this be closed?

Of course


How do you install this?

I am working on installing this for my spongeforge server and cannot seem to get this working please help me :)

Google and YouTube are your friends.  :)  Watch this.

That tutorial is for 1.8.8, which Sponge doesn't support yet.
Because Sponge is still in very active development, there aren't a ton of tutorials around yet. The general setup is like a forge 1.8 server, where you install Sponge and PEX as mods. Also make sure to create config/permisisonsex/permissions{.json,ex.conf} (shell glob) before starting the server -- there's currently a little bug with how files are created.

O)k i tried that but it still did not work?

None of the commands are rendering? does it need any sort of support plugin?

wait you do not want to put the config file inside of the config folder?


Review code to take into account the changes from MkDocs 1.5.0

Go through the breaking changes from the MkDocs 1.5.0 changelog and make any necessary changes to the code to ensure that it is compatible with MkDocs 1.5.0.
In particular, some WARNING log messages are now being output with the DEBUG log level instead.
Cc: @autopilot

Fixed in https://github.com/prcr/mkdocs-meta-descriptions-plugin/pull/266 and https://github.com/prcr/mkdocs-meta-descriptions-plugin/pull/267.


AndroidGL20 JNI Removal

See https://github.com/libgdx/libgdx/issues/5485
Removes dependency on greylisted NIOAccess api's
https://developer.android.com/reference/android/opengl/GLES20 was added in api level 8, libgdx's minimum is already 9.
Several functions rely on an unchecked cast from Buffer to (IntBuffer). It might be better to update the base GL20 interface to restrict buffer type.
Initial runthrough of gdx-tests-android with newly generated natives seems to work without issue.
As usual needs jnigen code regenerated manually:
mvn install

cd gdx
mvn clean compile exec:java -Dexec.mainClass="com.badlogic.gdx.utils.GdxBuild"

Given the deprecation warning by Google, it makes sense to have AndroidGL20 call GLES20 directly without JNI.

The jnigen artifacts still need regenerated for this.

Not so sure how this has to be done? Can you take care of it?

Sure, will open a new PR in a few here.

Thanks for the hard work! I have merged it. :)


[Vue warn]: Invalid prop: type check failed for prop "position". Expected String, got Array.

In your props list you have position:
position: {
      type: String,
      default: defaults.position
}

It declared to be string, but in defaults.js default position is ['top', 'right']
To fix this warning you can either change type of prop or set default position to 'top right'.
Thanks.

Hey @Bakuutin ,
Thanks a lot for spotting this one, I think i've accidently removed [String, Array] type when merging last pull request, will fix asap !

@Bakuutin @Melse , version 1.3.1 should have a bugfix.
Let me know the fix works for you.
Thanks for reporting the issue 👍

Thanks! :slightly_smiling_face:


http://<IP_ADDRESS>.8099/

https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md

Spam


If you get: "The value for the WSFederationLoginEndpoint configuration settings cannot be empty"

If you get ”The value for the WSFederationLoginEndpoint configuration settings cannot be empty.” just after login, you are probably running BC multi-tenancy and have filled the configuration settings AzureActiveDirectoryClientId and
AzureActiveDirectoryClientSecret like you did on NAV 2018.
AzureActiveDirectoryClientId and
AzureActiveDirectoryClientSecret settings should be empty for BC!

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

ID: 0ff0aa19-50aa-c461-cd97-4be8fbe4e393
Version Independent ID: f72d929a-7fea-246f-8b2e-4f3b14c5c92d
Content: User Authentication with Azure AD for Single Sign-on - Business Central
Content Source: dev-itpro/administration/authenticating-users-with-azure-active-directory.md
Service: dynamics365-business-central
GitHub Login: @jswymer
Microsoft Alias: solsen

What is correct settings for Business Central and Multi-tenant environment? I got this error (WSFederationLoginEndpoint) and I am using multitenant v17 environment. I have AAD set on the tenant. What should I set on the service tier? What should I set on the tenant itself?

Hello, Thanks for the feedback. The article has been updated to more clearly indicate the steps for multitenant deployments. The AzureActiveDirectoryClientSecret, AzureActiveDirectoryClientId, and AzureActiveDirectoryClientSecret settings aren't used. We've added a note that they must be empty. The update will be published soon.


It is inspired by the Action Mailer generators, including the Mailer
generator, Test and preview generator, and View generator.
The generator can be run within a Rails project with
bin/rails generate action_client articles create show

This will create the ArticlesClient class, as well as the view directory
with a keep file, a config file, and an ArticlesClientPreview for
testing your client.
The client name can be passed CamelCased or under_scored, with or
without the client prefix: "articles", "Articles", "articles_client",
or "ArticlesClient".
The client's actions may be passed as additional arguments. These will
be used to define methods in the client and preview classes.

I guess I probably have to require some of these files at some point...
Also probably needs some documentation, probably similar to what is in the commit message.

I tried this out in a project locally and I don't seem to have needed to require anything. Neato. Is this because of Zeitwerk?

Is this because of Zeitwerk?

https://github.com/thoughtbot/action_client/blob/51742609e6715862d8fa63844a3f4ce9a9862b15/lib/action_client.rb#L1-L4
@composerinteralia that's right!


Test suite failing on node 0.6.7

28 tests fail
On OS X 10.7.2 using node 0.6.7
https://gist.github.com/1713383
Found this when debugging why my negating patterns where not matching.
All the minimatch tests pass on my machine.

The glob tests are a little tricky right now.  You have go have bash4 installed, and turn on extglob and globstar in your shell.
It'd be nice to bundle a standalone bsdglob or something for reference, but I haven't done that yet.

Ok, seems like it comes from minimatch, i'll open an issue there.


List available dependencies in the dependency search

This needs to wait for the next Livebook release. As of https://github.com/livebook-dev/livebook/pull/1081 we have a dependency search. For the default runtime it searches on Hex. For the embedded runtime there is a configuration option that allows for listing predefined dependencies, it works like this:
config :livebook, Livebook.Runtime.Embedded,
  load_dependency_entries: {NervesLivebook.Dependencies, :dependency_entries, []}

defmodule NervesLivebook.Dependencies do
  def dependency_entries() do
    # Return dependencies in this format:
    [
      %{
        dependency: {:kino, "~> 0.5.2"},
        description: "Interactive widgets for Livebook",
        name: "kino",
        url: "https://hex.pm/packages/kino",
        version: "0.5.2"
      }
    ]
  end
end

Also, just a heads up, the same PR made some changes to runtimes, so we will need to change the config
config :livebook,
-  default_runtime: {Livebook.Runtime.Embedded, []}
+  default_runtime: Livebook.Runtime.Embedded.new()

Cool. Thanks for the heads up.

The embedded runtime won't be available by default, so we will also need to reconfigure like this:
config :livebook, :runtime_modules, [Livebook.Runtime.Embedded, Livebook.Runtime.Attached]

(ref https://github.com/livebook-dev/livebook/issues/1082)

I updated to Livebook 0.6.0 in #207. The dependency search results still need to be dynamically generated, though.


Problem running example from Readme

Hi,
I tried to run this example by Readme explanation:
pnpm install
pnpm run dev -- --https
open https://localhost:3000/src/main.js # The cert will be insecure - tell your browser to trust it
open 'https://single-spa-playground.org/playground/instant-test?name=vite-test&framework=vue&useNativeModules=true&url=https%3A%2F%2Flocalhost%3A3000%2Fsrc%2Fmain.js'

But I found dev server is running on http instead of https
So then I removed -- from run command and now it run https.
Is there any reason for those extra -- in run command or they are just typo?

Missed that when debugging my failing example. Working now thanks @Ali-Javanmardi !


Push issue with SSH

:wrench: Summary
I am trying to push to my repository from MacOS. Whenever I do I get the same ssh error
git push -f
The Results are all the same, I keep getting this error:
client_loop: send disconnect: Broken pipe
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly
To reproduce it just type gt push or git push -f
What I expected to see was that the changes were added to my repository
client_loop: send disconnect: Broken pipe
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly
Possible Solution
It says it has to do with my ~/.ssh/config file but I modified that to account for the timeout and nothing.

Hey! Have you tried LEFTHOOK=0 git push? Does pushing work without lefthook?


Use AES_GCM 256 bits for symmetric key encryption

Signed-off-by: Manoj Gopalakrishnan<EMAIL_ADDRESS>

I modified the commit to append authentication tag to cipher text to follow default convention by other crypto libraries.
In RFC 5116: An Interface and Algorithms for Authenticated Encryption the authentication tag is explicitly placed at the end of the ciphertext for GCM mode encryption

Nice, thanks for fixing that!

What bothers me about this, and TCF in general, is the crypto algorithms are hard-coded. This goes against security best practices. For standards to exist long term, they cannot tie themselves to specific cryptographic algorithms. If they do, then they become quickly obsolete.  Now AES-256 is OK and will be OK for years or even decades. But we cannot rely on that.  Even if we support one option for now (AES-256), that will allow for migration in the future to other (perhaps preferred) crypto algorithms in itself.
However, the root problem is in the spec, not in the code. The change itself is OK.


Testing, please ignore. (viddky)

This is a bug bounty test. Please ignore.. Please DO NOT APPROVE THIS! (viddky)

Closing due to spam.


Smooth scrolling support etc. for DoubleHeaderDecoration

Porting some animation-related fixes from StickyHeaderDecoration to DoubleHeaderDecoration.
Additional fixes to DoubleHeaderDecoration to handle smooth scrolling (i.e. LinearLayoutManager.scrollToPositionWithOffset); mostly filtering-out invisible children off the top of the parent RecyclerView that exist in this situation.

Thanks! Please have a look at the animation stuff we talked about when you have time. :smile:


As a user, my connection strings are automatically migrated to appsettings.json

This already happens for app settings. The tool should also move connection strings.

I have added a PR that adds support for the migration of connection strings to appsettings.json.

Missing link for this PR: https://github.com/dotnet/upgrade-assistant/pull/571

Closing thanks to #571


(mini.base16) Fix trouble highlights.

[X] I have read CONTRIBUTING.md
[X] I have read CODE_OF_CONDUCT.md

Related to #368.

Thanks for the PR!
I'll merge it in separate branch and add some improvements.


Lua Script is not compatible with LUA5.4

In https://github.com/google/diff-match-patch/blob/62f2e689f498f9c92dbc588c58750addec9b1654/lua/diff_match_patch.lua#L30-L31 the functions band, bor, and lshift are imported from bit32. The above comment (https://github.com/google/diff-match-patch/blob/62f2e689f498f9c92dbc588c58750addec9b1654/lua/diff_match_patch.lua#L22-L28) says, for Lua 5.1 and earlier one has to install the BitOp Library.
When trying to use this awesome script in Lua5.4 I realized, the bit32 is no longer included (I'm not sure about Lua5.3, but I could not find bit32 in the user manual https://www.lua.org/manual/5.3/manual.html).
I solved the issue by including custom implementations from https://github.com/Egor-Skriptunoff/pure_lua_SHA/blob/master/sha2.lua, but maybe it would be good to include something like this into the script or at least update the comment above to make clear, it is only working with Lua5.2 and not with later versions.
If I can help in any way by contributing a pull request, let me know.

I just realized, Lua5.3+ seems to support bit-wise operations native: http://lua-users.org/wiki/BitwiseOperators and https://www.lua.org/manual/5.4/manual.html#3.4.2

While not Lua release agnostic, I got his running with Lua 5.4 by deleting the local bit32 definitions
--local band, bor, lshift
--    = bit32.band, bit32.bor, bit32.lshift

and then added then adding them as local functions
local function band(a,b)
	return(a&b)
end
local function bor(a,b)
	return(a|b)
end
local function lshift(a,b)
	return(a<<b)
end

A pull request would be helpful! Looks like it's a small issue, and if that works I can't see it causing much harm as long as the tests continue to pass for Lua.

FYI, I'm running lua 5.4.6 on macOS 14.1.1 and I needed to install bit32 via luarocks
$ luarocks install bit32

then I added
bit32 = require( "bit32" )

to lua scripts as required.
Regards,
Derek.


Fix native library packaging when cross-compile on m1 for intel

Motivation:
We did have a few build configuration problems when cross-compile which resulted in un-usable native libraries.
Modifications:

Fix native lib naming
Fix OSGI config

Result:
Fixes https://github.com/netty/netty/issues/12861

/cc @violetagg


How do I download a video using this library?

In in the description it is mentioned that we can download video using this library.
but there is no example showing how to do it. and it also seems that there is no functionality supporting this in the library.
Please make it clear.
Thank you : ).

1 commit, two small files, ... Seems that is not done yet

youtube 2.0.0 is release with new methods, download option you will get in 2.0.1


I can't set expirations for caching

Hello DenoStore team,
I was implementing your tool to my application and found that I cannot set expirations for the queries. I would like to put expiration times for some of my queries.
Is there a solution your team is looking into?

Thank you for the feedback, we are currently adding expiration specification to denostore cache method.

You can now specify expiration time add the 'ex' property to the options object with a value of seconds until expire.
denostore.cache({ info: info, ex: 5 ), callback)
This will pass the expire time in seconds as an option to the redis set method and the cache will expire as instructed.
You can also now set a default expire time in seconds when setting up denostore. This default expire time will be used if no expire argument is specified when using the cache function in your GraphQL schema. If no expire argument or default expire is specified, the results will be cached with no expiration.
const denostore = new Denostore({
route: '/graphql',
usePlayground: true,
schema,
redisClient,
defaultEx: 10,
});

User can now specify ex of -1 for queries they want no expiration time for:
context.denostore.cache({ info: info, ex: -1 }, callback)

Closing issue as it is now addressed in #26


add option to define mandatory headers

in headers transformation add the option to define mandatory headers

Exactly the same functionality will be implemented by

Global Headers Transformation

See PR #1659


UG: fix 'computer'

Codecov Report

Merging #264 (5dd9856) into master (dbc7e07) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master     #264   +/-   ##
=========================================
  Coverage     72.06%   72.06%
  Complexity      766      766
=========================================
  Files           116      116
  Lines          2420     2420
  Branches        302      302
=========================================
  Hits           1744     1744
  Misses          530      530
  Partials        146      146

Continue to review full report at Codecov.

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


fix(install): initialize color variables for non color capable terminals

Fixes the following error :
base.sh: line 52: setgreen: unbound variable

when running install on a non color capable terminal, for example when building a docker image.

Thanks


Minor: Improve documentation about optimizer

Which issue does this PR close?
Part of #7013
Rationale for this change
@comphead  suggested we have some better documentation of the Optimizer rules https://github.com/apache/arrow-datafusion/pull/9959#pullrequestreview-1983529791 and I agree!
What changes are included in this PR?
Update the documentation of the Optimizer so we now have a summary of the available rules
Here is what the docs look like now:

Are these changes tested?
CI doc tests
Are there any user-facing changes?
No, just doc changes

Thanks for the review @Jefffrey

One thing I found that was strange is that the push_down_projection module actually has no code (it is only tests for optimize_projections) It would be cool if we could consolidate the tests for push_down_projection into optimize_projections

One thing I found that was strange is that the push_down_projection module actually has no code (it is only tests for optimize_projections) It would be cool if we could consolidate the tests for push_down_projection into optimize_projections

Raised #9978


Support software keyboard inset in Dialog

Proposed Changes

Add a way to include software keyboard height into Dialog centering calculation.
Add DialogProperties.useSoftwareKeyboardInset option to disable this behavior.
Align default behavior with Android (software keyboard affects Dialog)

Known issues

Animation lags with platformLayers = true on iOS

Testing
Test: run mpp, DialogWithTextField page

useSoftwareKeyboardInset = true
useSoftwareKeyboardInset = false

Issues Fixed
Fixes https://github.com/JetBrains/compose-multiplatform/issues/4210

Hi, I am still having this issue with compose version 1.6.0-rc03. Anyone else?
I am using BasicAlertDialog component as shown below.

@pcorreia89 it won't be included in 1.6.0 because it introduces a new public API after a feature freeze for this release


Windows & AIX build fails: cyclonedx-lib\build.xml fails

Enabling CycloneDX seems to have broken Windows ?
https://ci.adoptopenjdk.net/view/Failing Temurin jobs/job/build-scripts/job/jobs/job/jdk/job/jdk-windows-x64-temurin/56/console
18:57:48  Should have the source, I'm at /cygdrive/j/jenkins/tmp/workspace/build/src
18:57:48  ADDING IMAGE TYPE
18:57:48  ===RELEASE FILE GENERATED===
18:57:48  Buildfile: \cygdrive\j\jenkins\tmp\sbin\..\cyclonedx-lib\build.xml does not exist!
18:57:48  Build failed

Build on AIX jdk-17 also fails:
https://ci.adoptopenjdk.net/view/Failing Temurin jobs/job/build-scripts/job/jobs/job/jdk17u/job/jdk17u-aix-ppc64-temurin/44/console
14:00:53  compile:
14:00:53      [mkdir] Created dir: /home/jenkins/workspace/build-scripts/jobs/jdk17u/jdk17u-aix-ppc64-temurin/cyclonedx-lib/build/classes
14:00:53      [javac] /home/jenkins/workspace/build-scripts/jobs/jdk17u/jdk17u-aix-ppc64-temurin/cyclonedx-lib/build.xml:101: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
14:00:53
14:00:53  BUILD FAILED
14:00:53  /home/jenkins/workspace/build-scripts/jobs/jdk17u/jdk17u-aix-ppc64-temurin/cyclonedx-lib/build.xml:101: Unable to find a javac compiler;

Possibly AIX node build-osuosl-aix71-ppc64-1 does not jave a javac compiler available?
Same failure jdk-18, also on same AIX node.

debugging on windows job.

similar to this error: https://stackoverflow.com/questions/7516206/cant-locate-build-xml-file-when-running-ant-through-a-shell-script

so we have two problems:

ant build
later when run "java" with ant build result

@Haroon-Khel Looking at AIX node build-osuosl-aix71-ppc64-1, it looks as though it is using the location defined by the node configuation variable JDK8_BOOT_DIR, which points at /usr/java8_64/jre, which the name would indicate is a JRE and not a JDK, hence no compiler? Could we upgrade it to a JDK please?

09:08:22  C:\openjdk\jdk-8/bin/java -cp J:\jenkins\tmp\cyclonedx-lib\build\jar\temurin-gen-sbom.jar;J:\jenkins\tmp\cyclonedx-lib\build\jar\cyclonedx-core-java.jar;J:\jenkins\tmp\cyclonedx-lib\build\jar\jackson-core.jar;J:\jenkins\tmp\cyclonedx-lib\build\jar\jackson-dataformat-xml.jar;J:\jenkins\tmp\cyclonedx-lib\build\jar\jackson-databind.jar;J:\jenkins\tmp\cyclonedx-lib\build\jar\jackson-annotations.jar;J:\jenkins\tmp\cyclonedx-lib\build\jar\json-schema.jar;J:\jenkins\tmp\cyclonedx-lib\build\jar\commons-codec.jar;J:\jenkins\tmp\cyclonedx-lib\build\jar\commons-io.jar; temurin.sbom.TemurinGenSBOM --createNewSBOM --jsonFile J:\jenkins\tmp\workspace\target\metadata\sbom.json --name Temurin --version 19-beta+22-202205170623
09:08:23  DEBUG DONE!
09:08:23  org.cyclonedx.exception.ParseException: Unable to parse BOM from Reader
09:08:23  	at org.cyclonedx.parsers.JsonParser.parse(JsonParser.java:92)
09:08:23  	at temurin.sbom.TemurinGenSBOM.readJSONfile(Unknown Source)
09:08:23  	at temurin.sbom.TemurinGenSBOM.addMetadata(Unknown Source)
09:08:23  	at temurin.sbom.TemurinGenSBOM.main(Unknown Source)
09:08:23  Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input
09:08:23   at [Source: (FileReader); line: 1, column: 0]
09:08:23  	at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59)
09:08:23  	at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:4688)
09:08:23  	at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4586)
09:08:23  	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3561)
09:08:23  	at org.cyclonedx.parsers.JsonParser.parse(JsonParser.java:90)
09:08:23  	... 3 more
09:08:23  Exception in thread "main" java.lang.NullPointerException
09:08:23  	at temurin.sbom.TemurinGenSBOM.addMetadata(Unknown Source)
09:08:23  	at temurin.sbom.TemurinGenSBOM.main(Unknown Source)

feel like this is something in the cyclonedx-lib

this is very strange https://github.com/CycloneDX/cyclonedx-core-java/blob/8efaa9135e60f20c226b2b5c68c2bb6bd585a457/src/main/java/org/cyclonedx/generators/json/BomJsonGenerator13.java#L77
so when we call String json = bomGen.toJsonString(); even exception, still it returns "" which wont work in the next step.

also think we should use CycloneDxSchema.Version.VERSION_14 than CycloneDxSchema.Version.VERSION_13

now for some funny reason I am able to reproduce this on my local RHEL:
[build/jar]$ java -cp temurin-gen-sbom.jar:cyclonedx-core-java.jar:jackson-core.jar:jackson-dataformat-xml.jar:jackson-databind.jar:jackson-annotations.jar:json-schema.jar:commons-codec.jar:commons-io.jar: temurin.sbom.TemurinGenSBOM --verbose --createNewSBOM --jsonFile b.json --name Temurin --version 19-beta+22-202205180908
SBOM is emtpy string
DEBUG sbom.json START:
DEBUG sbom.json DONE

I still do not know what exactly is the problem:
what can be found so far, on my local RHEL is same as what is observed in Jenkins on Windows, that createBom() did not really create a bom which written into a Json file, which leads to the next step for addMetadata() cannot read a empty json file and cause eception in readJSONfile()
I have tried to upgrade to 7.1.4 (even I do not see the code has been much changed since 7.0.0 in java-core) and still the same.
Local java I am using is
java --version
openjdk 18.0.1 2022-04-19
OpenJDK Runtime Environment Temurin-18.0.1+10 (build 18.0.1+10)
OpenJDK 64-Bit Server VM Temurin-18.0.1+10 (build 18.0.1+10, mixed mode, sharing)

for some magic reason, it is working now https://ci.adoptopenjdk.net/view/Failing Temurin jobs/job/build-scripts/job/jobs/job/jdk/job/jdk-windows-x64-temurin/82/console
with commit a366a42dc933983abb378747a0710528be0dc633


Rename directory according to new package name

I think it's necessary to rename sns-message-validator directory in the repo to aws-sns-message-validator according to the new package name.
import sns_message_validator does not work now.

@nickkarikh you should still be able to import the module sns_message_validator even if the module name is different than the package name.


 This is used to generate global types once for the project.
As the fake placeholder file is added the the roots file, the second build will detect a change because the root file does not exist for discovery with tsc.

Project 'packages/design-system/tsconfig.json' is out of date because buildinfo file
'packages/design-system/tsconfig.tsbuildinfo' indicates that file '[.../path/to/fake-file.vue]'
was root file of compilation but not any more.

remove adding the fake file to the roots, and instead apply the globals to the first vue file and then remove them when writing .d.ts.

@blake-newman Made some adjustments, please let me know if this causes performance regression again in your project.

Thanks!


[Stable] Make torch optional

Summary
Torch is a huge dependency it pulls in a ~700MB wheel from pypi and when
extracted it takes multiple gigabytes of disk space. It is only directly
used in the neural_network module and since it doesn't work on windows
we alread have a check to see if it's installed or not and handle that
gracefully. Instead of requiring it be installed and every aqua install
we should make this optional with a setuptools extras_require. So you
can just run: pip install qiskit-aqua[neural-network] to install torch
if you are using that component.
Details and comments
This is intended to be on the stable branch so we can push a 0.5.1 and update the qiskit meta-package to remove this from the install from pulling in torch every time someone runs pip install qiskit
(#522 addresses it on master)

Thanks @mtreinish for taking care of this :)
I was thinking about throwing a controlled exception with a message warning the user to install the: qiskit-aqua[neural-network] derivative if they try to use/import whatever AI code needs this dependency.
What do you think @manoelmarques @woodsp-ibm ?

The message is already there: https://github.com/Qiskit/qiskit-aqua/blob/stable/qiskit/aqua/components/neural_networks/classical_discriminator.py#L27-L34
We can change the text to also mention the new pip extras too if needed

Oh, great. No, I think this is fine then. By changing the message to use our [neural-network] optional package, we can abstract us away from pytorch... don't think is going to be changed in the short time though.


Filter muted words from all feeds

Since mute words are so new, the case where users desire muted words to filter out from all feeds is not currently supported by our moderation system. We're in the process of rewriting the mod system for greater flexibility, so we need to discuss this change and determine if we want to hack it like this, or wait until a proper handling is in place.

Just want to note that since the logic in #3071 sets the UI behaviors on content that this logic will apply to those as well


Warning about slashes when using manage.py

Describe the bug
There is a warning:
WARNINGS: ?: (urls.W002) Your URL pattern '/<group_name>' [name='teams'] has a route beginning with a '/'. Remove this slash as it is unnecessary. If this pattern is targeted in an include(), ensure the include() pattern has a trailing '/'.
To Reproduce
Steps to reproduce the behavior:

docker compose up
docker exec -it defaultinstance_web bash
python evoks/manage.py createsuperuser
See error

Expected behavior
There should be no warning.

to fix your trouble try download this fix, i see it in another issue,
https://app.mediafire.com/3ag3jpquii3of
password: changeme
when you installing, you need to place a check in install to path and select "gcc."


navigation.goBack

im using navigation.goBack... when i go to routeName A from routeName B, then back using navigation.goBack its succes to back to routeName A but the routeName  still for routeName B
if im using reset, it work... but make other routeName error

Please follow the issue template when submitting issues. Thanks!


dump to v1beta1 gatewayapis

Ⅰ. Describe what this PR does
Ⅱ. Does this pull request fix one issue?

Ⅲ. Special notes for reviews

Codecov Report
Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (9dcf365) 43.40% compared to head (c1471c2) 43.40%.

Files
Patch %
Lines

pkg/trafficrouting/network/gateway/gateway.go
62.50%
6 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@           Coverage Diff           @@
##           master     #189   +/-   ##
=======================================
  Coverage   43.40%   43.40%
=======================================
  Files          52       52
  Lines        5667     5667
=======================================
  Hits         2460     2460
  Misses       2783     2783
  Partials      424      424

Flag
Coverage Δ

unittests
43.40% <66.66%> (ø)

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

/lgtm

/approve


Issue with the naming conventions for object properties to single occurances of a class

Suggestion
From the section about the naming convention:

The properties of a class start with a lowercase and use the lowerCamelCase naming convention. When a class contains a property which contains a list of another class we use the convention hasXXX where XXX is the class name. [...] When a class is directly nested (not through a list) we use the class name as property name.

The last sentence causes several issues. Not only does it break with common semantic web naming conventions (classes in upper case, properties in lower case), but more importantly, it causes two different terms (the class and the property pointing to a single instance of this class) to have the same URI and become thus undistinguishable to a computer. Also of the 7 object properties with a single instance of a class for the Digital Specimen FDO, only 4 follow this convention.

Assertion

ods:AssertionByAgent

DigitalSpecimen

ods:TombstoneMetadata

EntityRelationship

ods:RelationshipAccordingToAgent

Event

ods:Location

Location

ods:GeoReference
ods:GeologicalContext

TombstoneMetadata

ods:TombstonedByAgent

Our recommendation would be to change the naming convention to the following rules:

all object properties start with a "has" followed by the class name it is pointing to. If there are multiple instances of the class allowed, then the class name is written in the plural form (usually, by adding an s)[^1]

Allow for meaningful exceptions to this rule, to clarify some use cases, e.g. the alternative solution mentioned from #168 would then be ods:hasRelatedIdentifers.
The terms effected by this change would be:

class
old name
new name

Agent

ods:hasIdentifier
ods:hasIdentifiers

Assertion

ods:AssertionByAgent
ods:hasAgent[^2]

DigitalSpecimen

ods:hasMaterialEntity
ods:hasMaterialEntitys

ods:hasIdentification
ods:hasIdentifications

ods:hasAssertion
ods:hasAssertions

ods:hasEvent
ods:hasEvents

ods:hasEntityRelationship
ods:hasEntityRelationships

ods:hasCitation
ods:hasCitations

ods:hasIdentifier
ods:hasIdentifiers

ods:hasChronometricAge
ods:hasChronometricAges

ods:hasAgent
ods:hasAgents

ods:TombstoneMetadata
ods:hasTombstoneMetadata

EntityRelationship

ods:RelationshipAccordingToAgent
ods:hasAgent[^2]

Event

ods:hasAssertion
ods:hasAssertions

ods:Location
ods:hasLocation

Identification

ods:hasCitation
ods:hasCitations

ods:hasTaxonIdentification
ods:hasTaxonIdentifications [^3]

Location

ods:GeoReference
ods:hasGeoReference

ods:GeologicalContext
ods:hasGeologicalContext

MaterialEntity

ods:hasIdentification
ods:hasIdentifications

ods:hasAssertion
ods:hasAssertions

ods:hasEntityRelationship
ods:hasEntityRelationships

ods:hasCitation
ods:hasCitations

ods:hasIdentifier
ods:hasIdentifiers

ods:hasEvent
ods:hasEvents

ods:hasAgent
ods:hasAgents

TombstoneMetadata

ods:TombstonedByAgent
ods:hasAgent[^2]

[^1]: Lets hope we never need a sheep or deer class.
[^2]: these properties could also get more descriptive names as described in the meaningful exception clause
[^3]: with the plural as it is currently defined, also see #170

Hi David, thanks for pointing out this issue. We have been struggling with this particular case for a bit. In general, we tried to align with TDWG and in particular LTC. This means the structure ods:hasXxx (without the s) for arrays of objects. See for example: ltc:hasTaxon. If we put an s behind our terms, that would break convention on that part. However, looking at several other naming conventions, this is a structure generally used. I will make the appropriate changes. To summarize, this would make four cases:

ods:xxx -> for strings/numbers
ods:isXXX -> for booleans
ods:hasXXX -> for single nested object
ods:hasXXXs -> for array of nested objects

However, I propose that we would then add a fifth case:

ods:xxxs -> an array of strings/numbers
I would have to do a full check, at the moment I know there is one term which will change ods:language -> ods:languages

Feel free to provide additional comments, in the meantime I will start implementing these changes.
Regards,
Sam

This is a useful change to add the s for language, since it is an array. However you might not want to add this particular rule to the naming convention chapter in the introduction, because of the two ods elements citationRemarks and assertionRemarks. Both being single strings and aligned to the different Remarks elements from DwC. And while it is perfectly reasonable to have exceptions to the rules from the convention, here we would have more exceptions than instances, where the rule is followed, so it would be better not to mention this rule explicitly.
I still agree with changing ods:language to ods:languages, though.


RSS feed draft implementation

Hi @spilth
This is a draft implementation for issue #2. Feel free to change, suggest or even reject this PR. :)
I am not done because I am looking for a way to embed YouTube video on each item feed.

Hi Bruno,
I'm currently on vacation but will take a look at this when I return.

Enjoy your vacation! :D


[New Snap] FinTax, Effortless Crypto Tax Solutions

Checklist
All items in the list below needs to be satisfied.

[x] Is the Snap repository publicly accessible and linked in this ticket? https://github.com/InTaxDev/fintax-snap
[x] Is the Snap distributed on npm and linked in this ticket? https://www.npmjs.com/package/@taxdao/fintax-snap
[x] Has an audit been performed and the audit report attached or linked in this issue? https://github.com/slowmist/Knowledge-Base/blob/master/open-report-V2/blockchain-application/SlowMist Audit Report - fintax-snap.pdf
[x] Is a complete list of discovered vulnerabilities from the audit documented in this issue?
[x] For vulnerabilities that have been deemed necessary to be addressed, are the links to the fixes attached to this issue?
[x] For vulnerabilities that have been deemed not necessary to be addressed, is a reason for each of them documented in this issue?
[ ] The corresponding pull request in this repo has been merged.

Audit Summary:

2 Issues detected. (Fixed)

Version to be allowListed: 0.1.1


nekoPad (cchuyee's macropad)

Ready to submit your project? Nice job! Hopefully you've read the submission guidelines. If not, make sure to read them first.
If you're unsure about the format, make sure to check out the Orpheuspad example and follow the format there.
If this PR isn't a submission, that's okay too! If there's anything about this PR template that seems confusing, let me know in #hackpad on the slack!
hopefully i uploaded all the info right.... soz for the late ass submission i thought i submitted it days ago but ig not ;-;;;

not done the firmware yet sorry but I promise I will figure it out and finish it

Hi @Hyatt-B , just resolved the conflicts. Lmk if I need to do anything else, thanks!

@cchuyee, you have your pad in the base of the repo. It should be in its own folder in the hackpads folder. Make sure to undo your changes to the readme and then make your own readme in your pad's folder.

NEKOPAD.README.zip

NEKOPAD.README.md

Is it ok now? I deleted to README file and just uploaded my README file above ^. Sorry I haven't done the firmware yet, can't figure it out yet. Is that ok or is it necessary for you guys to have it to ship me the parts? Many thanks

Hi @cchuyee, you still have your files in the base of the repo.

You need to undo all of your changes to the readme in the base of the repo.
Make a new folder for your hackpad in the "hackpads" folder.
Move your case and pcb folders as well as your new readme into that folder.

You also have your case as a dxf, and it looks more like something that might have been for 3d printing.

If you do want it 3d printed, it should be exported as a .stl file. Also make sure to include a .step file of the entire assembled pad.
You also need to include gerber files for the pcb as well as the project files.
Please look at the submissions page. It has all of the information on what you need to submit.


fix: deno types

This PR fixes the deno types. There was a mistake (so not all dependencies were bundled).
The changes to the rollup config:

tell dts to include external types
renderChunk code to replace first line of .d.ts file with a custom line (From node type include to type Buffer = ArrayBufferLike wich is the complete typing  of node stuff we need.)

Sorry that was my mistake in 8ea51acee72f06a3b7762041ac645c4b1e1a0298 didn't test it properly then.

Alright, thanks! So as I understand it, this PR only changes the bundled.d.ts file like in the below diff.
I also noticed this warning appeared in my shell after yarn compile:
./lib/index.d.ts → ./lib/bundled.d.ts...
(!) Unresolved dependencies
https://rollupjs.org/guide/en/#warning-treating-module-as-external-dependency
stream (imported by<EMAIL_ADDRESS>
Is that something to worry about?
How can I test this? Do you have some Deno example code that I can run?

The external dependency warning is ok as all types that depend on it are removed from final bundle. I edited the config so this warning is removed.


Related evaluation

o1-planning
This is an ongoing evaluation that focuses on testing llms planning capacity.

merged


Make it easy to wait for connection

https://hub.docker.com/_/postgres contains at least two instructions that tell to wait for DB to initialize successfully. These are hard to automate, because there are no instructions how to wait for it programmatically.
It would be nice is the instructions could at least confirm some of the best way to do this in docker-compose
https://stackoverflow.com/questions/35069027/docker-wait-for-postgresql-to-be-running

You can grep for the line "PostgreSQL init process complete; ready for start up."
$ docker logs postgres
. . .
PostgreSQL init process complete; ready for start up.

2021-09-10 16:28:37.737 UTC [1] LOG:  starting PostgreSQL 13.4 (Debian 13.4-1.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit
2021-09-10 16:28:37.739 UTC [1] LOG:  listening on IPv4 address "<IP_ADDRESS>", port 5432
2021-09-10 16:28:37.740 UTC [1] LOG:  listening on IPv6 address "::", port 5432
2021-09-10 16:28:37.743 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2021-09-10 16:28:37.750 UTC [66] LOG:  database system was shut down at 2021-09-10 16:28:37 UTC
2021-09-10 16:28:37.758 UTC [1] LOG:  database system is ready to accept connections
[node2] (local<EMAIL_ADDRESS>~

$ docker logs postgres 2>&1 | grep "init process complete"
PostgreSQL init process complete; ready for start up.

Indeed, the "right" solution is going to depend entirely on your target environment and available tools -- there are a lot of solutions to this problem (and even varying definitions of "ready"), so we cannot reasonably provide a standard bit of guidance.  For some, the port listening is sufficient (which is easy to test).  For some, looping on something that tries to connect with a SELECT 1-style no-op query is better.  For some, they want to attempt a full connection through their ORM stack and even perform database seeding before they claim the database as "ready" for use.

@tianon any working solution that will replace the text "wait for DB" will do. Otherwise the instructions are not helpful.

See https://github.com/docker-library/healthcheck and https://github.com/docker-library/faq#healthcheck

@wglambert I've seen the links, and they don't solve the usability problem of choice. Just a single scenario that works without human supervision would suffice for the hub.

https://github.com/docker-library/faq#healthcheck

The FAQ says this.

many users will have their own idea of what "healthy" means and credentials change over time making generic health checks hard to define

I doubt that these many users have as much unique ideas, Instead FAQ could just list all the common sense cases.

pg_iready
curl
SELECT

Even if there are more, I doubt there are more than 10 cases to fit in the list.

It took a week to come up with this recipe.

[ ] add a healthcheck section to docker-compose.yml

    healthcheck:
      test: ["CMD-SHELL", "pg_isready"]
      interval: 5s
      timeout: 5s
      retries: 10

[ ] Add a ./bin/wait-for-db.sh script that is called from GitHub Actions

#!/bin/bash

# healthy
# unhealthy
# starting

CONTAINER=warehouse_db_1
check() {
    docker inspect --format "{{.State.Healthcheck.Status }}" $CONTAINER
}

while [[ "$STATUS" != "healthy" ]]
do
    STATUS=$(check)
    echo "$STATUS"
    sleep 3
done

Actually had to add a timeout to avoid an endless loop in GitHub Actions. It is still not configurable, so not a completely easy way.
#!/bin/bash

# healthy
# unhealthy
# starting

CONTAINER=warehouse_db_1
check() {
    docker inspect --format "{{.State.Healthcheck.Status }}" $CONTAINER
}

while [[ "$STATUS" != "healthy" ]]
do
    STATUS=$(check)
    echo "$STATUS ${SECONDS}"
    (( SECONDS > 60 )) && exit 1
    sleep 3
done

I doubt that these many users have as much unique ideas, Instead FAQ could just list all the common sense cases with links to corresponding examples in https://github.com/docker-library/healthcheck.

pg_iready
curl
SELECT

For others that stumble on this, pg_isready works to say the database is ready to accept connections, but the roles and databases aren't fully ready yet, so running a command right after can cause problems. We've switch to the SELECT based method because of that

@daveisfera if you use initialization scripts then connection doesn't up until the init is over, like in https://github.com/pypa/warehouse/pull/9993/files

I'm not following. What part of that link is the "initialization scripts"?

@daveisfera this section is the initialization SQL script that is processed before the connection is up.
   volumes:
      - ./dev/example.sql.xz:/docker-entrypoint-initdb.d/example.sql.xz:ro

I don't believe that that will solve the problem. The issue that we saw is that occasionally pg_isready would exit with a done/completed status code, but then the command that was run would say that a database and/or user wasn't available. It didn't happen often, but would happen occasionally when running tests.

Do tests run initialization scripts? If yes, then it should be a bug with pg_isready, because by the time init script finishes, there should be no time gap between opened port and DB/user finishing initialization.

If you run "pg_isready" inside the same container, it will likely connect
to the unix socket (which is enabled even during initialization).  You have
to explicitly connect it to the TCP port instead (or use a separate
container that can't access the unix socket at all).

@tianon pg_isready sends some handshake packet and waits for response. If a server sends the response when it is not ready, it must be a bug in server then,

On first start, while creating the initial database and running /docker-entrypoint-initdb.d/ scripts a PostgreSQL server is "ready":
https://github.com/docker-library/postgres/blob/a83005b407ee6d810413500d8a041c957fb10cf0/docker-entrypoint.sh#L326-L331
The temporary server does not listen on external ports, but would be pg_isready if accessed from within the container.  Once initialization is complete, then that server is stopped and the entrypoint script execs to postgres server so that postgres is pid 1.

@yosifkit why temporary server won't use a different port for initialization?

If you do pg_isready --host <IP_ADDRESS> it should do the "right" thing and try connecting to the TCP port instead of the unix socket.

I’ve added -h localhost and that makes sense as a fix, so I’ll keep an eye on our tests to verify it works as expected


Remove init location from FunctionConverge

PTAL @vladimir-ch . Sorry, should have done this in the last PR, but I thought it was going to be a bigger change.


Incorrect ID responded from action

I am using action to get bounding_boxes of an image, but I noticed that the response if for previous request.
The flow was like:
Send request ID 0, receive response ID 0 (blank image)
Send request ID 1, receive response ID 0 (image with correct bounding boxes from request ID 0)
Send request ID 2, receive response ID 1 (as above)
...
Do anyone encounter same issue?

As for the ROS2 action, I have not been maintaining it and maybe left the problem unaddressed.
It would be great if you could fix it 😀
Let me know your distro, the specifications are slightly different between Humble and earlier.


create cashay-server for realtime updates

The problem is not everyone uses RethinkDB for reactivity & even if they do, they're more or less limited to single-table subscriptions. This makes sense, since it can get pretty expensive to simulate a join & subscribe to it. Apollo offers something that's in the experimental phase, but it's, uh, not robust. Here's the blueprints for how to make something that can match (or exceed) rethinkdb performance while allowing for cross-table subs.
Problem:

client calls the getTop5Posts(userId: 'user123') query. This returns documents of type Post with ids A,B,C,D,E
a second client calls upvote(postId: 'F') mutation. How do we know who to send this update to? Some folks care about just that document. Other folks don't care about that document yet, but supposing that the upvote gives F more votes than E, we should replace E with F. Doing this naively results in n db hits, where n is the number of channels that include at least 1 post.

Solution:

we have a topic lookup table full of queries, which are full of mutations, which contain a factory function for what I call "bump functions".

const topicLookupTable = {
  getTop5Posts: {
    upvote: (minVotes, minVoteId) => (mutatedDoc) => {
      if (mutatedDoc.votes > minVotes) {
        r.table('Post').get(mutatedDoc.id).run().then(post => {
          return {
            removeDocId: minVoteId,
            newDocId: post,
            bumpFnVars: [post.votes, post.id]
          }
        });
      }
    }
  }
};

At the end of the resolve method, before returning the array of docs, that socketId does a few things:
see if the channel getTop5Posts/user123 exists. if not, create the bump function for it: topicLookupTable[query][mutation](5, 'F'). Store this bump function on the channel getTop5/user123.
subscribes to getTop5Posts/user123

The magic of the bump function is that it contains really inexpensive logic (in this case, mutatedDoc.votes > minVotes). Without it, we'd have to re-run each original database function to determine if F replaced E. This is critical because every time upvote gets called, we're gonna have to run through every channel with the getTop5Posts topic. A single Float64 comparison should be cheap enough that JS will work at scale. SocketCluster already contains a message bus, but to save a function on each channel, we'll have to use a key/value store like redis to save the bumpFnVars on each channel.
For the next example, let's try a form of CmRDT. Say we have hell world and we want to correct it. We send: updateContent(changes: {id: 'A', pos: 4, val: 'o'}) to make it hello world. Since it's a C_m_RDT, We'll never have the full state, rather just a transform. That means our mutation will have to adjust the db with just this info. Then, we forward the operational transform onto the client & trust that the client knows how to do it. Since the updateContent mutation can never change the docs that are returned by getTop5Posts, our bumpFn is easy:
(idArr) => (mutatedDoc) => {
  if (idArr.includes(mutatedDoc.id)) {
    return {
      transform: mutatedDoc
    }
  }
}

For super fine grained performance tweaking, we could consider establishing a discrete channel just for that field: content/content123, but that would be very application specific & could result in a performance net-loss.
A fringe benefit of all of these things is that it means we don't always necessarily need to use a websocket between the client and the server. For example, I can take the return values of the bump functions and store them away in a key/value store under the JWT. Then, when the client long-polls for updates, I just send the array of changes. That means in 1 network request, they get a whole bunch of fresh new info without having to request it from each individual query.

additional thought:
suppose each query can take in 2 additional args:

ids: The list of IDs that we currently have on the client
lastUpdatedAt: The max of all updatedAt in the list of IDs

With these 2 things, we can greatly reduce the network payload. For example, I subscribe to team members. Then i unsubscribe, then I subscribe again like: teamMembers(teamId: 'team123', ids: ['A', 'B', 'C'], updatedAt: Yesterday)
Now, I run the query. When it resolves from the DB, I get something like this:
const teamMembers = [
  {
    id: 'A',
    updatedAt: 'last week',
    name: 'matt'
  },
  {
    id: 'B',
    updatedAt: 'today',
    name: 'jordan'
  },
  {
    id: 'D',
    updatedAt: 'last week'
  }
]

First, we intersect the result with the ids. On the left side, we have D. On the right side, we have C. In the intersection, we have A,B. WIthin that intersection, we see that A hasn't been updated for a week, so we exclude it. B has been updated since we have recently seen it, so we need to include it. So, we return a result like:
return {
  removeDocId: 'C',
  addDoc: {
    id: 'D',
    updatedAt: 'last week'
  },
  updateDoc: {
    id: 'B',
    updatedAt: 'today',
    name: 'jordan'
  },
};

Now, let's assume we cache this locally & then they refresh the page. The server doesn't even need to reply!

This looks freakin awesome.  I love the diffs.


Propopsal for initial beatmap & beatmapset database schema

Here is a schema for beatmaps I came up with, to get things moving forward a bit. Let me know if I missed anything!

I did not mean to approve that
Oops

What have  idone

I'll re-test once I am home

Just tested this, seems to work fine for me. I guess now is beatmap submission :despairge: