HARP-10925: Clear tile cache when setting new theme

@harpgl-bot retest this please

@harpgl-bot retest this please


Add TerraDepot

Hello,
I added my remote state repository as well.
Hope this is fine. If not let me know what to change :)
Greetings
Malte

Interesting approach!


Con-PCA COOL Staging Deployment

After the completion of https://github.com/cisagov/cool-system/issues/82. Deployment and initial testing has to happen in the COOL staging environment. Here is the checklist of items that need to be done on this side.

[x] Setup Terraform backend in COOL accounts
[x] Create a policy for the Github Actions user to be able to deploy to the COOL.
[x] Create a subdomain hosted zone for con-pca.staging.cool.cyber.dhs.gov
[x] Create NS record set for hosted zone in https://github.com/cisagov/cool-dns-cyber.dhs.gov
[x] Create VPC Resources
[x] Attach Transit Gateway to Subnets similar to this https://github.com/cisagov/cool-assessment-terraform/blob/develop/transitgateway.tf
[x] Modify terraform for compatibility in the COOL
[x] Login to GoPhish to get API Key
[x] Set API Key in SSM
[x] Test for connectivity
[x] Create Github Action for automated deployments to staging on push to Develop

Subscriptions are running great in the COOL Staging environment. Have run multiple tests.

Subscriptions are running great in the COOL Staging environment. Have run multiple tests.


Component using withNamespaces inside next/head crashes the app

Describe the bug
Using a MyComponent with withNamespaces("common")(MyComponent) inside <Head> of next/head triggers an errors:
TypeError: Cannot read property 'wait' of null
    at NamespacesConsumerComponent.render (my-project/node_modules/react-i18next/dist/commonjs/NamespacesConsumer.js:213:33)

Occurs in next-i18next version
Any version.
Steps to reproduce

Make a component using withNamespaces:

import React, { Component } from "react";

export const MetaOgTag = withNamespaces("common")(
  class extends Component {
    render() {
      const { title } = this.props;

      return (
        <>
          <meta property="og:title" content={t(title)} />
        </>
      )
    }
  }
);

Use it in your pages/index.js inside <head>...</head>:

import React from "react";
import { MetaOgTag } from "../components/MetaOgTag";
import Head from "next/head";

export default class Index extends React.Component {

  render() {
    return (
      <Head>
        <MetaOgTag title={"Hello World"} />
      </Head>
    );
  }
}

Reload your app and see the error.

Expected behaviour
It should not crash.
Screenshots
None.
OS (please complete the following information)

Macbook Pro 2017 13 inches
Browser: Google Chrome - Version 73.0.3683.86 (Official Build) (64-bit)

Additional context
It looks like it's not possible to use i18n inside head because something not ready/setup yet.

Hi @Nelrohd - looks like that error is coming out of react-i18next. Most likely, req.i18n is still null. Did you debug any further?

Seems like React context is not available inside <Head />, so withNamespaces cannot get i18n. In one of my projects I just pass t as a prop and all works. When I need to reference a string in the common namespace I prefix the id with it, e.g. t("common:foobar").

