Documentation for composing middlewares

Is your feature request related to a problem? Please describe.
There are other middlewares like Auth.js and it would be good to provide documentation on how to use the middleware from next-intl in combination with those.
Describe the solution you'd like
A section in the middleware documentation.
Previous discussion:

https://github.com/amannn/next-intl/pull/149#issuecomment-1471592626 (and the comments below)
https://github.com/amannn/next-intl/pull/149#issuecomment-1509990635
https://github.com/amannn/next-intl-example-next-13/issues/2

/cc @narakhan @kieranm @velychkodmytro20

@amannn don't have time to handle this right now, will open a PR within the next couple of days. Assuming you want it targeting the main branch?

So if you're going to chain middleware it needs to go last, and using the API they expose is probably going to result in the least severe concussion from banging your head against the table.

@narakhan Hope you're recovering well currently! 😄
Thank you so much for chiming in here, if you're interested to look into this I'd be more than happy! 🙌
I'm currently thinking about a section in the middleware docs where a) we explain conceptually what it means to compose middleware (maybe similar to https://github.com/amannn/next-intl/pull/149#issuecomment-1471592626) and then b) a guide on how to integrate with Auth.js, since it's the most popular middleware for Next.js as far as I know.
Optionally, we could also add and link to an example in the repository (could be based on example-next-13). This could be used for simple e2e tests too if that helps, also to stay in sync with future releases of Auth.js.

Assuming you want it targeting the main branch?

Yep, I've recently cleaned up the RSC branch to only contain code specifically for RSC. Other improvements like the middleware are now available in stable releases and the documentation is also deployed on main.

I just had a moment to experiment with composing middlewares. This code seems to be working:
import createMiddleware from 'next-intl/middleware';
import {NextFetchEvent, NextMiddleware, NextRequest} from 'next/server';

export default withExtraMiddleware(
  createMiddleware({
    locales: ['en', 'de'],
    defaultLocale: 'en'
  })
);

function withExtraMiddleware(next: NextMiddleware) {
  return async (request: NextRequest, event: NextFetchEvent) => {
    // Step 1: Potentially change the incoming request
    request.headers.set('x-test', 'test');

    // Step 2: Call the nested next-intl middleware
    const response = await next(request, event);

    // Step 3: Potentially change the response
    if (response) {
      response.headers.set('x-test', 'test');
    }

    return response;
  };
}

export const config = {
  // Skip all paths that should not be internationalized
  matcher: ['/((?!_next|.*\\..*).*)']
};

I also found there is a (slightly hacky) way to programmatically compose rewrites on top of next-intl that could be interesting to implement named routes with localized pathnames:
    // ...

    // Step 2: Call the nested next-intl middleware
    const response = await next(request, event);

    // Step 3: Potentially change the response
    if (response) {
      // Add a programmatic rewrite
      // https://github.com/vercel/next.js/discussions/33477
      if (request.nextUrl.pathname === '/de/über') {
        const url = new URL('/de/about', request.url);
        response.headers.set('x-middleware-rewrite', url.toString());
      }
    }

    // ...

@narakhan Are you still interested on working on the Auth.js example? I could take care of the docs.

I just had a moment to experiment with composing middlewares. This code seems to be working:
import createMiddleware from 'next-intl/middleware';
import {NextFetchEvent, NextMiddleware, NextRequest} from 'next/server';

export default withExtraMiddleware(
  createMiddleware({
    locales: ['en', 'de'],
    defaultLocale: 'en'
  })
);

function withExtraMiddleware(next: NextMiddleware) {
  return async (request: NextRequest, event: NextFetchEvent) => {
    // Step 1: Potentially change the incoming request
    request.headers.set('x-test', 'test');

    // Step 2: Call the nested next-intl middleware
    const response = await next(request, event);

    // Step 3: Potentially change the response
    if (response) {
      response.headers.set('x-test', 'test');
    }

    return response;
  };
}

export const config = {
  // Skip all paths that should not be internationalized
  matcher: ['/((?!_next|.*\\..*).*)']
};

I also found there is a (slightly hacky) way to programmatically compose rewrites on top of next-intl that could be interesting to implement named routes with localized pathnames:
    // ...

    // Step 2: Call the nested next-intl middleware
    const response = await next(request, event);

    // Step 3: Potentially change the response
    if (response) {
      // Add a programmatic rewrite
      // https://github.com/vercel/next.js/discussions/33477
      if (request.nextUrl.pathname === '/de/über') {
        const url = new URL('/de/about', request.url);
        response.headers.set('x-middleware-rewrite', url.toString());
      }
    }

    // ...

@narakhan Are you still interested on working on the Auth.js example? I could take care of the docs.

Sorry likely don't have time to handle it right now.

I have the need to do something similar but my config for createIntlMiddleware is dynamically fetched from the edge. I ended up with something like this but I am not convinced it is the right approach.
async function middleware(req: NextRequest): Promise<NextResponse | void> {
  // Fetch config from edge
  const config = await getConfigFromHost(req.nextUrl.host);

  // Set custom header
  const response = NextResponse.next();
  if (config.id) {
    response.headers.set('x-marketplace-id', config.id || 'unknown');
  }

  const intlMiddleware = createIntlMiddleware(config.intl);
  const intlResponse = await intlMiddleware(req);
  // Merge the headers from the response with the intlResponse headers
  for (const [key, value] of response.headers.entries()) {
    intlResponse.headers.set(key, value);
  }
  return intlResponse;
}

export default middleware

It is working with one es-lint error of Unexpected await of a non-Promise (non-"Thenable").
This could be a useful case to put in the doc's potentially if there is a best practice approach.

Thanks everyone for participating and especially @narakhan for sharing his middleware implementation for Auth.js! There are now new docs on composing middlewares, including an example for Auth.js.
@ryanburns23 The new docs should hopefully help with your use case, let me know if there are open questions!

Thanks everyone for participating and especially @narakhan for sharing his middleware implementation for Auth.js! There are now new docs on composing middlewares, including an example for Auth.js.
@ryanburns23 The new docs should hopefully help with your use case, let me know if there are open questions!

Thanks for the release, while browsing the new middleware documentation I noticed that the provided example repos doesn't exist (example repos)

@bilel-lm Oh, good point—thanks! I've moved some files today, the links should be fixed now.

Thanks everyone for participating and especially @narakhan for sharing his middleware implementation for Auth.js! There are now new docs on composing middlewares, including an example for Auth.js.
@ryanburns23 The new docs should hopefully help with your use case, let me know if there are open questions!

Hello @amannn
I have been implementing some similar solutions, and I notice that the example does not redirect to "/secret" page after login.
How would you suggest redirecting the user to "/secret" once logged in? I am having some issues with this implementation.
Thank you so much!

@guifeliper That's a good point, thanks for noticing!
I'm not really experienced with Auth.js, this PR was my only exposure so far to the library. It is sometimes a bit tricky to find the right config.
If you're interested in contributing, we've got a minimalistic example in this repo along with some tests:

Code: https://github.com/amannn/next-intl/tree/main/examples/example-next-13-next-auth
Tests: https://github.com/amannn/next-intl/tree/main/examples/example-next-13-next-auth/tests

That could be helpful to quickly iterate with different config and figure out a solution, if you like!

Anyone have an example of integrating Supabase SSR cookie refreshing middleware with next-intl middleware when using Next.js 14?

Anyone have an example of integrating Supabase SSR cookie refreshing middleware with next-intl middleware when using Next.js 14?

Did you find a solution?

@AssisrMatheus @kimmo-koo maybe this will help you:
https://github.com/amannn/next-intl/issues/719

I'm so sorry to re-open this issue, but I'm having trouble understanding the underlying logic for middleware composition. I'm handling my cookie-based authentication through a custom middleware which looks like this:
import { NextRequest, NextResponse } from "next/server";

import { HOME_PATH, LOGIN_PATH, TERMS_PATH } from "constants/paths";

const accessTokenCookieName =
  process.env.ACCESS_TOKEN_COOKIE_NAME ?? "hal.access-token";
const PUBLIC_PATHS = [LOGIN_PATH, TERMS_PATH];

/**
 * Redirect to login page if no access token is found
 */
export function middleware(request: NextRequest) {
  const token = request.cookies.get(accessTokenCookieName);

  if (token) {
    // redirect to homepage if token is found on login page
    if (request.nextUrl.pathname === LOGIN_PATH) {
      return NextResponse.redirect(new URL(HOME_PATH, request.nextUrl.origin));
    }

    return NextResponse.next();
  }

  // Skip middleware for the public pages
  if (PUBLIC_PATHS.includes(request.nextUrl.pathname)) {
    return NextResponse.next();
  }

  return NextResponse.redirect(new URL(LOGIN_PATH, request.nextUrl.origin));
}

export const config = {
  /**
   * Match all request paths except:
   * - API
   * - NextJS chunks
   * - favicon.ico
   */
  matcher: ["/((?!api|_next/static|_next/image|favicon.ico).*)"],
};

I tried adapting it using the piece of code provided earlier in this issue, but I'm fairly new to next middleware usage, and I want to make sure I understand how it affects the response, and how I can combine both my authentication logic with the middleware provided by next-intl

any updates ?

1 @PhongLi
I need updates too


Allow custom ModuleResolverFactories

@Yannic can you share your use case, and what you're trying to achieve?
/CC @ChadKillingsworth who's done most of the work around node resolution here.

I'm also not sure what the goal of this is, but have to wonder if it would be solved by adding import map support to the BROWSER module resolver.

I'm using the Java API in a custom rule set for Bazel and need to support imports of different files depending on the target configuration. Unfortunately, that means that the imported module cannot have a stable import path (there may be multiple versions of the module in the build, although definitely not in the same JS compilation, and there cannot be multiple actions generating the same file). I would also like to avoid having multiple import-roots to avoid quadratic lookup time for imports.
I'll need to think about whether import maps are sufficient for the use case I have. Given the small size of this change, I would appreciate if you could accept it (as implementing import maps likely will take some time).

@Yannic I don't think we should accept this change into our code base, since it would only exist for your specific use case.
I suggest you make a fork of our repo instead and store this customization there for your use.


go install bug

go: github.com/gpustack/gguf-parser-go/cmd/gguf-parser@latest (in github.com/gpustack/gguf-parser-go/cmd/gguf-parser@v0.0.0-20240830110418-95b2217e772a):
The go.mod file for the module providing named packages contains one or
more replace directives. It must not contain directives that would cause
it to be interpreted differently than if it were the main module.

you can download it from the release page. go install does not support replacing the local module, we will remove this installation method from README later. thanks.


✨ Make the status controller handle the deletion of workstatuses

Summary
This PR adds logic to the status controller so that it handles the deletion of WorkStatus objects.
This PR also completes a pending e2e test, tracked by this comment. The test was blocked by #2020, and it's now unblocked by this PR.
Related issue(s)
Closes #2020

