support ad-hoc polygons in query

support ad-hoc polygon in a new filter in_polygon(<point_column>, <polygon in WKT format>)
allow exporting polygon as virtual dimension "_geoshape"

Codecov Report

Merging #275 into master will increase coverage by <.01%.
The diff coverage is 77.41%.

@@            Coverage Diff             @@
##           master     #275      +/-   ##
==========================================
+ Coverage    71.8%   71.81%   +<.01%
==========================================
  Files         166      166
  Lines       22868    22915      +47
==========================================
+ Hits        16421    16457      +36
- Misses       5167     5176       +9
- Partials     1280     1282       +2

Impacted Files
Coverage Δ

query/aql_context.go
88.23% <ø> (ø)
:arrow_up:

query/aql_compiler.go
73.11% <68.96%> (-0.63%)
:arrow_down:

query/aql_processor.go
80.11% <91.42%> (+0.23%)
:arrow_up:

controller/mutators/etcd/schema_mutator.go
59.17% <0%> (-1.78%)
:arrow_down:

memstore/cuckoo_index.go
91.27% <0%> (+1%)
:arrow_up:

subscriber/common/job/driver.go
71.98% <0%> (+1.41%)
:arrow_up:

broker/query_plan_non_agg.go
86.56% <0%> (+2.23%)
:arrow_up:

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 d025413...db4b694. Read the comment docs.

close for now, might need major refactor


Are Large-Language Models Graph Algorithmic Reasoners?

Are Large-Language Models Graph Algorithmic Reasoners? [preprint]
Alexander K Taylor, Anthony Cuturrufo, Vishal Yathish, Mingyu Derek Ma, Wei Wang. [PDF] [Code], 2024.10,

Thank you for providing this nice paper! It is added in the repo.
Best,
Bowen


Overriding languages translation files

Laravel Version: 5.6
Voyager Version: 1.1
PHP Version:
Database Driver & Version:

Description:
I need to override languages translation files for multiple languages
Steps To Reproduce:
I copied files from Directory [\vendor\tcg\voyager\publishable\lang] To [\resources\lang]
my user custom view still reading translations from old vendor path

This is described in the Laravel docs


ClassLoader getPackage filter

Adding getPackage to FilteredClassLoader inorder to filter out certain package lookups to parent classloader.

Lookin good! In order to reference packages in includes/excludes, just use the exact name of the package.


Compress images

Compressing images on a web page can speed up Loading Times and Improve performance.
Compressing the images can improve lighthouse score.

There are many ways to compress images, can upload the image to a website that compresses images, or use the compression tool that comes with Mac to compress the image.


Brightness not changing with nvidia proprietary drivers

Describe the bug
Brightness does not work when using nvidia proprietary drivers.
To Reproduce
Steps to reproduce the behavior:

Change the brightness using nvidia proprietary drivers

Expected behavior
The brightness decreases or increases
Additional context
Only happens with nvidia proprietary drivers
NixOS Version: 20.09

Never mind, seems to have solved itself.

Never mind, seems to have solved itself.


Add a compatibility layer for SwiftSyntax

When renaming methods this new file can contain deprecated declarations to keep clients building.

@swift-ci Please test


[AUTOPATCHER-CORE] Upgrade gnutls to 3.8.3 to fix CVE-2024-0553

[AUTOPATCHER-CORE] Upgrade gnutls to 3.8.3 to fix CVE-2024-0553
Upgrade pipeline run -> https://dev.azure.com/mariner-org/mariner/_build/results?buildId=655717&view=results

Build did not work for this change.

Thanks for the review. I found out that the couple of CVE patches that we were having in the spec file no longer are applicable to the version 3.8.3 and hence deleted. Hopefully the build should run well with this changes.

With the recent changes made we are able to build gnutls successfully. There are lot of breaking changes with this version like for example "Drop guile bindings." which looks to cause some ptests to fail in one of the directly depdennt packages nbdkit. At the first look we might need to upgrade nbdkit as well. Not sure whether this is feasible for 2.0. Hence closing this PR for now.
We can look at other ways of fixing it if possible without upgrading it to gnutls to 3.8.3.


Gobuster seems to stop after ~1100 requests?

Originally I tried pushing it through tor, it stopped with no error message after ~1200 requests.
I tried against my own server not over tor, and it stopped at ~1100.
The wordlist I'm using had ~382,000 items in it, so I'm not sure what's going on..
is there a preferred troubleshooting step you'd like me to follow here?

fyi, these cmdlines end with  | wc -l
and contain -v
the idea was that I wanted to see how many requests they made before the binary quit working

Thanks @viss. I've had a bit of a play with this and I'm seeing inconsistent results. Let me do some more testing and I'll get back to you.

no worries!
Let me know if there's stuff you want me to try on this side, or if you
want a copy of that dictionary!
On 10/18/16 5:40 PM, OJ Reeves wrote:

Thanks @viss https://github.com/viss. I've had a bit of a play with
this and I'm seeing inconsistent results. Let me do some more testing
and I'll get back to you.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/OJ/gobuster/issues/35#issuecomment-254679267, or
mute the thread
https://github.com/notifications/unsubscribe-auth/ABrMX9B_aAyMDzsl3htb9WQKawQpnBRVks5q1WcLgaJpZM4KaV7O.

Nah the dictionaries I have are more than big enough. The one I usually use is 1.5M lines.
I'm seeing different behaviours on local webservers vs remote webservers. Could be that certain attempts are erroring out without being caught.

This can also be caused because go hast an infinite timeout on requests. If the website sends you to a tarpit, you will wait forever. I implemented a timeout parameter here if you wanna try:
https://github.com/OJ/gobuster/pull/79

I've never been able to repro this, but I think this is now sorted in 2.0.0. Thanks!


[T5A1][W13-B1] Song Zhiwen

@zzzzwen
Some comments added. Please ack & close the PR after reading comments.

noted


Test Code coverage

Description:
This issue involves creating tests to ensure comprehensive code coverage for the application's functionalities. The goal is to validate that all critical components of the application are tested, which will help identify untested parts of the codebase and improve overall software quality.
Objectives:

Identify Key Components: Determine which modules and functionalities require testing, including user management, organizer management, event creation, ticketing, and attendee interactions.
Develop Unit Tests: Write unit tests for each identified component using a testing framework (e.g., pytest, unittest) to cover various scenarios, including edge cases.
Measure Code Coverage: Utilize a code coverage tool (e.g., coverage.py) to measure the percentage of code executed during tests and identify untested lines or branches.
Refactor as Necessary: If certain areas of the code are difficult to test, consider refactoring them to improve testability.

Requirements:

Ensure that all new tests are added to the existing test suite.
Follow best practices for writing clear, maintainable tests with descriptive naming conventions.
Document any significant findings or areas that require further attention based on code coverage results.

Acceptance Criteria:

Achieve a minimum code coverage percentage (e.g., 80%) across all critical modules.
All new tests must pass without errors.
Documentation should be provided to explain the testing strategy and any identified areas for improvement.

I have added the coverage badge to the README and configured coverage testing using a .coveragerc file.


Helm installation fails on exporter config

When installing by Helm on K8S via
helm install teletrace teletrace/teletrace --namespace teletrace --create-namespace
NAME: teletrace
LAST DEPLOYED: Wed May 17 14:12:09 2023
NAMESPACE: teletrace
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
**********************************************************
 Welcome to Teletrace!
 Chart version: 0.7.0
 Teletrace version: v0.7.0

created pod fails with message:
kubectl -n teletrace logs teletrace-5849b586bb-r452m
Error: invalid configuration: no enabled exporters specified in config
{"level":"fatal","ts":1684325555.901051,"caller":"all-in-one/main.go:97","msg":"Collector stopped with an error","error":"collector server stopped with an error: invalid configuration: no enabled exporters specified in config","stacktrace":"main.startCollector\n\t/app/cmd/all-in-one/main.go:97"}

Hey @chrlic thank you for the feedback!
It is necessary to pass the collector configuration as part of the values when installing the chart, i see that this is not that clearly stated in the docs or README so i'll make sure to fix that.
Regardless you will need to provide values with as least:
collectorConfig: |
  receivers:
    otlp:
      protocols:
        grpc:
        http:

  processors:
    batch:

  exporters:
    elasticsearch:
      endpoints: ["<elasticsearch-endpoint>"]
      username: "<elasticsearch-username>"
      password: "<elasticsearch-password>"
  service:
    pipelines:
      traces:
        receivers: [otlp]
        processors: [batch]
        exporters: [elasticsearch]

Feel free to reach out to me for further assistance!


Fix/json update

What's the purpose of this PR
bugfix
Which issue(s) this PR fixes:
Fixes #4483

Codecov Report

Merging #4486 (1f4240e) into master (0f7dc80) will decrease coverage by 0.00%.
The diff coverage is n/a.

:exclamation: Current head 1f4240e differs from pull request most recent head 0a39af6. Consider uploading reports for the commit 0a39af6 to get more accurate results

@@             Coverage Diff              @@
##             master    #4486      +/-   ##
============================================
- Coverage     53.62%   53.61%   -0.01%
- Complexity     2699     2700       +1
============================================
  Files           489      489
  Lines         15294    15294
  Branches       1588     1588
============================================
- Hits           8201     8200       -1
+ Misses         6537     6536       -1
- Partials        556      558       +2

Impacted Files
Coverage Δ

...mework/apollo/portal/component/PortalSettings.java
65.62% <0.00%> (-4.69%)
:arrow_down:

.../apollo/internals/RemoteConfigLongPollService.java
77.24% <0.00%> (-1.20%)
:arrow_down:

...work/apollo/biz/message/DatabaseMessageSender.java
64.58% <0.00%> (+8.33%)
:arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us.

This change seems to bring a new issue: if the user does want to clear the content, it won't work after this fix?

if the user does want to clear the content

Yes, let me make a fix

This change seems to bring a new issue: if the user does want to clear the content, it won't work after this fix?

Done.

Looks good to me, would you please also update the CHANGES.md?

Looks good to me, would you please also update the CHANGES.md?

Done.


Absolute URL support

Is your feature request related to a problem? Please describe.
The preview plugins (iframe, presentation etc) don't allow us to provide absolute URLs. This hinders our ability to provide a URL resolution mechanism when using multiple domains. This would allow us to use the preview mode with websites that might be spread across multiple domains or subdomains. Think about multi-tenant setups or more commonly next-intl with domains for different locales. A concrete example I have is a project with 24 locales spread across 16 domains, like:
- [da-DK] example.com/
    - [en-DK] example.com/en/
    - [en-US] example.com/en-US/