Feel free to copy the component code (it's written in TypeScript).
import _ from "lodash";
import Head from "next/head";
import { useContext } from "react";
import { format, parse } from "url";
import { TFunction } from "../../i18n";
import { SsrUrlContext } from "../../lib/appContext";

interface Props {
  t: TFunction;
  title?: string | false;
  titleSuffix?: string | false;
  description?: string | false;
  keywords?: string | false;
  keywordsSuffix?: string | false;
  canonicalUrl?: string | false;
  supportedGetParamsInCanonicalUrl?: string[];
}

const PageMeta = ({
  t,
  title,
  titleSuffix,
  description,
  keywords,
  keywordsSuffix,
  canonicalUrl,
  supportedGetParamsInCanonicalUrl,
}: Props) => {
  const ssrUrl = useContext(SsrUrlContext);
  let derivedCanonicalUrl;
  if (canonicalUrl) {
    derivedCanonicalUrl = canonicalUrl;
  } else if (canonicalUrl !== false) {
    const { port, query, ...rest } = parse(
      typeof window !== "undefined" ? window.location.href : ssrUrl,
      true,
    );
    const cleanedQuery = _.pick(query, supportedGetParamsInCanonicalUrl || []);
    derivedCanonicalUrl = format({
      ...rest,
      hostname: undefined,
      host: undefined,
      protocol: undefined,
      search: undefined,
      query: _.fromPairs(_.orderBy(_.toPairs(cleanedQuery), (pair) => pair[0])),
      hash: undefined,
    }).replace("//", "");
  }

  const derivedTitleSuffix =
    titleSuffix !== false ? titleSuffix || t("common:pageTitleSuffix") : "";
  const derivedTitle = title !== false ? title || t("pageTitle") : null;

  const derivedDescription =
    description !== false ? description || t("pageDescription") : undefined;

  const derivedKeywordsSuffix =
    keywordsSuffix !== false && keywords !== false
      ? keywordsSuffix || t("common:pageKeywordsSuffix")
      : "";
  const derivedKeywords =
    keywords !== false ? keywords || t("pageKeywords") : null;

  return (
    <Head>
      <title>
        {derivedTitle}
        {derivedTitleSuffix}
      </title>
      <meta name="description" content={derivedDescription} />
      <meta
        name="keywords"
        content={`${derivedKeywords}${derivedKeywordsSuffix}`}
      />
      {derivedCanonicalUrl ? (
        <link rel="canonical" href={derivedCanonicalUrl} />
      ) : null}
    </Head>
  );
};

export default PageMeta;

That must mean that NextJs is putting the Head component somewhere outside our i18n provider.

@Nelrohd I have a professional project wherein we're localising next/head inside our _app.tsx as such:
Head.tsx
import NextHead from 'next/head';
import * as React from 'react';

import { withNamespaces } from '../../i18n';

const Head = ({ t }) => (
  <NextHead>
    <title>{t('page.title')}</title>
  </NextHead>
);

export default withNamespaces('common')(Head);

_app.tsx
import * as React from 'react';

import NextApp, { Container } from 'next/app';
import { Head } from '../components';

import { appWithTranslation } from '../i18n';

class App extends NextApp {
  render() {
    const { Component, pageProps } = this.props;
    return (
      <Container>
        <Head />
        <Component {...pageProps} />
      </Container>
    );
  }
}

export default appWithTranslation(App);

Not sure exactly what is going wrong for you, but I can confirm that this approach works just fine.

@isaachinman Your example is different from mine.
In my example, my component use withNamespaces and is placed inside next/head.
In your example you create a component with withNamespaces and put its content inside next/head

Yes I understand that. Clearly NextJs is lifting next/head into the head and out of the React tree. The approach I showed works - is it possible for you to refactor to this?

@isaachinman For sure, I already did it before in fact but I wanted to point the issue to help others and maybe have a fix if it's possible.

I don't think there's going to be a possible fix outside of wrapping as I showed above. It's an acceptable solution and works just fine, though. Happy to continue discussion if anyone feels it's necessary.

I also faced with that issue. This issue should be pinned in the readme :smile:

Another solution is to wrap your tags in your component with a next/head component instead to centralize them in a single next/head at the end next will hoist of them together.
import React, { Component } from "react";
import Head from 'next/head';

export const MetaOgTag = withNamespaces("common")(
  class extends Component {
    render() {
      const { title } = this.props;

      return (
        <Head>
          <meta property="og:title" content={t(title)} />
        </Head>
      )
    }
  }
);

import React from "react";
import { MetaOgTag } from "../components/MetaOgTag";
import Head from "next/head";

export default class Index extends React.Component {

  render() {
    return (
      <Head>
        <title>Hello World</title>
      </Head>
      <MetaOgTag title={"Hello World"} />
    );
  }
}

@StarpTech #286.


__dirname is not defined in ES module scope

Hello,
I was following the tutorial for creating a nextjs app.
https://serverless-stack.com/examples/how-to-create-a-nextjs-app-with-serverless.html
I was trying to deploy it to eu-central-1, but when I run sst start, I've get the following error:
ReferenceError: __dirname is not defined in ES module scope     at Module.getOrCreateBucket (file:///home/stefan/projects/2022/2022-05-foresight/foresight/node_modules/@serverless-stack/resources/dist/nextjs-site/cross-region-helper.js:17:47)     at NextjsSite.createEdgeFunctionInNonUE1 (file:///home/stefan/projects/2022/2022-05-foresight/foresight/node_modules/@serverless-stack/resources/dist/NextjsSite.js:283:44)     at NextjsSite.createEdgeFunction (file:///home/stefan/projects/2022/2022-05-foresight/foresight/node_modules/@serverless-stack/resources/dist/NextjsSite.js:250:20)     at new NextjsSite (file:///home/stefan/projects/2022/2022-05-foresight/foresight/node_modules/@serverless-stack/resources/dist/NextjsSite.js:107:41)     at EmptyStack.MyStack (file:///home/stefan/projects/2022/2022-05-foresight/foresight/.build/lib/index.js:15:16)     at stack (file:///home/stefan/projects/2022/2022-05-foresight/foresight/node_modules/@serverless-stack/resources/dist/FunctionalStack.js:15:35)     at App.stack (file:///home/stefan/projects/2022/2022-05-foresight/foresight/node_modules/@serverless-stack/resources/dist/App.js:282:16)     at Module.default (file:///home/stefan/projects/2022/2022-05-foresight/foresight/.build/lib/index.js:38:7)     at file:///home/stefan/projects/2022/2022-05-foresight/foresight/.build/run.mjs:92:16
I am using node v16.14.2.
Is there something I have to change in the configuration to make it work?
Thanks in advance for any help!

So when deploying to another region it is using the cross-region-helper.
https://github.com/serverless-stack/serverless-stack/blob/master/packages/resources/src/nextjs-site/cross-region-helper.ts#L20
And it seems it is using ES modules, so __dirname is not available.
Could this post https://flaviocopes.com/fix-dirname-not-defined-es-module-scope/ help to fix the code in the cross-region-helper?

This should be fixed as of release 1.2.7


Web: Making keyboard Navigation work for login/signin buttons.

It is a continuation/completion of the PR #28074, made by @sethdivyansh.
Fixes: #28037

In this PR, We have refactored the navbar_menus.js with it's basic functionality of how it works, as before there was multiple duplicative code. Now it works on the basis of list system, and options can be visited with left and right press of arrow keys.
Now after pressing G Hotkey, in the spectator mode, and then travelling with arrow keys, will take you to login/signup button also.
Screenshots and screen captures:
Steps can be seen in the video capture.
1. Changed focus to login button from Help menu on pressing left arrow key.
2. Changed focus from login button to signup button on pressing left arrow key.
3. Changed focus from signup button to login button on pressing right arrow key.
4. Changed focus from login button to Help menu on pressing right arrow key.
Dark
https://github.com/zulip/zulip/assets/91906953/c0f6181e-f127-40eb-8299-b2d5129b2108
Light
https://github.com/zulip/zulip/assets/91906953/4f26f04d-f741-4052-99a2-77e5b6db8738

Self-review checklist

[ ] Self-reviewed the changes for clarity and maintainability
(variable names, code reuse, readability, etc.).

Communicate decisions, questions, and potential concerns.

[ ] Explains differences from previous plans (e.g., issue description).
[ ] Highlights technical choices and bugs encountered.
[ ] Calls out remaining decisions and concerns.
[ ] Automated tests verify logic where appropriate.

Individual commits are ready for review (see commit discipline).

[ ] Each commit is a coherent idea.
[ ] Commit message(s) explain reasoning and motivation for changes.

Completed manual review and testing of the following:

[ ] Visual appearance of the changes.
[ ] Responsiveness and internationalization.
[ ] Strings and tooltips.
[ ] End-to-end functionality of buttons, interactions and flows.
[ ] Corner cases, error conditions, and easily imagined bugs.

@alya I have updated the commit message to match the commit style guidelines.

Thanks! It looks like you also need to complete the self-review checklist.

@alya updated the self-review checklist.

@amanagr Could you please review this one? I haven't tested.

@CIC4DA looks great! Left a few comments.

@CIC4DA In addition to specific comments, it's helpful to post a summary comment when you've addressed all the feedback and your PR is ready for another round of review.
It looks like that's the case here?

@amanagr I have addressed the above feedback, could you please review it.
@alya Apologies for the delay, but there was one remaining change that needed to be made. I have now fully addressed all the feedback.

Oh! We forgot to handle it for narrow widths.

You can use conditions like window.innerWidth < media_breakpoints_num.xl to check for narrow state.

Closing in favor of #29781. Thanks for the work here, @CIC4DA !


Update README.md with new VSCode sqlsurge plugin

Hi! @mattn . Thank you nice language server.
vscode-slqs is currently not being updated and does not work properly, so I created a new VSCode extension called sqlsurge using this language server.
The extension works just NOT ONLY with SQL files but also with raw SQL queries.
I also wrote a Japanese article: https://zenn.dev/senken/articles/vscode-sqlsurge

@lighttiger2505 Any opinions?

On second thought, this extension has more functions other than supporting SQL language server on VSCode, and it is possible to use another LS.
So I will close this PR. Sorry,


And linq

With LINQ on top, benchmark doesn't show any performance regression (and any win may also be purely based on the circumstances). It looks like a wash overall, but it makes the code a little cleaner to my eye and that could be a good thing.

Are there any downsides to using LINQ (apart from the potential to impact performance that your tests have pretty much discounted)? If there aren't, I'd be happy to merge.

No real disadvantages that I can see. It's not an automatic win/loss on performance, hence the test data being useful in making a suggestion about this change. I also saw no measurable impact from these changes overall in my end-user applications based around Clipper.
In the case of this library, the LINQ candidates are pretty straightforward to understand. I admit that I often decline LINQ single-liners that others would go for, just because they are, to me, not easily readable, but here I had no concerns.
LINQ can also be a little tricky to debug, if you use it like a hammer, but here, I don't really see a concern, based on how and where it is used. Errors can be raised and linked back to a different part of the code and that needs to be born in mind.
There's a fairly decent summary here : https://stackoverflow.com/questions/271384/pros-and-cons-of-linq-language-integrated-query

Thanks Phil. And thank you too. I really appreciate what you've done.

Thanks Phil. I really appreciate what you've done.
Edit: I note that there's a conflict that's stopping the merge. Are you able to resolve this?

Looks trivial - I'll sort it out on my mind (collision between the clean-up merge and this PR) and update shortly. Stay tuned.

I don't mean to rain on anyones parade here, but I would introduce LINQ into high performance scenarios as an absolute last resort. There are often hidden allocations that are hard to spot plus debugging of stements becomes less trivial in complex sections (see highlighted comment).
While no change was seen in the current benchmarks there's no guarantee that the benchmarks themseleves provide adequate coverage.

Thanks for the feedback JBSP. I have a low threshold to receiving the linq dependency.

I've now reversed the LINQ dependency.

I ran a suite of tests using applications that make heavy use of Clipper and saw no performance impact. I expect I also had some clean-up code in my use cases that stripped duplicate vertices. It might be wise to have test coverage for the duplicates, though, to avoid similar 'regressions' in future - reverting the PR is fine, but the door is still wide open to a similar regression in future.

HI Phil. I really appreciate your efforts to improve the library.
I had a low threshold to reverse your linq dependency because I personally found it harder to read the code.
But my knowledge of C# is extremely limited, so I'm very dependant on feedback from the library's C# users.
I'm sorry if I reverted some cleanup code too. I thought I'd only reverted the linq specific changes.
Anyhow, I'm not sure what 'duplicates' or 'regressions' you're referring to.

No worries - LINQ is always something of a love/hate/indifference thing, and people tend to avoid it also on the assumption it will mess up performance (which I could find no case where it impacted performance in my tests). My comment about the regression was for the now-reverted change in line 369. I use USINGZ quite a bit and it never flagged on my side and perhaps there needs to be some test coverage to avoid a similar mistake in future. Failing the test would have avoided the oversight, I suspect.

I use USINGZ quite a bit and it never flagged on my side and perhaps there needs to be some test coverage to avoid a similar mistake in future.

Yep, I'd be happy to add more CI testing (including C#).
But I'm not overly motivated to doing this myself, especially for C#, since my focus is primarily on ensuring the C++ code is robust (in every way).


Update SCDF tagline and product features

Spring Cloud Data Flow's product focus and the message had evolved; however, the current description on the homepage is extremely dated, and it needs an update.
I would like to update the product messaging and feature-set, so it is consistent with how we present, including at Pivotal's Spring site.

Hey @sabbyanandan , thanks for the update!
This PR removes the monitor.jpg image, because I guess the UI is outdated. But it's not replacing it with a more recent version of it.
Merging this means we'd get HTTP 404s and the homepage would be missing an image (which was part of the design intent there). Could you get an updated version of this image instead?
Thanks!

Thanks for the review, @bclozel. I updated with a higher resolution image; however, the dashboard screenshot is not overlayed on top of the monitor background. If that is indeed a preferred variant, I'm happy to get that figured out. Let me know.

Hi, @bclozel. Any further thoughts here?

This is now out of date, as the homepage has been redesigned since.


Use model alias-large for blablador in custom_endpoints.ipynb

When I used blablador, the model alias-code did not produce useful output with bia-bob (neither did alias-fast), but the model alias-large worked well.
Therefore, I recommend using alias-large in this example.

Love it. Thanks for this!


IPA fails on large inputs with saturating error

here is an example of such run
Coordinator: 2024-05-29T02:09:55.095547Z  INFO ipa_core::cli::playbook::ipa: Running IPA for 5000000 records took 4177.366415084s
Coordinator: 2024-05-29T02:09:55.104605Z  INFO report_collector: IpaQueryConfig { per_user_credit_cap: 64, max_breakdown_key: 64, attribution_window_seconds: None, num_multi_bits: 3, plaintext_match_keys: true }
Coordinator: 2024-05-29T02:09:55.104682Z  INFO ipa_core::cli::playbook:
Coordinator: +-----+--------------+-------------+-------+
Coordinator: | Row | Expected     | Actual      | Diff? |
Coordinator: +==========================================+
Coordinator: | 0   | Some(106989) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 1   | Some(105657) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 2   | Some(105677) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 3   | Some(105051) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 4   | Some(106799) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 5   | Some(106926) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 6   | Some(104752) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 7   | Some(104977) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 8   | Some(104764) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 9   | Some(104801) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 10  | Some(104571) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 11  | Some(106523) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 12  | Some(105573) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 13  | Some(104639) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 14  | Some(104887) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 15  | Some(106892) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 16  | Some(104394) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 17  | Some(107038) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 18  | Some(103433) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 19  | Some(105431) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 20  | Some(104720) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 21  | Some(106623) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 22  | Some(106353) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 23  | Some(104670) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 24  | Some(104863) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 25  | Some(106054) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 26  | Some(105873) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 27  | Some(104947) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 28  | Some(104581) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 29  | Some(106903) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 30  | Some(105189) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 31  | Some(104976) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 32  | Some(106442) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 33  | Some(105882) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 34  | Some(104468) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 35  | Some(105692) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 36  | Some(105371) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 37  | Some(104191) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 38  | Some(105768) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 39  | Some(104475) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 40  | Some(106157) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 41  | Some(106300) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 42  | Some(104251) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 43  | Some(104853) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 44  | Some(104275) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 45  | Some(105477) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 46  | Some(105043) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 47  | Some(105353) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 48  | Some(105133) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 49  | Some(105448) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 50  | Some(105972) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 51  | Some(103884) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 52  | Some(104220) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 53  | Some(104569) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 54  | Some(103768) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 55  | Some(104172) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 56  | Some(104006) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 57  | Some(104970) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 58  | Some(105050) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 59  | Some(105561) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 60  | Some(104202) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 61  | Some(104338) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 62  | Some(102706) | Some(65535) | X     |
Coordinator: |-----+--------------+-------------+-------|
Coordinator: | 63  | Some(105328) | Some(65535) | X     |
Coordinator: +-----+--------------+-------------+-------+

if number of input rows is large enough, the container type for breakdown key is too small to account for the sum of all values.

The test data generator has a conversion probability parameter that defaults to 2%, but it looks like it's only used when generating all trigger events (ReportFilter::TriggerOnly). Possibly that is a bug?

Possibly that is a bug?

yea it looks like a bug to me, possibly not related to this one as we seem to be running out of space for HV not being large enough to account for degenerate use cases. We could say that we don't support more than 16 bits for HV, but then we need to fix our test in the clear

Discussed with @danielmasny - the approach of keeping an overflow bit is relatively straightforward to think about. Just keep the carry bit (secret shared) after the addition operation reaches the HV boundary. To properly set the overflow bit to 1, we need to OR all the carry bits obtained from the additions occurred after the overflow. This will require communication as OR gate cannot be represented by using XOR only
$A \lor B = (A \oplus B) \oplus (A \wedge B)$
So that will cost us an extra multiplication which is an extra 6% communication overhead. Not bad, but the aggregation code may need to significantly change to account for it. Using the appropriate channel, separating the overflow bit from value bits, etc.

I think it could be done relatively straightforwardly by using 15 of the 16 bits for storing the actual value and the 16th bit for the overflow. We could implement another integer_add which computes the overflow bit when adding two values.


Decide on exact command line argument format

I've had a look for specifications of command line argument formats, and the only common one I could find was the GNU one that @cquinn referenced (http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html). However, it's worth noting that this is ambiguously worded and various GNU programs / libraries that I found differ from it and each other. Therefore I suggest we base our scheme on this, but possibly with minor differences. Either way we should definitely write a detailed format spec, including examples.
Here's my first stab. This is basically the rules from the GNU, but with a degree of interpretation and scope to fix things. Initially I'll state all the rules and then later we can include / exclude them as we think necessary.
First some terminology to avoid confusion.
The command line arguments are split (by the shell) into an array of tokens. By this definition argv in C is an array of tokens.
Some tokens are options to be processed, others are just passed on to the program.
Some options can take arguments. These may be interpreted as strings, numbers, bools, etc, but this is irrelevant to the formatting being discussed here.
Rule 1.
A token that starts with a hyphen (but not 2 hyphens) is a set of short options, each of which is a single alphanumeric character.
Rule 2.
Multiple short options may be grouped together in a single token, if those options do not take arguments. So -abc is equivalent to -a -b -c.
Rule 3.
Any given short option may require an argument, such an argument not being present is an error.
Rule 4.
An argument for a short option may be specified as the remainder of the token containing the option. For example in -ofoo the option o has the value foo.
Since there is no way to tell if the f in that example is the start of the argument or the next option, arguments provided in this way cannot be optional.
Rule 5.
An argument for a short option may be provided as the entire next token following the one containing the option. For example -o foo.
The following token is considered to be the argument for the option even if it starts with one or more hyphens. Thus -o -foo means that option o has the argument -foo.
Rule 7.
A token consisting of a single hyphen only, -, is not an option.
Rule 8.
A token consisting of exactly 2 hyphens, --, ends option processing. All following tokens are passed straight through.
Note that rule 5 implies that the -- may actually be an argument and hence not end processing. For example, given the tokens -o -- -p, if the option o requires an argument then that argument is -- and -p is processed as the next option. However, if the option o does not require an argument then -- ends option processing and -p is not processed as an option.
Rule 9.
A token that starts with 2 hyphens is a single long option, which must contain only alphanumeric characters and hyphens.
Rule 10.
Users do not need to specify the whole of a long option name, as long as what they specify is unique.
Rule 11.
A long option may take an argument, which may be required or optional.
Rule 12.
An argument for a long option may be specified with an = between the option name and the argument. For example in --foo=bar the option foo has the argument bar.
Rule 13.
An argument for a long option may be provided as the entire next token following the one containing the option. For example --foo bar.
It is hard to see how to have optional arguments in this case.
Rule 14.
Options may appear in any order and may appear more than once. Interpretation of this is up to the program.
Rule 15.
Options and non-option tokens may appear in any order, including intermixed.
I think most of these rules make reasonable sense.
I think we should drop rules 10 and 13.
Rules 5 and 8 interact a bit nastily, but I'm not sure what can be done about that.
Also I haven't considered escaping and quoting here.

Sounds reasonable to me.

I like it, and I like the way you wrote up the rules. Makes it easy to follow.
I think rules 5 and 13 regarding optional flag arguments should be solved the same way: not allow a separate token for optional arguments. But I think we should allow a second token for required arguments in both cases. Shell autocomplete tends to work better with separate arguments.
Rule 10 allows for some convenient shortcuts, and would only affect the matcher. We could leave this out initially, but support it later. It would be pretty self-contained.
I think rule 14 should be adjusted a little. I would like to see a cli parser that processed a command line in one pass, and dealt with checking and error reporting, etc. This means that some rules about order, and multiple occurrences should be defined.
I've been using a couple of Golang libraries that provide similar features, for example:

https://github.com/codegangsta/cli
https://github.com/alecthomas/kingpin
although, I don't particularly like how kingpin uses local variables, but that's mostly a Go idiom.

One way to model a command line syntax is something like this:
[global-flags] [command [subcommand...]] [cmd-flags] [cmd-positional-args]
with the global-flags being allowed anywhere on the line. So, global-flags would need to be unique across all flags, but command-specific cmd-flags would not need to be unique between commands.
Some other nice features are:

Default arg values from code.
Arg values from env vars
Arg values from files provided on command line, like: @filename
Syntax usage and help messages generated based on spec and handled by cli package.
Additional flag arg types, like Bool, String enum, and maybe user-extensions (like IP address).
Programatic generation of bash or other shell auto-complete script.

Rules 5 and 13.
I agree that handling these the same way would be good, it's a glaring asymmetry in the GNU handling. However, I don't like the idea of handling optional and required arguments differently, I think that will just confuse people.
One way round that is to modify rule 5 slightly, so that the following token is NOT considered an argument if it starts with a hyphen. That's fine if the argument is optional and an error if it's required. It's a problem if you need an argument to start with a hyphen. We could get round that by saying it has to be in quotes in that case, or some similar escaping.
Examples, given -f and --fopt which have an argument and some other option --foo which doesn't:
-ffoo => -f has argument foo
-f foo => -f has argument foo
-f --foo => -f has no argument, error if not optional
-f "--foo" => -f has argument --foo
--fopt=foo => --fopt has argument foo
--fopt foo => --fopt has argument foo
--fopt --foo => --fopt has no argument, error if not optional
--fopt "--foo" => --fopt has argument foo

Rule 10.
You're entirely right that we can start without this and then add support for it later if we want to.
Rule 14.
It very much depends on how we record information about the options found. We can't really take the approach of assigning each to a named variable because Pony has no way to specify that. The obvious approach would be to provide a lambda for each option seen.
If the user doesn't care about order and repetition they can simply set some flag or assign the argument to some options object field:
parser.add("foo", "f", OptArg, StringArg,
  lambda(arg: ArgType)(options) => options.f_arg = arg end)

If the user does care about order and repetition they can do something more complex:
parser.add("foo", "f", OptArg, StringArg,
  lambda(arg: ArgType)(options)? =>
    if not options.g_seen then
      log("Option g must be provided before option f")
	  error
	end

    options.f_arg = arg
  end)

We could of course provide the facility to spot duplicates, multiples, etc and report them as errors ourselves, to make life easier for the user. The point is that if we use lambdas it's very easy for the user to handle whatever they want to and we can just leave everything up to them.
Other.
I was definitely assuming that we'd autogenerate usage messages etc. The original version of Options was supposed to do that, but it never worked right.

-f --foo => -f has no argument, error if not optional
-f "--foo" => -f has argument --foo

Don't know about windows, but on most (all?) Unix shells, the quoting is used to indicate that the contained string is a single argument (mostly just useful if it contains spaces).  So, from the perspective of the Pony application, these would both look like `["-f", "--foo"]`, and you couldn't distinguish between them.  The only way to make the quotes show up in the Pony application would be to quote them with single quotes.  Something like:

-f --foo => -f has no argument, error if not optional
-f '"'--foo'"' => -f has argument --foo

I don't think that's what you intended.

Good point @jemc, I'd forgotten about the shell hiding quotes for you.
My suggestion still works fine, unless you want an optional argument that starts with a hyphen, which is a problem.
Of course you can still the single argument forms in that case:
-f--foo
--fopt=--foo

So maybe that's alright.

I think we've arrived at a suitable spec here. Now someone just needs to implement it :)

I have the bulk of this coded up now, and just need to write some more tests.
I took the tact of writing a more full-featured cli package, like Golang's Kingpin (https://github.com/alecthomas/kingpin) or CodeGangsta's CLI (https://github.com/urfave/cli). The flags and args parsing can be used standalone by only creating the one root CommandSpec to hold the flag and arg specs.
I'll write up an RFC next.

My implementation is here: https://github.com/cquinn/ponycli
I still need to add some docs.

@cquin @jemc what's the status of this issue? you still planning on writing an RFC Carl?

I have recently started to get back to this work to polish it up. I'll write an RFC.

Awesome. Thanks @cquinn.

@cquinn once you open the RFC can you drop a note here about its creation and that this should be closed (feel free to reference this issue from the RFC though, could be quite helpful for background context)

@cquinn I'm in the process of taking items tagged as "turn into rfc" and opening issues for those RFCs on the rfc repo. I'm leaving this one as is as you said you have a RFC coming.

Thanks @SeanTAllen , I'm working on the RFC now. (sorry I'm so slow)

I finally polished up the RFC and made a PR: https://github.com/ponylang/rfcs/pull/80

Great, thanks!  I'll go ahead and close this now, in favor of discussing in the RFC thread.


Merge latest from main into trigger

@MaddyDev FYI, I had to fix up the stuff you added slightly so it works correctly. There were two issues:

It was hardcoded to 99.99.99 for the package version, but that is going to be different in the pipelines. We should use the actual version instead
We need to pass the correct version to the dotnet pack call as well, otherwise it'll always use the default 99.99.99 (which then causes failures later as it tries to find the package version from the pipeline, e.g. 1.x/2.x)

I'll backport these fixes to main once the PR builds are passing and I get it merged in here.


dashboard/react-components: robot-page

What's new
Robot Panel component based off from Task Panel

https://user-images.githubusercontent.com/28668944/118747937-866b2380-b88d-11eb-9fae-ccff90669be0.mp4
addition of robot page to the dashboard
Self-checks

[x] I'm familiar with and follow this Typescript guideline
[x] I added unit-tests for new components
[ ] I tried testing edge cases
[ ] I tested the behavior of the components that interact with the backend, with an e2e test

Discussion

I'm still not sure how to use the api_server's implementation of task progress in react-components because what react-components use is technically just dummy data. should this be taken as a prop and only implemented in the dashboard?

@koonpeng @matiasbavera hello, this is the implementation of the robots page. my current question is as described above, but I think the rest API should be able to resolve that? not entirely sure.
also I originally wanted to use antd's progress bar component to indicate task progress status because mui does not have such a component. but it would be "overkill" to include this, right? was thinking that a number would suffice.

The truth is that this is neat but it seems asymmetrical. For testing purposes, what do you think about putting Battery and Assigned Tasks centered to see how it looks

I'm still not sure how to use the api_server's implementation of task progress in react-components because what react-components use is technically just dummy data. should this be taken as a prop and only implemented in the dashboard?

1 way is to import type {} from 'api-client, another is to just take in a string, the dashboard will handle extracting the correct data from the api response.

@matiasbavera I'm not sure about the GH link you shared because it uses the original material UI library and it also uses styled-components which is something that we do want to remove, right?
I did find another: https://github.com/martyan/react-customizable-progressbar, which is also more updated. just that there's some webpack version incompatibility if I run the install line. will try this out and see!
@koonpeng ooo okay, will try that, thank you

Original left alignment

Centered battery and assigned tasks

The battery bar is already centered but it looks otherwise because there is white space after the '%'

Another option I can think of, but might get a little messy?

Another option I can think of, but might get a little messy?

Would it lose context if we do something like this?
               Battery

           Task progress

Assigned Task     Est. End time

Location              Destination

I've addressed the comments made in the previous branch pr (ui/robot-panel). Thanks @matiasbavera and @koonpeng
Some of the comments with 'VerboseRobot' updates, I think those can be made in another PR after this and the robot endpoints are merged in?

Hi, @vallq I'll approve it for you to merge it "today", so we can create a branch from it. But can you please address the minor changes pointed out from @koonpeng, test all the new features again, and create a follow-up GH issue of the things that we need to do?


Ask for sharing object navigation code

Thank you for your outstanding work! I am very interested in using 3d-llm in object navigation, could you please share the corresponding code? I'm primarily interested in using rgbd and camera pose processing in hm3d.

have you get the corresponding code?


CI

CI situation 2022-01-30

repo
webpack
node
other steps
npm publish
dependencies

rdflib
v4
12, 14, 16
save 14, gh-pages
build, latest

solid-logic

12, 14, 16

rdflib

pane-registry

10, 12, 14, 15

rdflib, solid-logic

solid-ui
v4
12, 14, 15
save 14, gh-pages
build, latest
rdflib, solid-logic, pane-registry

activitystreams-pane
v4
no CI

rdflib, solid-logic, pane-registry, solid-ui

chat-pane
v4
no CI

rdflib, solid-ui

contacts-pane

12, 14, 15
save 14
broken: build, latest
rdflib, pane-registry, solid-ui

folder-pane

no CI

rdflib, solid-ui

issue-pane

12, 14, 16

rdflib, pane-registry, solid-ui

meeting-pane
v4
no CI

rdflib, solid-ui

profile-pane
v5
12, 14, 15
save 14
broken: build, latest
contacts-pane, rdflib, solid-logic, pane-registry, solid-ui

source-pane

no CI

solid-ui

solid-panes
v5
12,14,16

mashlib
v4
10,12,14,15
save 14, gh-pages
build
rdflib, solid-ui, solid-panes

NSS

12, 14
test-suite on 12, 14
docker-hub  latest
rdflib, mashlib

deprecated

markdown

14, 16
save 14
build latest
rdflib, solid-ui, pane-registry

build means : npm publish version+commit
latest means : npm publish version latest
comments :
- why ? rdflib in individual panes except source-pane
- why ? pane-registry in activitystreams, contacts, issue and profile pane
- todo webpack 4 --> 5

I am working to make all repos have a running similar CI that is triggered on push and PR on all branchs.

[ ] solid-logic
[ ] solid-ui
[ ] pane-registry
[ ] activitystreams-pane
[ ] chat-pane
[ ] contacts-pane
[ ] folder-pane
[ ] issue-pane
[ ] meeting-pane
[ ] profile-pane
[ ] source-pane
[ ] solid-panes
[ ] mashlib
[ ] NSS

I am not sure, but for now we have differences in how repos are being build. For example: I need to skip lint on oslid-logic because it has on purpose some errors to fix typescript...

Interesting. In purpose ?

What I meant to say :)  is: in solid-logic in the authSession file we have // @ts-ignore lines on the code to avoid ts problems but it causes lint errors. The code needs to be improved longterm but I just do nto know how. The exact location is now: https://github.com/solid/solid-ui/blob/eb82ec38b28b2e2feb872492149f48b6507ebf42/src/authn/authSession.ts#L7 ( this is moved to solid-logic soon)


[Backport - Newton] MaaS: Enable agent auto upgrade

Enables auto upgrade in the rackspace-monitoring-agent.  Auto upgrades are hard coded enabled in the agent currently, so this ensures we maintain auto upgrades being enabled.
Cherry picks 95b62c8a7a5e4787f942164709947956fd254f08
Connects rcbops/u-suk-dev#1064

Closing this one out as it will get merged in #1749.


chore: update pypdf dependency in worker

Should fix https://github.com/huggingface/datasets-server/security/dependabot/200
But not sure where exactly we use this library, according to pypi page pypdf2 is now pypdf (Not sure if this will break something):
NOTE: The PyPDF2 project is going back to its roots. PyPDF2==3.0.X will be the last version of PyPDF2. Development will continue with [pypdf==3.1.0](https://pypi.org/project/pyPdf/)

Codecov Report
Patch coverage has no change and project coverage change: +1.54 :tada:

Comparison is base (6343f2c) 90.18% compared to head (3f2dd8a) 91.73%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1481      +/-   ##
==========================================
+ Coverage   90.18%   91.73%   +1.54%
==========================================
  Files         185       75     -110
  Lines       11376     5032    -6344
==========================================
- Hits        10260     4616    -5644
+ Misses       1116      416     -700

Flag
Coverage Δ

jobs_cache_maintenance
?

jobs_mongodb_migration
?

libs_libcommon
?

services_admin
?

services_api
?

services_worker
91.73% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 110 files with indirect coverage changes

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

not sure where exactly we use this

I installed it because some dataset script needed it.

Here is the reference: https://github.com/huggingface/datasets-server/issues/688. So, after merging, let's refresh https://huggingface.co/datasets/jordyvl/unit-test_PDFfolder and ensure it still works

I see they use exactly pypdf2 version and not pypdf https://huggingface.co/datasets/jordyvl/unit-test_PDFfolder/blob/main/unit-test_PDFfolder.py#L5 maybe this will not work, at least a commit is sent to their repo using pypdf instead right?

I don't know. Maybe other @huggingface/datasets maintainers could chime in

The dataset in question uses pdf2image (does not depend on pypdf/pypdf2) for PDF decoding, so I think we can drop this dependency :).


[WIP] Update felix gateway tests to use V2 API

Description
Update felix gateway tests to use V2 API
Todos

[ ] Run against V2 supporting calico-node and fix these tests when they fail
[ ] Add tests for namespaced network policies

Release Note
None required

Obsolete


Ergonomics: No validation of each action

No validation of each action. This takes too much time and does not make sense methodologically. Add instead a global validation option. This global validation would be made once (for example at the end of a working session, or when an analytical task is completed, all roots analyzed, all dissonances analysed, cadences corrected). This would also have the advantage of making available different published versions – like different pushes on GitHub - at different timepoints that would correspond to different analyses.

Attention ! Le bouton "Validation" dois être remplacé par "Publish" (voir ticket "Terminology: Validate")


Catch missed spawn requests, use them when the real thing spawns.

In games that make use of Addressable Assets, if the scene is not loaded on the Client-side before the Server-side, NetworkIdentities fail to match up when the Server issues a SpawnMessage to the client.
This PR adds a cache for missed SpawnMessages to correct for them later.

async spawning opens a whole can of worms, what if there's any updates to the spawn message while it's still loading? what happens if rpcs get called while the object isnt spawned?
In your case though, mirror does support async scene loading out of the box, so it might be better to use that instead?

async spawning opens a whole can of worms, what if there's any updates to the spawn message while it's still loading? what happens if rpcs get called while the object isnt spawned?

For the former: Is there a good way to reliably trigger this?
For the latter: Can you name a good example of where this would be a problem? I can't think of anything that doesn't feel like shoddy netcode that would break under these conditions, that wouldn't also break if a player were to connect to a server mid-game.

In your case though, mirror does support async scene loading out of the box, so it might be better to use that instead?

Is there a good example to look at on this front? How would this be different than effectively what this PR does? My end goal is to have a lobby that would allow players to hop in and out mid-game.

Is there a good example to look at on this front? How would this be different than effectively what this PR does? My end goal is to have a lobby that would allow players to hop in and out mid-game.

@MrGadget1024 made all our lobby / scene examples. He can probably help, you can also find him on discord every day :)