Using the status controller's memory of the association between workload object and WorkStatus object can not work because the WorkStatus object could be deleted while the status controller is not running.
If we could rely on the controller's memory, then it would not be necessary for the controller to enqueue whole WorkStatus objects. Instead the controller could maintain a map from WorkStatus name to the util.SourceRef from that WorkStatus.
One approach would be to rely on the status controller's memory, improving that by having the controller maintain a finalizer on the WorkStatus object. This is technically imperfect because Kubernetes does not have a perfect failure detector; it is barely possible that two concurrent copies of the controller could be running, each thinking that it is the sole manager of the finalizer and related state.
Another approach would be to maintain the association information in the workload object. Define a label name such as internal.kubestellar.io/work-status-ref to hold a reference to the WorkStatus that is the source of the workload object's status information.

The approach of relying on the WorkStatus object to indicate which workload object it applies to is fragile: because Kubernetes has no multi-object atomic transactions, and because Kubernetes is based on eventual consistency with no coherence between notifications about different objects, it is possible that the controller may see multiple WorkStatus objects referring to the same workload object for a while.

/priority undecided

/label needs-priority

/priority undecided

/label needs-priority
/remove-priority undecided

I thought about the proposed solutions, and also reflected on the current designs of the status controller.
When the status controller handles singleton statuses, it solely relies on the changes of WorkStatus object. In other words, the controller doesn't have a desired state clearly defined. This seems to be 'edge-driven' instead of (recommended) 'level-driven'. More details are available here. As a consequence, we have Issue #2020. We may probably have more issues in the future.
To improve, I'm proposing some redesigns in this doc. I started by (a) introducing a desired state, and (b) switching to the established 'edge-triggered, level-driven' pattern.

/lgtm
/approve


API: Migrating to the new server API

Sample json files for V2 are availabel here
https://github.com/fossasia/open-event-orga-server/tree/development/samples/ots16
We have to start with modifying out fold.js functions to suit the new format. The differences aren't too many.

Yup, I will also contribute to this

Since fold.js needs significant rewrite for this, we can look at offloading some work to frontend js files ?

Like I had mentioned before, we can make a openevent.js library for frontend. The .json files will be present along with index.html anyway, so the clientside js lib can live-load the data (like we do in Angular like webapps)

I like the idea for Openevent.js library and directly accessing its functions on front-side. But, can we make this an issue for later milestone. This will require significant changes on both Frontend and Backend.

@aayusharora will assign the frontend library-fication on a later milestone, correct !

Yeah correct @championswimmer.

all done !!!


[Bug][Manager] Stream source was not deleted when calling delete operate

What happened
Stream source was not deleted when calling delete operate.
What you expected to happen
Should set is_deleted = source_id.
How to reproduce
Just delete the source by id, you'll see the is_deleted field of this source still is 0.
Environment
No response
InLong version
master
InLong Component
InLong Manager
Are you willing to submit PR?

[ ] Yes, I am willing to submit a PR!

Code of Conduct

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

I can fix this issue.


Implement genes

The genes should affect the jumpmen's parameters, such as speed, color etc.
Estimated time: 2 h.

Closed by 540cdfe.


[Git] Add some files to gitignore file

Problem Summary:
Some files are generated after building manager project, add them to .gitignore file.
Checklist(Required)

Does it affect the original behavior: (Yes/No/I Don't know)
Has unit tests been added: (Yes/No/No Need)
Has document been added or modified: (Yes/No/No Need)
Does it need to update dependencies: (Yes/No)
Are there any changes that cannot be rolled back: (Yes/No)

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

cc @hf200012 @morningman, take a review when free, thanks.


Filter list of tasks that users can see in tasks section

Users should only be able to see tasks with no 'type' since alerting tasks have a type.
I'm not sure that we can make a request to the backend to filter, so we might want to filter after getting the response

This looks like it's done actually n/m!


archive: skip chmod IsNotExist error

handleLChmod() does not properly check that files behind the handlinks exist
before calling os.Chmod(). We've seen base images where this results in
"no such file or directory" error from os.Chmod() when unpacking the image.
os.Stat() follows symlinks and tells us if the destination file exists.
Use that as the pre-check before os.Chmod() to avoid errors.
The failing case for me was:
sudo ctr i pull docker.io/library/clearlinux:base

v2: updated to commit to simply just skip chmod IsNotExist error.

Codecov Report

Merging #4099 into master will increase coverage by 3.33%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #4099      +/-   ##
==========================================
+ Coverage   42.43%   45.76%   +3.33%
==========================================
  Files         129      116      -13
  Lines       14875    11935    -2940
==========================================
- Hits         6312     5462     -850
+ Misses       7644     5555    -2089
+ Partials      919      918       -1

Flag
Coverage Δ

#linux
45.76% <0.00%> (ø)

#windows
?

Impacted Files
Coverage Δ

archive/tar_unix.go
43.56% <0.00%> (ø)

remotes/docker/fetcher.go
54.11% <0.00%> (-5.41%)
:arrow_down:

remotes/docker/auth.go
63.82% <0.00%> (-3.97%)
:arrow_down:

remotes/docker/status.go
21.42% <0.00%> (-3.58%)
:arrow_down:

remotes/docker/errdesc.go
28.12% <0.00%> (-2.65%)
:arrow_down:

remotes/docker/errcode.go
47.61% <0.00%> (-1.60%)
:arrow_down:

filters/scanner.go
81.35% <0.00%> (-0.85%)
:arrow_down:

platforms/platforms.go
79.41% <0.00%> (-0.81%)
:arrow_down:

platforms/cpuinfo.go
3.57% <0.00%> (-0.72%)
:arrow_down:

remotes/docker/handler.go
22.38% <0.00%> (-0.09%)
:arrow_down:

... and 75 more

Continue to review full report at Codecov.

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

LGTM

LGTM


Job hangs on client side

Sometimes this is because the Slurm job failed but did not result in the client being notified of the failure. Other times this is because the Slurm. This occurs rarely and is hard to reproduce unless there are more specific details. Other issues have been created based on more specific details.

This has occurred again (when running tests; maybe there's something weird about running tests and this won't show up in regular code?) with some exception occurring in the executor. The Slurm job is killed and disappears from the cluster. Even logs are returned and printed out as expected including the ending saying JOB_FAILURE and MESSAGE_END. But then the process just hangs on the client side.


[feature] ci/cd workflow

Use CI/CD of CSCS to test the code. Both base and derived containers are now rebuilt on-demand. Dockerhub is not used.

cscs-ci run default

All the other pipelines use an environment which isn't concretized during container build and then reused:
https://github.com/electronic-structure/SIRIUS/blob/feature-ci-rocm/.github/workflows/build.yml#L179
I'm trying it here with a new base container (build in progress)
https://github.com/electronic-structure/SIRIUS/tree/feature-ci-rocm

@simonpintarelli @mtaillefumier can we accept this as some intermediate solution? cuda and rocm will be built on our build farm, the rest is on github. In principle, we can migrate all the builds to our ci/cd soultion and keep only cpu validation runs on github.

I have no objections at all. I use the setup as a basis for cp2k internal one.

One commit only is probably better.


CloudSearchDomain upload document's contentType does not set correctly

Requesting to upload a simple JSON data through CloudSearchDomain returns a
{ ["Content-Type header must be one of ['application/xml', 'application/json'] (was binary/octet-stream)"] }
even though the request specifically sets the contentType to .applicationJson
To Reproduce

instantiate a cloudSearchService like this:

let cloudSearchService = CloudSearchDomain(
  accessKeyId: "ACCESSKEY",
  secretAccessKey: "SECRETKEY",
  sessionToken: nil,
  region: .uswest2,
  endpoint: "https://{Document domain listed in the dashboard}",
  middleware: [],
  eventLoopGroupProvider: .useAWSClientShared
)

Encode a simple struct to json using encodable:

let jsonData = try! JSONEncoder().encode(segment)

Where segment is defined:
  struct IndexSegment: Codable {
    let id: Int
    let episode_title: String
    let guest: String
    let keywords: [String]
    let text: String
  }

Create a CloudSearchDomain.UploadDocumentsRequest request

let request = CloudSearchDomain.UploadDocumentsRequest(
  contentType: .applicationJson,
  documents: jsonData
)

Upload the data to the CloudSearch domain

cloudSearchService.uploadDocuments(request).whenComplete { result in
  switch result {
  case .success(let response):
    print(response)
   case .failure(let error):
      print(error)
    }
 }

Expected behavior
At this point, I expect to get a successful response from AWS which would indicate whether the new document was added/updated or deleted. But instead, get
{ ["Content-Type header must be one of ['application/xml', 'application/json'] (was binary/octet-stream)"] }

even though the content type is set to .applicationJson
Setup (please complete the following information):

OS: macOS Catalina 10.15.5 Beta
Version of aws-sdk-swift [4.6.0]
Authentication mechanism [hard-coded credentials]

I have a fix for this on the 4.x.x branch of aws-sdk-swift-core. https://github.com/swift-aws/aws-sdk-swift-core/commit/13738adc1603e4b50ae6aa3f758fc44f51e46aa3. If you could test this that'd be great

How can I set the dependency branch for swift-aws/aws-sdk-swift-core specifically? I can set the branch for aws-sdk-swift which seems to resolve to the master branch  of swift-aws/aws-sdk-swift-core for all the targets.
I'm using XCode 11.4 and the package manager integrated with it.

Nevermind, I forked the repo and changed the package to point toward 4.x.x for core. The issue is fixed. Thanks!

The easiest way to test is to drag the aws-sdk-swift-core folder into xcode on top of your project.
I’ll do a new release in the next day or so.

A new release of aws-sdk-swift-core https://github.com/swift-aws/aws-sdk-swift-core/releases/tag/4.5.1 has been released. This is patch release so you should be able to pick it up by selecting menu item "Swift Packages"->"Update to Latest Package Versions"


Wrong "main" value in bower.json

The current main value in the bower.json file is backbone_tastypie/tatic/js/backbone-tastypie.js which is wrong, and makes auto-injections fails (wiredep)

There is already a PR for that: https://github.com/PaulUithol/backbone-tastypie/pull/45

Ok, I didn't find it. I close this issue.


feat: bump Windows CSE script package to v0.0.39

What type of PR is this?
/kind feature

What this PR does / why we need it:
bump Windows CSE script package to v0.0.39
Which issue(s) this PR fixes:

Fixes #
Requirements:

[x] uses conventional commit messages

[ ] includes documentation
[ ] adds unit tests
[ ] tested upgrade from previous version

Special notes for your reviewer:
Release note:
none

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 79.39%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
2292

Relevant Lines:
2887

💛  - Coveralls


Add create command to cli

Adds a create command to the commandline. Takes a JSON file as input describing the type of object and it's attributes.
Please review: @msolnit @nicjansma

@andreas-marschke other than the indentation comment, this looks good to me.  Two ideas for enhancement:

support for reading from stdin instead of a file
support for JSON output, to make it machine-readable for scripting (e.g. instead of New ID is: 42 you could opt for {"id": 42}

:+1: to Matt's thoughts.
Otherwise looks good.

@msolnit Updated

OK, works for me!


About react()

How to use react($emoji) ?
What's for $emoji ?
I know it's string.
But what string?
Pls reply with example like ex) For thumbsup emoji, 'THUMBSUP'

if you have so many questions, please come to our discord https://discord.gg/JA4KFF9, the issue tracker is intended for bug reports, not to ask how to do certain things


OpenShift Origin HA Installation on AWS

FEATURE REQUEST:
Step-by-step HowTo for OpenShift Origin HA Installation on AWS
The docs here says, it's deprecated. It links to this documentation. Is there anywhere a valid and working tutorial how OpenShift Origin 3.9 can be installed on AWS with high-availability features?

Sorry for the confusion.  Red Hat is in process of adding official support for AWS infrastructure deployment within openshift-ansible itself.  It's talking some time.
In the meantime please refer to the current release of Red Hat OCP 3.9 on AWS reference architecture.  Link is here.

Ok, thanks for the information. In my view, the main reason for OpenShift Origin is the ability to provide a platform for development or testing (including high availability) without thinking about subscriptions or yes, opens source projects.

Origin is the upstream for OpenShift Container Platform.  Origin is most definitely an Open Source project as is OpenShift Container Platform.  There is no subscription model for Origin.
re HA ... The control plane can most definitely be configured for HA in both Origin and OCP.
The example inventory in the reference architectures should deploy both openshift-enterprise and origin just flip the value for openshift_deployment_type in the inventory.  Please file another issue if you find a specific problem with deploying either.


Update community files (#2769)

Signed-off-by: Knative Automation<EMAIL_ADDRESS>Signed-off-by: Knative Automation<EMAIL_ADDRESS>

OCF Webhook is merging this PR


Support TIFF

https://github.com/image-js/tiff should be more than enough to do this.

@SaschaNaz I think your initial idea of supporting only the formats that the browser supports is better. Those users that need TIFF (or any other image format support) can include the respective JS decoder themselves and pass the decoded image to the FLIF encoding API.

@hrj The page is already using external decoder for APNG and GIF so I don't think TIFF should be an exception. The FLIF decoder will still always receive raw pixels for its input, which is generated by browser or external decoders.
The page is just a sample and will not make FLIF decoder code bloated.

Ah ok. I thought you were bundling this decoder into a library for others to use.

@mojovski TIFF support is now active. Note that decoder still only supports 8-bit output while encoder now supports 16-bit output. I will update decoder later in this month.


document the status values in the sql tables.

Trying to verify that bley is working like I expect. The bley_status.status value is not easily explained.
1 seems to be that a valid SPF record was found and no extra delay was added.
2 seems to indicate that a 450 message was sent saying try again later but the client never did.
not sure what 0 is exactly. I see it for things that did not get a 450 message but don't seem to have a valid SPF record either.
would be helpful if these values were documented / explained.

Hi,
it is "documented" in the code ;-)
https://github.com/evgeni/bley/blob/master/bley.py#L135-L139
0 = "ok"
1 = "found in whitelist"
2 = "should be greylisted"
actually, I have no idea why I differentiate 0 and 1 here :)
I'll see that I add some proper DB layout to the docs