- [en-GB] example.co.uk/
- [fr-FR] example.co.fr/
- [nl-BE] example.be/
    - [fr-BE] example.be/fr/
.......

Feeding the presentation plugin an absolute preview URL (for example on another domain) isn't possible as it only sends the path to the draft mode API.
The draft mode API url is always hardcoded, so a single Studio instance isn't able to invoke multiple different draft APIs.

Describe the solution you'd like
The presentation plugin (or iframe plugin btw) shouldn't try to protect me from myself. If I tell it that the url is something, it needs to trust me and send that something in its raw form to the draft API. It is the draft API's responsibility to decide if this is a legit request or not.
The draft mode API url should be able to be decided on a document by document basis, allowing for us to invoke multiple different domains or subdomains and set cookies for them. We should be able to provide a draft mode URL resolver, that would receive a Sanity context and the document being queried. The reason for this is that afaik cookies are set per domain, when using multiple domains, so my studio might be at .com, while preview for this particular document might sit at .co.uk. In this case, the draft endpoint from .co.uk must be invoked, as it can set the cookie for that domain.
Describe alternatives you've considered
I'm currently looking at somehow manually using usePresentationNavigate which seems to allow any URL, in combination with ¿something? from @sanity/preview-url-secret that'd construct draft urls with an appropriate preview secret. That would be dirty, but would at least allow us this functionality in some way :/
Which versions of Sanity are you using?
@sanity/cli (global)                   3.36.4 (up to date)
@sanity/document-internationalization   2.1.0 (latest: 2.1.1)
@sanity/icons                          2.11.6 (latest: 2.11.7)
@sanity/image-url                       1.0.2 (up to date)
@sanity/presentation                   1.12.1 (latest: 1.12.3)
@sanity/ui                             2.0.14 (latest: 2.0.16)
@sanity/vision                         3.36.4 (up to date)
@sanity/webhook                         4.0.3 (up to date)
sanity                                 3.36.4 (up to date)

Which versions of Node.js / npm are you running?
10.2.4
v20.11.1