This PR isn't necessary.
You need to override both of these methods in your Network Manager:
bool scenesLoaded;

public override void OnClientChangeScene(string newScene)
{
    StartCoroutine(LoadAddressableScene(newScene));
}

IEnumerator LoadAddressableScene(string newScene)
{
    // yield load your addressable here
    // call this when all loaded
    scenesLoaded = true;
    OnClientSceneChanged();
}

public override void (OnClientSceneChanged)
{
    if (scenesLoaded) base.OnClientSceneChanged();
}

For support, please join our Discord.


Fixing german localization returning 404

Renamed the german localization file so that it matches the naming-scheme and no longer returns a 404

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

It's already fixed


Support Partial Reindex

Is your feature request related to a problem? Please describe.
The $reindex operation atomically creates and conditionally updates search parameter values in the Search Parameter tables, this may lead to situations where the values tables remove values that are updated.
There should be a better method with partial Reindex.
Describe the solution you'd like
Reindex should consider what is actually updated, and selectively delete the update.
A couple ideas:

What if we re-run the extract for both the old resources and the new resource and then do the delta?
What if we add support to the reindex operation to accept a set of search parameter names and only perform the reindex on those select names.

Either scoped to just new parameters (skip parameter deletion) OR we need to update the persistence layer to avoid deletion of search parameters that aren't being reindexed
Describe alternatives you've considered
Acceptance Criteria