Catalog job only get repo top 100

Catalog job bundle exec rails r bin/client.rb catalog will only get first 100 repos. Therefore if user pushes an image but lists after 100, he will be able to see new pushed image, thanks to notification events. But that image will soon removed by crono catalog job, since it only get 100 repos.

@summerQLin wow, that's weird. Let me investigate on this.

You can check registry catalog api. The api call will return 100 repos by default, then get next n repos by sending parameter n and last. https://docs.docker.com/registry/spec/api/#catalog

The Documentation states:

Catalog Fetch Complete
GET /v2/_catalog
Request an unabridged list of repositories available.
so, it should only limit the response, when you request it to do.

@Salzig yes, that's correct. That's also what I understood from the documentation. However, I want to check this out by myself before closing to make sure whether this bug exists, and if it does, whether it's distribution's fault, or our own.

@summerQLin in order to investigate this, I've added a repository with 110 tags, and I've pushed 110 different images in my local registry. This is the response (after adding a print statement on the catalog command): http://pastebin.nue.suse.com/16735. As you can see, everything worked properly really.
So, in order to further debug this, I need the following:

What does your log file say about this ? Could you paste the logging message generated when the catalog job kicks in ? This is important, because as you can see, in app/jobs/catalog_job.rb line 16 we actually log the exception.
Could please provide the configuration of your registry?

@mssola, for your first question, log didn't throw any exception, catalog job is able to update database.
For my registry configuration, I set environment variables as below.
    REGISTRY_AUTH_TOKEN_ISSUER:
    REGISTRY_AUTH_TOKEN_REALM:
    REGISTRY_AUTH_TOKEN_ROOTCERTBUNDLE:
    REGISTRY_AUTH_TOKEN_SERVICE:
    REGISTRY_HTTP_SECRET:
    REGISTRY_STORAGE_SWIFT_AUTHURL:
    REGISTRY_STORAGE_SWIFT_CONTAINER:
    REGISTRY_STORAGE_SWIFT_INSECURESKIPVERIFY: 'true'
    REGISTRY_STORAGE_SWIFT_PASSWORD:
    REGISTRY_STORAGE_SWIFT_TENANTID:
    REGISTRY_STORAGE_SWIFT_USERNAME:
    REGISTRY_STORAGE_DELETE_ENABLED: true
    REGISTRY_REDIS_ADDR: cache:6379
    SEARCH_BACKEND: sqlalchemy
    REGISTRY_HTTP_TLS_CERTIFICATE:
    REGISTRY_HTTP_TLS_KEY:

By the way, you link http://pastebin.nue.suse.com/16735 can't be open.
And you can see code here, https://github.com/docker/distribution/blob/master/registry/handlers/catalog.go, seems there is a max value.

By the way, you link http://pastebin.nue.suse.com/16735 can't be open.
My bad :_) This should work: http://pastebin.com/hesCYwxY

And you can see code here, https://github.com/docker/distribution/blob/master/registry/handlers/catalog.go, seems there is a max value.

And as you can see in the GetCatalog function, it's only used if "n" is specified. Since you're using swift, I wonder if this is a bug on this particular storage backend :/
To help us with this, is there something on the registry log about this ?

@summerQLin I just made a quick test inside of the registry, and yes, this is a bug on the registry. Let me investigate a bit more on this, and I'll submit the issue/pr myself ;)

@summerQLin I've submitted an issue on distribution, as you can see. I'll continue to investigate how to solve this upstream, but anyways we are forced now to provide a workaround for this in Portus. That's why I'm adding this issue as a bug, and we'll hopefully get it fixed asap. Thanks for reporting.

I've added a workaround in the PR #575

Thanks :+1:

Fixed with PR #575.


ACF 11 and Lucee 5 compatibility. Load POI from class path first.

While I know it's not a goal to be compatible with ACF 11, having lucee-spreadsheet work with both is really helpful before migrating large code bases from ACF to Lucee. Also, if the POI jars have already been added to the class path, there is no need to use JavaLoader.

Thanks for the PR, but I have a few comments/questions:

I see your point with ACF11/12 migration but I'm not sure it justifies the added burden of compatibility and having to run those platforms for testing which official support would impose.

I'm happy to make minor post hoc tweaks though if that's all that's needed. No problem with the missing semi-colon on line 147 of tools.cfm and the alternate script syntax on 213/214 is OK, although I prefer the Lucee version personally.

I don't understand your change at lines 818/819. Why do you need to explicitly scope headerRow? And when using local you shouldn't need to declare the variable using var.

Could you explain the change to package access? Is that for ACF or the java path support?

I definitely like the idea of having the option to bypass JavaLoader in favour of POI in the class path. In Lucee 4 you need to customise your installation to do this as it ships with old POI jars that conflict if you don't remove them. I haven't used Lucee 5 yet but am hoping this will be easier - is that right?

But I think more code changes will be needed beyond the loadPoi() method. Have you run the test suite without JavaLoader? I would expect read() and write() to fail when using a password as the crypto functions require some specific functionality that it provides.

On May 14, 2016, at 5:17 AM, Julian Halliwell <notifications<EMAIL_ADDRESS>wrote:
Thanks for the PR, but I have a few comments/questions:

I see your point with ACF11/12 migration but I'm not sure it justifies the added burden of compatibility and having to run those platforms for testing which official support would impose.

I completely understand that compatibility with ACF is addition burden and not the goal of your project. For my purposes, I need to have it work with both ACF and Lucee until we can migrate away from ACF and use Lucee in production. That’s our goal in the next 6 months or so. Unfortunately, I have a large codebase with judicious use of cfspreadsheet, so there are a lot of code changes that need to be made. Personally, I prefer your implementation over cfspreadsheet and my near-term goal is to make it our standard moving forward. Rather than just modify the code locally, making future updates of lucee-spreadsheet difficult, so I thought I would pass the ACF changes along.

I'm happy to make minor post hoc tweaks though if that's all that's needed. No problem with the missing semi-colon on line 147 of tools.cfm and the alternate script syntax on 213/214 is OK, although I prefer the Lucee version personally.

I like the Lucee syntax as well, but ACF wasn’t having it. This is a perfect example of the added burden you mention, so I understand if you don’t want to do it.

I don't understand your change at lines 818/819. Why do you need to explicitly scope headerRow? And when using local you shouldn't need to declare the variable using var.

ACF complained (I’m a little surprised Lucee didn’t) that the variable “header” had already been declared. It’s declared on line 765 as an argument. The only change that was needed was to rename the variable but I thought explicitly scoping was preferable.

Could you explain the change to package access? Is that for ACF or the java path support?

Yes, in ACF, due to the includes for tools.cfm and formatting.cfm, Spreadsheet.cfc was not able to access their private methods. I’m not sure why this is different than Lucee, although I would tend to agree with the ACF logic (which is akin to including libraries in Java). Using package access allowed ACF to see the methods from Spreadsheet.cfc where it hadn’t previously, and it also provides the same level of protection as private when instantiating a Spreadsheet object.
NOTE: After I submitted my pull request, I ran into an error where ACF could not access methods in formatting.cfm. I had to change those methods to package access as well. If you accept the changes, I can submit a pull request for that as well.

I definitely like the idea of having the option to bypass JavaLoader in favour of POI in the class path. In Lucee 4 you need to customise your installation to do this as it ships with old POI jars that conflict if you don't remove them. I haven't used Lucee 5 yet but am hoping this will be easier - is that right?