Additional context
I'd be interested in contributing to this, although I have no idea where to start, so perhaps some advice would be needed. For now, let's see if the repo is interested in this sort of contribution (or perhaps I've missed something and this is entirely possible?)

It is my understanding that this is where the override happens: https://github.com/sanity-io/visual-editing/blob/a77ccf2b7e918579809d6f9fd90c1915d3d83ea0/packages/preview-url-secret/src/definePreviewUrl.ts#L31 although I must admit, I don't fully understand this code.

I suggest that we change this, so that the origin logic is used only if the given URL is not a valid absolute url, which is btw easy to check for with:

function isValidUrl(urlString: string): boolean {
  try { return Boolean(new URL(urlString)) } catch (e) { return false }
}

I've already been doing this same logic within the draft enable endpoint like this:
    // We'd prefer the client to always send absolute URLs, but we also support relative by trusting the proxied host header or the current hostname.
    const redirectUrl = isValidUrl(redirectTo)
      ? new URL(redirectTo)
      : new URL(
          redirectTo,
          request.nextUrl.protocol + "//" + request.headers.get("Host") ??
            request.nextUrl.href,
        );

And this is where the draft enable URL is fetched from: https://github.com/sanity-io/visual-editing/blob/a77ccf2b7e918579809d6f9fd90c1915d3d83ea0/packages/preview-url-secret/src/definePreviewUrl.ts#L24

I suggest we simply add an escape hatch that would allow us to define a callback as part of configuration, as an alternative to providing a static string. That'd be enough and allow us to use whatever logic we see fit, including server actions, to decide what draft url should be invoked.

FYI, we have a partial alternative in the meantime, where we circumvent @sanity/preview-url-secret by composing it ourselves. I've explained it here: https://github.com/tinloof/sanity-kit/issues/17#issuecomment-2041452863
This isn't ideal, and while it solves productionUrl preview urls, it still means that we are unable to offer Sanity presentation or live editing to our clients :(

This is the perfect explanation of the issue, I just stumbled across.
The only "solution" in our case (Next.js) would be using the embedded Studio and the draft mode URL set with a env variable. But IMO this would not be a great UX opening multiple embedded studios to edit stuff on multiple domains.
Hopefully this gets some attention soon, as we would also love to offer visual editing to our clients. 🙏

Thanks for sharing @markomitranic 🙌  We'll fast track this and add the escape hatches you need 👍

@markomitranic a status update on what we intend to do, following our deep dive into this so far.
We'll do two feature releases.
1. Add previewMode.check API
In order to call previewMode.enable dynamically then we need a way to check if preview mode is enabled or not.
The MVP configuration looks like this:
presentationTool({
  previewUrl: {
    previewMode: {
      enable: '/api/draft',
      check: '/api/draft-check'
    }
  }
})

The response of /api/draft-check is expected to be:
GET /api/draft-check 200
{
  "version": 1,
  "enabled": boolean
}

A basic implementation of this API in App Router would be:
/* eslint-disable no-process-env */
import {draftMode} from 'next/headers'
import {NextResponse} from 'next/server'

export async function GET() {
  return NextResponse.json({
    version: 1,
    enabled: draftMode().isEnabled,
  })
}

We plan on shipping first class utilities for this in @sanity/preview-url-secret and next-sanity.
With the ability to check if the preview url secret handshake is needed we're able to do improve cold starts and long lived preview sessions where it's necessary to restart Next.js Draft Mode due to newer deployments that happened in the background.
If you don't specify previewMode.check, then previewMode.enable works like before:

Presentation Tool loads, and assembles the iframe URL based on the previewUrl configuration.
The iframe is set to load new URL(${previewUrl.previewMode.enable}?redirect=${previewUrl.preview}, previewUrl.origin), and the API handler is responsible for redirecting the iframe to the preview after setting necessary cookies and what not.
While this is happening the iframe is hidden and a loading spinner is shown, until we receive a postMessage from @sanity/visual-editing letting @sanity/presentation know everything is ready to respond to events.
Iframe fades in and overlays are shown.

If the connection to @sanity/visual-editing is lost then we don't have a way of knowing if that's because the URL of the iframe changed somewhere external, if it's because the app crashed, or because a navigation happened and next had a newer deployment in the background so the current draftMode cookie is no longer valid, and the app is back in production mode. All we know is that the connection is lost.
With previewMode.check we can change the flow:

Call await fetch(previewUrl.previewMode.check, previewUrl.origin).enabled == true.
If enabled is false, call await fetch(previewUrl.previewMode.enable, {method: 'POST', body: {secret}}).
If the enable request is successful, then load the iframe with src={new URL(previewUrl.preview, previewUrl.origin).toString()}.
Wait for a while for the postMessage from @sanity/visual-editing, if received then we're done.
If it takes too long for @sanity/visual-editing to connect, we'll call previewMode.check again and check if we lost the session, if it's reporting enabled: true then we know there's something else preventing the connection (misconfiguration or a crash).
If enabled: false we can retry the handshake automatically a couple of times before giving up and throwing an error that takes you to docs for how to setup preview mode correctly as well as troubleshooting it.

Step 5-6 will also happen should the postMessage connection to @sanity/visual-editing be lost later on in a long lived session.
Finally, while adding this we also want to let you customize the fetch method used for the handshake, allowing you to set custom headers and more:
presentationTool({
  previewUrl: {
    previewMode: {
      enable: '/api/draft',
      check: '/api/draft-check',
      defineFetch: context => (url: URL, init: RequestInit): Promise<Response>
    }
  }
})

2. Support absolute URLs/multiple origins for previews
The locations API, as well as how previewMode works, is built under the assumption that everything you're previewing will happen on a single origin/domain.
The URL bar validation operates under this assumption, so does the locations drawer.
In order to support use cases like locales tied to a specific domain or subdomain, or markets and regional segments, then it becomes necessary to build in support for it in each layer of the stack.
previewMode needs to know when you're moving between domains and which ones need to initiate a handshake, and we might need to expose a way to configure how the handshake is setup based on the origin:
presentationTool({
  previewUrl: {
    previewMode: origin => {
      switch(origin) {
        case 'https://next.vercel.app':
          return {enable: '/api/draft', check: '/api/draft/check'}
        case 'https://hydrogen.shop':
          return {enable: '/api/preview'}
        default:
          // Returning false signals that a handshake shouldn't be attempted, or isn't needed
          return false
      }
    }
  }
})

The locations API needs to support rendering absolute URLs in its drawer, allowing viewing a e.g. french translation of a document that lives on a different domain than the one currently in the preview iframe.
We'd also need an API for validating the URL, that is used when:

a URL is manually entered in the preview URL bar.
the document.referer state is read on initial load when there isn't a &preview search parameter in the URL.
the &preview search parameter is read from the URL.

Dear @stipsan thank you for this lengthy and sturdy plan of action! I am super happy to hear some movement on this, it will change the editor's experience quite a bit if we are able to do this!
I understand that your "RFC" needs to support more consumers than I can think of - live editing, preview links, iframe plugin etc, and many ways of using it - you mention being able to manually type stuff into the address bar for example, I never thought of that. So, I write this while fully appreciating that the issue is more complex than it seems to me, nor am I a library author, so not thinking that I deserve any sort of influence. Just my 2 cents.
We might be overthinking this. The proposed changes seem much more like a long-term course correction, than a simple and non-breaking addition to the API.
Instead of taking it in small steps, going from a string to a simple callback, we are talking about re-engineering how preview URLs work. I like the changes, but I don't think they are at all necessary to resolve the issue I've raised:
- don't see a real point of `check`. Sure, it will save 0.2s for editors when they are being redirected, but will introduce a bunch of complexity/state that the Sanity team now has to think about forever - Redirect-on-every request (UI or address) served us perfectly fine so far, I don't see why we'd trade that.

The only reason we'd have this is if you are clicking links within the iframe, and you click on a link that belongs to a different domain, where a new draftMode is needed. I firmly believe we should not accomodate for this. The only place where we should trigger draftMode are the UI, not the iframe. This is an edge case, that we don't have support for anyway. The primary use case of all 3 preview plugins is to preview a specific page that the user is editing. We shouldn't try to build a browser out of it. At the end of your proposal you like out some changes to the way Address bar is handled, but I am afraid I don't fully understand those either, why wouldn't it use exactly the same system as the rest of the app does - take the URL, find out if draftMode is needed by sending the origin of the url to previewMode function, don't use draftMode if not.

Looking at the switch statement in the second part, do I understand it correctly that it would send us the origin as seen on the resolved previewUrl? In that case it is fine, as long as we have an easy mechanism for supporting relative URLs by default.

Also worth mentioning that the draftMode.defineFetcher addition is added to solve different use cases, such as when you deal with Vercel deployments that have protection enabled, and require some form of bypass to be setup: https://github.com/sanity-io/next-sanity/issues/770#issuecomment-1828910958
It's also to allow similar security requirements where you may have to send certain headers or extra secrets to bypass strict firewalls.
It's mentioned here since it also allow you to customize requirements that may be necessary in the context of intl. For example you may have middleware setup that makes it necessary for the fetch to /api/draft to have the correct Accept-Language header to avoid it redirecting you to a different locale than what you're trying to navigate to.

Any plans / progress to support preview mode for multiple domains? 😄 We have the studio and our other applications spread across different subdomains, so presentation mode is pretty useless for us. This feature would be much appreciated. Keep up the great work that you guys do ⭐

Any plans / progress to support preview mode for multiple domains? 😄 We have the studio and our other applications spread across different subdomains, so presentation mode is pretty useless for us. This feature would be much appreciated. Keep up the great work that you guys do ⭐

I am using preview mode on multiple websites. It is not documented how to do it, and I wish that Sanity made this an easier thing to do. You basically have to hijack the sanity.config.ts / documnt.productionUrl to generate draft mode requests that are created whenever a user clicks on the preview button yourself.
import { createPreviewSecret } from "@sanity/preview-url-secret/create-secret";

export const previewUrl: DocumentPluginOptions["productionUrl"] = async (
  prev: string | undefined,
  context: ResolveProductionUrlContext,
): Promise<string | undefined> => {
  const { getClient, document, currentUser } = context;
  const client = getClient({ apiVersion: "2023-06-04" });

  const resolvedUrl = await resolver(); // <-- my own internal URL generation implementation here.
  if (!resolvedUrl) return prev;

  const { secret } = await createPreviewSecret(
    client,
    "@sanity/presentation",
    typeof window === "undefined" ? "" : location.href,
    currentUser?.id,
  );

  return constructDraftUrl(
    "/api/draft/enable/",
    secret,
    resolvedUrl.href,
    resolvedUrl.locale,
  ).toString();
};

function constructDraftUrl(
  draftEndpoint: string,
  secret: string,
  resolvedUrl = "/",
  targetLocale: Locale,
) {
  const domain =  findDomainByLocale(targetLocale); // <-- My own logic for finding the appropriate domain. In my case based on the targetLocale parameter, but of course you may pass your own props.

  const enablePreviewModeUrl = new URL(draftEndpoint, domain);
  enablePreviewModeUrl.searchParams.set("sanity-preview-secret", secret);
  enablePreviewModeUrl.searchParams.set(
    "sanity-preview-pathname",
    resolvedUrl ?? "/",
  );
  return enablePreviewModeUrl;
}

With this in place, your preview button will now send the user to the appropriate draft API on the appropriate domain, with the sanity-preview params and your URL. Works like a charm for our editors in production on 20 domains for a while now. Hope this helps @mjansrud (also @stipsan i guess would love to read this 😄  )

Hi @markomitranic
following is my sanity config  setup

export default defineConfig({
    ...
    plugins: [
        codeInput(),
        table(),
        structureTool({
            ...
        }),
        visionTool({
            ...
        }),
        presentationTool({
            previewUrl: {
                origin: url,
                previewMode: {
                    enable: '/api/draft/',
                },
            },
            resolve: {
                mainDocuments: defineDocuments([
                    {
                        route: `${prefix}/:slug`,
                        filter: `_type == $type && nameSlug.slug.current == $slug`,
                    },
                ]),
                locations: {
                    ...AbortController.
                }
            }
        }),
    ],
    document: {
        async productionUrl(prev: string | undefined, context: ResolveProductionUrlContext) {
            console.log("prev", prev);
            const { getClient, document, currentUser } = context;
            const client = getClient({ apiVersion: "2024-06-30" });
            console.log(document._id);
            let resolvedUrl;
            if (document._id === 'A') {
                resolvedUrl =  'http://localhost:3000/';
            } else {
                resolvedUrl = 'http://localhost:3001/';
            }

            console.log(location.href)

            const { secret } = await createPreviewSecret(
                client,
                "@sanity/presentation",
                typeof window === "undefined" ? "" : location.href,
                currentUser?.id,
            );

            const enablePreviewModeUrl = new URL('/api/draft/', resolvedUrl);
            enablePreviewModeUrl.searchParams.set("sanity-preview-secret", secret);
            enablePreviewModeUrl.searchParams.set(
                "sanity-preview-pathname",
                resolvedUrl ?? "/",
            );
            console.log("enablePreviewModeUrl", enablePreviewModeUrl.toString());
            return enablePreviewModeUrl.toString();
        },
        actions: (prev: DocumentActionComponent[], context: DocumentActionsContext) => {
            ...
        }
    },
    schema: {
        types: schemaTypes,
        templates(prev, context) {
            return [

            ];
        }
    },
});

In my case, we are using two distinct home page ids to render home page of two separate domains. but, presentation tool always ends up using origin value mentioned in previewUrl.origin.
Have I done something wrong in the above setup or have I misunderstood anything?
following the versions that we are using
"sanity": "^3.57.3",
"@sanity/presentation": "^1.16.2",
"@sanity/vision": "^3.49.0",
Thanks!


aider hang forever

It just stoped at this step forever. I don't know how I can get you more information to replicate it. I tried run it with --verbose but it just print out all the configuration value.

Thanks for trying aider and reporting this issue.
Do you get a traceback or any additional information when you hit ^C to force aider to exit?
Is it a very large repository?
Is the repo dirty, with a large number of uncommitted changes?

@jzhang-brex
I have experienced the same issue and wonder if it can be connected to streaming responses.
Can you try adding --no-stream to the command-line before running aider and see if it fixes or improves anything?

Also, can you tell me what version you're running? The latest version will display it when you run the program. Or you can run with --version to print it out.
You should make sure you've upgraded to 0.8.3 because there was a bug like this in 0.8.1. That was the default version on pypi for about a day before the bug fix was released.

Is it a very large repository?

Yes, it's a huge repo. However, the issue is intermittent and I got it working most of the time.
My version is fairly behind. I was on 0.7.1. Let me upgrade and observe if the issue continue. If I didn't reply within 2 weeks, you can consider I can no longer reproduce the issue.

I'm going to close this issue for now, but feel free to re-open or file a new issue any time.


RTL8188FU driver fails to compile for T31 Ultimate

Having enabled the driver build flag, the result is an "exit status 1".
diff --git a/br-ext-chip-ingenic/configs/t31_ultimate_defconfig b/br-ext-chip-ingenic/configs/t31_ultimate_defconfig
index 691572b1..afde272f 100644
--- a/br-ext-chip-ingenic/configs/t31_ultimate_defconfig
+++ b/br-ext-chip-ingenic/configs/t31_ultimate_defconfig
@@ -97,7 +97,8 @@ BR2_PACKAGE_WPA_SUPPLICANT_NL80211=y
 BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE=y
 BR2_PACKAGE_LINUX_FIRMWARE_OPENIPC=y
 BR2_PACKAGE_LINUX_FIRMWARE_OPENIPC_MT7601U=y
-# BR2_PACKAGE_RTL8188EU is not set
+BR2_PACKAGE_LINUX_FIRMWARE_OPENIPC_RTL8188EU=y
+BR2_PACKAGE_RTL8188FU_OPENIPC=y

I based the enabling of the driver on other builds that have it enabled. It's entirely possible other flags need setting to make it work, but nothing seemed obvious.
Also I don't know how to get the actual error produced here, I assume "exit 1" is the build script.
Build output: https://gist.github.com/drunlade/949290c9fed619d30690e6a791d2bde6

The patch works and compiles the driver.
The driver appears to load when I set the USB power GPIO on.
dmesg output shows the driver doing it's thing, but fails to connect to the WiFi after a few attempts and eventually disables it self. Unsure if failure is driver related or incorrect config on my part, I'll need to spend some time debugging.
Overall it's a step forward at least having a driver that loads!

I swapped the wpa_supplicant driver over to nl80211, re-ordered some of the config and there we go, it works!
root@openipc-t31:~# ifup wlan0
Successfully initialized wpa_supplicant
rfkill: Cannot open RFKILL control device
nl80211: Could not re-add multicast membership for vendor events: -2 (No such file or directory)
udhcpc: started, v1.33.2
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending select for <IP_ADDRESS>
udhcpc: lease of <IP_ADDRESS> obtained, lease time 7200
deleting routers
adding dns <IP_ADDRESS>
root@openipc-t31:~# ping google.com
PING google.com (<IP_ADDRESS>): 56 data bytes

Context
Camera
Brand: VStarCam
Model: CS55
SoC: Ingenic T31N
WiFi: rtl8188ftv (USB Based)
Purchase Date: Around November 2021
Setup
WiFi Driver: As above, rtl8188fu as built with OpenIPC
wpa_supplicant:  wpa_supplicant -B -D nl80211 -i wlan0 -c /tmp/wpa_supplicant.conf
GPIO
In order to turn the USB WiFi device on, I have to hit a GPIO. To that end, I added the following to my /etc/network/interfaces config for wlan0.
    pre-up echo 11 > /sys/class/gpio/export
    pre-up echo out > /sys/class/gpio/gpio11/direction
    pre-up echo 1 > /sys/class/gpio/gpio11/value

However this isn't entirely ideal, since if I ifdown the interface I can't run those GPIO commands again as part of an ifup as the path will already exist, so i'll probably move those echo lines into an init script for the camera as a whole and just have pre-up echo 1 ... and post-down echo 0 ... in the interfaces config.
Example /etc/network/interfaces
manual wlan0
iface wlan0 inet dhcp
    pre-up echo 11 > /sys/class/gpio/export
    pre-up echo out > /sys/class/gpio/gpio11/direction
    pre-up echo 1 > /sys/class/gpio/gpio11/value
    pre-up sleep 1
    pre-up modprobe mac80211
    pre-up modprobe rtl8188fu
    pre-up sleep 1
    pre-up wpa_passphrase "SSID-NAME-HERE" "PASSWORD-HERE" > /tmp/wpa_supplicant.conf
    pre-up sed -i '2i \\tscan_ssid=1' /tmp/wpa_supplicant.conf
    pre-up sleep 3
    pre-up echo -e "nameserver <IP_ADDRESS>\nnameserver <IP_ADDRESS>\n" >/tmp/resolv.conf
    pre-up echo -e "server 0.time.openipc.org iburst\nserver 1.time.openipc.org iburst\nserver 2.time.openipc.org iburst\nserver 3.time.openipc.org iburst" >/tmp/ntp.conf
    pre-up wpa_supplicant -B -D nl80211 -i wlan0 -c /tmp/wpa_supplicant.conf
    post-down killall -q wpa_supplicant

Closing issue, resolved.


How to make nested Serializer

@angvp @shanx @kvbik  anyone help
which i have a model called Qusetion
and another model called Answer
class Qustion(models.Model):
user = models.ForeighnKey(User)
content = models.CharField(max_length=100)
title= models.CharField(max_length=100)
class Answer(models.Model):
question = models.ForeignKey(Question on_delete=models.CASCADE)
content = models.IntegerField()
date = models.TimeField()
user = models.ForeighnKey(User)
expected output like this
[
{
"id": 2,
"content": "this is first post comment",
"comment": [
{
"user": {
"id": 1,
"username": "m_mohamed",
},
"content": "this is first comment",
"date": "2017-05-14T21:40:48.123368Z"
}
],
"publish_user": {
"id": 2,
"username": "H_mohamed",
}
]
}

Ok, you better ask in a proper DRF forum (not opening an issue) or read more docs (this is explained on DRF docs), this is not the place for asking about nested serializers.


DBZ-5398 The column is referenced as PRIMARY KEY, but a matching column is not defined in table

https://issues.redhat.com/browse/DBZ-5398
@jpechane @Naros I couldn't find a graceful solution to parse the column name from index definition including a function. Currently, the regex expression just support the function including parameters which split by comma, and the nested function also not be supported as below.
coalesce(coalesce(col1,'1'),'xxx')

I can't help but wonder if this is over-engineered and could lead to other problems.  This may not apply to PG but at least for other databases, there are situations where the PK consists of a function call that wraps a synthetic column that isn't naturally available in the JDBC metadata, i.e. ROWID or some other "hidden" column.  I believe PG has similar things like CTID.
So I'm inclined to question whether a better solution for this would have been to flag that the row tuple we identified should be excluded entirely as a unique index or primary key mapping like we do for Oracle.

@Naros You means we can exclude the entire index columns if including function expression according method isTableUniqueIndexIncluded. I know the following index columns are not database internal or "hidden" column.
However, I will imeplement the solution as you sugguest.
Create Index Statement:
create unique index counter_ukey on counter(campaign_id, COALESCE(group_id, ''::text));

@harveyyue  I am fine with this soution but will it capture siatuatilons like index being defined as for example col1 + col2 as I suppose there can be not only function call but arbitrary expression.

Could you please add a test cae similar to https://github.com/debezium/debezium/pull/3728 ?

Could you please add a test cae similar to #3728 ?

Ok, will do it.

@jpechane Add a expression regex including these operators + - * / < > = ~ ! @ # % ^ & |  ?`,  also add a expression test case.
https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-OPERATORS

Applied to main (=2.0).


Support Lezer grammars with our output pipeline

It'd be nice to be able to use Lezer for parsing paired with our output pipeline... this would allow users wishing to pay a higher download cost to get much improved support for some languages that require a more complex parsing engine.
References:

#3619
#3620
https://lezer.codemirror.net/docs/guide/

getStyleTags was added to make this easier!


fix(build): Adding travis ci build support and increasing integration…

… tests.

+1 -----------------------------------------
http://www.philipotoole.com
On Wednesday, July 26, 2017 10:37 PM, Justin Morant<EMAIL_ADDRESS>wrote:

… tests.
You can view, comment on, or merge this pull request online at:
  https://github.com/rqlite/rqlite-js/pull/8
Commit Summary

fix(build): Adding travis ci build support and increasing integration tests.

File Changes

A .travis.yml (23)
M es6/api/data/client/test.integration.js (88)

Patch Links:

https://github.com/rqlite/rqlite-js/pull/8.patch
https://github.com/rqlite/rqlite-js/pull/8.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.


chore(package): update local-repository-provider to version 6.4.40

:tada: This PR is included in version 8.5.32 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Build fail (due to update to binfarce create I think)

Hey I tried
git clone https://github.com/Shnatsel/rust-audit.git
cd rust-audit
cargo build --release

and got:
error[E0004]: non-exhaustive patterns: `SectionIsMissing(_)` and `UnexpectedSectionType { .. }` not covered
  --> auditable-extract/src/lib.rs:96:15
   |
96 |         match e {
   |               ^ patterns `SectionIsMissing(_)` and `UnexpectedSectionType { .. }` not covered
   |
  ::: /home/harry/.cargo/git/checkouts/binfarce-e74c3427e3f3ff61/32b9eed/src/error.rs:5:5
   |
5  |     SectionIsMissing(&'static str),
   |     ---------------- not covered
6  |     UnexpectedSectionType { expected: u32, actual: u32 },
   |     --------------------- not covered
   |
   = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
   = note: the matched value is of type `ParseError`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0004`.
error: could not compile `auditable-extract`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed

Thanks for the report! Fixed now.


enhanced other mapping libraries as part of Getting Started

For Docs issue#634
@rochoa , we got a Support complaint that this info was hard to find. I've applied minor enhancements to the Getting Started section to add clarity and make it easier to locate.  Let me know if you approve?

Do you approve if I merge @rochoa ?

:+1:


Version the install commands

Similar to https://github.com/canjs/canjs/pull/3004, the guides should specify version numbers so the correct version is installed.
This depends on https://github.com/donejs/donejs/issues/854

This needs to be done in major and master.

Some of this has been done on https://github.com/donejs/donejs/pull/858, but the tests keep failing on AppVeyor with Node 7 so it has not been merged yet.

I filed https://github.com/donejs/donejs/issues/864 for that.

I'm working on the 0.9 versions of this change.

It looks like only the chat guide was updated in #858

Both sites have been updated with the versioned guides.


How to add cartopy?

For making maps in many cases we will want to add the cartopy Python module but simply adding the module to requirements.txt leads to unresolvable dependencies (https://github.com/RobertPincus/how_to_eurec4a/commit/acac4cc2486c9d152415dfbdb2955ee4322a472b). I can't get my local module stack to work with conda - can someone (@d70-t ?) show me how to modify requirements.txt?
(I love that autocorrect wants to change cartopy to "carroty")

Yes, I was fearing that at some point we really want to have cartopy... I just closed #11 because I don't have a really good solution on how to do that.
The problem is that one can not "just" install cartopy via pip. As per their docs one has to install quite some dependencies before installing via pip. This makes the whole book more complicated to run on someones computer. I basically see two options:

install dependencies via apt etc... on the continuous integrations machines and the binder environment before running the things -> users / authors would need to install cartopy dependencies manually on their machines prior to be able to compile the book
pull in conda as a dependency and install cartopy via conda -> users / authors would need to have conda running on their machines

I personally never got used to conda but others may not be used to installing things manually... Do you have more ideas or preferences?

Well, I use conda to manage environments in other CI situations (https://github.com/earth-system-radiation/rte-rrtmgp/blob/main/.github/workflows/continuous-integration.yml#L112).
Though using conda will also take some fussing - when I tried to set up a conda environment by just installing 'jupyter and the modules in requirements I got derailed because somehow one jupyter module was being called from the system and not the venv. I could maybe get this worked out.
Or we could make a container? https://github.com/earth-system-radiation/rte-rrtmgp/blob/main/.github/workflows/containerized-ci.yml#L10, https://github.com/earth-system-radiation/containers

I am actually not worried too much of getting it to work within CI or binder. There's e.g. hackathon_env which properly sets up a binder environment (or docker image using repo2docker) which includes cartopy.
I am more worried of how to expain and maintain that explanation to someone who follows running locally > via git.

Maybe we could also do a setup like it is described here on stackoverflow, i.e.: make a conda environment which includes the requirements.txt. That way we could keep a single source of information, but give a choice to users if they want to install via conda or via pip?

It's great if we have a way for users of conda to run the book. But then how do we support users of pip?

Well, if you want to run cartopy via pip you only have the option to install its dependencies manually... But chances are high that people already did that on their machines as cartopy is quite a common thing. And if cartopy should already be installed on someones machine, pip shouldn't complain during the installation.
That said, we would still need to explain the installation of cartopy in the pip case, as for some, pip install -r requirements.txt will fail.

I made a conda environment.yml file that works locally (installs everything from requirements.txt plus cartopy in a conda environment, https://github.com/RobertPincus/how_to_eurec4a/tree/add-p3-examples) but I don't have the CI right yet

Indeed I'm quite confused, @d70-t . Documentation suggests that the environment I create will be activate in later steps but conda info shows no environment active (https://github.com/RobertPincus/how_to_eurec4a/runs/2449453339?check_suite_focus=true) and both conda activate how_to_eureca and the equivalent source activate command fail.
Otherwise I would be ready to add examples from the P-3...

Hmm, I probably can look into it tomorrow, but I have to admit, that I never really used conda, so maybe I'll have a hard time on this.

I will also keep working... but it doesn't seem to be a problem with the conda installation but rather that the virtual environment isn't being invoked

@d70-t Got it... it helps to follow directions


Move to tomli and remove jsonschema

I didn't use the compatibility layer since mypy was unhappy with it.
Let's investigate this further as soon as python 3.11 is out: https://issuetracker.deltares.nl/browse/IMOD6-847

Merging before review in order to avoid merge conflicts

Looks good!


removed unnecessary initialization of values with zero

xpos and ypos are assigned with a value inside _glfwPlatformGetMonitorPos

Thank you for the PR but I will not merge this.
The shared function sets those because the API guarantees that out parameters will have defined values even if an error occurs, including GLFW_NOT_INITIALIZED. It is also a service to platform functions so they don't all have to duplicate this work.

Ok, thanks for your time.


Be less strict about the metadata interface for erc1155

According to https://eips.ethereum.org/EIPS/eip-1155#metadata the following should be true for ERC1155 contracts:

If the optional ERC1155Metadata_URI extension is included:
The ERC-165 supportsInterface function MUST return the constant value true if 0x0e89341c is passed through the interfaceID argument.

So currently we check each ERC1155 contract for this interface value and if it returns false we don't try to fetch metadata such as the token name / image of the token ID.
BUT as the real world shows. Most ERC 1155 contracts do not correctly implement ERC-165 and don't return true on the supportsInterface call. That's why we should not check for that interface anymore.

Seems reasonable to me.

This was fixed in the mentioned PR.


Report that abbr-touch doesn't work on mobile safari

https://twitter.com/reibejoy/status/597754253529210880

It's actually a problem with the inclusion of the script in tyriar.github.io https://github.com/Tyriar/tyriar.github.io/issues/273


Update machine-learning-data-science-process-data-blob.md

Corrected Liang's GitHub user name

Hi @msolhab, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!

It looks like you're working at Microsoft (mohabib). If you're full-time, we DON'T require a contribution license agreement.

If you are a vendor, or work for Microsoft Open Technologies, DO please sign the electronic contribution license agreement. It will take 2 minutes and there's no faxing! https://cla.azure.com.

TTYL, AZPRBOT;


Adding support for missing request and response messages

What do you think about this, @crhym3 ?

Sounds good! But should also modify tests... I know, don't tell me about it :)

I could modify tests to work with this but not today - have a couple of things to do first.

tests added and passing

All of the above done.

LGTM!


Remove Unnecessary Width Preventing Horizontal Slider

Describe the bug
The current layout includes unnecessary width that obstructs the horizontal slider functionality. Propose adjusting the width settings to allow for proper horizontal sliding without constraints.
To Reproduce

Steps to reproduce the behavior:
Navigate to the page with the horizontal slider.
Attempt to use the slider functionality.
Observe that the slider does not operate as expected due to excessive width.

Expected behavior
The horizontal slider should function smoothly, allowing users to slide items without obstruction, and utilize the full width of the container effectively.
Screenshots

I checked the issues, and no similar issue exists. This issue is unique Can you please assign this to me?


Added link to contribution guidelines

Pull Request
Please add hacktoberfest-accepted label. (Thanks)
Proposed Changes

Added link to contribution guidelines
No dependencies used.
Also mention the issue number [Fixes #38 ].

Types of changes made

[ ] Fixed Bug
[ ] Added new Features
[X] Edited Documentations
[ ] Enhanced the working of code
[ ] Additional Changes
Mention any Additional Change here

Additional Info
Provide additional information(if any) you want to convey.
Viability of Code
Describe the tests that you ran to verify the changes made. Mention the tests for easy reproducibility.

None

Mention(if any) specific Test Configurations used:

Filmware version:
Hardware:
Toolchain:
SDK:

Screenshots or GIFs (if any)
Attach screenshots of the changes made for easy reference.

Original
Updated

Attach_Original_Screenshot
Attach_Updated_Screenshot

Checklist:

[X] My code follows the Mentioned Guidelines for the project
[X] I have self-reviewed the changes made
[ ] I have made the changes easy to understand by adding comments
[X] My changes does not generate new warnings/errors
[ ] I have attached relevant screenshots to display the changes made
[X] I have made the required changes to the documentations

@all-contributors Add @UsmanAhmadSaeed for docs


[PDI-19058] Pentaho reporting output: Parent folder is created even w…

…hen the 'Create Parent Folder' option is unchecked.

:white_check_mark: Build finished in 38m 29s
Build command:
mvn clean verify -B -e -Daudit -amd -pl engine

:ok_hand: All tests passed!
Tests run: 3911, Failures: 0, Skipped: 7    Test Results

:information_source:  This is an automatic message


[QUERY] Application took 15 minutes to update checkpoint

Describe the bug
Receive event: "12/7/2020, 6:21:43.610"
Finish processing event: "12/7/2020, 6:21:43.669"
Update Checkpoint: "12/7/2020, 6:37:26.121"
Checkpoint writing stucked in application for 15minutes. There is a duration of ownership expiration set as partitionOwnershipExpirationInterval(Duration.ofSeconds(150)) during creation.

To Reproduce
Keep updating checkpoint and It will happen occasionally
Code Snippet
public final Consumer<EventContext> PARTITION_PROCESSOR = eventContext -> {
        Map<String, Object> metricMap = new HashMap<>();

        EventData event = eventContext.getEventData();
        metricMap.put(OWNER_ID, ownerId);
        metricMap.put(OFFSET, event.getOffset());
        metricMap.put(SEQUENCE_NUMBER, event.getSequenceNumber());
        metricMap.put(ENQUEUE_TIME, event.getEnqueuedTime().getEpochSecond());
        metricMap.put(PARTITION_ID, eventContext.getPartitionContext().getPartitionId());
        metricMap.put(EVENT_ID, String.format("%s_%s_%d", metricMap.get(OWNER_ID), metricMap.get(PARTITION_ID), (long) metricMap.get(SEQUENCE_NUMBER)));

        String receivedEventContext = metricMap.entrySet().stream().map((entry) -> (entry.getKey() + "=" + entry.getValue().toString())).sorted().collect(Collectors.joining(" & "));
        LOG.info("receive event: {}={}", EVENT_ID, metricMap.get(EVENT_ID));

        metricMap.put(EVENT_HUB_SINK_COUNT, "0");
        metricMap.put(EVENT_HUB_SINK_TIME, "0");
        metricMap.put(BLOB_STORAGE_SINK_SIZE, "0");
        metricMap.put(BLOB_STORAGE_SINK_TIME, "0");
        metricMap.put(TRANSFORMATION_TIME, "0");

        long lag = Instant.now().getEpochSecond() - (long) metricMap.get(ENQUEUE_TIME);

        statsd.recordGaugeValue("xxxxxxx", lag, "partition_id:" + metricMap.get(PARTITION_ID));

        metricMap.put(EXECUTION_TIME, getExecutionTime(() -> processEvent(event.getBody(), metricMap)));

        String executionDetails = metricMap.entrySet().stream().map((entry) -> (entry.getKey() + "=" + entry.getValue().toString())).sorted().collect(Collectors.joining(" & "));
        LOG.info("finish event processing: " + executionDetails);

        eventContext.updateCheckpoint();
        LOG.info("update checkpoint: {}={}", EVENT_ID, metricMap.get(EVENT_ID));
    };

Expected behavior
It should either fail or succeed in shorter time.
Setup (please complete the following information):

OS: Linux
Version of the Library used: 5.3.1

Hi @alzimmermsft,
The updateCheckpoint in EventHubs blob checkpoint store calls the blob storage API blobAsyncClient.setMetadata(metadata);
Among many calls, one call was stuck for 15 minutes and then succeeded. Other calls about the same time in different threads succeeded immediately. Do you know of any similar cases?
Another question is, can we configure the timeout for the above API? If it times out in much shorter time like in a few seconds, the updateCheckpoint won't be blocking for 15 minutes. An error is much better than a 15-minute waiting.

Based on the dependencies of azure-messaging-eventhubs-checkpointstore-blob it resolves to azure-core-http-netty 1.5.4, in a new release of this library (1.6.0 and above) additional logic was added to timeout requests/responses after a certain time of inactivity. Upgrading to a new version of azure-storage-blob or azure-core-http-netty should add in this functionality which should help reduce the chances of hitting a 15 minute wait period in the application.

@neallee2012 Following Alan's answer above, could you put azure-storage-blob 12.9.0 in your pom.xml before we release a new checkpoint store blob version that uses storage 12.9.0?
<!-- https://mvnrepository.com/artifact/com.azure/azure-storage-blob -->
<dependency>
    <groupId>com.azure</groupId>
    <artifactId>azure-storage-blob</artifactId>
    <version>12.9.0</version>
</dependency>

@neallee2012 Do you have any updates? Did you try the new storage blob version?


Answers Integration - Beta V1

Sorry for opening this by mistake... PR will be coming soon! Thanks everyone for the awesome work (:


RssAgent: Add limit on feed items fetched

How's this for a start?
I'm going to look at rss_agent_spec file later and try to figure out how to add a test in there

Nice!

Does it set a limit on how many events can be created per run?  If so, I would call it "max_events_per_run" and probably make it a common option in the future.

OK, sounds good
On Thu, Jun 18, 2015 at 11:24 PM, Akinori MUSHA<EMAIL_ADDRESS>wrote:

Does it set a limit on how many events can be created per run? If so, I
would call it "max_events_per_run" and probably make it a common option in
the future.
—
Reply to this email directly or view it on GitHub
https://github.com/cantino/huginn/pull/865#issuecomment-113388309.

Related to issue #858

Looks good!  If this is working for you, I'll merge it.

Yep, it's working for me

Thanks @irfancharania, great work!
Would you mind sending me a quick email at andrew at andrewcantino dot com?


Autosave only after smth changed

First step for #977

Download:
Environment: QT=5.12, ARCH=32, CONFIGURATION=release, QTIFW=C:\Qt\Tools\QtInstallerFramework\3.1


We can not pass a value for one scenario to another

We can not pass a value for one scenario to another in the same feature file ,
can you tell how to do this
Scenario: test1
Given path '/user/applications'
And request {"lastName": "dfsfdfds", "zipCode": "06037", "ssn": "0000"}
When method POST
Then status 200

def response = response.replace(')]}',', '')
def response = JSON.parse(response)
And assert   response.listOfApplications[0].loanAppStatus == "APPROVED"
And def res = response.listOfApplications[0].appId

Scenario: Test2
Given path '/user/applications/' + res
When method GET
Then status 200
here value "res" is not coming from Scenario: test1to test2

@satishgowda please ask such questions on stack overflow. and this is already answered: https://stackoverflow.com/a/54182437/143475


Remove autofocus from email field on Registration screen

Description
LEARNER-2913

Remove autofocus from email field on Registration screen
Also includes a workaround to fix auto announcement of Spinner's
accessibility text

Codecov Report

Merging #1027 into master will increase coverage by 0.32%.
The diff coverage is 0%.

@@             Coverage Diff              @@
##             master    #1027      +/-   ##
============================================
+ Coverage     17.39%   17.72%   +0.32%
+ Complexity     1048     1047       -1
============================================
  Files           479      477       -2
  Lines         19958    19586     -372
  Branches       2260     2221      -39
============================================
- Hits           3472     3471       -1
+ Misses        16087    15717     -370
+ Partials        399      398       -1

Impacted Files
Coverage Δ
Complexity Δ

...ain/java/org/edx/mobile/view/RegisterActivity.java
0% <ø> (ø)
0 <0> (ø)
:arrow_down:

...e/registration/view/RegistrationOptionSpinner.java
0% <0%> (ø)
0 <0> (ø)
:arrow_down:

...bile/src/main/java/org/edx/mobile/util/Config.java
60.49% <0%> (-0.62%)
28% <0%> (-1%)

...g/edx/mobile/view/CourseTabsDashboardActivity.java
0% <0%> (ø)
0% <0%> (ø)
:arrow_down:

...g/edx/mobile/view/CourseTabsDashboardFragment.java
0% <0%> (ø)
0% <0%> (ø)
:arrow_down:

.../org/edx/mobile/view/NewCourseOutlineFragment.java

.../org/edx/mobile/view/NewCourseOutlineActivity.java

.../mobile/view/adapters/NewCourseOutlineAdapter.java

...mobile/third_party/view/PinnedSectionListView.java
0% <0%> (ø)
0% <0%> (?)

...bile/src/main/java/org/edx/mobile/view/Router.java
15.81% <0%> (+0.15%)
8% <0%> (ø)
:arrow_down:

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 14097af...38d036a. Read the comment docs.

cc @staubina


Do not use jinja variables in name  as it is not supported by migrators

See discussion in https://github.com/conda-forge/librobometry-feedstock/pull/20#issuecomment-2041618340 . Not doing so results in migrators error (see https://github.com/regro/cf-scripts/actions/runs/8732998278):
bot error (
[bot CI job](https://github.com/regro/cf-scripts/actions/runs/8732998278)
): main: Traceback (most recent call last):
  File "/home/runner/work/cf-scripts/cf-scripts/cf-scripts/conda_forge_tick/auto_tick.py", line 1253, in _run_migrator
    migrator_uid, pr_json = run(
                            ^^^^
  File "/home/runner/work/cf-scripts/cf-scripts/cf-scripts/conda_forge_tick/auto_tick.py", line 234, in run
    migrator.run_pre_piggyback_migrations(recipe_dir, feedstock_ctx.attrs, **kwargs)
  File "/home/runner/work/cf-scripts/cf-scripts/cf-scripts/conda_forge_tick/migrators/core.py", line 268, in run_pre_piggyback_migrations
    mini_migrator.migrate(recipe_dir, attrs, **kwargs)
  File "/home/runner/work/cf-scripts/cf-scripts/cf-scripts/conda_forge_tick/migrators/cstdlib.py", line 206, in migrate
    sections = _slice_into_output_sections(lines, attrs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/cf-scripts/cf-scripts/cf-scripts/conda_forge_tick/migrators/libboost.py", line 48, in _slice_into_output_sections
    raise RuntimeError("Could not find all output sections in meta.yaml!")
RuntimeError: Could not find all output sections in meta.yaml!

Checklist

[x] Used a personal fork of the feedstock to propose changes
[x] Bumped the build number (if the version is unchanged)
[ ] Reset the build number to 0 (if the version changed)
[x] Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
[x] Ensured the license file is being packaged.

@conda-forge-admin, please rerender

@xela-95 feel free to add automerge label, thanks!


Negative Zero denom should be treated like Zero instead of panic.

This is issue is related to https://github.com/rust-bitcoin/rust-bitcoin/issues/3307
I believe this should not panic:
let _a = Amount::from_str("-0 BTC").unwrap();
The reason being that assert_eq!("-0".parse::<f64>(), "0".parse::<f64>()); is considered true, that 0 is equal to negative 0, and therefore parsing -0 BTC should be equal to Amount::ZERO.  Same goes for other denominations (sat etc).

I don't think we should allow negative 0. Yes, it is mathematically equal to 0 as an integer, and therefore you can argue that it's just a formatting thing, but I would argue that -0 is a signed value, and therefore of a different type than Amount.

FTR Rust doesn't consider -0 valid for unsigned integers. So I think we should do the same. (Yes, we treat Amount more like float but also unsigned and there's no unsigned float to compare with.)

I would argue that -0 is a signed value, and therefore of a different type than Amount.

A signed value is not synonymous with a negative value.

FTR Rust doesn't consider -0 valid for unsigned integers. So I think we should do the same. (Yes, we treat Amount more like float but also unsigned and there's no unsigned float to compare with.)

Hmm that bothers me that a -0 float is value but a -0 u64 is invalid.  We actually treat the input like a float which is why I still think it makes sense to follow how Rust works with floats.

Seems i'm the minority here so I'll work around it.

We actually treat the input like a float

We treat it as a fictitious uf64 so we don't carry any sign. I was speaking about unsigned numbers, not floats/integers.
Also parsing negative zero in Rust stores the sign and then outputs negative zero
Here you could argue we're meaningfully differing from floats, however preserving the sign would be a lot of work and would be lost on conversions to/from u64 sats, not to mention that from_sat would have to become fallible or we would have to double the type's size (because of padding we can't even add one byte). Both of these options are horrible.(1) So I conclude we really need to differ from floats here.
(1) Fallible from_sat would've been fine if we guaranteed something stronger, which would have additional value (e.g making it equivalent of u63 would make conversion to i64 infallible). I was even advocating for 21M limit but there's a strong opposition to that. So no such change is going to happen.

I would say that we're emulating a decimal type, not f64. And for a (typical) decimal type which can represent values exactly as the user types them, there is no distinction between 0 and -0. Unlike IEEE floats.

A signed value is not synonymous with a negative value.

They don't need to be synonyms for negative numbers to always be signed.

Unhelpful comment: Bitcoin should never have used BTC amounts, sats only, floats are a pain in the neck - period (pun intended).

Fully agreed. But yes, it's hardly helpful to say now :)

I would say that we're emulating a decimal type, not f64. And for a (typical) decimal type which can represent values exactly as the user types them, there is no distinction between 0 and -0. Unlike IEEE floats.

I see.  This discussion is also happening on pr 3346.  There's a crate rust_decimal that implements a decimal type, that ought to work the same as how Amount parses decimals.  Although I notice in the rust_decimal crate, if the precision can't be represented because the number is too precise, it just rounds to 0, while the Amount implementation throws a parse error.

@yancyribbens not knowing anything about rust_decimal crate it feels like that behavior already failed the purpose of the crate. But anyway, first and foremost we're making a financial application here, so all rules of it apply before anything else.

not knowing anything about rust_decimal crate it feels like that behavior already failed the purpose of the crate

Hmm maybe this sentence makes more sense in Slovak, or is an expression in the language, although I admit to not knowing anything about the rust_decimal crate.

Of topic, I spent some time in Bratislava a while back (per-pandemic times).  I remember going to a place for lunch that even accepted btc, although when I tried to pay, wait staff didn't actually know how to accept btc.  Pretty par for the course though.  Anyway, Bratislava was nice, like Vienna but much more affordable and chill.

@yancyribbens Kix's point is that the point of a decimal crate is that it can represent exact decimals. If you parse stuff and then it changes what you parsed, it's not really doing that.
Having said that, I've used rust-decimal before and in practice this isn't a big deal. With Bitcoin you have only 8 digits of precision and you never encounter a serialized version of anything more than that. And then before outputting you use the RoundingStrategy enum to bring whatever number you computed (which will either have 8 significant figures if you were just summing, or infinitely many if you were doing any nontrivial calculation, so you have to round no matter what) in line with whatever tax software or whatever you need to match.
It's also worth noting that Excel has the same behavior - if you type something with a bajillion sig figs it'll just silently drop them. And for better or worse, half the world's accounting processes wind up using Excel for critical stuff.

@apoelstra ah cool, that's useful information.  I'm toying with making a proptest for Amount, so that's helpful.

@apoelstra I often compute EUR <-> BTC conversion manually and then enter the amount relying on error messages to tell me where the 8th digit is so I don't have to bother counting. :D But funnily enough if it always rounded then just entering whatever would have worked for me.
@yancyribbens pre-pandemic we also had Paralelna Polis. It was absolutely awesome, shame it crumbled. But I'm no longer in Bratislava anyway.

pre-pandemic we also had Paralelna Polis. It was absolutely awesome, shame it crumbled. But I'm no longer in Bratislava anyway.

I went to paralelni polis in Prague which was cool I thought.  Hopefully that didn't get shuttered as well.  Goes without saying I'm not in Bratislava anymore either :P or europe for that matter.  I thought about going to Tokyo for Bitcoin Tokyo but I'm not feeling very ambitious about traveling right now.

Actually Prague got too for different reasons (though some are somewhat related to pandemic). They're restructuring it, so at least there will be something interesting happening.


Should scrolling/printing out-of-range characters on the display be an "error glyph"

This might be considered a breaking change, and so, we might not want to change this.
The issue is that when trying to scroll or print UTF-8 long characters, like 갎, we end up with 3 empty characters (UTF-8 encoding is 0xEAB08E), which might make it look like the screen animation has ended.

Related to: https://github.com/lancaster-university/codal-microbit-v2/issues/423
Related to: https://github.com/lancaster-university/codal-microbit-v2/issues/424

Having an "error character" instead of a white space means that at least it shows something unexpected but a bit more obvious, that doesn't resemble a latin letter.
My first thought would be that people might already be used to see squares ▯ or the replacement character � .

@JohnVidler suggested we could also have this a config option with space by default.

Some discussion about a possible implementation if we decide to do this:

https://github.com/lancaster-university/codal-core/pull/168#issuecomment-2057186345


Regarding the inclusion of GoG games

Hi everyone,
I have a bunch of DRM-free, linux native, GoG games on my library that I've decided to package.
I could have perfectly run them from lutris or other solutions but instead I've created proper packages for them.
This helps reducing overhead and, in my humble opinion, it brings a better gaming experience to NixOS.
I thought that maybe they could fit here, I would like to contribute back to the nix community and this seams like a cool way to it.
Although there are some problems, while I do already have a few working games the nix code could be drastically improved. They are my first take at packaging so I did what I could. I also lack the knowledge to even create packages outside an standalone flake...
I want to contribute but I would need some aid, and well, I don't even know if those kind of things fit here.
Thanks in advice.

I was cleaning up a bit my Darkest Dungen flake and it looks like this:
(I'm posting this as an example to what has been explained in the previous post).
{
  description = "Darkest Dungeon (GoG) Flake";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";

    # Nix code formatter.
    alejandra = {
      url = "github:kamadorueda/alejandra/3.0.0";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs = inputs @ {
    self,
    nixpkgs,
    ...
  }: let
    inherit (self) outputs;
    pkgs = nixpkgs.legacyPackages."x86_64-linux";

    # There are better ways to handle this, but for now `with` would have to be present.
    # See the note regarding nix best practices.
    commonDeps = with pkgs; [
      SDL2
      libcxx
      libGL
      fmodex
      libmx
      fmodex
      xorg.libX11
      xorg.libXext
      xorg.libxcb
      xorg.libXau
      xorg.libXdmcp
    ];
  in rec {
    formatter.x86_64-linux = inputs.alejandra.defaultPackage."x86_64-linux";

    packages = {
      darkest-dungeon = pkgs.stdenvNoCC.mkDerivation rec {
        name = "darkest-dungeon";

        # The official installer is required but, obviusly, not provided by this flake.
        src = pkgs.requireFile {
          name = "darkest_dungeon_24839_28859.sh";
          url = "https://www.gog.com/game/darkest_dungeon";
          sha256 = "2b235b43d8d6ab4b2a4b80b627ce2a9c31c1b4bee16fc6f9dda68c29cb5da99c";
        };

        nativeBuildInputs = with pkgs;
          [
            autoPatchelfHook
            makeBinaryWrapper
            unzip
            zip
            copyDesktopItems
          ]
          ++ commonDeps;

        runtimeDependenciesPath = pkgs.lib.makeLibraryPath commonDeps;

        # Desktop entry.
        desktopItems = [
          (pkgs.makeDesktopItem {
            name = name;
            desktopName = "Darkest Dungeon";
            genericName = "Loosing your will to live; the game.";
            exec = "darkest";
            #icon = "CCicon";  # The proper icon needs to be set instead.
            comment = "Darkest Dungeon GoG version.";
            categories = ["Game"];
          })
        ];

        # FIXME: I know this is curserd, but for some reason, it is required.
        unpackPhase = ''
          # First, creates a new fixed zip archive from the original installer.
          ${pkgs.zip}/bin/zip -F $src --out fixed-src.zip

          # Then extracts that one instead.
          ${pkgs.unzip}/bin/unzip fixed-src.zip
        '';

        /*
        Nix would complain about not knowing how to unpack a source file ending in
        .sh, even when specifically told which command to run.

        It is specially weird since according to the logs, it unpacks the installer but fails
        at the very last moment because it tries to unpack it again.

        Maybe the fix command can be moved to a preUnpackPhase and then point the source var to it.
        This would make the unzipping happen automatically. Don't know if it's possible.
        */

        installPhase = ''
          mkdir -p $out/share/${name}

          # Only copies this folder since the rest is useless.
          mv data/noarch/game/* $out/share/${name}

          # Creates the wrapper for the game.
          makeBinaryWrapper $out/share/${name}/darkest.bin.x86_64 $out/bin/darkest \
          --prefix LD_LIBRARY_PATH : "$runtimeDependenciesPath"
        '';
      };
    };

    defaultPackage.x86_64-linux = packages.darkest-dungeon;

    # Metadata
    meta = with pkgs.lib; {
      description = "The game that would drive you into utter maddness.";
      longDescription = "Darkest Dungeon GoG version. Without any DLCs.";
      homepage = "https://www.darkestdungeon.com/";
      downloadPage = "https://www.gog.com/game/darkest_dungeon";
      license = licenses.unfree;
      mainProgram = "darkest";
      maintainers = with maintainers; [srestegosaurio];
      platforms = platforms.linux;
    };
  };
}

As for future work:
This approach lacks support for DLCs. This could be fixed by creating a simple home-manager module in which the user can declare which DLCs they have. I've never done it but it should not be difficult to change the derivation build plan based on the options provided by the user.
And a few nitpicks;

It does not need to extract the whole zip, I need to look up the command-line options to only get what's needed.
I have not tested the desktop entry yet but the icon needs to be added.

Hi! It's great that you want to contribute. I'll test the above package soon. However, I have a few questions/points to add.

Do you need to be logged in in any way to download the installer? Or do you need to log into the installer to allow downloading/installing the game? If no login mechanism is in place, this can easily be categorized as pirating, which I don't want to allow in this flake.
To make things easier, we can create a "builder" that has a game list as the argument. The builder will then create a package out of each game. This reduces duplication and can also be used to set global options for games, just like the legendary builder does.
DLCs can be handled by the builder if we implement it.

Hi, thanks for you're reply. Here are more details:

Do you need to be logged in in any way to download the installer? Or do you need to log into the installer to allow downloading/installing the game? If no login mechanism is in place, this can easily be categorised as pirating, which I don't want to allow in this flake.

No, you don't need to be logged-in or anything similar since the derivation uses requireFile which means that each user should own a copy of the required installer beforehand. While building nix would tell you which exact command to run in order to add the installer to the nix store.
This behaviour can pose as a problem in situation like testing although I might have a few ideas regarding that which, hopefully, don't involve promoting piracy.

To make things easier, we can create a "builder" that has a game list as the argument. The builder will then create a package out of each game. This reduces duplication and can also be used to set global options for games, just like the legendary builder does.

That's a new concept to me but sound rather useful, after all I've found the only differences trend to be the set of libs and metadata info about the game. I'm up for everything which reduces boilerplate/unnecessary code.

DLCs can be handled by the builder if we implement it.

Nice, I had little to no idea regarding how to approach that.

Also, this could be extended to all DRM-free games since it does not relay on any platform specific way of downloading the games. I've mentioned GoG because I own some games there but there's also itch.io and others.
I also want to ask about creating derivation for non-native games thought wine:

Is it possible to achieve without resorting to weird hacks?
If possible, how difficult would it be?

I'm pretty certain that the answers will vary depending on the game but I wanted to know the general state.
I've ask this because I've noticed the presence of wine in the flake.
Thanks!

Sorry for the late response, I missed the notifications.
Yes, it's possible to create derivations for wine-run games. Depending on how you define "weird hacks", you may or may not like the current solution. Look at the legendaryBuilder/osu-stable derivations.

Hi,

Sorry for the late response, I missed the notifications.

Don't worry, happens sometimes. I'm not the best keeping up with notifications either.

Yes, it's possible to create derivations for wine-run games. Depending on how you define "weird hacks", you may or may not like the current solution. Look at the legendaryBuilder/osu-stable derivations.

The only "weird hack" that currently bothers me is that I have to recompress the zips before extracting them, still don't know why. I've also looked up a bit regarding wine derivations and  at least they are possible which is something.
I've also read that they can be a bit hacky but that has to do with the immutability of the nix store and how windows programs operate. If I'm not mistaken.
I'm currently trying to ducktape my way into creating a builer for the games, they share most boilerplate so it might be a nice thing to have.
Also, I've updated the Darkest Dungeon flake here: https://next.forgejo.org/notevil/darkest-dungeon-nix


server crash

latest.log
debug.log

disable mixin.collections.entity_by_type in canary

disable mixin.collections.entity_by_type in canary

i delete mod Canary and in console: https://pastebin.com/w5jLV0Ve


Chat between GCC and Commercial Cloud doesn't work

Chat between meeting participants in GCC and commercial clouds doesn't work, so it shouldn't be listed as working.

@atguilmette
Thank you for submitting this feedback.
I will get this over to for investigation. Thank you for reporting and making the docs better. Much appreciated.

@officedocsbot assign @scanum

@atguilmette  - thank you for submitting feedback.
I think the best way forward is if you open a service ticket in your tenant so this can get resolved ASAP. Based on the outcome let me know if it is something that can be called out in the docs.
Please follow this link to contact support for business products:  https://docs.microsoft.com/office365/admin/contact-support-for-business-products
Please keep us posted here on the resolution so we can feed whatever information you discover into the content.

@officedocsbot close

Bouncing back here. Cross cloud federation isn't supported.


Reenable openSUSE-SLE shedule

https://progress.opensuse.org/issues/111255

Codecov Report

Merging #30 (cc84a0e) into master (300aac7) will not change coverage.
The diff coverage is 100.00%.

@@          Coverage Diff           @@
##           master     #30   +/-   ##
======================================
  Coverage    9.06%   9.06%
======================================
  Files          23      23
  Lines        1577    1577
======================================
  Hits          143     143
  Misses       1434    1434

Impacted Files
Coverage Δ

openqabot/loader/repohash.py
100.00% <100.00%> (ø)

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 300aac7...cc84a0e. Read the comment docs.


Provide ResetPassword notification toMailUsing function with the full resetUrl.

Allows overwriting the resetUrl function using createUrlUsing callback in a similar way verificationUrl can be overwritten with createUrlUsing to be included in toMailUsing in VerifyEmail.
With the current implementation, in order to include a custom URL in toMailUsing callback, the createUrlUsing callback is of no use.

This was attempted before and the failed tests are in place to avoid this breaking change.

Now it's failing due to Route [password.reset] not defined... that must be related to something else, no?

Now it's failing due to Route [password.reset] not defined... that must be related to something else, no?

https://github.com/laravel/framework/pull/39681 The tests was added because this exact PR keep popping up and we want to avoid causing breaking change.

#38552 merged and reverted
#41109 closed due to breaking change
#41514 closed due to breaking change

I understand you want to avoid causing breaking changes, but if this keeps coming up, then perhaps there is a way to implement this in a safe way then? Closing this due to lack of interest on the maintainer's part.


SCM Sync view - move Tree/List choice to action button

Type: Feature Request
At the moment it is exposed as two options on the ... dropdown menu, with a checkmark against one or the other.
For consistency with the equivalent feature in the main SCM view title bar please reimplement as an action button whose icon changes as you switch state.
VS Code version: Code - Insiders 1.83.0-insider (c72447e8d8aaa7497c9a4bd68bc4301584b92beb, 2023-09-22T09:29:47.641Z)
OS version: Windows_NT x64 10.0.22621
Modes:

/assign @lszomoru

Thanks for the feedback. The "Source Control" view exposes the Tree/List view mode in two places: 1) the title bar, and 2) the ... menu (View & Sort). I did not want to place it in both locations and I did not think that switching between List/Tree is an action that warrants a prominent place in the title bar. Having said that, let's keep this issue opened to continue to gather feedback.

Sync view has been removed.


Playlist - Fix 'Add Entity' Drawer Title

Hey, I just made a Pull Request!
This PR fixes an issue where the 'Add Entity' drawer title did not reflect the configured value when set.
:heavy_check_mark: Checklist

[x] A changeset describing the change and affected packages. (more info)
[ ] Tests for new functionality and regression tests for bug fixes
[ ] Screenshots attached (for UI changes)
[x] All your commits have a Signed-off-by line in the message. (more info)

Overall looks good - thanks for the fix!
However looks like prettier is failing - can you run prettier to fix the style issues?

@kuangp Should be good to go now. 😄


ExpressionChangedAfterItHasBeenCheckedError thrown when switching between two mat-menus with matMenuTriggerDatadifferent

Bug:
What is the expected behavior?
ExpressionChangedAfterItHasBeenCheckedError should not be thrown on switching between submenues that are using the same mat-menu element with different matMenuTriggerData.

What is the current behavior?
The error is thrown
What are the steps to reproduce?
https://stackblitz.com/edit/angular-nevxe3-cafesh?file=app/nested-menu-example.html
Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Is there anything else we should know?
It is regression of #12194

I wasn't able to reproduce it against the latest code in master. Closing.


What are the data sources and the licence?

In other words, how do I know this really is open data and not just pirated from copyrighted websites? Thanks!
G.

Please post questions to the opensport forum. Thanks. Cheers.

I see you've rejected my improvements to the README without any comments, fair enough, although that just confirms my original concern. I've posted a question on the forum as you suggested. If the attitude the group has is the same as yours, I guess it won't be published :-/ There is no open data without licensing.


Foreground process model

Continuation of process model discussion that started in #920
Background
Currently, kong start is a daemonizing command. It exits after spawning its services in the background, nginx, dnsmasq, & serf.
This daemon process model is not compatible with container platforms like Docker & Heroku, as these containers depend on the start command remaining attached to the calling process, in the foreground. Refer to the official docs:

Heroku foreground execution
Docker examples demonstrating foreground execution:

Postgres

CMD ["/usr/lib/postgresql/9.3/bin/postgres", "-D"…]
-D means no daemonize, remain in the foreground

NodeJS

CMD ["node", "/src/index.js"]
Node remains in the foreground, only exits the event loop when there are no more callbacks to perform (About Node.js®)

Redis

ENTRYPOINT  ["/usr/bin/redis-server"]
redis-server remains in the foreground

The official Kong Docker container itself does not actually run Kong in the foreground. It's handed off to stream the error log.
CMD kong start && tail -f /usr/local/kong/logs/error.log

What happens if one of the background processes spawned by kong start exits or crashes?
Proposal: Process Supervision
To solve this problem, we need to implement a process supervisor that starts each service as a subprocess, remaining attached in the foreground, so that upon exit or crash, the supervisor can restart the subprocess or exit so that its parent process (Docker daemon or Heroku dyno manager) can restart the container.
External process management solutions:

runit with Heroku
Supervisor with Docker

Kong's current service startup in Lua could also be crafted into a proper process manager using Lua modules like:

subprocess
lua-subprocess

I've so far failed to get either of these Lua modules working locally, much less as part of a service deployment. They seem to be old experiments without any activity to make them easily installable as a Lua rock.
Challenges: Configuration & Log streams
So, I've been experimenting with using an external process manager to run nginx, dnsmasq, & serf as foreground processes with stdout/stderr log streams.
The main challenge is calling into Kong's Lua services modules to prepare the database and service configurations, before the services are started by the process manager.
The Path Forward
The external process management model would be the most robust solution, using proven Posix tools to supervise the processes of Kong. Building a process manager in Lua seems like internalization of a problem already solved elsewhere.
Separating Kong configuration calls from process management will be the biggest challenge.
What do you all think?

Hi Mars!
Great, thanks for the detailed feedback!
Yes, process management could definitely be handled better by Kong's CLI and avoid things like this or that or even sending signals through a shell invocation as well as handle cases when Kong needs not be daemonized.
It is worth noting that foreground mode as been discussed in various places already, notably in Mashape/docker-kong#16 (run Nginx in foreground for Docker) and #647 (Using LuaPosix), which back in the day got ignored because we did not use to manage so many subprocesses.
I see two benefits if we switch to another solution:

Better handling of Kong's subprocesses (such as the waiting example or signal sending) in general. That means a more reliable Kong and better restart/reload commands (for example iirc, the current upgrade from 0.5 to 0.6 requires people to run kong restart simply to start the subprocesses, instead of handling that from reload and avoiding downtime).
Possibility to keep a process in foreground without using the Nginx's daemon off; directive (which btw once it ends because of a kong stop has the oddity of printing [OK] started, which is somewhat funny)

However, if not written in Lua, it has a major drawback:

Including one more dependency in Kong's stack, which is already quite huge (Java, Cassandra, Openssl, PCRE, Nginx, Openresty, LuaJIT, Luarocks, Serf, dnsmasq and I might forget some).

Using Lua scripts to build Kong's CLI is also a major advantage in the sense that it can reuse all of Kong's internal APIs, which is done as of now and will be even much more in the future for commands such as kong add-api <...> etc... (See #810 for even more compatibility with Kong's internal APIs).
Maybe we could write Lua bindings for a C process manager (do you know of any?) or use an existing one and keep Lua. This would also be very useful for our test suite which starts and stops Kong many, many times.

Hi @thibaultCha!
So true that running the processes from Lua would provide a minimalism & directness to the models at play inside Kong.
After investigating LuaPosix and the "subprocess" rocks mentioned above, writing a robust process control layer in Lua is going to be significant feature. LuaPosix (or a tiny part of it) is the foundation of those subprocess modules, which demonstrate how challenging this will be :zap:
So, I've been continuing down the path of reading the service configurations out of Kong. I've written a Lua script that exports all the process params as environment variables.
This Procfile is what I have working today with those environment variables, except for a couple runtime issues (Cassandra cert & serf_event.sh):
dnsmasq: dnsmasq -p $DNSMASQ_PORT -N -o --listen-address=<IP_ADDRESS> --keep-in-foreground
nginx: nginx -p $NGINX_WORKING_DIR -c $NGINX_CONFIG
serf: serf agent -bind $SERF_CLUSTER_LISTEN -rpc-addr $SERF_CLUSTER_LISTEN_RPC -encrypt $SERF_ENCRYPT -log-level err -profile wan -node $SERF_NODE_NAME -event-handler $SERF_EVENT_HANDLER

Making the minimal changes to Kong to support external supervision of the processes (nginx, dnsmasq, serf)

One of the beautiful things about this process model, as that all of their stderr streams flow through the parent process, merged into a unified stream.
Hopefully the plan for a native/Lua solution would include streaming logs instead of writing to various hardcoded log files in the Nginx temp dir. Let the host's process manager decided whether to redirect log streams to a local file or send them out to a collector (syslog, etc.)

To make Kong compatible with an external process supervisor, a few changes would be required.
You can see in this external-supervise branch comparison to master:

the KONG_EXTERNAL_SUPERVISE environment variable/flag to:

short-circuit is_running() checks (the external supervisor takes care of keeping processes up)
perform service bootstrapping from Kong.init() (only serf:_autojoin() at this time)

the previously proposed separation of prepare_all() & start_all() to:

permit configuration of all services without implicitly starting them

That external-supervise branch is WIP/research into making this work. Ideally we could apply these solutions using a more sound architectural plan, like:

Add an after_start() method to each of the kong.cli.services so that each service clearly defines bootstrapping after the process starts.
Add appropriate integration tests for when KONG_EXTERNAL_SUPERVISE flag is present

@mars

That experimental external-supervisor fork of Kong mentioned above can now be seen in context of a complete deployment on Heroku:

Heroku app, which uses…
Heroku buildpack

@sinzone great point! We will eventually list this buildpack in Elements.
Before we make it publicly discoverable through heroku.com, we need to resolve this cluster runtime issue: Cassandra error from kong.core.cluster.
I will be following-up/working on at least the temporary solution that @thibaultCha & I discussed in that issue:

…to define the configuration & dao globals inside each of the kong.core.cluster timers.

So I have seen, that now 'kong start' is run as a foreground process, but now I do not have access or error logs. How can I tell kong that I want these logs to be printed to stdout, to make it accessable via 'docker logs'?

Removing third-party dependencies #835

Does the desire to remove 3p dependencies trump this issue? i.e. will mashape consider merging a PR that implements what @mars is suggesting in the interim?
@mars, I see the last time you did work on this was about a month ago. Are you planning on completing the supervised process integration or are you just trying things out? I have a desire to get this working properly with docker and, assuming that a PR will be considered here, I may be inclined to help out if it's not something someone like yourself already has a solution for.

@mjdev Mashape's Kong does not send logs to stdout. Unless you're willing to go renegade experimenting with these external process supervision patches & running a supervisor like runit, tailing Nginx & other services' log files is the way.
@nguilford The work on this has been experimental to enable the Heroku Kong buildpack & app which is not integrated back into Mashape's Kong.

Has process supervision been addressed with the 0.9.0 CLI improvements? Or do Kong's processes still run unattached?

They still run un-attached.

 serf replacement

Finally Kong 0.11+ will only consist of an nginx process (dnsmasq and serf are gone), so that this becomes a non-issue. The new Docker image for 0.11 will directly run the nginx process.
A simple test can be seen at https://github.com/Mashape/docker-kong/blob/0.11.x/Dockerfile#L16
Closing this now.

Managed to get Kong 0.11 deployed to Heroku 💜 https://github.com/heroku/heroku-kong
Made possible by all your work on the new single-process model, prepare & run semantics, dramatically simplified clustering, and Postgres support.

@mars Great news! We're glad to hear! Things are only going to improve on this front from now on! The next big leap forward will be #2355, if you are feeling curious ;)

@mars do you think we can list it in Heroku Elements now?

After some usage of the Kong buildpack & deploy button, it should begin to show-up in Heroku Elements. Things get indexed when they're used.
So, get more folks to try out Kong on Heroku with this button:


Remove BagReader from public interface

Since we already have a FileLike interface to abstract reading bytes in
various environments, BagReader feels like an unecessary added abstraction.
Fixes #27
This change removes it from the public interface so Bag construction only
requires passing in a FileLike.

@gkjohnson Sorry about that. I think this was caught between refactor work with some remaining items for a new major version and another issue that resulted in making a patch release.

Also I assume this is the only change I need to accommodate the API update? Does anything else need to change?

I think thats the only change. It matches what we are doing in studio https://github.com/foxglove/studio/blob/dcf862f688ce76c7747404b4956d58695c66ee9a/desktop/quicklook/getInfo.ts#L28 so I think you'll be good with that change.

Thanks! Figured something like that may have happened -- and thanks confirming my fix!