GIVEN [a precondition]
AND [another precondition]
WHEN [test step]
AND [test step]
THEN [verification step]
AND [verification step]

Additional context
For scenarios where we've added a new table / column and rely on reindex to populate these, we're hoping that implementing a feature like this could cut down on the number of deletes we make to the other parameter tables and therefor avoid #1822

Could benefit from #2736


Impressing and confusing

Hi,
First of all, thanks for the nice work. It is easy to set up an environment to load up images, especially because you took care of the server side as well.
However, I feel a bit confused about a few things, maybe because I don't understand the idea of this.
In the first place, the "preview" suggests a view before something happens, but to me it seems a postview, because it shows images after they are uploaded, not before.
In the second place, there is a delete feature (cross in right upper corner of pre/postview images). But I don't understand the use of it, since the image is already uploaded, you can not prevent it from being uploaded and it neither deletes the uploaded file. So what is the idea it should affect?
What I would expect is that the preview shows images before uploading them and the delete feature would prevent them from being uploaded. So I am wondering if I am doing something wrong.

+1 I really like the simplicity of this component! Thanks!
I am running into roadbumps that relate to this as well. I am trying to upload images with a form to go along with it. It seems that it will always upload automatically when selected, and not when let's say a submit button is pressed? Interested in seeing how the delete button works as well, or if there are server endpoints that can be tied to it as well.