Since I have time before migrating to Lucee in production, I’ve only been working with the Lucee 5 beta. I did not try Lucee 4. In Lucee 5, I just added your poi and xmlbeans jars to my /WEB-INF/lucee/lib/ directory and restarted Lucee. With that, Lucee will use those jars and not need the JavaLoader. Now, that requires a server restart, but in production, that’s how we would implement it. If you’d like, I would be happy to test on Lucee 4.
Another reason to not use JavaLoader is decreased security. While Lucee did not complain, In CF11, I had to enable access to internal ColdFusion Java components for Javaloader to work.

But I think more code changes will be needed beyond the loadPoi() method. Have you run the test suite without JavaLoader? I would expect read() and write() to fail when using a password as the crypto functions require some specific functionality that it provides.

I haven’t run them. I have TestBox installed but am having trouble running the Spreadsheet tests (getting errors). I’m on a case-sensitive filesystem so let me look at that and run the tests.
Based on this, I think you should decline my pull request and I’ll issue another  to include the package scoping for formatting.cfm, case changes to the tests, and potentially removed or fixed bypassing of the JavaLoader.
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHubhttps://github.com/cfsimplicity/lucee-spreadsheet/pull/79#issuecomment-219209875

JavaLoader is needed to correctly read and write and cannot be bypassed. Closing pull request and will resubmit when resolved and/or reverted. Thanks!

OK. I'm definitely keen on the option to bypass JL and will create a ticket for it. It is more complex than it seems though. Just adding the jars to the /lib folder isn't enough on Lucee 4. You must also remove the existing POI jars that ship with it, otherwise there will be confusion as to which should be used. JL is currently the only way of avoiding this manual customisation.
I will need to see whether the encrpytion can be done differently if using the class path.
Meantime, I'm happy to implement the compatibility changes you mention: the missing semi-colon and the script syntax for downloading.
The "headerRow" issue was a mistake on my part. I shouldn't have been using that variable name because as you say it was already being used as an argument. Lucee didn't break because it simply overwrote the previous variable (its local variable handling is better in my view). Thanks for that.
I am a bit puzzled by the "package" issue. I'd disagree that ACF's logic is right. Includes are just "fragments" rather than encapsulated elements of the "package", and including a file is really saying: "this code is part of the file, but I'm storing it separately for ease of management/re-use".
On reflection though, I've decided to do away with the includes since "mixing in" methods in this way is generally frowned upon. All the private methods are now part of the main Spreadsheet.cfc, which avoids all these issues while preserving the access semantics.
Thanks again for your input.

Hi Eric
I'm about to release a new version of the library which I'm hoping will address the Java loading issues we discussed last year. I've also done more work on ACF compatibility and made support for ACF11+ official.
Would you be able to quickly give the new version a run through to see if it works the way you were wanting? It's on the develop branch.
Have a look at this guide to how the java loading should work (and does according to my testing).
Any feedback gratefully received.
Julian.


Add kokoro job for sequencefile importer

To prevent #2366 from re-occurring, we need to have a kokoro test for the sequencefileIntegrationTest profile
something like:
mvn verify
-pl bigtable-dataflow-parent/bigtable-beam-import
-Dgoogle.bigtable.instance.id="int-tst"
-Dgoogle.bigtable.project.id="PROJECT_ID"
-Dgoogle.dataflow.stagingLocation="gs://SOME_GCS_PATH_TO_USE_FOR_TEMP_FILES"
-Dcloud.test.data.folder="gs://SOME_GCS_PATH_TO_USER_FOR_TEMP_DATA_FILES/"
-PsequencefileIntegrationTest

#2623 covers this request, so I'm closing it


better tracking

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
introduce device oriented tracking and reporting
What is the current behavior? (You can also link to an open issue here)
no comparative tracking of analyses
What is the new behavior (if this is a feature change)? If possible add a screenshot.
reports can be tracked based on device/platform
Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
yes, DB-model changes ⚠
Other information:
TBD link wiki page?

Hello Benedikt,
I have an EMBArk system, which is running on a PowerEdge server. I use this system for huge file scans, yesterday I started one for a 600MB file. The problem is that the progress stays at around 85% and the scan has already been finished but the dashboard is not able to show the results. If I want to terminat the process in EMBArk I get this message in the browser:

The good thing is that the final report is available here:
/var/www/emba_logs/d9a9ad33-ab45-4e62-8a79-0acf0ddaa9e4
after this I restarted the Kali and EMBArk and the init phase displayed this:

I have no idea what is this about, but the problem is that the previous process is still available on the page and I can not stop it manually. The luck is that I can start new scans but the old one is stuck.
I just wanted to let you know this, I am going to try again on this environment when the next update will be available.


New App: Who's That Pokemon?

This app uses the PokeAPI and the Imgix API to get a silhouette of a Pokemon and then switch to the revealed sprite halfway through the Tidbyt cycle. The images and the Pokemon JSON all cache for 60 days, because Pokemon almost never change so there's no need to pull them often. This also caches images in the exact same way the other Pokemon app does -- this means that we can potentially share caching and lighten the API calls even further.

This takes me back, super excited for this one!


Add metadata for Schema.org Version

Describe the feature
I'm not 100% sure we actually get this from our data source but it would be nice having a program-accessible constant that refers to the Schema.org version that the code is currently using.

Decent idea. It might be in one of the two JSON files we request.