just use deleteImage: function(key: number, url: string) callback and remove the image from your server manually


Question about reduction=mean when computing loss in train stage 2 ?

Hi, authors. Thanks for your great work.
I have a question about loss computing here https://github.com/fudan-generative-vision/hallo/blob/83dd4ebf52baa27de737045773d4fc4163d7c820/scripts/train_stage2.py#L857
Why do we set reduction=mean when computing loss in train stage 2 ? It seems reduction should be set to none instead of mean following the setting of stage 1. Setting it to mean makes mse_loss_weights meaningless and total loss will be multiplied by the value of sum(mse_loss_weights)/train_batch_size which is a number less than or equal to 1.
If the followings are correct, this probably results in unstable training process and no convergence.

I have the same question. I'll appreciate it if authors could explain why they made this change.


SqlSetup: Integration test is using SQL Server 2017

Pull Request (PR) description

Changes to SqlSetup

Integration test is using SQL Server 2017 (issue #858).

This Pull Request (PR) fixes the following issues
Fixes #858
Task list

[x] Added an entry under the Unreleased section in the CHANGELOG.md? Entry
should say what was changed, and how that affects users (if applicable).
[ ] Resource documentation added/updated in README.md?
[ ] Resource parameter descriptions added/updated in README.md, schema.mof
and comment-based help?
[ ] Comment-based help added/updated?
[ ] Localization strings added/updated in all localization files as appropriate?
[ ] Examples appropriately added/updated?
[ ] Unit tests added/updated?
See DSC Resource Testing Guidelines.
[x] Integration tests added/updated (where possible)?
See DSC Resource Testing Guidelines.
[x] New/changed code adheres to
DSC Resource Style Guidelines
and Best Practices?

This change is

Codecov Report

Merging #1103 into dev will not change coverage.
The diff coverage is n/a.

@@         Coverage Diff          @@
##            dev   #1103   +/-   ##
====================================
  Coverage    97%     97%
====================================
  Files        32      32
  Lines      3930    3930
====================================
  Hits       3844    3844
  Misses       86      86

@TraGicCode I would appreciate you helping out reviewing! I can surly rebase it! Although it won't pass the tests. 😞  Was meaning to comment on this this weekend but time ran out.
The integration test for SqlRS tries to install Reporting Services but fails, because there are no RS in SQL Server 2017. It's an external installation media now.
I see two solutions

Download the new .msi and install it in the tests (we really need a resource for this, but out of scope)
Use the Reporting Services 2016 already present on the AppVeyor build worker (but its service is shut off). Maybe if we start it we could run SqlRS on it.

I like first option, although that most work (I think). The second option has a downside that eventually there won't be a Reporting Services 2016 on the build worker, and then we are at option 1 any way. 😏
The integration tests for SqlAlwaysOnService fails as well, of unknown cause (or it says it can't find the instance) - had no time to debug that this weekend.

Labeling this PR as abandoned since it has gone 14 days or more since the last update. An abandoned PR can be continued by another contributor. The abandoned label will be removed if work on the PR is taken up again.

Reopening this PR as it was wrongly closed by GitHub All Stale due to miss configuration. It still labeled as abandoned. An abandoned PR can be continued by another contributor. The abandoned label will be removed if work on the PR is taken up again.

Worked on this, now and then, for the last two weeks. Finally I have fixed so that SQL Server 2017 can be tested. I also split them up into two jobs so that we can test both SQL Server 2016 and SQL Server 2017 (and SQL Server 2019 when available). That way we could integrate test functionality that only works in one edition of SQL Server, or differently like Reporting Services.

See updated PR description for more details.


Stackprof cpu weight fixes upstream

testing CI execution with upstream branch

doing some (winter?) cleaning. PR was merged upstream. not needed here anymore.


Manage date formats in connectors

Manage "date", "date-time" and "date-no-tz" formats in connectors
Previously, these were considered as strings and we'll now convert them to the proper Power-Fx type
Apply necessary conversions to manage the dates properly (local, utc)

✅ No public API change.

✅ No public API change.

✅ No public API change.

✅ No public API change.


Players other than Host getting bugged - Co op to Dedicated Server

I would love someone who actually knows what they're talking abouts input on this as I literally have no idea.
When I upload my files straight from my friends co op world to my dedicated server, (he's the host.) it seems to work for me right away. I have my guild, and I also have all my Pals. It doesn't work for him of course, because I haven't ran the script yet. his GUID is still set as 000000~1.
However, when I then RUN the script and update the files on my dedicated server to match what the script has fixed - My own character breaks. He can now log on, and still be in his guild; but my own character practically gets removed from the game. I have to create a new character.
The bit I'm really interested in is, why could this be happening? Does me running the script cause changes in the level.sav file that breaks my own character?? I have no experience, I'm simply copying the instructions listed, so some advice/input from someone who actually has any clue about this would be super super helpful.
Another thing, not sure if it's important or not, but on the Co op server, I joined on a second account. (This was because I didn't realise that the Guild bug was fixed.) On that second account (it's level 2.), I joined my friends guild so I can pass it over to him when we're on my Dedicated server. Interestingly, this second account doesn't get reset. Only my MAIN account does. This is the part that's confusing me the most. My second account is still in his guild, and hasn't been changed at all; but my main account (Level 34.) get's completely removed from the server.
Any advice or input would be so helpful! Sorry for the messy post. I'm writing this rather late at night after I've been trying to figure this out myself all day. Thank you for reading. :)
EDIT: I forgot to mention, my GUID doesn't change. My GUID on the Co op server is the exact same as my GUID on my dedicated server.

are you using the startup command "-nosteam" on the dedicated server?

Thank you for responding.
I'm not sure - How would I check if that setting is enabled?

I'm not sure - How would I check if that setting is enabled?

right click palworld dedicate server > Properties >under "Launch options"

Ah, I'm using IB as a server provider, not running one from my PC
(indifferent broccoll)

oh okay, i would suggest trying to follow this guide then https://www.reddit.com/r/Palworld/comments/19bcui7/transfer_coop_save_to_dedicated_server/kj5nul0/?context=3
the reasoning is because you are in a similar situation as them (friend was co-op host, but now you are going to be the dedicated host)

Thanks!
I've tried to follow this guide multiple times - not sure where the hitch is coming from. It completely overrides only my main player, when I wasn't even the co op host. Weird.

This bug is being handled under https://github.com/xNul/palworld-host-save-fix/issues/26 so I'm going to close this issue. If you want updates on it, feel free to subscribe to it.
And to answer your earlier question, I'm not sure why the fix is causing other players to bug out but I might be able to figure it out as I work to fix it.


Evaluate Huginn1.2

According to HF Leaderboard, this is the 13b model with one of the highest MMLU scores right now.
https://huggingface.co/The-Face-Of-Goonery/Huginn-13b-v1.2

it's chronos, airoboros, hermes, beluga merged using my random-merge method, then merged with mythologic using model revolver, then merged with ledgerdemain, and the limarp lora.

These things are out of control :D no prompt format specified on its model card I've started a discussion to ask the author how we should prompt it.

There's already an improved MythoMix successor called MythoMax https://huggingface.co/Gryphe/MythoMax-L2-13b I guess the only way is up from here xD
Yeah, I think it's Alpaca.

The scripts he's using to make these gradient-merges look pretty fun: https://github.com/Gryphe/BlockMerge_Gradient/blob/main/YAML/MythoMix-Variant-L2-13b.yaml
Language model soup.

Evaluation of this model was completed, it passes the tests (>90%) but does worse then MythoMix.
We need a more difficult test suite to be able to differentiate much beyond this point, so that's probably the last of these I will run.


doc: Adds note about newuidmap to machine setup.

Closes #9666

@stgraber regarding the detection of nf_tables in the integration tests. I ran
update-alternatives --set iptables /usr/sbin/iptables-nft
update-alternatives --set ip6tables /usr/sbin/ip6tables-nft
update-alternatives --set ebtables /usr/sbin/ebtables-nft

before running the test suite and there were no failures. I've tried setting say ebtables to legacy and ip/ip6tables to nft but the tests continue to pass. I'm now uncertain as to why the tests were failing in my initial dev set up.

Documentation preview available at: https://linuxcontainers.org/lxd/docs/pr.9793/


Add robotframework-lsp dependency

In order to use PyCharm's Robot Framework Language Server Plugin we need this lib

Closing this PR, as it's replaced by #48


Rework alching & favalch

Description:

Alching is limited to 1 item at time.
Fav items is limited to adding/removing 1 item at time.

Changes:

Reworks the alching system to allow for multiple items to be alched, be it using +alch or on agility laps.
Allow +favalch to receive multiple items as parameters.
Allow +favalch now returns an image with the items (and their ID) by default. --text was added to allow for a text to be exported.

Other checks:

[X] I have tested all my changes thoroughly.

Addition to this suggestion.
Allow an alch filter such as --alch --hv (highest gp value for stack) or --alch -- hq (highest quantity of items in a stack)
Also --favalch --clear or something similar to delete list to start from scratch


Question: how to configure handlers for events not supported in SAM yet?

Hi Guys,
First of all thanks for your work on SAM, this is awesome!
I currently working on a Lex Bot proto and Lex events aren't yet supported by SAM.
How could I define this inside a SAM config ?  I'm using serverless framework
I read SAM supports pure cloudformation too, I guess that would be the way to go for now.
Is there an example of using pure CF inside SAM that I can use as reference?
Thanks in advance
here's the Stack Overflow question in case that's more appropriate.
https://stackoverflow.com/questions/45850380/how-define-lex-bot-lambda-handlers-using-sam-inside-the-serverless-framework

hi @gaboesquivel You can define blocks of cloudformation as usual in the same template as you would normally. For example, I wanted a little more control of my endpoints to reference lambda functions;
 AverageDiSns:
     Type: 'AWS::SNS::Topic'
     Properties:
     DisplayName: !Join ['-',[!Ref Environment, 'average-di-analytics-sns']]
     Subscription:
       -
        Endpoint:
           !Join [':',[!GetAtt [StoreDiAveragesByChannel,Arn],!Ref Environment]]
           Protocol: "lambda"

which can be referenced like this
 .......
  MemorySize: 128
  Timeout: 3
  Role: 'arn:aws:iam::xxxxxxxx'
  Events:
    IncomingDniAnalyticsAverageDi:
      Type: SNS
      Properties:
        Topic:
          Ref: AverageDiSns

Does that help? Bear in mind SAM appears to have limitations. You can't work with existing resources in many cases (i.e you can't pass in an existing S3 bucket)

Thanks, yes that helps


Function errors at compiling and variable scoping runtime

Preflight Checklist

[X] I have installed the latest version of Power Query SDK.
[X] I have checked existing resources, including the common issues and the release notes.
[X] I have searched for similar issues.

Power Query SDK
0.4.0
Regression From
No response
Platform
Windows
Architecture
x64
OS Version
Windows 11
VSCode version
1.88.1
PQSdkTool Path
No response
Bug Description

I'm developing , building and deploy a connector for OpenSearch in PowerBi. When I try to access to the information of a JSON file with file = File.Contents(<path>), it gives me an error:

Microsoft.Mashup.Engine.Interface.UnpermittedResourceAccessException

The command is tested as inline command from another user Help-request and so, without SDK, work.

Also, a global variable (declared outside any other object or functions) is read-accessible from other objects or function but not writable even though the IDE mark the variable as [section-member] and assigning a valid value.

Steps to Reproduce
1.Launch Visual Studio Code 2. Compile the project 3. Transfer the .mez file to to proper PowerBI folder 4. Run PowerBI and test
Actual Experience

It does not complete the compiling.
Runtime byzantine error as the variable is not modified.

Expected Experience

Compile.
The value of the variable should change with a new value assigned.

Additional Context
No response

Hi @fepatrifork!
Custom connector code is only allowed to invoke a small subset of Power Query's data source functions:
https://learn.microsoft.com/en-us/power-query/handling-data-access#data-source-functions
File.Contents is not one of those functions, so isn't allowed to be used from inside a connector.
Idea: What if you built a function, which you package in your .mez file, that accepts a binary value as its input then processes it appropriately? So, a consumer using this function would write something like MyPqExtension.SomeFunction(File.Contents(<path>)). This would keep the call to File.Contents out of the connector while still allowing you to share the custom binary processing logic via the .mez file.
Regarding modifying variables: In M, identifier values are immutable, so the fact that you can't change the variable's value is expected. (M is drawn from a functional programming background, where immutability is more common, as compared to a procedural/OO language.)
Hope this helps!

Correct - we don't allow File/Folder access from custom connectors.

Thanks for the explanation and info! I suspecting of that because also is not allow multiple context, but regarding the idea, probably I understood what I have to do, but not sure :). If you are interested I would like to explain why I need one of those, maybe can raise some new discussions or just my ignorance: I'm implementing a Oauth authentication in a connector that is does not have. To initialize the flow i require to input the IDP endpoint the user and the user-secret. The IDP endpoint is often static, but user and the user-secret maybe not.
So one solution is with a  1. config file to load or a 2. dynamic input as parameter. For the solution # 2 there will be also many solutions: 1. Global variable 2. (I prefer that) A prexistent GUI that pass the info to initialize the "Security GUI" ----> I have a solution for that but I do not how to access the data to that (I cannot transform a Function type to Text):   `[DataSource.Kind = "Project", Publish = "Project.Publish"]
shared Project.Contents = [authBackend= Value.ReplaceType(ProjectImpl, ProjectType), authSecGUI= Value.ReplaceType(ProjectImplSecGUI, ProjectType)];
// Wrapper function to provide additional UI customization.
ProjectType = type function (
    Server as (
        type text meta [
            Documentation.FieldCaption = "Server",
            Documentation.FieldDescription = "The hostname of the server.",
            Documentation.SampleValues = {"localhost"}
        ]
    ),
    Port as (
        type number meta [
            Documentation.FieldCaption = "Port",
            Documentation.FieldDescription = "Port server listens on.",
            Documentation.SampleValues = {9200}
        ]
    ),
    UseSSL as (
        type logical meta [
            Documentation.FieldCaption = "Use SSL",
            Documentation.FieldDescription = "Use SSL",
            Documentation.AllowedValues = {true, false}
        ]
    ),
    HostnameVerification as (
        type logical meta [
            Documentation.FieldCaption = "Certificate validation",
            Documentation.FieldDescription = "Certificate validation",
            Documentation.AllowedValues = {true, false}
        ]
    ),
    IdPurl as (
        type text meta [
            Documentation.FieldCaption = "Uri IdP",
            Documentation.FieldDescription = "The endpoint of the Identity Provider",
            Documentation.SampleValues = {"http://xxxxxxx or https://xxxxxxx"}
        ]
    ),
    ClientId as (
        type text meta [
            Documentation.FieldCaption = "Client ID",
            Documentation.FieldDescription = "The identifier of the user",
            Documentation.SampleValues = {"Username"}
        ]
    ),
    ClientSecret as (
        type text meta [
            Documentation.FieldCaption = "Client secret",
            Documentation.FieldDescription = "The secret of the user",
            Documentation.SampleValues = {"Client-secret"}
        ]
    )
) as table meta [
    Documentation.Name = " Project"
];

ProjectImplSecGUI` = (Server as text, Port as number, UseSSL as logical, HostnameVerification as logical, IdPurl as text, ClientId as text, ClientSecret as text) as record =>
    let
        config = [IdPurl = IdPurl, ClientId = ClientId, ClientSecret = ClientSecret]
    in
        config;

ProjectImpl = (Server as text, Port as number, UseSSL as logical, HostnameVerification as logical, IDPurl as text, ClientId as text, ClientSecret as text) as table =>
    let
         .......................................................

// Data Source Kind description
    Project = [
        let
           // I need a ref to have config info from ProjectImplSecGUI here!
        in
          // output as records of config info ,
        ......................................

Please, can you help me for this?

Correct - we don't allow File/Folder access from custom connectors.
Unfortunately correct, a bad news for me. I also try to define into File/Folder access into a different shared section but is not allow to have two sections?

Hmm...you might have to go with something outside the box, like using an Azure Function to proxy between your connector and the upstream service?

@bgribaudo
thanks for the reply, I will explain better, my bad, I was not so clear... The main goal is to connect to a OpenSearch DB through Oauth using a PowerBI OpenSearch connector and all good so far. The Oauth implement the auth code flow type of authentication.
Before starting it requires the endpoint of the IdP, and then the client_id and the id_secret. Actually I'm in the condition to create this connector with this values statically hardcoded when the .mez file is created. In turns I have one connector for one user, but a realistic use in production is to have the capability to insert dinamically these values. In the code are inserted in a "General GUI" that appears before the standard "Security GUI" here:
   .........      IdPurl as (         type text meta [             Documentation.FieldCaption = "Uri IdP",             Documentation.FieldDescription = "The endpoint of the Identity Provider",             Documentation.SampleValues = {"http://xxxxxxx or https://xxxxxxx"}         ]     ),     ClientId as (         type text meta [             Documentation.FieldCaption = "Client ID",             Documentation.FieldDescription = "The identifier of the user",             Documentation.SampleValues = {"Username"}         ]     ),     ClientSecret as (         type text meta [             Documentation.FieldCaption = "Client secret",             Documentation.FieldDescription = "The secret of the user",             Documentation.SampleValues = {"Client-secret"}         ]     ) )
The "Security GUI" is provided by PowerQuery and is not possible to modify granularly, is defined for example in this way with only one type of authentication available (but can be multiple):
Authentication = [     OAuth = [         StartLogin = StartLogin,         FinishLogin = FinishLogin,         Refresh = Refresh,         Logout = Logout     ] ]


Optimization of actor's traversal path when a sequence of move to actions are applied to it

Problem Statement : Imagine a chess board of size 10 X 10. I am moving an object at 2 X 2 such that it must pass through all the cells of the chessboard starting at (0, 0) which is the bottom left corner of the board. Therefore, the object will start from (2, 2), then traverse to (0, 0) then to (0, 1), (0, 2) .... (0, 9) , (1, 0), .....(9, 9)
Issue being observed : The object doesn't pass through all the cells; it takes a short cut and moves along the diagonal like starting (2, 2) through (9, 9). Why is this happening? Any thoughts or is it a bug in the implementation somewhere and an issue must be opened?
Note : I have verified the position of each of the cells in the chess board for correctness. I am not making any mistake in those.
// GameBoardObject is a user defined class that extends Actor

GameBoardObject gObjectAtTwo_Two =      LevelHelperMethods.getTopMostGameBoardObjectAtRowCol(2, 2);

for(Vector2 position : listOfAllObjectWorldLocation){
    gObjectAtTwo_Two.addAction(LevelHelperMethods.createSequencesOfActions(
                                         (new String [] {"moveTo"},
                                         new Object [] {new Tuple<Vector2, Float>(position, 2.0f)}));
}

public static SequenceAction createSequencesOfActions(String[] actionNames, Object[] actionParameters)
{
	SequenceAction sequenceAction = new SequenceAction();
	int actionCounter = 0;
	for(String actionName : actionNames)
	{
		if(actionName.equalsIgnoreCase("moveTo"))
		{

			Tuple<Vector2, Float> moveToParameters = (Tuple<Vector2, Float>) actionParameters[actionCounter];
			Gdx.app.log(TAG, "MoveTo Params from Helper " + moveToParameters.first.x + " " + moveToParameters.first.y);
			sequenceAction.addAction(Actions.moveTo(moveToParameters.first.x, moveToParameters.first.y, moveToParameters.second));
		}

		actionCounter++;
	}
	return sequenceAction;
}

Note : The issue persists even if I add the action to the actor directly using the Actions.moveTo instead of creating a SequenceAction
Why is this happening?

Closing as i saw the source code and learnt that all actions by default are implemented in parallel.


feat: HasComponent method

should avoid many try...catch blocks

So, this would avoid doing as much try...catch blocks, wouldn't it?

Ideally. From what I've seen, most of the try...catch blocks that are currently needed just check for a particular component. As you and David have pointer out, that can be avoided by checking the tag of the game object in the majority of the cases. But there are others, like [this snippet in ActivationLogic::Start](


[Issue report] Removing the OS from my sdcard

Describe the bug or issue
I was going to remove the OS from the SD card, but attempts to do so causes the partition table to revert the changes unexpectedly, including the use of erasing and/or formatting some partitions. I also noticed that when using the OS and doing changes on their makes it revert and clear my progress, even using powerwash to format it as well..
Describe your setup

Raspberry Pi 4B 8GB
chromiumos image r89r1
Keyboard and mouse

To Reproduce
Steps to reproduce the behavior:
Not able to do
Expected behaviour
I expected the drive to erase it.
Screenshots and/or hardware setup photos

Sorry I am not a fan of GUI gparted. You can try commmd line:

sudo fdisk /dev/sda
Press key g  and confirm
Press key w
lsblk

Didn't work, same thing

Please paste all outout or screen record.

I did what you told me to type, but the partitions came back, also on every reboot.

The fdisk reported that your SD card was mounted.

lsblk
sudo umount /dev/sda*
2.sudo fdisk /dev/sda
Press key g and confirm using key enter
Press key w
lsblk

That also did not work. I haven't responded in a while so I can't fully remember part of this issue.


Do not gc if we have a project file

not really sure how it got there. especially with that framework <> None filter


[FLINK-14463] [Kafka Consumer] Merge Handover in flink-connector-kafka and flink-connector-kafka-0.9

What is the purpose of the change
Handover.java exists both in flink-connector-kafka(kafka 2.x) module and flink-connector-kafka-0.9 module. We should put this file into kafka base module to avoid repeated codes.
Brief change log
Remove Handover in  flink-connector-kafka(kafka 2.x) module and flink-connector-kafka-0.9 module, and add Handover in flink-connector-kafka-base module.
Verifying this change
Unit testing.

@buptljy Thanks for your contribution. This PR has checkstyle errors.

@yanghua Thanks for your reminding. It's fixed now.

@flinkbot run travis

@buptljy Still two error msgs:
02:48:55.083 [ERROR] /home/travis/build/flink-ci/flink/flink-connectors/flink-connector-kafka-0.10/src/test/java/org/apache/flink/streaming/connectors/kafka/internal/Kafka010FetcherTest.java:[180,79] package Handover does not exist
02:48:55.083 [ERROR] /home/travis/build/flink-ci/flink/flink-connectors/flink-connector-kafka-0.10/src/test/java/org/apache/flink/streaming/connectors/kafka/internal/Kafka010FetcherTest.java:[329,77] package Handover does not exist
02:48:55.083 [ERROR] -> [Help 1]

Thanks. It works now. @yanghua
cc @aljoscha

Kafka 0.9 connector has been removed.


Automatically pick up knip.mjs and knip.cjs

https://knip.dev/overview/configuration#location
Could you add these two extensions to the list of files knip automatically looks for? So I don't have to add --config knip.mjs
Reasoning
My app doesn't use type=module, but my webpack config does (.mjs), which means that knip also has to be loaded as a module.
https://github.com/pixiebrix/pixiebrix-extension/blob/951da774d2ecb296f381b3b6cda128be790fac3f/knip.mjs#L1

Sorry, I'd rather make that list smaller than bigger. Hopefully the ecosystem can agree on some conventions and we'll move on from CJS to ESM too.
I could even imagine supporting only JSON, since compilers might become a solved problem.
Let's see where this goes. I'm not against the idea per se, but not at this time.

Hopefully the ecosystem can agree on some conventions and we'll move on from CJS to ESM too.

What convention? Those two extensions are here to stay and will never not be used. There are a lot of people who are unable/unwilling to switch to ESM, or are in these partial states because of other tools that don't support ESM.

since compilers might become a solved problem.

A solved problem in knip or in development? Because webpack is not going anywhere anytime soon either.

How will knip read the entry points from webpack's config without importing webpack's config? Would I have to repeat them and hope they will not get out of sync?

OK I think I see we're the confusion stems from. Let's break it down:

The initial request is about the Knip configuration file (e.g. knip.json or knip.ts).
The Webpack configuration file (e.g. webpack.config.ts) is handled by Knip's Webpack plugin, which should automatically result in those config.entry files being added as entry files to Knip.

Sorry, I didn't dive into the links you've sent and explain immediately. You shouldn't need to do any of this: https://github.com/pixiebrix/pixiebrix-extension/blob/951da774d2ecb296f381b3b6cda128be790fac3f/knip.mjs#L3-L14
Knowing this, if anything isn't working as expected, please file an issue :)

The file is executed, I see the console.logs within it, but its entries don't appear in Knip's debug output. Does knip support config factories?
https://webpack.js.org/configuration/configuration-types/#exporting-a-function


Venue website

Venue website so we can be linked.
Instructions how to get to our space
Contact number who to call in case of visiting

done


maxMemory is a uint32

That makes the max cache ~4GB which is not nearly big enough for any application. Is there a reason a uint32 was used for this setting? Does simply making it a uint64 resolve this issue?

Facing same issue, and fixed in my fork. https://github.com/yulin-li/Redis-Operator/commit/f95ffbcf74cde5445f87c3274da8aa30d6fbcb27


Can't get a dynamic cfg to work

I'm not sure how you're supposed to specify a dynamic cfg value--trying it as presented on the main page or suggested in the training tab--e.g. 1.0-3.5:cos, or (1.0-3.5:cos)--only produces a ValueError as the contents of the box cannot be converted from a string to a float.

This is correct, you cannot. (I just went through the code recently for a different PR).  Can you help me understand what this does and maybe I can patch it in?

I assume it's meant to vary between the two cfgs over the course of training, with no specification being a linear variance. Unfortunately, the main page doesn't clarify whether this is meant to return to the starting point or... much of anything.

It works fine in the latest version


Why is the "OmniSharp server is running" status bar icon green?

Extensions typically shouldn't do this, red makes sense for a failure state but if everything is working as intended it should just be white so as to not draw the eye to it.

cc @akshita31

Thanks @akshita31 😃

Hello, @akshita31! Can I somehow change that color?

This actually confused me - I was used to the icon being green and now I though something was wrong...
Anyway: now the icon is white regardless of theme, and as @ihodev illustrates this doesn't make much sense on light themes. Can it please be changed to have the dark grey of other status bar indicators on light themes?

I could relate to this, icon doesn't look very attractive http://tinyimg.io/i/zgW8qOr.png

@v-zubritsky created https://github.com/OmniSharp/omnisharp-vscode/issues/4384


Error thrown on simple equation

Thanks for this library, is working really well in many cases.
I am facing an issue though with a specific case:
        let solver: Solver = Solver()

        let row0 = Variable("row_0")
        let row1 = Variable("row_1")
        let row2 = Variable("row_2")
        let row3 = Variable("row_3")

        do {
            try solver.add(constraint: row0 == row1)
            try solver.add(constraint: row2 == row3)
            try solver.add(constraint: row0 + row1 + row2 + row3 == 240)
            try solver.add(constraint: row0 + row1 == 120)
            try solver.add(constraint: row2 + row3 == 120)
        } catch {
            throw error
        }

This simple equation is raising an error: caught error: "unable to satisfy constraint: 1.0 * row_2 + 1.0 * row_3 + -120.0 == 0
If I set any of the last 3 constraints as .strong (instead of required), the solver is able to resolve (all variable values are 60).

I  am not sure how your code is actually written, but i add the following code to the unit test, it did pass the test."
func testSetRestricted2(){
let solver: SimplexSolver = SimplexSolver()

let row0 = Variable.restricted()
let row1 = Variable.restricted()
let row2 = Variable.restricted()
let row3 = Variable.restricted()

XCTAssertNoThrow(try solver.add(constraint: row0 == row1))
XCTAssertNoThrow(try solver.add(constraint: row2 == row3))
XCTAssertNoThrow(try solver.add(constraint: row0 + row1 + row2 + row3 == 240))
XCTAssertNoThrow(try solver.add(constraint: row0 + row1 == 120))
XCTAssertNoThrow(try solver.add(constraint: row2 + row3 == 120))

XCTAssertNoThrow(try solver.solve())

XCTAssertEqual(solver.valueFor(row0) , 60)
XCTAssertEqual(solver.valueFor(row1) , 60)
XCTAssertEqual(solver.valueFor(row2) , 60)
XCTAssertEqual(solver.valueFor(row3) , 60)

}


requirements: Upgrade Django (on Python 3.6)

Hi @jpmckinney, In production is Python 3.7, Dockerfile

Ok, I force pushed a change based on Python 3.7.

LGTM


Unable to see any Open Folder

Type: Feature Request
When i open any folder in vs code. I am unable to see my folder in vs code.
I don't know what is happend with my vs code.
I already did uninstall and again install my vs code even i found the issue is not resolved!!
VS Code version: Code 1.76.2 (ee2b180d582a7f601fa6ecfdad8d9fd269ab1884, 2023-03-14T17:57:21.103Z)
OS version: Linux x64 5.19.0-38-generic snap
Modes:
Sandboxed: No

Try CTRL + SHIFT + P -> Reset View Locations

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.
Happy Coding!


Version 7.0.0 onwards HazelcastProxyManager does not provide getProxy method

Hi,
From my understanding, the hazelcast is used to store the bucket with a key, and when it comes to rate limiting, the application needs to get the bucket from hazelcast to check if there is still token left in bucket.
As of version 6.4.0, the HazelcastProxyManager still provides getProxy to get Bucket, but it is not supported after. Can I first verify my understanding, and if it's correct, how does the application now retrieves the bucket with the newer version? In your docs, I cannot see any steps to retrieve a bucket, only build bucket code is available.
Thanks.

Hello @KaeYan93
This method was removed in order to prevent eniffecient usage of API like:
Bucket bucket = proxyManager.getProxy("42");
if (bucket.tryConsume(1)) {
   ...
}

There are two network requests in the scenario above, It is not optimal usage of API.
New API does not allow to act in this way.

Thanks for prompt reply. Understand the concern of inefficient calls for old APIs.
With the new approach below you mentioned, is there a way that i can retrieve the same bucket for the same key when i need to consume it, without having to keep track that it has been consumed? Because the code (Builder) seems will create the new bucket for the same key everytime.
BucketConfiguration configuration = BucketConfiguration.builder()
                .addLimit(Bandwidth.simple(1_000, Duration.ofMinutes(1)))
                .addLimit(Bandwidth.simple(200, Duration.ofSeconds(10)))
                .build();

Bucket bucket = proxyManager.builder().build(key, configuration);

If bucket was created before, it will not be rewritten, so multiple client will operate with same bucket.

If the bucket is persisted before and there is a configuration change, i will need to removeProxy and build a new one with the same code above?

Also, just curious, if the bucket was created before and if the next client retrieve the same bucket (with same key) with the builder method, wouldnt it that it will get the bucket from cache and that it might have the similar inefficient network calls as well?

If the bucket is persisted before and there is a configuration change, i will need to removeProxy and build a new one with the same code above?

It not needs to remove bucket in such case. There is special API On-the-fly configuration replacement

Also, just curious, if the bucket was created before and if the next client retrieve the same bucket (with same key) with the builder method, wouldnt it that it will get the bucket from cache and that it might have the similar inefficient network calls as well?

Default Bucket4j integration with Hazelcast is implemented on the top of EntryProcessor functionality. There is no regular get->modify-write ->commit pattern that we usually use in our typical enterprise code.

Hi @vladimir-bukhtoyarov, thank you for your response, my above queries is answered already.
I have 2 more questions:

Is there a default refill config if refill config is not specified?
For the bucket4j distributed feature, the specific feature is that bucket4j is able to store the bucket information in the distributed cache right? Apart from this, what other features i can leverage?

Refill config is always defined. When Bandwidth#simple method is called, it creates Refill behind the scene https://github.com/bucket4j/bucket4j/blob/master/bucket4j-core/src/main/java/io/github/bucket4j/Bandwidth.java#L105

The stable list of features is documented there https://bucket4j.com/8.3.0/toc.html  Threre is interesting package io.github.bucket4j.distributed.proxy.optimization that is not documented and is not finalized.

If bucket was created before, it will not be rewritten, so multiple clients will operate with same bucket. Provided configuration will be used if and only if it detected that bucket was not persisted yet.

I am using 8.3.0, and i realized that the bucket will be overwritten with new configuration with the code below, after created a bucket. When the bucket was first created, it is also using the method below. Does it mean that when i create the bucket using code below, it is not persisted in the hazelcast yet?
BucketConfiguration configuration = BucketConfiguration.builder()
                .addLimit(Bandwidth.simple(1_000, Duration.ofMinutes(1)))
                .addLimit(Bandwidth.simple(200, Duration.ofSeconds(10)))
                .build();

Bucket bucket = proxyManager.builder().build(key, configuration);

Also, @vladimir-bukhtoyarov my feedback is that it is not intuitive/costly for the user to create the BucketConfiguration again, when retrieving the bucket to do rate limit. My use case is that i will have > 1 application running, and they sharing a hazelcast cluster. If it happen that I need to store my BucketConfiguration so that i can generate the Bucket everytime for rate limit purpose, it would be costly + not intuitive because when i first create bucket, i have already given a key and a bucket configuration to create the bucket.
The analogy would be e.g. using a HashMap, first i store a key and value pair, subsequently, if i want to get the value from a key, i have to generate the value first to get the key value pair, instead of using the key.
Please let me know if there is a misunderstanding of the use of APIs. Thanks.

@KaeYan93
You are right while your cluster is stable. But... What will you do when by any reason bucket had been lost? Without configuration provider the bucket can not be recreated, while current API ressurects bucket for you automatically.
Comaprision with HashMap is not well suitable there. HashMap is not distributed object, so it would be right to compare HashMap with LocalBucket. LocalBucket is free from described awkwards.
Also, if configuration is costly to create you can use lazy configuration provider:
// lazyConfigurationSupplier is called if and only if bucket is absent in Hazelcast
Supplier<BucketConfiguration> lazyConfigurationSupplier = () -> readFromSlowDatabase(userId);
Bucket bucket = proxyManager.builder().build(userId, lazyConfigurationSupplier)

In consclusion:
Current API design is addressed to prevent as many pitfalls related to distributed computations as it possible. Previuos API design did not prevent prefomans and availability problems.

If bucket was created before, it will not be rewritten, so multiple clients will operate with same bucket. Provided configuration will be used if and only if it detected that bucket was not persisted yet.

I am using 8.3.0, and i realized that the bucket will be overwritten with new configuration with the code below, after created a bucket. When the bucket was first created, it is also using the method below. Does it mean that when i create the bucket using code below, it is not persisted in the hazelcast yet?
BucketConfiguration configuration = BucketConfiguration.builder()
                .addLimit(Bandwidth.simple(1_000, Duration.ofMinutes(1)))
                .addLimit(Bandwidth.simple(200, Duration.ofSeconds(10)))
                .build();

Bucket bucket = proxyManager.builder().build(key, configuration);

It can not be true, otherwise it should be a cause of thouthands reported issues in the bugtracker. This functionality is covered of massive tests suite, and can not be broken in so cheap way.  Try to run this code https://github.com/bucket4j/bucket4j/commit/b3d8788dc3a2bd2c1b5de68b4d0d878633a71357 I have created it to specially demonstrate that problem does not exist.


Idea: quick'n'dirty Python 3.6 support

Python 3.4 is really old. The oldest version still widely supported is 3.6. This makes it difficult, for example, to use IronPython with packages from PyPI and other more modern code. IronPython3 already supports many of the newer features (e.g. f-strings), but cannot claim to be 3.6 until it can at least parse Python 3.6 source code without a SyntaxError.
The idea is to add minimal parser support for async/await so they do not cause a SyntaxError. In the mean time, it can produce a  placeholder coroutine object that raises an exception if actually used.  It should be OK for an alpha version to have partial support and it will instantly be more useful than Python 3.4 as there are many useful packages that do not require async support. Full async support can be added later on whatever schedule you already had planned.
The parser should also support PEP 526 variable type annotations without raising SyntaxError. The annotations can be simply discarded. Porting the new standard library modules should be relatively straightforward. The pathlib module will require adding support for the fspath() in the core.

It's an interesting idea. I have a local branch that targets 3.5 which works fairly well after commenting out the few async/await instances that appear in the standard library. I can try to extend the exercise and target 3.6 to see what the pain points would be.
I guess my main concerns are:

Having multiple branches to test and maintain (although maybe we could release a 3.4-beta and then bump the main branch to 3.6-alpha).
Packages that may not work without async/await. I haven't done any testing so I don't know if this is actually an issue, but if "core" packages such as pip, requests or whatever were to have an async/await dependency it may complicate matters.

Anyway, I'll run some tests to see what sticks out...

I think that upgrading the parser to be able to parse Python 3.6 is a very good idea, even if it turns out that there are other blocking issues in StdLib to bump up to 3.6. This is how some features of 3.4 were done too: e.g. nonlocal was first implemented in the parser, and the actual support for it came later.
I share @slozier's concern for having to maintain/test two branches and the idea to do one more release (3.4-beta) and then bump to 3.6 seems to me the most appealing.

Just wondering if there's been any further thinking on this. At this point I'm not able to use IronPython in the majority of my projects because they require 3.6.


Multi line text

The text editor control only accepts a single line. Is it possible to have it accept multi-line text?

The text editor control only accepts a single line. Is it possible to have it accept multi-line text?

We are also facing the same issue. Anyone get solution for this?
Thanks in advance.

Would take months of development.

+1


Update version of replace-requires to work with requires that have slashes

Version 1.0.3 has a fix: https://github.com/bendrucker/replace-requires/issues/1
This will make it possible to replace require('react/addons') using this transform.

Wow, super fast response. Thanks!

:)

Would be awesome to get this published to NPM!

Thorsten will get to it in the next couple of days. Shouldn't matter though. A fresh install will get the updated patch versions downstream.

Oh, right - good point.