With our request to https://schema.org/version/latest/all-layers.jsonld, the @id property (currently) contains "https://schema.org/#8.0" so getting the version isn't too hard.
To get the version without a second HTTP request might be harder due to how the code in the tool handles the result - its designed to pass back only the schema classes.
Might need to think a little more about how I want to approach it. I know I've wanted to restructure the tool a bit to make working on it a little easier but I didn't want to overlap with potentially changing how the tool generates the classes (as like we've discussed before, source generators in .NET 5 might be the path forward).


create namespaces

created namespaces to match our environment ontology:

development
paper
live

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

#253  👈
#252
#251
#243 : 1 other dependent PR (#244 )
#238
master

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @chrisaddy and the rest of your teammates on  Graphite


async SQLDatabaseChain

Feature request
Hello everyone!
Please when will we have SQLDatabaseChain async?
I believe it's crucial for all Chains to be async so that we can have a serverless service serving multiple clients.
Thank you!
Motivation
I believe it's crucial for all Chains to be async so that we can have a serverless service serving multiple clients.
Your contribution
I dont know how to contribute. Maybe I coult test your code.

You can count on me, I'll be delighted to collaborate!
In fact, I already have an implementation of a serverless service to
respond to database-related queries, waiting for this feature to go into
production. So when this new capability is ready, I can test it quickly!
Em qui., 12 de out. de 2023 às 17:32, dosu-beta[bot] <
@.***> escreveu:

🤖
Hello,
Thank you for your feature request and your interest in LangChain.
You're absolutely right, asynchronous operations are crucial for
serverless services serving multiple clients. Currently, LangChain does
support asynchronous operations as evident from the
AsyncCallbackManagerForChainRun class and the async def _acall method in
the APIChain class. However, the SQLDatabaseChain class does not
currently support asynchronous operations. All the operations in the
provided code are synchronous.
We understand the importance of this feature and we appreciate your
suggestion. We will consider adding asynchronous support for
SQLDatabaseChain in our future updates.
As for your contribution, testing our code is a great way to contribute!
Once we have implemented this feature, we will definitely need help with
testing. We will keep you updated on this.
Thank you for your valuable input!
Best,
Dosu
Sources

libs/langchain/langchain/tools/init.py
https://github.com/langchain-ai/langchain/blob/master/libs/langchain/langchain/tools/__init__.py
libs/langchain/langchain/chains/api/base.py
https://github.com/langchain-ai/langchain/blob/master/libs/langchain/langchain/chains/api/base.py
libs/langchain/langchain/utilities/sql_database.py
https://github.com/langchain-ai/langchain/blob/master/libs/langchain/langchain/utilities/sql_database.py

This response is meant to be useful and save you time. It is not meant
to be a precise solution, but rather a starting point for your own
research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it
is irrelevant.
If you want to continue the conversation, start your reply with @dosu-bot
https://github.com/dosu-bot.
—
Reply to this email directly, view it on GitHub
https://github.com/langchain-ai/langchain/issues/11732#issuecomment-1760326124,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAGFVVRZQ6MOWLK5F26U6LTX7BHUBANCNFSM6AAAAAA56EXZEI
.
You are receiving this because you authored the thread.Message ID:
@.***>

I also need this feature. I will add more: we need to make sure it can be async all the way down, including the database driver. For example, it should work with something like:
DATABASE_URL=postgresql+asyncpg://postgres:postgres@localhost:5432/mydb

if you are using SQLAlchemy, for example, the engine to be instantiated is different:
from sqlalchemy import create_engine
from sqlalchemy.ext.asyncio import create_async_engine

database_url = os.getenv("DATABASE_URL")
if database_url.find("+asyncpg") > 0:
    engine = create_async_engine(database_url)
else:
    engine = create_engine(database_url)

SQLDatabaseChain should have similar smarts inside and support 100% async.

This branch: https://github.com/sudranga/langchain/tree/11732 contains an implementation of async sql chain. I think things need to be reworked a little bit.
A sample code that works with the branch contents is:
import gevent.monkey
gevent.monkey.patch_all()
import asyncio
import asyncio_gevent
asyncio.set_event_loop_policy(asyncio_gevent.EventLoopPolicy())
import langchain
langchain.verbose=True
from langchain.utilities import SQLDatabase
from langchain.llms import OpenAI
from langchain_experimental.sql import SQLDatabaseChain
async def say(what):
cnt = 0
while cnt < 5:
print(what)
await asyncio.sleep(1)
cnt += 1
async def do_db():
db = await SQLDatabase.from_uri_async("sqlite+aiosqlite:///Chinook.db")
llm = OpenAI(temperature=0, verbose=True)
db_chain = SQLDatabaseChain.from_llm(llm, db, verbose=True)
await db_chain.arun("How many employees are there?")
async def main():
task1 = asyncio.create_task(say("HELLO"))
task2 = asyncio.create_task(do_db())
await task1
await task2
print("done")
asyncio.run(main())

@sglebs @mrctito @sudranga
Hey guys. You guys seem experts and I've just been learning both programming and LangChain for the past 6 months.
So I have a fully working and functional code when doing it sync however I'm trying to switch to async and the 2 issues I am saving is that

Chat is not being saved in chat history
The questions and answers arent being saved in my Sql Alchemy db either.

I've made my code as short as possible to make it easy to read. I appreciate the help and thank you in advance
import asyncio
from langchain.llms import OpenAI
from langchain.chains import ConversationalRetrievalChain
from langchain.vectorstores import FAISS
from langchain.schema.vectorstore import VectorStoreRetriever
import time
retriever = load_emdeddings(cfg.faiss_persist_directory, cfg.embeddings).as_retriever(search_kwargs = {"search_type" : "similarity"})
memory = ConversationBufferWindowMemory(k=2, chat_memory=chat_message_history, memory_key="chat_history", return_messages=True)
custom_prompt_template = """
You are an amazing bot named "XYZ", designed to provide assistance and answer queries related to the XYZ book.. You are primarily trained on the XYZ data. When engaging in conversation, please adhere to these guidelines:
The user you are in communication with is referred to as {User_Name}.
The user's location is noted as {User_Location}.
Personalize your interactions by addressing the user with their name, but use it sparingly and only at moments that seem most fitting.
{context}
Chat History: {chat_history}
Question: {question}
"""
Create a PromptTemplate instance with your custom template
custom_prompt = PromptTemplate(
template=custom_prompt_template,
input_variables=["context", "question", "chat_history", "User_Name", "User_Location"],
)
qa = ConversationalRetrievalChain.from_llm(llm=cfg.llm, memory= memory, retriever=retriever, combine_docs_chain_kwargs={"prompt": custom_prompt})
Define your list of queries
queries = ['How many chocolates are there?', 'What is the calories for those chocolates?', 'What is the name of the chocolates']
Define an async function to process a single query
async def process_query(query):
result = await qa._acall(inputs={"question": query, "User_Location": "Jamacia", "User_Name": "Brandon", "chat_history":[]})
return result

Use asyncio to run all queries in parallel
async def process_all_queries():
tasks = [process_query(query) for query in queries]
results = await asyncio.gather(*tasks)
return results
My SQL module:
class CustomMessage(Base):
tablename = "custom_message_store"
id = Column(Integer, primary_key=True, autoincrement=True)
session_id = Column(Text)
type = Column(Text)
content = Column(Text)
created_at = Column(DateTime)
author_email = Column(Text)

class CustomMessageConverter(BaseMessageConverter):
def init(self, author_email: str):
self.author_email = author_email
def from_sql_model(self, sql_message: Any) -> BaseMessage:
    if sql_message.type == "human":
        return HumanMessage(
            content=sql_message.content,
        )
    elif sql_message.type == "ai":
        return AIMessage(
            content=sql_message.content,
        )
    else:
        raise ValueError(f"Unknown message type: {sql_message.type}")

def to_sql_model(self, message: BaseMessage, session_id: str) -> Any:
    now = datetime.now()
    return CustomMessage(
        session_id=session_id,
        type=message.type,
        content=message.content,
        created_at=now,
        author_email=self.author_email,
    )

def get_sql_model_class(self) -> Any:
    return CustomMessage

chat_message_history = SQLChatMessageHistory(
<EMAIL_ADDRESS>connection_string="mssql+pyodbc://User\SQLEXPRESS/db_name?driver=ODBC+Driver+17+for+SQL+Server",
custom_message_converter=CustomMessageConverter(author_email="user1@example.com"),
)


Ruby group capstone: set up your Kanban board

We have total 3 team members
Project Link : https://github.com/QueenterJuma/ruby_catalog/projects/1
Team member #1: @dheerajsachdeva
Team member #2: @Adholah96
Team member #3: @QueenterJuma
we have assigned the tasks in projects
😄

Please add a link to the project in your description above.

Status: Approved :heavy_check_mark:
Hi Team,
Your task is complete! 🍾 🍾 🍾 Congratulations!  🎉💯🌟
Highlights 🌞
⭐ Board has required number of tasks
⭐ Fair distribution of tasks
Keep soaring higher! 💻 🍷 🚀
Feel free to leave any questions or comments in the PR thread if something is not 100% clear. Please, remember to tag me in your question so I can receive the notification.
Please, do not open a new Pull Request for re-reviews. You should use the same Pull Request submitted for the first review, either valid or invalid unless it is requested otherwise.

As described in the Code reviews limits policy  you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form.

Approved


Add new key encode structure for API V2

Once the API V2 is enabled, the key will be starting with either:

m and t: TxnKV key that will only be used by TiDB.
x{keyspace prefix id}: TxnKV key.
r{keyspace prefix id}: RawKV key.

The {keyspace prefix id} is the keyspace prefix for seperating keys of different keyspace. It should be an vary-length integer whose highest bit of every byte denotes whether the next byte is still part of the integer. The client will fetch the prefix from PD by the keyspace name specified by the user when initializing the client, so it means that the keyspace prefix is valid during the session, in other words, the change on keyspace on PD will not take effect on running seesions.

/assign

@Patrick0308 FYI: after the discussion, the raw atomic prefix has been removed.
https://github.com/tikv/rfcs/pull/69/commits/84d27af9600871cbf233e38d503bf96616437cd3

Sorry, I haven't started yet.


The "Important" note after Azure AD join

Is this accurate? " Important - If you join Surface Hub to Azure AD during first-run setup, single sign-on (SSO) for Office apps will not work properly. Users will have to sign in to each Office app individually."
This sounds like a bug - could it be confirmed that this is the intended behavior? Our current Surface Hubs are AD joined and the SSO makes for a very smooth experience. It seems very peculiar that it would be different for Azure AD joined hubs.

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

ID: 77041701-3c1f-d1a7-51fe-c6f82ec52319
Version Independent ID: 1d014d9d-6238-2b82-bde8-a8e88c3bd3fa
Content: First-run program (Surface Hub)
Content Source: devices/surface-hub/first-run-program-surface-hub.md
Product: surface-hub
GitHub Login: @jdeckerMS
Microsoft Alias: jdecker

@ferrety2006 I checked with the product team, and they confirmed that the note is still accurate.

@ferrety2006 I can't answer as to whether that's something that they're working on changing, or if it's by design, or if it's a technical limitation.

Ok, thank you.


add org.freedesktop.Screensaver method

Implements a keep.running mode with https://people.freedesktop.org/~hadess/idle-inhibition-spec/re01.html
The org.freedesktop.Screensaver does not have option for inhibiting just suspend.

Tested manually to work on Ubuntu 22.04.3 LTS, GNOME 42.9


Add global support

Fixes #19
Add support for Wasm globals. Decisions worth validating:

For creating GlobalTypes, I've chosen to define 2 constructors (GlobalType.const & GlobalType.var instead of accepting mutability as an argument. It feels like a nicer UI, less error prone, and nothing precludes adding .new that takes a symbol argument if we ever need that.
Following Wasmtime's naming, I'm calling a GlobalType Wasm type "content" (e.g. GlobalType#content -> :i32). This naming feels odd to me, but didn't want to diverge without a clear reason.

I'm looking into the memcheck failure but it does not look related to this PR, I can reproduce on main (edit: fix for memcheck in #75).

For creating GlobalTypes, I've chosen to define 2 constructors (GlobalType.const & GlobalType.var instead of accepting mutability as an argument. It feels like a nicer UI, less error prone, and nothing precludes adding .new that takes a symbol argument if we ever need that.

No objections on this. I actually prefer it this way.


Added missing line ending

I assume that this is why emotes from Revolt to Discord aren't sent properly

Ok the issue I had was local but this is still a nice fix for clean code :)


Why Don't Model Results Show Impression Variables in One-Pager Results and Model Results Identical for Impression version and Spend version?

Project Robyn
Describe issue
I would expect that if impression variables were declared in paid_media_vars that they would be represented in the waterfall chart and the effect spend/share/ROI chart. Yet when I run the demo.R code as is, only the spend variables show up in those results. Further, when I run the demo.R script and change the paid_media_vars to only the spend variables in paid_media_spends, 3 of the 5 model one-pagers are identical to the model one-pagers in the original demo file.
Why would this be? If the recommendation is to use impression and GRP variables, why don't they show up in the model and why are model results identical for models specified with impressions and only spend? Is this a bug or am I doing something wrong? I'm trying to persuade my company to use this and show the importance of using impression/GRP data, but I don't see a difference in the output between the two modeling approaches (impressions vs only spend).
When looking at the output in your Analyst's Guide (https://facebookexperimental.github.io/Robyn/docs/analysts-guide-to-MMM), it shows the two impression variables in the output graphs. I look forward to an explanation. Thanks.
Provide dummy data & model configuration
Original Demo File (only showing InputCollect and OutputModels
InputCollect <- robyn_inputs(
  dt_input = dt_simulated_weekly
  ,dt_holidays = dt_prophet_holidays
  ,date_var = "DATE" # date format must be "2020-01-01"
  ,dep_var = "revenue" # there should be only one dependent variable
  ,dep_var_type = "revenue" # "revenue" (ROI) or "conversion" (CPA)
  ,prophet_vars = c("trend", "season", "holiday") # "trend","season", "weekday" & "holiday"
  ,prophet_country = "DE"# input one country. dt_prophet_holidays includes 59 countries by default
  ,context_vars = c("competitor_sales_B", "events") # e.g. competitors, discount, unemployment etc
  ,paid_media_spends = c("tv_S","ooh_S",	"print_S"	,"facebook_S", "search_S") # mandatory input
  ,paid_media_vars = c("tv_S", "ooh_S"	,	"print_S"	,"facebook_I" ,"search_clicks_P") # mandatory.
  # paid_media_vars must have same order as paid_media_spends. Use media exposure metrics like
  # impressions, GRP etc. If not applicable, use spend instead.
  ,organic_vars = c("newsletter") # marketing activity without media spend
  ,factor_vars = c("events") # specify which variables in context_vars or organic_vars are factorial
  ,window_start = "2016-11-23"
  ,window_end = "2018-08-22"
  ,adstock = "geometric" # geometric, weibull_cdf or weibull_pdf.
)

OutputModels <- robyn_run(
  InputCollect = InputCollect # feed in all model specification
  #, cores = NULL # default
  #, add_penalty_factor = FALSE # Untested feature. Use with caution.
  , iterations = 2000 # recommended for the dummy dataset
  , trials = 5 # recommended for the dummy dataset
  , outputs = FALSE # outputs = FALSE disables direct model output
)

Modified Demo File with spend only variables
InputCollect_d2 <- robyn_inputs(
  dt_input = dt_simulated_weekly
  ,dt_holidays = dt_prophet_holidays
  ,date_var = "DATE" # date format must be "2020-01-01"
  ,dep_var = "revenue" # there should be only one dependent variable
  ,dep_var_type = "revenue" # "revenue" (ROI) or "conversion" (CPA)
  ,prophet_vars = c("trend", "season", "holiday") # "trend","season", "weekday" & "holiday"
  ,prophet_country = "DE"# input one country. dt_prophet_holidays includes 59 countries by default
  ,context_vars = c("competitor_sales_B", "events") # e.g. competitors, discount, unemployment etc
  ,paid_media_spends = c("tv_S","ooh_S",	"print_S"	,"facebook_S", "search_S") # mandatory input
  ,paid_media_vars = c("tv_S", "ooh_S"	,	"print_S"	,"facebook_S" ,"search_S") # mandatory.
  # paid_media_vars must have same order as paid_media_spends. Use media exposure metrics like
  # impressions, GRP etc. If not applicable, use spend instead.
  ,organic_vars = c("newsletter") # marketing activity without media spend
  ,factor_vars = c("events") # specify which variables in context_vars or organic_vars are factorial
  ,window_start = "2016-11-23"
  ,window_end = "2018-08-22"
  ,adstock = "geometric" # geometric, weibull_cdf or weibull_pdf.
)

OutputModels_d2 <- robyn_run(
  InputCollect = InputCollect_d2 # feed in all model specification
  #, cores = NULL # default
  #, add_penalty_factor = FALSE # Untested feature. Use with caution.
  , iterations = 2000 # recommended for the dummy dataset
  , trials = 5 # recommended for the dummy dataset
  , outputs = FALSE # outputs = FALSE disables direct model output
)

Environment & Robyn version
> packageVersion("Robyn")
[1] ‘3.7.1’

Hi Philip,
Thanks for reaching out! We're having capacity constraints during the summer breaks so please bear with us.
Regarding the impressions, yes the latest versions will fit spend by default, while impressions are used only for indications purposes: when the pattern of imps and spend are very different, we recommend to split the channel to obtain more variability and thus better fit.
We used to fit using imps when provided. But it's deprecated and this is the explanation from a FB post:
"The major reason lies in the saturation curve and budget allocation. When using spend, we get cost-response relationship directly via hill function, which can be directly used in budget allocator. When using imps, we need to do extra fitting between imps and spend to recover the cost-response relationship. Considering the quite large uncertainty in imps-spend translation, it could results in very unreliable budget recommendation. Even though we're aware of the advantages of using exposure metrics, at least for now it's not worth the trade-off. We do consider re-introduce the spend-exposure fitting as added information though, however not for modelling purposes."
https://m.alpha.facebook.com/groups/robynmmm/permalink/1234713643963433/?comment_id=1245438872890910&reply_comment_id=1245648736203257
I hope this makes sense to you.

Please reopen if this issue reoccurs.


[Epic] - FUSEML Contributing guidelines and Documentation

We should aim to have a contributing guideline that may help those who want to help to be quickly "enabled".
We should have a proposal, in the form of one or more issues to be approved and that will produce, as an outcome, a contributing.md file that implements this epic and its user-stories (the proposal above).
Also, we should set up a proper way to document the project through the Wiki's and/or other solutions like:

readthedocs
gitbooks

We probably have the framework now, should we close this and detail things in other cards ?


Chore: cleanup ioutil for newer go version

/kind cleanup
The package io/ioutil should be cleanup from go 1.16: https://go.dev/doc/go1.16#ioutil

LGTM, please run make reviewable to format the code. Thanks for the contribution!


coc.nvim configuration

Hi, I would like to configure this language server with coc.nvim, but I can't figure out what options do I need to pass if any.
These are the options coc.nvim asks for:
 "languageserver": {
    "foo": {
      "module": "/usr/local/lib/node_modules/foo/index.js",
      "args": ["--node-ipc"],
      "filetypes": ["foo"],
      "trace.server": "verbose",
      "rootPatterns": ["root.yml"],
      // Used for debugging
      "execArgv": ["--nolazy", "--inspect-brk=6045"],
      "initializationOptions": {
      },
      "settings": {
        "validate": true
      }
    }
  }

Any help would be appriciated.

I also tried to configure coc, without success. Any idea?

I also tried without success. Any idea @UnwrittenFun?
  "languageserver": {
    "svelte": {
      "module": "/home/soywod/Code/svelte-language-server/dist/src/index.js",
      "args": ["--node-ipc"],
      "execArgv": ["--nolazy"],
      "filetypes": ["html", "svelte"],
      "rootPatterns": ["package.json"],
      "trace.server": "verbose",
      "initializationOptions": {
      },
      "settings": {
        "validate": true
      }
    }
  }

@soywod: Thanks. this actually works.


Adding step 4 for setting plugin executable

Ran into #13 myself when setting up the plugin, figured I'd add the mention of making the plugin executable.
Should fulfill #13

Thanks!


check/fetch after each block and recalc totals

check and fetch previous missing blocks after every new block broadcast
recalc totals for past 10 blocks after every new block broadcast

https://github.com/mohamedmansour/ethereum-burn-stats/pull/73


v6 failing for missing default branch

Is there an existing issue for this?

[X] I have searched the existing issues

Current Behavior
in v6.4.1 I see an error that default branch master is missing, I do not see this same failure in v5.0.0.  I'm running as github action.
Expected Behavior
master branch exists in my repo so this error should not occur
Super-Linter version
v6.4.1

Relevant log output
2024-04-29 10:43:58 [INFO]   The master branch doesn't exist in /github/workspace
2024-04-29 10:43:58 [INFO]   The origin/master branch doesn't exist in /github/workspace
2024-04-29 10:43:58 [FATAL]   Neither master, nor origin/master exist in /github/workspace

Steps To Reproduce
upgrade superlinter to version 6.4.1 and run
Anything else?
no

Hi! There aren't enough data points to understand what's happening here. Can you post your super-linter configuration?

name: Super-Linter

# Run this workflow every time a new commit pushed to your repository
on: push

jobs:
  # Set the job key. The key is displayed as the job name
  # when a job name is not provided
  super-lint:
    # Name the Job
    name: Lint code base
    # Set the type of machine to run on
    runs-on: ubuntu-latest

    steps:
      # Checks out a copy of your repository on the ubuntu-latest machine
      - name: Checkout code
        uses: actions/checkout@v4

      # Runs the Super-Linter action
      - name: Run Super-Linter
        uses: github/super-linter@v5
        env:
          DEFAULT_BRANCH: master
          FILTER_REGEX_INCLUDE: .*src/.*
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Closing for the lack of replies. We can reopen if anything comes up.

I'm getting the same error:
Failed run: https://github.com/nodenv/actions/actions/runs/9245118639/job/25431170647?pr=64
jobs:
  test-lint:
    uses: nodenv/.github/.github/workflows/test.yml@v3

referenced workflow:
  super-linter:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      packages: read
      statuses: write # to report status checks
    steps:
      - uses: actions/checkout@v4
        with:
          # super-linter needs the full git history to get the
          # list of files that changed across commits
          fetch-depth: 0
      - uses: super-linter/super-linter/slim@v6
        env:
          GITHUB_TOKEN: ${{ github.token }}

@jasonkarns I had a quick look at the workflow run you linked. It appears that you're not using that referenced workflow, but rather one that uses the deprecated github/super-linter action

I'm confused: this screenshot is from the run itself (selecting view workflow)

Wait, i think i see. I released the bump in the reusable workflow. And then want to the caller and hit re-run job. I don't think the re-run pulled the latest of the v3 ref but rather re-ran the job with the same "reusable workflow sha" as originally. Sorry about cluttering this issue.


[FR] - GPT 4 Turbo

Hello! Would love support for GPT4 Turbo.

Hello! I'll confirm this when I get a chance, but I believe this should already be supported. Cannoli just passes the model string you provide in the settings pane or the config arrow into openai.
Check out the cannoli college canvas about config arrow, and the  list of model strings on the openai docs: https://platform.openai.com/docs/api-reference/chat/streaming
Let me know if the new models cause issues.

I will try again. I had tried simply entering the new model in the settings but received an error. Something about "name" I think? Maybe I did something wrong.

Looks like the name to reference gpt4 turbo is:
gpt-4-1106-preview
Let me know if that works!

Thinking about this more and it's possible I have some particular models hard-coded in that are throwing errors.
I'll take a look soon.

Here is the error I get.

Oh yea this is an issue on my end. I'll take a look and put together a fix.

Hi @blindmansion, any update on this? Thanks for creating such a stellar extension. I don't think I'll have time in the next few weeks, but if you're totally swamped, I may eventually be able to look at this and PR it.

Actually, it was easy to patch. Turns out the models are hardcoded with pricing info. I just slapped another object into the map:
    this.modelInfo = {
      "gpt-4": {
        name: "gpt-4",
        promptTokenPrice: 0.03 / 1e3,
        // $0.03 per 1K tokens
        completionTokenPrice: 0.06 / 1e3
        // $0.06 per 1K tokens
      },
      "gpt-3.5-turbo": {
        name: "gpt-3.5-turbo",
        promptTokenPrice: 15e-4 / 1e3,
        // $0.0015 per 1K tokens
        completionTokenPrice: 2e-3 / 1e3
        // $0.002 per 1K tokens
      },
      "gpt-4-1106-preview": {
        name: "gpt-4-1106-preview",
        promptTokenPrice: 0.01 / 1e3,
        completionTokenPrice: 0.06 / 1e3
      }
    };

However, I imagine you'd probably want to implement some logic that says "if it's not in modelinfo, run it anyway and don't do any price calculations" or something more elegant so that you're not tied to updating every time the models change. But I hope my comment is useful for anyone who just wants to get it working right now.

Awesome thanks for finding the fix! And yes, that's exactly the kind behavior i'd like for the model strings. Yea I've been struggling to find time for cannoli the last few weeks, but I should be able to implement this soon.

Hi @wwboynton, thanks for sharing the fix. Where do I make the changes? Keen to use Turbo!
Thanks

Sorry for the delay on this, I'll fix this and release it early next week.

Oh and if you search up a portion of the code posted above you'll be able to find it if you want to fix it in the meantime. I believe it's on the file run.ts.

Hey, thanks, I meant to the Obsidian plugin itself, but it's all good - ChatGPT told me to where to find the main.js file 😊

This is fixed in the newest release! Sorry for the wait.

Thanks!


What is the private key in the TronWeb constructor?

Hi all, I have a question, with TronWeb library, in order to instantiate a TronWeb object, I need to pass in the private key, as following, since I like to use the code to create a wallet, which will generate a private key for the wallet, so why I need to pass in a private key? where to get it?
const tronWeb = new TronWeb({ fullHost: trongrid_url, headers: { "TRON-PRO-API-KEY": 'your api key' }, privateKey: 'your private key' })
Thanks in advance!!

Hi,
If you want to use the account created by the privateKey in the constructor, such as in node env, you need to pass the priviteKey when creating tronweb instance. However, in the DAPP, you can use the tronWeb instance injected by TronLink extension or TronLink App, which you do not need to create an account or tronWeb instance by youself, accout is managed in the wallets.

I just want to create a new tron wallet for my users, so I do not have private key to pass into the constructor, I need to still instantiate the tronWeb object via new TronWeb, then use tronWeb.createAccount() to create a wallet.
Is there a TronWeb constructor which does not need to pass in private key?
Thanks

Hi,
Yes, you can instantiate the tronWeb object first without any privateVate Key, you only need pass the fulleNode url. And then use tronWeb.createAccout() which you will get a privateKey from the result. Last you could use tronWeb.setPrivateKey('priKey') to set the accout in tronWeb object you just created.
`const tronWeb = new TronWeb({
fullHost: 'https://api.trongrid.io'
});
const account = tronWeb.createAccout();
tronWeb.setPrivateKey(accout.privateKey);`
After using the 3 steps above, you could get the same account in on tronWeb object.


fix(acp): Fix Admin Columns Pro integration when return format is not an array

Very confused. In some environments, I'm finding get_field_type() to be throwing an exception (due to it missing on the Column class), get_type() is not ACF specific, and get_acf_field_option('type') is apparently deprecated (but still works & works as intended).
...not sure which one I'm supposed to be using. Their hook reference hasn't been updated to reflect any changes to get_acf_field_option...

The latest version of the Admin Columns ACF Addon has killed custom field support. :(
I contacted them and they are aware of the regression and are hoping to add some kind of support in the future but have no ETA and I don't think it's a priority.


[Android] Fully Offline Courses (Text and Problems)

Goal
The ability to access a full course experience on your phone even without connectivity will enable learning on the go and in limited bandwidth environments. Today only video downloads are possible on the mobile applications but moving to fully offline text components as well as a read-only problem component experience is a big step forward toward fully offline mobile courses.
Slack: #wg-product-mobile
Requirement Definition: Confluence Project Page
### Tasks

I see this was created for android - please let me know if there are any plans to start development on this, we should coordinate as this is funded contribution work via FC-0047 currently. FYI @nizmaylova , @touchapp

@marcotuts Related to my earlier question about FC-0025, I was wondering:

... this is funded contribution work via FC-0047 currently.

Does that mean that offline support is already being worked on?
I found a couple PRs for Android that seemed related, but they're not mentioning FC-0047.

I looked into FC-0047 a bit more and was able to confirm that offline support is in scope for it.

linked - https://github.com/openedx/openedx-app-android/pull/346

@itsjeyd - apologies for missing your note earlier! If this happens in the future / again feel free to ping me / the team in #wg-product-mobile or #mobile-apps in slack.
The PR for the offline work is linked above now.

Will do, thanks @marcotuts 🙂


[SiVal] Test plan update for adc_ctrl

Added list of features to the adc_ctrl specification.
Moved adc_ctrl chip tests to chip_adc_ctrl_testplan.hjson
Added si_stage: SV* test cases to cover functionality enumerated in the list of features.
Updated the pre-silicon test cases with relevant SV* labels.

CHANGE AUTHORIZED: hw/top_earlgrey/data/chip_testplan.hjson
CHANGE AUTHORIZED: hw/top_earlgrey/data/chip_adc_ctrl_testplan.hjson

CHANGE AUTHORIZED: hw/top_earlgrey/data/chip_testplan.hjson
CHANGE AUTHORIZED: hw/top_earlgrey/data/chip_adc_ctrl_testplan.hjson

CHANGE AUTHORIZED:hw/ip/adc_ctrl/data/adc_ctrl.hjson

CHANGE AUTHORIZED: hw/ip/adc_ctrl/data/adc_ctrl.hjson


SQS does not reload on changes

This plugin is working great on first start, however when the function which is subscribing to the change is changed, and serverless-offline triggers a restart, the SQS subscription no longer seems to work.
Here's my config for reference:
plugins:
  - serverless-webpack
  - serverless-log-forwarding
  - serverless-offline-sqs
  - serverless-offline

custom:
  serverless-offline-sqs:
    endpoint: http://<IP_ADDRESS>:9324
    region: ${self:provider.region}
    accessKeyId: local
    secretAccessKey: local

  serverless-offline:
    # httpsProtocol: certs
    dontPrintOutput: true
    host: local.in.ft.com
    port: ${env:PORT, '3000'}
    noTimeout: true

functions:
  releaseLogConsumer:
    handler: src/handlers/release-log-consumer.handler
    events:
      - sqs:
          arn:
            Fn::GetAtt:
              - ReleaseLogQueue
              - Arn
          batchSize: 10

resources:
  Resources:
    # Release Log resources
    ReleaseLogQueue:
      Type: "AWS::SQS::Queue"
      Properties:
        QueueName: "${self:custom.releaseLogQueueName}"
        RedrivePolicy:
          deadLetterTargetArn:
            Fn::GetAtt:
              - ReleaseLogDeadLetterQueue
              - Arn
          maxReceiveCount: 5
        MessageRetentionPeriod: 345600 # 4 days
        VisibilityTimeout: 25
        KmsMasterKeyId: alias/aws/sqs

Actually this now seems to work as expected, it could have been an unrelated issue preventing it.
Closing this.


On Android, allow image viewer's top bar to hide/show with bottom bar

Could the app be updated so attachments go full screen when you tap on them in the attachment view? now it still shows the top bar with 'done' and hides the bottom row of buttons, but doesn't expand to take up the screen.

https://github.com/BlueBubblesApp/bluebubbles-app/assets/84814040/b6416bc5-cc5d-482c-87a4-aa7a6f61249d
The top bar hides but the image still doesn't actually go full screen

Fair enough, we'll re-look at it.

It also doesn't hide the top ir bottom bar for videos at all. I'm not sure if that's intentional.


Split EHP metric for competitions for Irons/Mains

Currently an EHP competition will track iron ehp for ironmen and main ehp for mains.
Ironmen can gain 6+ehp in 1 hour by using banked herblore supplies.
There should be 2 separate metrics, Ironehp and Mainehp, a competition should use the same ehp rates for everyone within the competition.

Left is Main ehp, Right is Iron ehp. It's important to note that the difference would have been greater if we were using wom and originally tracking Iron ehp because it would have severely changed the methods that people were using. An Iron ehp is essentially a banked supplies comp in a select few skills.
Main EHP
Iron EHP


static proptypes and decorators

Hey I am having problems with standardJS linting warnings regarding static proptypes and decorators

I red loads loads of topics about it but I couldnt find the right solution for me. Any idea how to fix it?

Has there been any updates to this issue, it's really annoying

Update to standard v11 to resolve this issue. Cheers! ✨


Fix box vectors upon rejection

Thanks to @gregoryross for pointing this out!

Codecov Report

Merging #89 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master      #89      +/-   ##
==========================================
- Coverage   64.46%   64.45%   -0.02%
==========================================
  Files          19       19
  Lines        2851     2853       +2
==========================================
+ Hits         1838     1839       +1
- Misses       1013     1014       +1

Impacted Files
Coverage Δ

protons/driver.py
86.73% <100%> (-0.12%)
: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 070acd6...7fe7310. Read the comment docs.

Ready for merge when tests pass.


UX - Navigation

This ticket is to change from side navigation to a bottom tab navigator.
This is loosely what we want it to look like:

Given I am an engineer or designer:

[ ] Then I implement bottom navigation
[ ] and get rid of side navigation

@DejaTrudeaux - your simple acceptance criteria for this Issue, accompanied by the wireframe sketch, are definitely sufficient for communicating what is desired at the high level.
I'm going to think on this a few more minutes after I clear out my various channel mentions and DMs.
The only thing I'm concerned about is the Resources tab, b/c we don't have a page like that and I don't want to link to something that doesn't exist.
I do have an alternative for keeping it 3 tabs that I think also may solve some other UX problems, but give me 30-45 to get it written up.
If I end up blocking you in the meantime, shout at me in Slack or call/text me!

I think right now I'm just switching from hamburger menu to bottom tabs using the same things that were previously there, Home, Locations, and Hotspots. I was wondering about Resources but no prob, just sticking to what we got for now

EOD Update:
Started this and have a component but not 100% how this is going to fit in with what we already have. I think I'll need to touch base with Sam and Neil tomorrow about it.
I'm actually getting this error:

which I don't understand how there's a syntax error in a package in node_modules but I think it's related to node 12 and somethin new theyre doing: https://stackoverflow.com/questions/55002755/importing-node-js-module-syntaxerror-unexpected-identifier

moved to QA, i think should be available on Testflight to QA now

not available in Testflight due to some issues currently trying to be resolved


Operation Collections in Lab

closes https://github.com/kamilkisiela/graphql-hive/issues/767

This branch has conflicts that must be resolved

Could you please resolve these conflicts?
@B2o5T  @n1ru4l You rock 🤩

Merging into https://github.com/kamilkisiela/graphql-hive/pull/1610 as preparation to make this ready for merging


Added some unit tests

Added unit tests for cli.py. If you think these are fine, I'll add for tab.py as well

@pep8 resume

@pep8speaks suggest diff

Hello @T1duS! Thanks for updating the PR.

 Thanks for updating the PR.

 Thanks for updating the PR.

 I'm waiting for those tab.py tests now 😛


Using httpgd for R graphics

The default behaviour is to create plots in a PNG and then display them in a VSCode window. However the default PNG size does not display well and the plot is overwritten when a new plot is created, so you cannot go backwards/forwards between plots created in a session.
The first issue could be solved by creating a .Rprofile file at the root of the workspace (/workspaces/r-dev-env/) with
options(vsc.dev.args = list(width = 800, height = 600)

However, it may be better to switch to httpgd graphics which display plots in a device with functionality including backwards/forwards navigation and zoom. The Plot viewerhttps://github.com/REditorSupport/vscode-R/wiki/Plot-viewer#svg-in-httpgd-plot-viewer) section of the vscode R extension docs describe how to set this up. It requires installing an R package, so we will need to investigate if we can install this in the default version of R and keep the library clean for new builds of R as we now do for the languageserver package (discussed here https://github.com/r-devel/r-dev-env/issues/25).
If it's not possible to do this cleanly, then we may want to set the .Rprofile as above and link to the plot viewer documentation so that users know how to switch to an alternative if useful for the work they are doing.

Is this output expected?
I can observe some difference in plot window than earlier!

Fixed by #110


Is spl-token 3.3.0 a must?

https://github.com/saber-hq/stable-swap/blob/master/stable-swap-client/Cargo.toml#L21 this line restricts spl-token to be 3.3.0 or above, but solana-account-decoder is forcing spl-token to be 3.2 https://github.com/solana-labs/solana/blob/master/account-decoder/Cargo.toml#L25.
This means this repo is not possible to be used with solana-account-decoder until they bump the version.

I think we should bump the spl-token dependency in https://github.com/solana-labs/solana/blob/master/account-decoder/Cargo.toml#L25.

@dovahcrow feel free to send a PR to change this to ^3.

@macalinao they said they are gonna upgrade to 3.3 soon, so maybe we can wait for them? https://github.com/solana-labs/solana/pull/23570

Addressed by https://github.com/saber-hq/stable-swap/commit/0476964cb7ba5d533e7c2a9a808cfdce3f906107


x.com urls make work like twitter.com

I've tested using the API with this code change to allow x.com urls:
will do a PR... placeholder issue.
# twitter_archiver.py

link_pattern2 = re.compile(r"x.com\/(?:\#!\/)?(\w+)\/status(?:es)?\/(\d+)")
...

def get_username_tweet_id(self, url):
    # detect twitter.com URLs that we definitely cannot handle
    matches = self.link_pattern.findall(url)
    # twitter.com
    if not len(matches):
        # maybe it is an x.com url?
        matches = self.link_pattern2.findall(url)

        if not len(matches): return False, False

    username, tweet_id = matches[0]  # only one URL supported
    logger.debug(f"Found {username=} and {tweet_id=} in {url=}")

    return username, tweet_id

Hi Dave, thanks for opening this issue. I think that this should have been solved in ddb9dc8 (corresponds to release v0.6.12) which tweaked the link_pattern regex. Would you be able to check?

Indeed this has been fixed and released, closing the issue.


Allow for object based scene definitions

I think it would be awesome if Phaser 4 allowed for simple object literal scene syntax like previous versions had.  Something like:
const scene = {
    key: "main",
    create() {
        const world = new StaticWorld(this);
        On(world, WorldPostRenderEvent, (renderPass: IRenderPass) => {
        });
    }
}

CreateGame(
    WebGL(),
    Parent('gameParent'),
    Scenes(scene)
)

Full Example
This is somewhat achievable through the const game = await CreateGame(...); On(game ... syntax but a lot of the constructors like StaticWorld need an IScene.
Also I think this option is the most approachable, especially for educational purposes where someone might not yet know what a class is. I've ran game jams with people that had no prior game-dev experience and often limited coding knowledge, its less code to get someone up and running. I loved Phaser 3 for this.
I also think it increases interoperability with the broader javascript ecosystem. Specific example is in ClojureScript, emitting a defined ES6 class that extends a base class is not trivial.
Super open to feedback on the approach. One major thing I needed to do was to add a create method to the IScene, I dont know if you have other plans for this sort of thing.

I had asked a similar question:
https://discord.com/channels/244245946873937922/617014860101845033/890902214367932437

Yeah I saw that actually haha. I think my suggestion is not at all about hating classes, I agree with photonstorm’s response. But I hope I was able to give some good arguments outside of just disliking classes

I don't think this is the same thing as "no classes" - even in v3 when you provided an object like this, it still created a Scene class internally. It feels like it's more about convenience.
What I'm thinking about right now is if we even need a Scene or not. While it does provide for a consistent structure, it also isn't actually required. It also means I could do away with the Scene Manager and all the baggage that entails.
I'm very tempted to just have the Game class emit key events and any type of class / object you like could listen for those and respond accordingly. It would then be up to you if you have multiple "Scene's" running, or not, based purely on what is listening for an event.

Yeah I think the main reason for wanting this is right now its highly inconvenient to not use the scene class. If you want to implement an IScene yourself you must call Install on it manually and set your own game/events fields. Which is not a huge deal but its not explicitly obvious because the Scene class has a side-effecting ctor.
I like that idea a lot. It would let the user use it however they like. If the SceneManager isn't actually giving you any extra features you wouldn't otherwise have then its a needless abstraction.

Sounds good, perhaps this is worth revisiting after thinking more about how Scene/SceneManager/World/Game could work together. Cheers!
In the meantime it's NBD to just do something like this for now:

CreateGame(
// ...
).then(async game => {
    const scene: IScene = {
        events: new Map(),
        game,
        update() {

        },
    };

    Install(scene);

    const world = new StaticWorld(scene);
});


Add SwiftLint

Add SwiftLint as a library.
Having a linter would allow us to have more consistent code styling with multiple devs working in one codebase. SwiftLint is one of the most popular ones used for Swift code and a great one to have while we're early in the project.
SwiftLint comes with some default styling rules but is customizable if we decide to add additional rules ourselves.
SwiftLint - https://github.com/realm/SwiftLint

Currently added on develop branch


Example for I2c Interrupts

Hello,
I'm trying to figure out how to use I2C interrupts (master tx). I see that the driver supports listening for interrupts, but there is no clear example of how to use it.
Thanks for the assistance
Kind regards,
Oliver

I haven't used I2C interrupts before but it should be similar to any other interrupts.

Configure I2C. Call listen() to enable raising interrupts for the desired event(s).
Create an interrupt handler. This can be done using the macro
https://github.com/stm32-rs/stm32h7xx-hal/blob/f3e10a1e3b61832261aaa10db0443c5911aa6d29/examples/exti_interrupt.rs#L117-L129
Or by using RTIC
https://github.com/stm32-rs/stm32h7xx-hal/blob/f3e10a1e3b61832261aaa10db0443c5911aa6d29/examples/rtic.rs#L54-L58
If you're not using RTIC, you then need to enable the interrupts in the interrupt controller
https://github.com/stm32-rs/stm32h7xx-hal/blob/f3e10a1e3b61832261aaa10db0443c5911aa6d29/examples/exti_interrupt.rs#L79-L84

I'd recommend reading the reference manual for your chip to understand when each interrupt is raised, and if any specific configuration is required. I don't think anything special is needed for I2C, though.
If you run into any issues, leave a comment! It'll help when making an I2C interrupt example.

I haven't used I2C interrupts before but it should be similar to any other interrupts.

Configure I2C. Call listen() to enable raising interrupts for the desired event(s).
Create an interrupt handler. This can be done using the macro
https://github.com/stm32-rs/stm32h7xx-hal/blob/f3e10a1e3b61832261aaa10db0443c5911aa6d29/examples/exti_interrupt.rs#L117-L129
Or by using RTIC
https://github.com/stm32-rs/stm32h7xx-hal/blob/f3e10a1e3b61832261aaa10db0443c5911aa6d29/examples/rtic.rs#L54-L58
If you're not using RTIC, you then need to enable the interrupts in the interrupt controller
https://github.com/stm32-rs/stm32h7xx-hal/blob/f3e10a1e3b61832261aaa10db0443c5911aa6d29/examples/exti_interrupt.rs#L79-L84

I'd recommend reading the reference manual for your chip to understand when each interrupt is raised, and if any specific configuration is required. I don't think anything special is needed for I2C, though.
If you run into any issues, leave a comment! It'll help when making an I2C interrupt example.

Hi! As well at those tips from mattico, you can also have a look at the I2C BDMA example on the dma branch https://github.com/stm32-rs/stm32h7xx-hal/blob/dma/examples/i2c4_bdma.rs
It only works with I2C4 (because it's the Basic DMA), but the interrupt part applies to all the I2Cs)

Hi! As well at those tips from mattico, you can also have a look at the I2C BDMA example on the dma branch https://github.com/stm32-rs/stm32h7xx-hal/blob/dma/examples/i2c4_bdma.rs
It only works with I2C4 (because it's the Basic DMA), but the interrupt part applies to all the I2Cs)

Thanks for the responses! @richardeoin that DMA branch looks really awesome. If I2C DMA has already been implemented, I'll see if I can get that working with my application

Thanks for the responses! @richardeoin that DMA branch looks really awesome. If I2C DMA has already been implemented, I'll see if I can get that working with my application

Closing as the i2c4_bdma example is now merged and shows i2c interrupt usage.


[3.7] Fix read-only counter adjustments

Scope & Purpose
In a few places, we make counter adjustments in read-only contexts, in order to correct a counter which is out of sync with the underlying document store. This leads to broken invariants in the sequence tracking we use for these counters. This PR updates these cases to correctly place blockers and conditionally force a write of the settings in order to restore the invariants.

[x] :hankey: Bugfix
[ ] :pizza: New feature
[ ] :hammer: Refactoring
[ ] :book: CHANGELOG entry made
[ ] :muscle: The behavior in this PR was manually tested
[ ] :computer: The behavior change can be verified via automatic tests

Backports:

[ ] No backports required
[x] Backports required for: 3.5? 3.6, devel

Testing & Verification

[ ] This change is a trivial rework / code cleanup without any test coverage.
[x] This change is already covered by existing tests, such as (please describe tests).
[ ] This PR adds tests that were used to verify all changes:

[ ] Added Regression Tests
[ ] Added new C++ Unit Tests
[ ] Added new integration tests (i.e. in shell_server / shell_server_aql)
[ ] Added new resilience tests (only if the feature is impacted by failovers)

Jenkins: https://jenkins.arangodb.biz/view/PR/job/arangodb-matrix-pr/12384/

https://<IP_ADDRESS>/view/PR/job/arangodb-matrix-pr/12389/

https://<IP_ADDRESS>/job/arangodb-matrix-pr-linux/14003/

Tests blue except known failure.


[test] Add basic hostname check for xfer partition

Codecov Report

Merging #1678 (0ffcb49) into master (1ffe893) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1678   +/-   ##
=======================================
  Coverage   87.21%   87.21%
=======================================
  Files          45       45
  Lines        7546     7546
=======================================
  Hits         6581     6581
  Misses        965      965

Impacted Files
Coverage Δ

reframe/frontend/executors/policies.py
99.33% <0.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 1ffe893...0ffcb49. Read the comment docs.

Codecov Report

Merging #1678 (0ffcb49) into master (1ffe893) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1678   +/-   ##
=======================================
  Coverage   87.21%   87.21%
=======================================
  Files          45       45
  Lines        7546     7546
=======================================
  Hits         6581     6581
  Misses        965      965

Impacted Files
Coverage Δ

reframe/frontend/executors/policies.py
99.33% <0.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 1ffe893...0ffcb49. Read the comment docs.


Create a better way to import Experimental client for both javascript and typescript projects

We should look at a way to generate a file for both systems so that users that aren't using typescript don't run into an error like:
Module not found: Can't resolve '../../.tina/__generated__/types'
  2 | import { Layout } from "../../components/Layout";
  3 | import { useTina } from "tinacms/dist/edit-state";
> 4 | import {ExperimentalGetTinaClient} from "../../.tina/__generated__/types";

This is because in javascript we have to import with the .ts at the end.
import {ExperimentalGetTinaClient} from "../../.tina/__generated__/types.ts";
We could separate the client into its own file for example client.js and client.ts and then a user can import both the same way without having to include the extension.

One thing I noticed yesterday, when using javascript:
Autocomplete doesn't work when imported as import {ExperimentalGetTinaClient} from "../../.tina/__generated__/types.ts"; but does when imported as import {ExperimentalGetTinaClient} from "../../.tina/__generated__/types
Then you can't compile or test without adding .ts

This is smoother with the new client.queries. See barebones starter for an example:
https://github.com/tinacms/tina-barebones-starter