Bump version

Codecov Report

Merging #40 (2c24588) into main (c96e33a) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##              main       #40   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files            7         7
  Lines          598       598
=========================================
  Hits           598       598

Continue to review full report at Codecov.

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


Several _document.js for Open Graph markup

Hi,
I'm trying implement og markup to my site. Main page have a type business.business type and prefix is a <head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# business: http://ogp.me/ns/business#">, but Article's pages in the blog have a type article and prefix is a <head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# article: http://ogp.me/ns/article#">.
How can I handle the head prefix or is possible use several _document.js?

I think you can use this this for that.

Nope, its wrong way, I trying add prefix to

@LeeTwelve on getInitialProps for _document.js you get the req object, holding the url. You can then take decisions on render to add the prefix into head

@impronunciable thx, this is work


feat: a develop branch from master that can be used to develop features

I think using a develop branch to create features to protect the main branch is a good idea

make a wiki with the plan of the project and add those diagrams to it


Issue with Vite's new Sass JS API and @blakedarlin/sass-json-importer

Describe the bug
Describe the bug
I'm attempting to use Vite's new Sass JS API for a project where I need to convert JSON files into Sass variables. Previously, I used the node-sass-json-importer package with the old Vite configuration. Here's an example of the old config:
import jsonImporter from 'node-sass-json-importer';

export default {
  css: {
    preprocessorOptions: {
      scss: {
        additionalData: '@use "@BBB/assets/scss/utils" as *;',
        importer: jsonImporter(),
      },
    },
    // Specific PostCSS config file folder.
    postcss: '../../packages/AAA',
  },
};

With the new API, I switched to using @blakedarlin/sass-json-importer. Below is my updated Vite config:
import jsonImporter from '@blakedarlin/sass-json-importer';

export default {
  css: {
    preprocessorOptions: {
      scss: {
        api: 'modern-compiler',
        additionalData: '@use "@BBB/assets/scss/utils" as *;',
        importers: [jsonImporter()],
        silenceDeprecations: ['mixed-decls', 'import'],
      },
    },
    // Specific PostCSS config file folder.
    postcss: '../../packages/AAA',
  },
};

However, the @blakedarlin/sass-json-importer package doesn't work as expected in the Vite environment. When I print out the url from the canonicalize method, it always returns @BBB/assets/scss/utils. This is problematic because utils/index.scss is not a JSON file, and canonicalize returns null. Once canonicalize returns null, other @use, @forward, or @import statements inside utils/index.scss are skipped by this importer and are only processed by the default importer.
I confirmed that this package is designed to work specifically with sass-embedded. I also raised this issue in the Sass community, and the conclusion was that Sass itself seems to process the input correctly, so this might be a Vite-related issue.
Reproduction
https://codesandbox.io/p/devbox/k8xtqw?file=%2Fvite.config.js
(or as zip to download vite-18961-sass-json.zip)
Steps to reproduce

Run pnpm install && pnpm dev in the example project.
This will start Vite and reproduce the issue in the Vite environment.
The vite.config.js file also uses sass.compileAsync to compile index.scss.

Using sass.compileAsync, everything works fine, and the console output shows:.logo {
  border: 1px solid #323232;
}

This is the expected result.

However, Vite throws the following error:[vite] Pre-transform error: [sass] Error: expected "}".
╷
1 │ {
│ ^
╵
/project/workspace/src/assets/json/colors.json 1:1           @import
/project/workspace/src/assets/scss/utils/colors.scss 1:9     @use
/project/workspace/src/assets/scss/utils/variables.scss 1:1  @forward
/project/workspace/src/assets/scss/utils/index.scss 1:1      @use
/project/workspace/src/App.vue 1:1                           root stylesheet

The issue occurs when Vite tries to handle imports within utils/index.scss, and the importer doesn't process JSON correctly after canonicalize returns null.
The standalone sass.compileAsync appears to handle everything correctly, so this seems to be specific to Vite's handling of the Sass API.

Is this issue related to Vite's Sass integration, the way I'm using the @blakedarlin/sass-json-importer, or the implementation of the package itself?
Any guidance or recommendations would be appreciated!
Thanks in advance for your support!
System Info
System:
    OS: macOS 14.6.1
    CPU: (8) arm64 Apple M1
    Memory: 39.52 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.20.2 - ~/.nvm/versions/node/v18.20.2/bin/node
    Yarn: 1.22.5 - /usr/local/bin/yarn
    npm: 10.5.0 - ~/.nvm/versions/node/v18.20.2/bin/npm
    pnpm: 8.7.6 - /usr/local/bin/pnpm
  Browsers:
    Chrome: 131.0.6778.140
    Safari: 17.6
    Safari Technology Preview: 18.0
  npmPackages:
    @vitejs/plugin-vue: ^5.1.5 => 5.2.1
    vite: ^5.4.11 => 5.4.11

Used Package Manager
pnpm
Logs
No response
Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
[X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
[X] The provided reproduction is a minimal reproducible example of the bug.

Can you move your reproduction somewhere else? It now says "Out of credits".

Sorry about that, I assumed you would fork a copy to run it directly. Here’s another link to the reproduction: New Link.
The reason I’m not using StackBlitz is that it seems to have issues with sass-embedded, which prevents it from running correctly. Otherwise, I agree that StackBlitz would have been more convenient.
Let me know if you encounter any issues with this new link!

I simplified a repro https://stackblitz.com/edit/vitejs-vite-nhtz78vk?file=src%2Ftest.scss (again this needs to download it and run locally for sass-embedded)
I haven't dug deeper, but it looks like user's custom importer is not kicking in when the file is loaded via Vite's internal custom importer.
// [working]
@import './scss/colors.scss';

// [not working]
@import<EMAIL_ADDRESS>

The custom importer order does't look intuitive, but I'd assume sass spec says so somewhere. Probably we should check with them too.
[user canonicalize] @/scss/colors.scss -> null
[vite canonicalize] @/scss/colors.scss -> /path-to/scss/colors.scss
[vite load]         /path-to/scss/colors.scss -> ...
[vite canonicalize] file:///path-to/json/colors.json -> /path-to/json/colors.json
[user canonicalize] ../json/colors.json (called only when I patch above "vite canonicalize json" to return null)

For Vite side, considering we check extension on load side, it sounds fine to reject non css extensions during canonicalize. https://github.com/vitejs/vite/blob/63b82f1e29a00d06a82144fd03ea8d6eff114290/packages/vite/src/node/plugins/css.ts#L2379-L2386

It sounds like some implementations in Vite caused the custom importer not to work correctly. Am I understanding this correctly? Thank you for the fix and the quick response!


Auto-indenting fails when the line contains '$var = $(something)' [using PowerShell]

VSCode Version: 1.10.1
OS Version: Windows 7
PowerShell plug-in 0.9.0 (if that helps at all)

Steps to Reproduce:

Turn on editor.formatOnSave setting
Code language - PowerShell
If I have code that has a line that has a variable configured with "$foo = $(3+5)", the indenting of the subsequent line is not correct, it falls back one indentation level, and it shouldn't as follows.

Example 1 - both lines should be at the same indentation level:
$foo = $(3+5)

$bar = "hello world"
or
Example 1 - All three lines should be at the same indentation level:
$bar = "world"
$foobar = $("hello " + $bar)

Write-Warning ($foobar)
The subsequent line after the code that contains '= $(' does a negative indention whereas it should remain on the same indentation level.
Thanks,
Steve.

It looks like an issue with the extension you use, please file issues against them :)

Thanks rebonix,
I've tested it again with a later version of the PowerShell Extension (0.12.2) and it's formatting correctly now.


Correct semverCompare constraints for ingress. Fixes: #60

Fix the user of ingress api v1 on GKE, and probably other kubernetes versions. See: #60

Thanks! See the failing test logs (version bump needed).

Yeah I figured that the chart version should probably be changed. It should be OK now.


Cast interval to an integer, not a float

Fixes https://github.com/enova/sidekiq-rate-limiter/issues/30 by avoiding "ERR value is not an integer or out of range" errors.
The interval for a RedisRateLimiter instance must be an integer, according to the RedisRateLimiter documentation.

Coverage remained the same at 100.0% when pulling ada771bd46a4dd7827f64b98b787ef760b3ff3b6 on controlshift:integer-interval into c163145c160f4a56d6b03bf12994b3eedb62101c on enova:master.

Coverage remained the same at 100.0% when pulling ada771bd46a4dd7827f64b98b787ef760b3ff3b6 on controlshift:integer-interval into c163145c160f4a56d6b03bf12994b3eedb62101c on enova:master.

Can we get this merged and released?

This solves the error for me. Would love to see it merged.


go/cmd/dolt: commands/login.go: Change behavior so dolt login with existing creds checks server for association before opening a browser.

Realized this behavior could be better when investigating #561

 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.


Allow some variants of filenames in required_files_checks

Partial work towards solution for #128. This allows a .md or .txt for readme and a .jpg and .png for screenshot. Also allows uppercase README.* variants.
The file_exists() function is case sensitive on some filesystems and not others so it's not reliable to check variants with different cases. We probably need to explore another solution for this but the only other way I can think of right now would be to list entire directories to do case insensitive string matches. Seems overly messy.

I'll also let @timelsass look at this, since he wrote it 😄 delegating...
Also can you just change the branch to development? Thanks!

@pattonwebz There were some merges to the development branch. Can you update your code and fix the conflicts? Thanks!

Yup will refresh it today :)

I think with reworking the screenshot and readme checks the required files check won't be necessary anymore, and we can handle the file missing errors inside of those classes - you may want to hold off on this for a little bit.  The start of the readme validation stuff is in the development branch though if you wanted to look at that one.  I'm still not entirely sure if the sniff should allow .md for the reasons described on https://github.com/WPTRT/theme-sniffer/issues/128#issuecomment-470288556.  As a note, the parser/validator on wp.org is expecting .txt when validating via URL: https://meta.trac.wordpress.org/browser/sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/readme/class-validator.php#L33.
Themes never had a requirement as to format when it comes to a readme.txt, so I don't see a reason to allow multiple extensions.  I would even argue that having a stricter format would be a better choice than adapting to old methods which are filled with their fair share of underlying issues.  The Gutenberg block RFC is a good example of a better way to handle this type of information: https://github.com/WordPress/gutenberg/blob/97e878c57266071b4c4de460dabbf3471055bd21/docs/rfc/block-registration.md
associated PR/discussion: https://github.com/WordPress/gutenberg/pull/13693/files/97e878c57266071b4c4de460dabbf3471055bd21#diff-4b5f9e280074f644def145cb4cc4fb6e
That information is far more accessible, easier to parse, and pretty much every programming language has a lib to consume it easily if not already built in.   However if the desire is to achieve closer parity between plugins and themes for some reason, then having the format as just readme.txt seems okay for now.

@tim if you think these files could be checked for inside of alternative sniffs should the check this PR modifies just be removed entirely?
My concern here is that I want to stop users from having so many false positives on the required files check. I'd like to make that happen sooner rather than later.
Readme can be either .txt or .md. Screenshot can be .png or .jpg/.jpeg (possibly also .gif). comments.php file is not required.

Readme can be either .txt or .md.

The Required page says readme.txt file. There is nothing about readme.md. It should be consistent with plugins, and if core will be reading it (as we intend), only one name should be allowed.

In the past we have allowed people to use .md if they wanted. In the interests of getting something out there for a fix I am allowing it. If it is not allowable in future that's ok - but for now we can allow it and prevent users seeing an ERROR that is only a blocker in terms of semantics.

I think that's a dangerous way to go. It should match the requirements page and also match what core is checking for PHP version, and match what plugins allows.
I say it's okay to have readme.md, but it should be ignored by WP. WP should only look at one file: readme.txt.

WP should only look at one file: readme.txt.

I'm not saying I disagree with that. I just don't want to have to wait until that is worked through before this check stops making people think there is a major blocker when it's only minor and easily resolvable :)

I updated this PR to fix conflicts. It does have certain issues with the other updated readme checks that will need worked though if this is the method that we go with here if nothing else more appropriate can be worked out quickly.
Flagging as a WIP for the moment.

i merged in @pattonwebz commits and started a quick refactor in PR https://github.com/WPTRT/theme-sniffer/pull/160.   The PR does add a few extras in as well - the aspect ratio check from theme-check on screenshot, the extra extensions checks, and case-insensitive file exists checks.  It should be easier to manage and tell what's going on in the refactor - or at least I hope it is :smile:  It's still not 100%, but I think it's bringing things together better.  It does remove the required files check mentioned above, and brings the screenshot sniffs into it's own validator class like the readme sniffs were.  These changes should resolve the issues @pattonwebz mentioned above about the updated readme checks collisions.
I started to remove some of the logic for errors/warnings/messages in these, and have a more generic implementation for other sniffs to use in the future which is a Results class.  Both the readme and screenshot sniffs are using it now.  The Results class is designed for a single file that has a Validator class with a call to get_results() (these implement Has_Results), which returns an array of messages, and then it will format those the expected way for merging into the final report response that gets output.
There's now a Validate_File class, which both readme/screenshot sniffs use - this is where the logic for required files was abstracted out to. Following @pattonwebz suggestion of a case-insensitive search in directory seemed like a good way to go for the issues with file_exists, so there's a helper/trait that can be used where needed to do that.  The Validate_File class makes use of this to resolve README.txt vs readme.txt (a test case for this is twentyseventeen since it uses all caps for it's readme file).
For all the extensions stuff, no ones really gave a clear answer, so I just have screenshot checking png, jpg, case-insensitive, and readme checking txt, md, case-insensitive.  The filename and extensions are just class properties, so easy to spot and change if this needs to be changed.  For the case insensitive stuff - as explained above is the File_Helpers trait, so the logic there can be changed to check only lower + only upper instead of case-insensitive if needed.
I've not tested all of this out, so i'd say it's still WIP, and any help in testing is appreciated if anyone has some spare time

@timelsass  I will try test out your work on Monday for #160 . I appreciate you bearing with me here on my shifting targets for allowable types and extensions :).
I'm aware that it could well be a slippery slope to go down making such decisions on the spot (for a very short term workaround on the issue) but the amount of uses that seek help with the old required file checks is out of proportion with the severity of what the check was reporting.

The readme.txt should be validated and required, as it is going to be important to have a valid readme if were to make a theme main page look like plugins one.
The readme.md is good for github, but shouldn't be required to have.
Btw, any update on this PR?


↩ [1.9] DCOS-16147: default portDefinitions to an empty array

This is a back port of https://github.com/dcos/dcos-ui/pull/2244
I had to adjust applyPatch tests since it uses stripEmptyProperties that I had to update so it doesn't remove empty arrays and objects.
To test: launch 1.9 cluster, go and create an app, verify that portDefinitions: []. Without the fix you won't see portDefinitions at all and because of that Marathon will create a port by default.

LGTM! 👓 👍


Use JSONL for streaming rather then SSE

Looking at the builtin assistants, there are currently three ways of streaming:

Using SSE

Anthropic
OpenAI

Using streaming responses

with one object per line (JSONL):

Cohere

with streaming JSON:

Google

Out of those, I think 2.ii. is by far the worst as it is the hardest to parse. When we implemented streaming for Ragna, I went with 1., since that is what I was familiar with and seen other providers to as well. At that point, I was not aware of streaming JSONL (2.i.) as an alternative.
This has the upside, that one does not need an extra library to handle as it is "required" for the other two cases (of course we could write the logic ourselves as well).
Due to its simplicity I would actually prefer JSONL streaming. We should make a decision here before we release streaming with 0.2.0.

I've added a PR for this in #357. We eliminate the dependency on sse-starlette, httpx_sse becomes an optional dependency for Anthropic and OpenAI assistants, and we simplify the streaming code on the user side from
https://github.com/Quansight/ragna/blob/4a667f9aced1970f8eab8aa9e01aaf8c67b05db0/docs/examples/gallery_streaming.py#L151-L162
to
import json

with client.stream(
    "POST",
    f"/chats/{chat['id']}/answer",
    json={"prompt": "What is Ragna?", "stream": True},
) as response:
    chunks = [json.loads(data) for data in response.iter_lines()]

I currently don't see a downside.


deleting / importing a keystore on primary doesn't change the status of reverse proxies to require a restart

Hi, I'm using simple roles to delete a keystore and import a new version of it.  Each role calls the commit changes notifier.
I've set up small demo env which has 2 appliances....a primary and a cluster member.  Both the primary and the clsuter memeber have the reverse proxy deployed and configured to use a self sign cert in the keystore that is being changed.
I'm finding that only the reverse proxy on the primary has its status changed to 'changes are active' = false.  The same reverse proxy on the cluster member still shows 'changes are active' = true.
Is there a further step required in order for the cluster member reverse proxy to have its status changed.  My next step is to call a role to restart the reverse proxies to take in the cert change but this is only happening on the primary.

I suggest having a playbook to restart the reverse proxies - I dont think the cluster sync flags a reverse proxy as needing restart. Alternately you can detect if a change is being made in your import playbook and then manually trigger restarts. You can force handlers (see rp_restart.yml playbook - in sample playbooks repository).


Recognize any "standard" JVM-style main object in the sbt plugin.

In addition to recognizing objects extending js.JSApp, the sbt plugin now recognizes "standard" main methods as well, i.e., objects with a method of the form
def main(args: Array[String]): Unit = ...

If such an object is used as main class, its main method is called using the new ModuleInitializer.mainMethodWithArgs.
This has the nice benefit that we can finally write a cross-platform main object.
We "softly" deprecate js.JSApp: its documentation says not to use anymore, but it does not cause a deprecation warning yet.
For backward compatibility, objects extending js.JSApp are still recognized, and their main(): Unit method will be called.
There are some subtle scenarios regarding backward compatibility:

If an object both extends js.JSApp and has a standard main method, the main() method of js.JSApp is preferred, for backward compatibility.
If an object has a main(): Unit method but does not extend js.JSApp, it will not be discovered. In that case, we assume the old style and call main(). This can happen if the user explicitly sets the mainClass setting.
If an object has both a main(): Unit method and a main(args: Array[String]): Unit method, it will now be discovered, and the new style will be assumed. This can potentially break compatibility, as now the standard main will be called. This only happens in case the user has explicitly set mainClass. Moreover, it is only problematic if main() does not behave the same as main(Array()), in which case the codebase is arguably in a bad shape to begin with.
The very fact of recognizing more objects as potential main objects means that the sbt build can break because it cannot automatically choose between several discovered objects. This will however fail to link with a nice error message, so it is not too bad.

Here are some examples.

Old-style only, main() is selected
object OldStyleOnly extends js.JSApp {
  def main(): Unit = ...
}

New-style only, main(Array[String]) is selected
object NewStyleOnly {
  def main(args: Array[String]): Unit = ...
}

Old and new style combined, main() is selected
object OldAndNewStyle extends js.JSApp {
  def main(): Unit = ...
  def main(args: Array[String]): Unit = ...
}

def main(): Unit without js.JSApp only, main() is selected
object OldStyleNonJSApp {
  def main(): Unit = ...
}

Both styles of methods without js.JSApp, main(Array[String]) is selected (potentially silently breaking)
object OldAndNewStyleNonJSApp {
  def main(): Unit = ...
  def main(args: Array[String]): Unit = ...
}

Both styles exist in two different objects, sbt reports an ambiguity and demands that mainClass be set explicitly
object OldStyle extends js.JSApp {
  def main(): Unit = ...
}
object NewStyle {
  def main(args: Array[String]): Unit = ...
}

Supersedes #2992.

Refer to this link for build results (access rights to CI server needed):
https://scala-webapps.epfl.ch/jenkins/job/scalajs-pr/4039/
https://scala-webapps.epfl.ch/jenkins/job/scalajs-matrix-build/5350/
Test FAILed.

Did you manually test the last commit? (I guess that's enough-ish).

Updated:

1 binary filter
Don't touch HelloWorld.scala, and instead test the def main(args: Array[String]): Unit main method in the sbt-plugin-test. The problem is that our CI matrix still tests the persistLauncher case on the helloworld, and persistLauncher does not work with the new-style main (as documented).

Also, yes, I locally tested every one of the cases listed in the commit message ;)

Refer to this link for build results (access rights to CI server needed):
https://scala-webapps.epfl.ch/jenkins/job/scalajs-pr/4042/
https://scala-webapps.epfl.ch/jenkins/job/scalajs-matrix-build/5353/
Test FAILed.

Refer to this link for build results (access rights to CI server needed):
https://scala-webapps.epfl.ch/jenkins/job/scalajs-pr/4043/
https://scala-webapps.epfl.ch/jenkins/job/scalajs-matrix-build/5354/
Test PASSed.


Add TypeScript annotations

Hi @kylebebak!  Can I take this issue?

Hey @kevotovar !
I added instructions to the README for running dev.
Fork the repo, run dev, and get a feeling for the code base. The prop types are documented in the code, and also here.
I think this is a good time to work on TS annotations, because the API for RDU is pretty stable now.

Ugh, I didn't realize that there already was a feature branch for the typings https://github.com/fortana-co/react-dropzone-uploader/tree/feature/typescript

@nchen63
That feature branch has some exploratory junk, but nothing usable... So your efforts were definitely not in vain!
In the last few days I actually started working on an index.d.ts as well, in master. I'll take your type declarations, add them to what I've got, and push a release with TypeScript support within the next week =)
I was thinking I'd change examples/src/index.js, which is the entry file for webpack-dev-server, and change it to index.ts.
In package.json I could change "dev": "webpack-dev-server ...", to "dev": "tsc && webpack-dev-server ...",, so that running dev tsc to compile index.ts without errors, as a cheap shortcut for testing the type declarations. Any thoughts?

TS declarations ship with 2.8.0. They're tested against the code in https://github.com/fortana-co/react-dropzone-uploader/blob/master/examples/src/index.tsx.
@nchen63
I took your definitions and added to them. Thanks again!


Chromium won't start under hardened profile

I've just switched to the hardened profile, and Chromium now
fails to start, saying —

[31931:31931:0611/032643.444522:FATAL:credentials.cc(137)] Check failed: error == EPERM || error == EUSERS || error == EINVAL || error == ENOSYS. : No space left on device

A comment in the hardened profile's definition says that "No
space left on device" is the error message generated if a program
tries to create a user namespace when user namespaces are, as under
the hardened profile, disabled via sysctl.
Chromium documentation says that Chromium does indeed use user
namespaces, as well as BPF, another thing that the hardened profile
disables or at least restricts.
I'm not sure Chromium not working is necessarily a bug, but I think it
at least worthy of a report.

If I use sysctl to lift the limit on user namespaces, Chromium
appears to work without any intervention for BPF.
Perhaps there might be a way to disable user namespaces for all but
select programs.

It seems that I can either enable user namespaces and their
accompanying vulnerabilities, and use Chromium's user namespace
sandbox, or enable setuid bits and their accompanying vulnerabilities,
and use Chromium's setuid sandbox.
Perhaps a silver bullet for permitting the use of these features by
Chromium only might be found in SELinux, though last I heard there's
no support for SELinux in NixOS.

I think chromium has --no-sandbox flag? Of course, you lose isolation of parts of Chromium in this case, but at least you can isolate entire Chromium inside a different user.

re: selinux, I believe it is compiled in but disabled by default. One problem with label based mac is that NARs don't store xattrs, so you'd have to relabel stuff all the time (which also meshes poorly with read-only stores).

re suid vs userns, I think it's easier to audit a suid stub than it is to audit the privilege checks within the kernel in the presence of namespacing, so you might be better off with the suid sandbox ...

Oh, I see I already have setuid bits enabled for my root filesystem;
Chromium's setuid sandbox doesn't work because I never enabled
security.chromiumSuidSandbox.enable. I'll try turning that on after
nixos-unstable updates and I can rebuild again without hitting #26431.

On the other hand, Chromium seems to want to drop the setuid sandbox
(https://bugs.chromium.org/p/chromium/issues/detail?id=312380 etc.),
so using it may not be a sustainable solution.

I'd bet on the suid sandbox (or something like it) to stay around for a while.  I believe Debian disables unprivileged userns by default (via kernel patch) while Arch Linux disables them outright. My impression is that the NixOS kernel is somewhat unusual in supporting unprivileged userns creation out-of-the-box.

I've set the NixOS option security.chromiumSuidSandbox.enable to
true and the sysctl parameter user.max_user_namespaces back to
0, and Chromium seems to work.

The error in the original post also occurs for hipchat, which does not seem to honour CHROME_DEVEL_SANDBOX in the env.


Adds a file for alternating_characters.py inside HackerRank

Adds Solution for the problem of Alternating Characters originally from Hackerrank.
File Location : HackerRank/alternating_characters.py

does not follow Contribution guidelines


excessive RAM usage with quantized base model and LORA with SFTTrainer

installed trl from git clone of main
git rev-parse main
6c2f829bb7408660b0e581cde56fbff0980b9d7b

transformers version: 4.39.1
Platform: Linux-6.5.0-26-generic-x86_64-with-glibc2.35
Python version: 3.11.8
Huggingface_hub version: 0.22.0
Safetensors version: 0.4.2
Accelerate version: 0.28.0
peft version: 0.10.0

The following command is using 21.4GB of RAM on an RTX3090.
trainable params: 7,127,040 || all params: 338,323,456 || trainable%: 2.106575785274551
with 4bit quantization i was expecting the RAM usage to be much less. am i missing something?
(only change I made was #1488 to be able to use all-linear for lora_target_modules
CUDA_VISIBLE_DEVICES=0 TRL_USE_RICH=1 python examples/scripts/sft.py \
       --model_name_or_path="facebook/opt-350m" \
       --report_to="wandb" \
       --learning_rate=1.41e-5 \
       --per_device_train_batch_size=32 \
       --gradient_accumulation_steps=16 \
       --output_dir="sft_openassistant-guanaco" \
       --logging_steps=1 \
       --num_train_epochs=3 \
       --max_steps=-1 \
       --gradient_checkpointing \
       --use_peft \
       --lora_r=16 \
       --lora_alpha=32 \
       --lora_target_modules="all-linear" \
       --load_in_4bit \
       --bnb_4bit_quant_type="nf4" \
       --use_bnb_nested_quant \
       --attn_implementation="flash_attention_2" \
       --torch_dtype="float16" \
       --max_seq_length=512

wandb link https://wandb.ai/galtay/huggingface/runs/x99vv79m

@lewtun i might be totally misunderstanding what this example script does, but I was expecting that fine tuning a 4bit  quantized 350m parameter model with lora would not require much more RAM than the base model in eval mode.

adding gradient checkpointing brings it down to 13GB of GPU RAM, but that still seems like an awful lot ... like something is going wrong with the quantization or the base model parameters are holding gradients or optimizer state
CUDA_VISIBLE_DEVICES=0 TRL_USE_RICH=1 python examples/scripts/sft.py \
       --model_name_or_path="facebook/opt-350m" \
       --report_to="wandb" \
       --learning_rate=1.41e-5 \
       --per_device_train_batch_size=32 \
       --gradient_accumulation_steps=16 \
       --output_dir="sft_openassistant-guanaco" \
       --logging_steps=1 \
       --num_train_epochs=3 \
       --max_steps=-1 \
       --gradient_checkpointing=True \
       --gradient_checkpointing_use_reentrant=True \
       --use_peft \
       --lora_r=16 \
       --lora_alpha=32 \
       --lora_target_modules="all-linear" \
       --load_in_4bit \
       --bnb_4bit_quant_type="nf4" \
       --use_bnb_nested_quant \
       --attn_implementation="flash_attention_2" \
       --torch_dtype="float16" \
       --max_seq_length=512

hey @younesbelkada, thank you for taking a look!
yea, I forgot to consider the large-ish amount of RAM in the logits ... I guess (32 batch) * (50272 vocab) * (512 seq len) * (16 bits) / 2**20 ~ 12.5GB by itself ... I'll close this for now and try and do a finer grained accounting of where the RAM is actually going ... and maybe try some larger models and smaller batch sizes ;)


AIS-9091 Improve Partner Documentation for FIP

Describe the change:
Updated the documentation. Added more clarity around the API and events purpose. Added diagrams to show the process flow with events.
What are the acceptance criteria for this change:
Better documentation for the Developer portal
How was this tested, and what to look for when testing: N/A

hi @jonikamelcher my IDE is changing the table markup. I still see all tables as tables in the Rich Diff and in Macdown

Hi @denitsastoy. Correct. They still display through GitHub, however it makes it extremely difficult for the writers to edit and review the material and our website isn't always as forgiving when it publishes. It also highlights a lot of changes that are not actually changes. Do you have a way to remove this? We can navigate  around it this time if we have to, but if it can't be remedied we ask you add your changes manually.

@jonikamelcher ok I see. Let me see if I can revert just these changes.

@jonikamelcher removed the table changes that were just formatting

@denitsastoy You are an absolute hero. Thank you so much. We greatly appreciate it.


Save/restore dynamic manifest on restart

We don't currently save/restore the latest dynamic manifest on node restart.
https://github.com/filecoin-project/go-f3/blob/3b6ea9e2210365ea22c10cfdaadeb1559a931fb3/manifest/dynamic_manifest.go#L124-L125

I think we don't need to in practice. The current deployment of Manifest server does this automagically.
The initial manifest (and any modifications to it) are stored on disk via the _deployment of manifest server.
But I hear you in that we could have built-in storage of it on disk? I like keeping the dynaminc manifest dumb: in that it just broadcasts whatever it is given in-memory. But no strong feelnigs.

I'm talking about the client/lotus. Without it, nodes will start with the wrong instance and wait until the manifest server broadcasts an update before switching. I guess maybe that's fine? But I'd prefer to re-boot into the correct manifest.

Oh I see; that makes sense 👍

@Kubuxu are you picking this up?


[Enhancement] Fix primary key cooldown time

Why I'm doing:
The cooldown time and storage medium of the primary key model do not match when show partitions.
What I'm doing:
Update it to permanent when the cooldown time is reached.
Fixes #issue
What type of PR is this:

[ ] BugFix
[ ] Feature
[x] Enhancement
[ ] Refactor
[ ] UT
[ ] Doc
[ ] Tool

Does this PR entail a change in behavior?

[ ] Yes, this PR will result in a change in behavior.
[x] No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

[ ] Interface/UI changes: syntax, type conversion, expression evaluation, display information
[ ] Parameter changes: default values, similar parameters but with different default values
[ ] Policy changes: use new policy to replace old one, functionality automatically enabled
[ ] Feature removed
[ ] Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

[ ] I have added test cases for my bug fix or my new feature
[ ] This pr needs user documentation (for new or modified features or behaviors)

[ ] I have added documentation for my new feature or new function

[ ] This is a backport pr

Bugfix cherry-pick branch check:

[x] I have checked the version labels which the pr will be auto-backported to the target branch

[ ] 3.3
[ ] 3.2
[ ] 3.1
[ ] 3.0
[ ] 2.5

 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.

I think the MAX_COOLDOWN_TIME_MS should be used instead of current cooldown time, otherwise the storage medium and cooldown time will not match.


Move build infra to CDK deployment

Description
Switching to CDK to support the additional aws tools needed to make build artifacts public
(More details to come)
Issues Resolved

#453

Check List

[X] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Codecov Report

Merging #496 (3404707) into main (9032bdc) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #496   +/-   ##
=======================================
  Coverage   69.31%   69.31%
=======================================
  Files          58       58
  Lines        1509     1509
=======================================
  Hits         1046     1046
  Misses        463      463

Continue to review full report at Codecov.

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

Given #448 do you want to think about putting it at the root?

Given #448 do you want to think about putting it at the root?

Moved to the root and ready for review!

What is the reason to have CDK here if we already have Jenkins.

What is the reason to have CDK here if we already have Jenkins.

These changes are specific to the build process, built off of the existing cloud formation template that was side-by-side with these changes.  This location will likely change when the new repo opens, but this is codifying the changes we need for the 1.1.0 release.

existing cloud formation template that was side-by-side with these changes

Can you point me to those templates? In my understanding the bundle workflow is only running python and shell either locally or on CI.

@peterzhuamazon The CFN template is in this PR, it is the deleted.

@dblock @gaiksaya @peterzhuamazon Could you take a look?


Fix using databasemanager config file to connect the database.

@congpeijun we kind of trying not to use database manager

@h-wang Ok, but the readme.md file shows two way to connect the database. may update the document

@congpeijun i think u r right 👍 this one is using database manager

🎉


Use TestDefinion in strategies instead of TestTemplate

Summary
TestTemplate is an additional indirection and usually an empty class without any implementation. It serves two purposes:

Creating test types.
Holding strategies and some high level methods.

While (2) is still relevant, (1) is now better served by TestDefinition classes.
Test Plan
CI
Additional Notes
—

It looks good to me, but let's discuss it in the design meeting and ensure we have two approvals for this PR.
cc: @srinivas212 , @srivatsankrishnan

This is essential. I can approve it once you resolve the conflicts and complete the necessary tests, @amaslenn .

Let's have two approvals.

@amaslenn  Please make sure that you have a PR ready for CloudAIX, as it needs to be updated accordingly. After merging this, please create a pre-release and update CloudAIX.

@srivatsankrishnan, I believe the acceptance test is robust enough, but it might be worthwhile to run a straightforward test on a real system, such as nccl-test. While I consider it optional, it could still be beneficial to do. - @amaslenn

@srivatsankrishnan, I believe the acceptance test is strong enough, but it might be worthwhile to run a simple test on a real system, such as nccl-test. While I consider it optional, it could still be beneficial to do - @amaslenn

Tested with cloudai run --system-config ... --tests-dir conf/common/test --test-scenario conf/common/test_scenario/nccl_test.toml


Add Clarification about the library render cycle

Hello,
I first assumed that all react components would be rerendered on every frame. I took me a long time to figure out that this is not how its works. My understanding now is that its only supposed to be used for the initial rendering and the the objects get animated via ref's and useRender. Thats ok, it just really confused me and I would have loved some clarification on this.

It basically is like common react+react-dom. it only really renders (through react) when changes occur, and it diffs so that only the parts are changed that had prop changes. in the background threejs runs in a loop, through the scene that is fed to it, but if you set Canvas invalidateFrameloop to true, it will only do that when react detects changes, which is better for the battery.
useRender has little to do with rendering, it's just a callback that happens before the threejs rendercall (gl.render(scene, camera)) is made.

You have to differentiate between "render" in a React sense and in, in this case, three.js. Same word but two different concepts. I think @drcmda explained it quite well, however I'd just like to add that a render in three.js is basically about generating the "image" that the canvas will be displaying.
Remember graphics in motion (videos and gameplay a like) are just a lot of still frames being played in a fast manner giving the illusion of something actually being "played".

I've also noticed in my project that mounting and unmounting components with React is an expensive operation and can cause lag. Currently I try to anticipate how many components will be visible in a given scene and mount them all at once, with their scale set to a very small number so they aren't visible, but this isn't feasible with scenes that dynamically add and remove a lot of components.
Is there a recommended way of mounting new components or unmounting unneeded components with React that doesn't cause a lag?

react shouldn't take that long mounting unless we're talking a lot of components. and even then, perhaps there's a different reason why it takes so long (stuff in the render function that's not inside useEffect?
react will soon allow us to use async mode, that means it will not blow budget, if it detects something is going to put 60fps in danger it can defer according to the priorities you set. this will be the end game.
until then, i think profiling would be best (dev tools and new react dev tools).
there's also some unusual threejs stuff to be taken into account. for instance, three will run material/shader compilers only when objects are in view. most games will precompile assets for that reason. see: https://discourse.threejs.org/t/tips-to-pre-compile-shaders-before-theyre-needed/4324
you can also use this:
<Canvas onCreated={async ({ gl }) => {
  await LoadStuff()
  gl.compile()
}}>
  ..
</Canvas>

but gl.compile only works if all the objects are presents in the scene.


impl GpioExt for GPIOF/GPIOG?

Seems to be missing.

Just found that there are no modules for gpiof/gpiog.

Good catch (and sorry for the delay), I don't think there is a good reason for us not having that already. If you're interested, I could show you how to add the impls

Good catch (and sorry for the delay), I don't think there is a good reason for us not having that already. If you're interested, I could show you how to add the impls

How to add the impls ? (for gpiof/gpiog...)

@TheZoq2

Sorry for the delay. I think all that is required is to add another one of these macros https://github.com/stm32-rs/stm32f1xx-hal/blob/master/src/gpio.rs#L1315 for the other peripherals. It probably also needs feature gating because IIRC those ports are only available on some of the chips

@TheZoq2 Thanks!

Seems that additional timers need to be implemented to fully use GPIOF/G. Since that only affects things like pwm, and adc, should this be it's own issue?

Any progress?


No CLS or SEP token in the batches

Hi LightTag,
thanks for the tutorial :)
I was wondering whether there is a specific reason for not including the special tokens when tokenizing the data?
They are not getting added either to the batches later on before training the model.
kind regards,
wanderingashenvalewisp

Hi, good question!
Our implementation is optimized for "text in the wild" and assumes texts are long. So we window over them. Because of the windowing having a start token doesn't make sense because the first token in a window isn't really the start of anything.
We weren't sure where the SEP token comes from, e.g. do tokenizers split sentences automatically. Since we're windowing and we might cut a sentence somewhere SEPs don't make sense either.
Both of these rationales are subjective, so try with or without and test if it makes a difference for your use case

Ah, I see.
Thanks alot for the answer :)
Go LightTag!
// wanderingashenvalewisp


Look for .conflist file if .conf doesn't exist

Fixes #85

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: john-a-joyce
If they are not already assigned, you can assign the PR to them by writing /assign @john-a-joyce in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

You might argue that istio-cni cleanup should revert the file to its original name & contents, but in reality, the file might also get updated (and renamed) by another agent (not related to istio at all).
Basically, if the other agent renames the file from .conf to .conflist before the istio-cni installer runs (and assuming CNI_CONF_FILE is set to something.conf), the istio-cni installer needs to look for .conflist even though CNI_CONF_FILE points to .conf

I'm wondering if we should even be renaming the file to ".conflist".  Maybe this fix should just be to remove that.
Also, IMO, I don't think starting iinstall-cni.sh with env CNI_CONF_NAME (helm chart cniConfFileName) is advisable.  The behavior of kubelet is that the CNI conf file is found by using the lexicographical first file in the CNI config dir.  The install-cni.sh will do the same thing.
In #83, I make the daemonset detect clobbering of the CNI conf and in that check it detects whether the file with the istio-cni config is the first file in the CNI conf dir.  If the env CNI_CONF_NAME is set for install-cni.sh it will just echo a warning, but if env CNI_CONF_NAME is not set it will restart the proc and the config will be applied to the new lexicographical first file.  This case will work if the install-cni.sh creates the CNI conf file prior to another CNI plugin's installer since the file istio-cni's install-cni.sh defaults to a file not likely to be lexicographical first.

I'm wondering if we should even be renaming the file to ".conflist". Maybe this fix should just be to remove that.

I've just checked this. It must be a .conflist file. See https://github.com/kubernetes/kubernetes/blob/954996e231074dc7429f7be1256a579bedd8344c/pkg/kubelet/dockershim/network/cni/cni.go#L158-L163

Also, IMO, I don't think starting iinstall-cni.sh with env CNI_CONF_NAME (helm chart cniConfFileName) is advisable. The behavior of kubelet is that the CNI conf file is found by using the lexicographical first file in the CNI config dir. The install-cni.sh will do the same thing to detect the conf file if env CNI_CONF_NAME is unset.

I agree, but the Kubelet doesn't just use the lexicographical first file. It uses the first valid file (it logs a warning if the first file isn't ok and then moves on to the next file).  Install-cni.sh should thus do the same.

@luksa Great catch!   Yeah, I agree we should follow those semantics.
So the logic is:
foreach file in cni_conf_dir:
   if file suffix is ".conflist":
      if it contains a valid conflist:
           use it
      else:
          continue to next file
   else:
      if it contains a top level key "type" with a value:
          use it (non conflist case)
      else:
          continue to next file

For now, we could implement that basic logic within the bash script using cat <file> | jq <check contents> but, ideally, we'd convert the install-cni.sh to golang to use those libcni methods to absorb the file.  Still there's a decent bit of logic up in kubelet so even the golang approach would have a good amount of duplicate logic.
Would you be able to work on implementing the logic in install-cni.sh for this in this PR?

I rebased this locally and basic testing seems fine.  If you could rebase this so CI passes we can get this in.  I'll do the other logic we discussed in a separate PR

@tiswanso Rebased to latest master.


Compose elements cannot run integration commands

See original issue on GitLab
In GitLab by [Gitlab user @valentindavid] on Nov 20, 2019, 14:38
Summary
Compose elements do not allow anymore to run integration commands.
Steps to reproduce
Build a compose element that depends on elements with integration commands.
What is the current bug behavior?
Get the error:
Sandbox.run() has been disabled

What is the expected correct behavior?
It should just build.
Relevant logs and/or screenshots
Possible fixes
Other relevant information

BuildStream version affected: /milestone %BuildStream_v1.x

In GitLab by [Gitlab user @valentindavid] on Nov 20, 2019, 14:38
mentioned in merge request !1722

In GitLab by [Gitlab user @valentindavid] on Nov 20, 2019, 14:38
mentioned in merge request !1722

In GitLab by [Gitlab user @traveltissues] on Nov 26, 2019, 16:35
closed via merge request !1722

In GitLab by [Gitlab user @traveltissues] on Nov 26, 2019, 16:35
closed via merge request !1722

In GitLab by [Gitlab user @traveltissues] on Nov 26, 2019, 16:35
mentioned in commit 46458698dcbbb7947bed63a274ece0323cedbedc

In GitLab by [Gitlab user @traveltissues] on Nov 26, 2019, 16:35
mentioned in commit 46458698dcbbb7947bed63a274ece0323cedbedc


Refactor or deprecate parent-child relationships between XBlocks

This would be a long-term initiative. It probably belongs on the platform-roadmap.
Context
We have decided that parent-child relationships should only exist at/below the VerticalBlock: https://github.com/openedx/edx-platform/blob/master/docs/decisions/0006-role-of-xblock.rst
We have further discussed that parent-child relationships in their entirety should be removed; I'm not sure if we came to a consensus on that.
TODO -- Add more context ( @ormsbee , @kdmccormick , and @bradenmacdonald ).
Tasks
Off the top of my head...

[ ] File a DEPR encompassing our plan to:

[ ] Remove parent-child relationships on the base XBlock class. Delete the _HasChildrenMetaclass. Move all parent-child logic to a new subclass, XBlockWithChildren. Make it XBlock.has_children a read-only class property. Some details.
[ ] Raise an exception if get_parent is called at or above the VerticalBlock level.
[ ] For all XBlockWithChildren subclasses above the VerticalBlock (so, CourseBlock, SectionBlock, and SequenceBlock): Move their implementations to either Learning Core or edx-platform djangoapps.

[ ] Decide: Should parent-child relationships still exist at/below the Vertical block?

[ ] Either way -> ADR it.
[ ] Yes -> We're done.
[ ] No -> File another DEPR encompassing our plan to:

[ ] Raise deprecation warnings on the XBlockWithChildren class.
[ ] For all remaining XBlockWithChildren subclasses in edx-platform (eg, LibraryContentBlock, SplitTestBlock):
Move their implementations to either Learning Core or edx-platform djangoapps.
[ ] Write guidance on how custom XBlockWithChildren subclasses can be similarly migrated. Ensure that, for example, OpenCraft's ProblemBuilder block can be migrated using this guide.
[ ] Delete the XBlockWithChildren class, and delete all parent-child logic from the XBlock repository.
[ ] Delete all parent-child logic from modulestore and edx-platform's XBlock runtimes.

Should parent-child relationships still exist at/below the Vertical block?

Other than the "structural" XBlocks (course, sequential, vertical/unit, etc.), the only blocks I know of with has_children are:

ConditionalBlock (built-in)
SplitTestBlock (built-in, for A/B testing)
LibraryContentBlock (built-in, may be renamed to Problem Bank or Item Pool Block)
Problem Builder (which we may deprecate)

Problem Builder makes extensive use of child blocks. If we deprecated has_children, we'd need to figure out a path forward for courses that use Problem Builder, but that's been known for a while so needn't be a blocker here, just something to solve at the same time.

For the other three (conditional, split, LCB), I think they're going to be a blocker for now until we have some kind of Outline concept that can unify and replace them. But what I'd love to do is put in a restriction so that only those three blocks can have children, and attempting to do it for other blocks will raise an error. That way we can prevent people from introducing new dependencies on has_children.


phpmailer critical vulnerability

Currently silvershop is using this module: "markguinn/silverstripe-email-helpers": "~1.3"
this module is using phpmailer 5.2.8 in version 1.3
As phpmailer < 5.2.20 contain critical vulnerability, it will be necessary to updated the email module as soon as they update their phpmailer version.

I'm aware of this. There's nothing I can do right now, since @markguinn needs to update the email-helpers module first. I can then update the composer constraint

This has been addressed with the latest release (2.2.1)


We need an Epoch in the tileSet metadata

Epoch is generally not part of the CRS.

We do need an Epoch, and I believe the best place for it is in the TileSet metadata.
Possibly it should be added both at the top-level (along with a new crs property), as well as at the layer level.
We should probably also rename the layers'  supportedCRS to simply crs (it is a single value, not a list of supported CRS).

Added to the model

@joanma747 - the coordinate epoch is a decimal number (decimal year in the Gregorian calendar, for example, 2017-03-25 is 2017.23), not a string.

Changed to "number" as suggested


@mentioning people in comments

In the comments, I'd like to be able to @mention users. They would then get a message through MapRoulette (if they have a MR account) or through OSM (if they're not)

This is supported and should be working, though there isn't any indication to the comment author.

Incredible, we should make that more apparent then. Incremental search triggered by typing @

I got your test @mention ... Would be good if that message could then turn into a conversation!

PR #1183 expands user mentions into links in the rendered (or previewed) comment.

That was merged some time ago, closing


Alt-tab registers as pressing tab

Alt-tab on most platforms switches between windows. If you open the city picker UI, then alt tab to another window, the UI registers the tab key and opens up the search tool.
https://github.com/a-b-street/abstreet/blob/f17f4c27312c86ade9d99de5a8e66cc6f6d44db6/widgetry/src/runner.rs#L375
Can we skip most events if the window isn't the active focus?

I am trying to reproduce the error can you please elaborate, e.g step by step guide to reproduce.

I am trying to reproduce the error can you please elaborate, e.g step by step guide to reproduce.
I am interested in fixing it.

Hi! To repro:

Open the OSM viewer tool (http://play.abstreet.org/0.3.43/osm_viewer.html or osm_viewer in the .zip release or cd apps/osm_viewer; cargo run from git
Press tab. You should see the business search widget expand or collapse
Press alt+tab to switch to another window
Switch back to the OSM viewer by clicking the window (or anything besides alt+tab). You'll see that it picked up the tab

widgetry/src/event.rs is where winit events turn into widgetry ones, tab included. The fix probably involves using winit's API differently, like maybe figuring out if our window is the current focused/active one when we hear a keypress

I'll also note that widgetry/Cargo.toml is using winit 0.27, in case that makes looking up winit's API confusing. There may have been relevant changes since then. I haven't upgraded to modern winit because it requires upgrading glutin, and the API for that changed very dramatically recently and it's more work than I can invest so far


Black introduces E302 with a Comment at Line 0 and no Imports

Operating system: Debian 9
Python version: 3.6.4
Black version: black.py, version 18.3a2
Black converts this:
# License/Header comment

def includeme(config):
    pass

into this:
# License/Header comment
def includeme(config):
    pass

which causes this:
./compute/storage/__init__.py:14:1: E302 expected 2 blank lines, found 0

Thanks for your report, I will be dealing with empty lines for the next release!

Thanks for the quick turn-around! Do you have a donation link?

Thanks for asking! I appreciate that. I don't intend to make money by working on Black.
I invite you to donate to the Python Software Foundation instead. This organization protects our trademarks, sponsors development sprints and conferences, and so on.

Oh I'm already a donor to PSF. I'll have to increase my donation! :)

This is now fixed in 18.3a3! Thanks! ✨ 🍰 ✨

I'm not sure if this is a regression, or if classes are handled differently, but I have the following code:

# -----
# something
# -----
class FooState:
    YES = "yes"
    NO = "no"

which black reformats to:
# -----
# something
# -----
class FooState:
    YES = "yes"
    NO = "no"

which results in:
E302 expected 2 blank lines, found 0

Should I open a new issue? Is this expected behavior and flake8 is just wrong?

flake8 is wrong, you don't have to have those pointless empty new lines at the start of the file.

I figured as much. I disabled E302 given I want to let black handle all "formatting"-related concerns.


Add owner reference for PVC

This ensures that PVCs get deleted upon deletion of mysql cluster. The PVC description now looks like this --
`ownerReferences:

apiVersion: mysql.presslabs.org/v1alpha1
controller: true
kind: MysqlCluster
name: foo
uid: 1c518200-8c64-11e8-9952-42010a800107`

Thanks! We'll do a release this week.


Client ConnectAsync does not provide sensible exception when mqtt broker is offline

Expected behavior
When the mqtt broker is offline and ConnectAsync is invoked, an exception should be thrown that makes it clear that it cannot connect to the mqtt broker because it is unreachable.
Actual behavior
Interestingly, we observe a wide variety of exceptions and most of them are unrelated to the actual problem. Here's a list of the exceptions that we observed so far, the first being the most sensible of the following list:
MQTTnet.Exceptions.MqttCommunicationTimedOutException: Exception of type 'MQTTnet.Exceptions.MqttCommunicationTimedOutException' was thrown.
   at MQTTnet.Internal.TaskExtensions.<TimeoutAfter>d__1`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MQTTnet.Client.MqttPacketDispatcher.<WaitForPacketAsync>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MQTTnet.Client.MqttClient.<SendAndReceiveAsync>d__41`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MQTTnet.Client.MqttClient.<AuthenticateAsync>d__32.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MQTTnet.Client.MqttClient.<ConnectAsync>d__26.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at MQTTnet.Client.MqttClient.<ConnectAsync>d__26.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Subscriber.SubscriberApplicationContext.<ConnectAsync>d__23.MoveNext() in C:\Workspace\Development\studies\evaluate-mqtt\src\clients\MQTTnet\DotNETCore\Subscriber\SubscriberApplicationContext.cs:line 87

System.Threading.Tasks.TaskCanceledException: A task was canceled.
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MQTTnet.Client.MqttClient.<StartReceivingPacketsAsync>d__45.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MQTTnet.Client.MqttClient.<ConnectAsync>d__26.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at MQTTnet.Client.MqttClient.<ConnectAsync>d__26.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Subscriber.SubscriberApplicationContext.<ConnectAsync>d__23.MoveNext() in C:\Workspace\Development\studies\evaluate-mqtt\src\clients\MQTTnet\DotNETCore\Subscriber\SubscriberApplicationContext.cs:line 87

MQTTnet.Exceptions.MqttCommunicationException: The semaphore has been disposed. ---> System.ObjectDisposedException: The semaphore has been disposed.
   at System.Threading.SemaphoreSlim.CheckDispose()
   at System.Threading.SemaphoreSlim.Release(Int32 releaseCount)
   at MQTTnet.Adapter.MqttChannelAdapter.<>c__DisplayClass12_0.<<SendPacketsAsync>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MQTTnet.Adapter.MqttChannelAdapter.<ExecuteAndWrapExceptionAsync>d__15.MoveNext()
   --- End of inner exception stack trace ---
   at MQTTnet.Adapter.MqttChannelAdapter.<ExecuteAndWrapExceptionAsync>d__15.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MQTTnet.Client.MqttClient.<SendAndReceiveAsync>d__41`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MQTTnet.Client.MqttClient.<AuthenticateAsync>d__32.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MQTTnet.Client.MqttClient.<ConnectAsync>d__26.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at MQTTnet.Client.MqttClient.<ConnectAsync>d__26.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Subscriber.SubscriberApplicationContext.<ConnectAsync>d__23.MoveNext() in C:\Workspace\Development\studies\evaluate-mqtt\src\clients\MQTTnet\DotNETCore\Subscriber\SubscriberApplicationContext.cs:line 87

System.OperationCanceledException: The operation was canceled.
   at MQTTnet.Adapter.MqttChannelAdapter.<ExecuteAndWrapExceptionAsync>d__15.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MQTTnet.Client.MqttClient.<SendAndReceiveAsync>d__41`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MQTTnet.Client.MqttClient.<AuthenticateAsync>d__32.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MQTTnet.Client.MqttClient.<ConnectAsync>d__26.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at MQTTnet.Client.MqttClient.<ConnectAsync>d__26.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Subscriber.SubscriberApplicationContext.<ConnectAsync>d__23.MoveNext() in C:\Workspace\Development\studies\evaluate-mqtt\src\clients\MQTTnet\DotNETCore\Subscriber\SubscriberApplicationContext.cs:line 87

System.NullReferenceException: Object reference not set to an instance of an object.
   at MQTTnet.Client.MqttClient.SendAsync(MqttBasePacket[] packets)
   at MQTTnet.Client.MqttClient.<SendAndReceiveAsync>d__41`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MQTTnet.Client.MqttClient.<AuthenticateAsync>d__32.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MQTTnet.Client.MqttClient.<ConnectAsync>d__26.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at MQTTnet.Client.MqttClient.<ConnectAsync>d__26.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Subscriber.SubscriberApplicationContext.<ConnectAsync>d__23.MoveNext() in C:\Workspace\Development\studies\evaluate-mqtt\src\clients\MQTTnet\DotNETCore\Subscriber\SubscriberApplicationContext.cs:line 87

Hi, which version do you use? I fixed this or a similar issue in 2.7.5.
Best regards
Christian

I am also seeing this problem with 2.7.5. I am connecting to broker.hivemq.com with most settings set to default. I see the 2nd exception you posted within the Disconnect event. e.Exception contains System.Threading.Tasks.TaskCanceledException: 'A task was canceled.'.
I can reproduce this every time I am running my program for about 10-20 seconds. My client reconnects and will disconnect after a few seconds again. Today I observed that this behavior stops after some time, but I am not 100% sure about this behavior.
This is how I created the MQTTClient:
public Actor(string topic)
{
    Topic = topic;

    // Last will & testament
    lwt = new MqttApplicationMessage()
    {
        Topic = Topic + "status",
        Payload = Encoding.UTF8.GetBytes("disconnect"),
        QualityOfServiceLevel = MqttQualityOfServiceLevel.AtLeastOnce,
        Retain = true
    };

    // MQTT client options
    options = new MqttClientOptions()
    {
        ClientId = ClientId, // Guid.NewGuid().ToString();
        WillMessage = lwt,
        ChannelOptions = new MqttClientTcpOptions()
        {
            Server = Broker // "broker.hivemq.com"
        }
    };

    // Create a new MQTT client.
    var factory = new MqttFactory();
    _mqttClient = factory.CreateMqttClient();

    // Message received callback
    _mqttClient.ApplicationMessageReceived += MqttClientOnApplicationMessageReceived;
    _mqttClient.Connected += MqttClientOnConnected;
    _mqttClient.Disconnected += MqttClientOnDisconnected;
}

Please try again with the latest dev branch or a preview version of 3.0.0 and reopen this ticket if it still fails.

I am experiencing similar issue, when trying to log in. I use the MQTT mosquitto broker, almost with default settings, but only after enabling the log & anonymous access. The goal is only to test everything locally. Emulating several MQTT devices for further testing and the application just stopping execution during attempt to connect, even the exception handler doesn't fire, until I found how to add your CancellationTokenSource and implemented some kind of Logger from your samples, after which I saw the error message just like here, but without more detailed explanation, why that happens..
Using recent NuGet version <IP_ADDRESS>2... What's interesting is that it worked a little at the very beginning... But it doesn't work anymore, whatever I try, while I didn't changed anything about connection. I thought maybe the problem is in mosquitto broker, but it do not register even attempt to connect. Everything on localhost.
MyLogger.cs::Publish(45) MqttClientTrying to connect with server '<IP_ADDRESS>:1883'
MyLogger.cs::Publish(45) MqttClient:Error while connecting with server, The operation was canceled.
MyLogger.cs::Publish(45) MqttClientDisconnecting [Timeout=00:01:40]
MyLogger.cs::Publish(45) MqttClient:Disconnected from adapter.
MyLogger.cs::Publish(45) MqttClient:Disconnected.


Add colors to the prompt

Fixes https://github.com/prefix-dev/shell/issues/29.
It works, but on Windows the cursor starts at the wrong column.
Linux:

Windows:

@wolfv any idea what might be causing this? I think on Windows it counts the number of characters in the string to offset the column (while it should skip the escape color sequences), but it doesn't do it on linux for some reason.

I think we might need to use the Highlighter of rustyline and figure out how to use highlight_prompt. I'll take a look!

I think we have to follow this example and implement a helper that has the colored_prompt.

Fixed in https://github.com/prefix-dev/shell/pull/79.


Updated validations.py Python script

Fixes #<issue_number_goes_here>

It's a good idea to open an issue first for discussion.

[ ] Tests pass
[ ] Appropriate changes to README are included in PR

@googlebot I signed it!


Remove Logger-V1Compat and ILoggerBase-V1

Remove the following files from the NLog-solution:
ILoggerBase-V1.cs
Logger-V1Compat.cs
For NLog ver. 5

I think there isn't a real benefit here and so I think it's better to keep the interfaces.

I want to reuse the name ILoggerBase for my PR for improved callsite capture. I have recognised that removal of these interfaces must be delayed until NLOG 6.0. But I think it should be done. These logger interfaces are terrible
Sent from my Samsung device
-------- Original message --------
From: Julian Verdurmen<EMAIL_ADDRESS>Date: 12/02/2018 09:35 (GMT+00:00)
To: NLog/NLog<EMAIL_ADDRESS>Cc: Rolf Kristensen<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [NLog/NLog] Remove Logger-V1Compat and ILoggerBase-V1 (#2528)
I think there isn't a real benefit here and so I think it's better to keep the interfaces.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/NLog/NLog/issues/2528#issuecomment-364870425, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AK-fnFjihizdPJMyrvJCPUM3ldmLmZNgks5tUAXkgaJpZM4Rl-nQ.

These logger interfaces are terrible

Could you elaborate on this? It should not a problem with adding new code?
Do you agree that this will be a (binary) breaking change in the logging API?

They are overly complicated. Should just have two methods Log and IsLevelEnabled. Rest should be extension methods.Interfaces are for mocking. Again this change is for Nlog 6.0
Sent from my Samsung device
-------- Original message --------
From: Julian Verdurmen<EMAIL_ADDRESS>Date: 12/02/2018 10:36 (GMT+00:00)
To: NLog/NLog<EMAIL_ADDRESS>Cc: Rolf Kristensen<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [NLog/NLog] Remove Logger-V1Compat and ILoggerBase-V1 (#2528)
These logger interfaces are terrible
Could you elaborate on this? It should not a problem with adding new code?
Do you agree that this will be a (binary) breaking change in the logging API?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/NLog/NLog/issues/2528#issuecomment-364884666, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AK-fnJOXO56hXUES6gAg7J-Ukm_DRwhPks5tUBQxgaJpZM4Rl-nQ.

Do you agree that this will be a (binary) breaking change in the logging API?

Sorry, I will prevent any breaking change to the logging API as far possible.
AFAIK this is a binary breaking change, thus "wont fix"

Thought major versions (Like Nlog6) was for breaking changes. Not sure I  understand how you are going to break up Nlog without making breaking changes (Ex moving config using xml into separate nuget package)
Sent from my Samsung device
-------- Original message --------
From: Julian Verdurmen<EMAIL_ADDRESS>Date: 12/02/2018 12:16 (GMT+00:00)
To: NLog/NLog<EMAIL_ADDRESS>Cc: Rolf Kristensen<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [NLog/NLog] Remove Logger-V1Compat and ILoggerBase-V1 (#2528)
Do you agree that this will be a (binary) breaking change in the logging API?
Sorry, I will prevent any breaking change to the logging API as far possible.
AFAIK this is a binary breaking change, thus "wont fix"
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/NLog/NLog/issues/2528#issuecomment-364906361, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AK-fnDSFgoOk0y7tB-704bsV_pgutNscks5tUCu7gaJpZM4Rl-nQ.

Thought major versions (Like Nlog6) was for breaking changes

that's true, but lot of libraries are build on the logging API. So breaking changes, even with major versions, should be prevented if possible.  The logging API is now binary compatible with NLog 1.
Breaking changes on targets VS logging API is different
So NLog 5 and 6 could make breaking changes, but not in the logging API and we try to limit to breaking changes if that's possible - there should be a good reason to make a breaking change.


Secondary Crusher Sound Active Even When Idle

Mod source
Factorio Mod Portal
Operating system

=Windows 10

What kind of issue is this?

[ ] Compatibility
[ ] Locale (names, descriptions, unknown keys)
[ ] Graphical
[ ] Crash
[ ] Progression
[ ] Balance
[ ] Pypostprocessing failure
[X] Other

What is the problem?
When placing a secondary crusher and connecting it to power, the building immediately starts its crushing sound, despite being inactive due to no input (raw coal).
Steps to reproduce

Craft a secondary crusher MK 01
Place the building on Nauvis
Connect the building to power
Observe that the building is already playing the crushing sound, despite having no raw coal to crush

Additional context
This is solely a sound bug. When a machine is idle, the expected behavior is for the machine to be silent or idling. The actual result for this bug is the secondary crusher is always playing the active sound, regardless of the actual state.
Log file
No response

Fixed. Thanks for the report. https://github.com/pyanodon/pyfusionenergy/commit/8fa53b1db4f43eeb6fa5eb3f3b0b077bef2004af


Text Edit

+1 for ability to modify/specify the text that appears in the middle of the knob.
Prefer this plugin to circliful, but this is a requirement.
thx!

+1

+1


Automatic commit: Move 'private-link-aws' from QA to Production

Madeline,
You have conflicts in this file to resolve.  This is probably due to the fact that your local repository got behind in updates from the master repository.  Please resolve the conflicts.


Removing a space in the example

The space breaks the CLI execution

yep, correct

reopening, since it was closed w.o. being merged


 Start backing up the webroot to S3 instead.

Here's a good method. I didn't know there was an autoremove policy.

Steps:

[x] set up an S3 bucket with the proper permissions and autoremove policy
[ ] put together a tar command that excludes everything unnecessary (e.g., caches, videos) that will refresh an existing archive to remove or add changed files
[ ] create a script to run that tar command, and then upload the resulting file to S3
[ ] create a cron job to trigger that script

I created backups.richmondsunlight.com bucket that moves things through a 365-day cycle of deprecation.

This looks like a good tar command:
tar -cvf ../backups/webroot.tar * --exclude='cache/*' --exclude='finance/*'-exclude='*.mp4' --exclude='*.mp3' --exclude='mirror/*' --exclude='*.bill.jpg*' --exclude='*.name.jpg*'
Presumably s3 sync can be fed the same exclusions list.

Upload the data like such:
aws s3 cp webroot-20160404.tar.gz s3://backups.richmondsunlight.com --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers

This is mostly done. The script is set up, the cron job is created. The only problem is that permission is denied to include some files, and that's yielding a failed tar task.
Oh, wait, and ricsun lacks the AWS credentials. OK, two problems to solve.

Done. Works great.


Assertion Error of Wrong Activation Type Configured

Describe the bug
I'm encountering an issue when attempting to run a modified FP32 ResNet18 model with a 6-channel input (stacked 2 images) using SPIKE. The model architecture is largely the same as ResNet18, except for the input tensor shape change from (1, 3, 224, 224) to (1, 6, 192, 640). After making slight modifications to imagenet_runner, I rebuilt it and ran the following command: spike --extension=gemmini pk ort_test -m pose_cnn_first_layer.onnx -r 0.png -c 1.png -p mxnet -x 2 -O 99. I use the -r and -c flags to accommodate the 2-image input. However, I encountered the following error message:

Upon further investigation, I found that the assertion error is occurring because gemmini_state.acc_act is configured to 16777216 (however, it should be <= 4) after inserting some debug printf statements.  Here is the first few layers of the model, as viewed from netron.app:

I believe there is no activation that is not supported by Gemmini.
Urgency
I'm facing this issue that's blocking my progress. I'd greatly appreciate a prompt response.
System information

OS Platform and Distribution: Linux Ubuntu 18.10
Python version: 3.9.13
GCC/Compiler version (if compiling from source): esp tools shipped with chipyard
Chipyard: 1.8.1 (commit 004297b6a8c01be1b2110c4cf4f9393ae1ff8805)
Gemmini: 0.7.0 (commit aaedc95247384dda63aa201d8d13492220df3cc3)
ONNX-runtime-riscv: commit f6d2fc95463316ec47d7f832f35be03c26887922

To Reproduce
I followed the instructions provided in this comment, modifying three files: riscv-pk/pk/syscall.h, riscv-pk/pk/syscall.c, and riscv-pk/machine/encoding.h. I did not modify riscv-pk/machine/minit.c since it has changed significantly from that commit. Following issue #77, I modified CustomConfigs.scala with val customConfig = trainingConfig and has_max_pool = true. I then rebuilt SPIKE with scripts/build-spike.sh. I also rebuilt onnxruntime-riscv and the systolic runner using the following commands: ./build.sh --parallel --enable_training --config=Debug --cmake_extra_defines onnxruntime_USE_SYSTOLIC=ON onnxruntime_SYSTOLIC_INT8=OFF onnxruntime_SYSTOLIC_FP32=ON and ./build.sh --parallel --enable_training --config=Debug. I successfully used SPIKE to simulate FP32 ResNet18 and verified the results were correct. However, when transitioning to my 6-channel ResNet18, I encountered this error.
Expected Behavior
I expect the simulation to run correctly, similar to how it does with the FP32 ResNet18.
I appreciate any assistance or insights into resolving this issue. Thank you in advance!

Met the same issue here. It seems that this can be temporarily resolved either by commenting out the assertion line in gemmini.cc or by replacing systolic_include.h with the one from the newest version of gemmini-rocc-software.


Feature Request: display TODOs in current file only

Cannot see how this would be relevant.

 In this case I want the shown TODOs from just the opened files and not the local dir that has nothing to do with the remote location.
In this case I think it's a good idea to have an option to search only opened files (or current).

That is a reasonable use case. Also I have found that having a huge project it makes sense to just look isolated at the todos for a subdirectory, where search only in open files would be enough. Would todo-show:find-in-open-files command pallette be sufficient?

I think so :-)


Tomorrow Night Eighties

Hi! Thanks for the themes!
I personally love Tomorrow Night Eighties. I was a bit surprised that the theme was not included in this extension. It could be great to include it.

Glad you like them! @Conaclos
The "Tomorrow Night Out" Variant should be based off of the Eighties palette iirc.
Lmk if anything needs to be changed! :D


1.1.3 update breaks less compiled styles

After today's composer update the styles got broken.
Seems that my .less files are no longer compiled :(
I'm a symfony 2 developer using the AsseticBundle, which relies on 1.1.*
forcing my project to use the 1.1.2 fixes the styles again.

@kriswallsmith Took me a while to figure out exactly what was causing it but I think I've found it. When you create an asset with multiple inputs and all of the inputs aren't of the same type this problem occurs:
# Assetic Configuration
assetic:
    debug:          "%kernel.debug%"
    use_controller: false
    bundles:        [ ]
    assets:
        some_asset:
            inputs:
                - @AppBundle/Resources/test.css
                - @AppBundle/Resources/test1.less
                - @AppBundle/Resources/test2.less

If you remove the test.css then the other less files compile just fine. Previous to the AssetReference modification this did work. I did make a project just in case, but you should be able to replicate with a simple config as above: https://github.com/isometriks/AsseticTestProject
I was originally doing this through my own forumula loader/resource but the same happens through the config.
I'll try to look into it further.

@kriswallsmith still having some trouble here. I've tried a few different things to fix this but I know they aren't the "right" way to do it. As I had mentioned, I can remove the "clone $asset" part from AssetReference, and I've also found that changing AssetCollection's clone to $this->clones = clone $this->clones, or removing that line altogether works. I fixed my project as before it had an error in the composer.json but it still produces the same issue. If you git clone https://github.com/isometriks/AsseticTestProject install vendors, and then run php app/console assetic:dump --env=prod you'll be left with a css file that looks something like this:
body {
    line-height: 30px;
}

body {
    p {
        background-color: red;
    }
}
body {
    p {
        font-family: 'Comic Sans MS';
    }
}


Add custom variants

Add the ability to transform colors with custom plugins
.customVariant('slightly-lighter', function(color) {
  // color would be a TinyColor instance
  // https://github.com/typectrl/tinycolor
  // this method should return a TinyColor instance too
  return color.lighten(25)
})

Currently being implemented in the next branch.


User-Dashboard: Product (Add new Product)

Develop the User Dashboard add new product pages UI appropriately
The user dashboard upload product page contains 4 pages ( you should send a pull request for each of the pages)
Ensure they are responsive and follow the responsive design on the Figma
Implement images properly
Follow the colour guide and the appropriate colours

And for the page 2 and page 3 of the 'Add new Product' design are the same, making it 3 pages to be designed instead of 4

All the tasks has been implemented. They was a duplicate of pages on the figma design so it was three pages and not four for this section


ci:add kube-linter

KubeLinter is a SAST tool to scan Kubernetes YAML and Helm Charts: https://github.com/stackrox/kube-linter
The documentation can be found here: https://docs.kubelinter.io/
The following questions arise:

KL is currently in early development and we have to see whether that is okay for us
Check the findings
Does it provide value?

Codecov Report

Merging #146 (5a4ca86) into develop (165f518) will increase coverage by 2.68%.
The diff coverage is 96.00%.

@@             Coverage Diff             @@
##           develop     #146      +/-   ##
===========================================
+ Coverage    93.52%   96.20%   +2.68%
===========================================
  Files           15       17       +2
  Lines          633      870     +237
===========================================
+ Hits           592      837     +245
+ Misses          41       33       -8

Impacted Files
Coverage Δ

connaisseur/util.py
72.72% <50.00%> (-27.28%)
:arrow_down:

connaisseur/notary_api.py
95.65% <55.55%> (-4.35%)
:arrow_down:

connaisseur/flask_server.py
96.82% <91.30%> (+25.39%)
:arrow_up:

connaisseur/validate.py
94.62% <94.73%> (-2.05%)
:arrow_down:

connaisseur/alert.py
100.00% <100.00%> (ø)

connaisseur/crypto.py
100.00% <100.00%> (ø)

connaisseur/exceptions.py
100.00% <100.00%> (ø)

connaisseur/image.py
100.00% <100.00%> (ø)

connaisseur/key_store.py
90.32% <100.00%> (ø)

connaisseur/mutate.py
100.00% <100.00%> (+5.55%)
:arrow_up:

... and 6 more

Continue to review full report at Codecov.

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

Could exclude resource rules for now: https://docs.kubelinter.io/#/configuring-kubelinter?id=run-specific-checks
And open ticket for later to do these, then we get securitycontext for now and linting


run error

I clone this seed and run {npm install,npm run build,npm run run}
then Error

This occured because there was no main field set in the package.json. I fixed this and you can update your repo
git fetch
git reset origin/master --hard
will do this.

at first,thank you very much!but i have some other problems.
i dev platform is win7 x64 and i am in china.so when i run cnpm install

so i cancel it and run cnpm install again.
update you source code ,run cnpm build & cnpm run run is ok now.
but i run cnpm run start ,window is ok,but web app not work.

at last,when i run cnpm run package:win,is slowly

can you help me ?

So everything on your system is ok. The app is not intended to run in the web browser. It will only work in the electron window. This is a seed for an Angular 2 Electron App, not for an Angular 2 Web App. If you want to read more about the details of the configuration, you can read this article of mine.

Thanks for your reply! I have solved the problem, it's that the angular-cli hasn't installed correctly. Then I used VPN to install angular-cli. Thank you again for your article about electron's configuration.


stm32l4: Fix small typo on stm32l4_adc.h

Summary
stm32l4: Fix small typo on stm32l4_adc.h
Impact
Only stm32l4
Testing
N/A

@acassis let's fix both typo in one patch?


[pytorch] Allows load libtroch from pip installation package

Change-Id: Ic87302a880564027bed1f213088baac1ee543d9e
Description
the default PyTorch pip package contains both cpu and gpu native binaries. Currently DJL can only load cpu/gpu only pip package:
pip install torch==1.10.0+cu113 -f https://download.pytorch.org/whl/torch_stable.html
or
pip install torch==1.10.0+cpu -f https://download.pytorch.org/whl/torch_stable.html

This PR allows DJL to load libtorch from default pip package on CPU machine. However load on GPU machine will still fail due to missing libtorch_cuda_cpp.so file in the default pip pacakge.

Codecov Report

Merging #1577 (168f7b7) into master (bb5073f) will decrease coverage by 1.26%.
The diff coverage is 58.26%.

@@             Coverage Diff              @@
##             master    #1577      +/-   ##
============================================
- Coverage     72.08%   70.82%   -1.27%
- Complexity     5126     5394     +268
============================================
  Files           473      503      +30
  Lines         21970    23597    +1627
  Branches       2351     2567     +216
============================================
+ Hits          15838    16712     +874
- Misses         4925     5606     +681
- Partials       1207     1279      +72

Impacted Files
Coverage Δ

api/src/main/java/ai/djl/modality/cv/Image.java
69.23% <ø> (-4.11%)
:arrow_down:

...i/djl/modality/cv/translator/BigGANTranslator.java
21.42% <ø> (-5.24%)
:arrow_down:

...odality/cv/translator/BigGANTranslatorFactory.java
33.33% <0.00%> (+8.33%)
:arrow_up:

...nslator/InstanceSegmentationTranslatorFactory.java
14.28% <0.00%> (-3.90%)
:arrow_down:

.../modality/cv/translator/YoloTranslatorFactory.java
8.33% <0.00%> (-1.67%)
:arrow_down:

...i/djl/modality/cv/translator/YoloV5Translator.java
5.69% <0.00%> (ø)

...odality/cv/translator/YoloV5TranslatorFactory.java
8.33% <0.00%> (-1.67%)
:arrow_down:

...pi/src/main/java/ai/djl/ndarray/BytesSupplier.java
54.54% <0.00%> (-12.13%)
:arrow_down:

...ain/java/ai/djl/ndarray/index/dim/NDIndexPick.java
100.00% <ø> (ø)

api/src/main/java/ai/djl/nn/Blocks.java
75.00% <0.00%> (-25.00%)
:arrow_down:

... and 231 more

Continue to review full report at Codecov.

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


OpenFloodAI-Web design Suggestions!

Hey folks! Share your valuable design suggestions for OpenFloodAI-Web

Hey @adventuroussrv  Hope you are doing well, I think these Designs might interest you

I hope you might find this valuable, if yes, would you like me to work on one of these. Thanks

Hi, @2016CS101UET Thanks for sharing the lovely designs!
We are looking for a design that will be suitable for OpenFloodAI & will be sticking to it for the development!
Stay in touch! Looking for more suggestions.

OpenFloodAI-Web design Suggestions!


Matching set contains individual uuid or '____' if none

Pull Request Overview

For sage Detection, send the matching set as Individual uuids or '____' if none rather than name

/rebase

/rebase


”Papiu Ilarian” is listed in the drop-down menu

Description:
"Papiu Ilarian" is listed in the drop-down menu alongside its corresponding county and commune, according to the law.
Precondition:
The website is up an running.

Step 1
Type "Papiu Ilarian" in the search bar.

Expected results
The location is listed in the drop-down menu as "Comuna Papiu Ilarian, MUREȘ".


ValidateRange

with ValidateRange. You can specify in a convenient new syntax that the value must be positive or negative.
[ValidateRange('Positive')]$i = 7
[ValidateRange('Negative')]$i = -3

but the result is wrong if one or more space is added between - and number
Steps to reproduce
PS C:\> [ValidateRange('Negative')]$i = - 3

Expected behavior
PS C:\> [ValidateRange('Negative')]$i = 3
The variable cannot be validated because the value 3 is not a valid value for the i variable.
At line:1 char:1
+ [ValidateRange('Negative')]$i = 3
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : MetadataError: (:) [], ValidationMetadataException
+ FullyQualifiedErrorId : ValidateSetFailure

Actual behavior
NONE

Environment data
> $PSVersionTable
PS C:\> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      6.1.0
PSEdition                      Core
GitCommitId                    6.1.0
OS                             Microsoft Windows 6.3.9600
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>
WSManStackVersion              3.0

I don't see a difference in behavior between [ValidateRange('Negative')]$i = -3 and [ValidateRange('Negative')]$i = - 3 - and there shouldn't be: it's fine to have whitespace between the unary - operator and its operand, and both commands succeed, as expected.
Your "Expected behavior" code contains command [ValidateRange('Negative')]$i = 3, which fails, as expected (the number is positive).
Can you clarify what doesn't work as expected?


Cannot read property '0' of undefined

Steps taken:

npm install -g vue-cli
vue init webpack test
cd test
npm install vue-resource vuetable-2 --save-dev
cd node_modules/vuetable-2
npm install
cd ../..
npm install
change src/main.js to

var Vue = require('vue');
var VueResource = require('vue-resource');
Vue.use(VueResource);

import Vuetable from 'vuetable-2/src/components/Vuetable.vue';
import VuetablePagination from 'vuetable-2/src/components/VuetablePagination.vue';
import VuetablePaginationDropdown  from 'vuetable-2/src/components/VuetablePaginationDropdown.vue';

Vue.component('vuetable', Vuetable);
Vue.component('vuetable-pagination', VuetablePagination)
Vue.component('vuetable-pagination-dropdown', VuetablePaginationDropdown)

new Vue({
  el: '#app',
  template: '<App/>',
  components: { App }
})

npm run build

Error:
ERROR in ./~/vuetable-2/~/css-loader?sourceMap!./~/vuetable-2/~/vue-loader/lib/style-rewriter.js?id=data-v-d0b0b768!./~/vuetable-2/~/vue-loader/lib/selector.js?type=styles&index=0!./~/vuetable-2/src/components/Vuetable.vue
Module build failed: TypeError: Cannot read property '0' of undefined
    at Object.module.exports (test/node_modules/vuetable-2/node_modules/vue-loader/lib/selector.js:10:31)
 @ ./~/extract-text-webpack-plugin/loader.js?{"omit":1,"extract":true,"remove":true}!./~/vuetable-2/~/vue-style-loader!./~/vuetable-2/~/css-loader?sourceMap!./~/vuetable-2/~/vue-loader/lib/style-rewriter.js?id=data-v-d0b0b768!./~/vuetable-2/~/vue-loader/lib/selector.js?type=styles&index=0!./~/vuetable-2/src/components/Vuetable.vue 4:14-233

Does anyone have a working example/guide?

@fivethousand Your installation steps may not be correct. Try this instead
vue init webpack test
cd test
npm install
npm install vue-resource vuetable-2 --save-dev

The step-by-step tutorial should be out by the end of next week. Not sure whether I can get the whole documents out or not.

Thanks, that does indeed work.
Do you understand why the additional npm install in node_modules/vuetable-2 leads to this error?

@fivethousand I think you do not understand the purpose of npm and why it is needed in your project (or any project). You need to read more about it because it is very important as one of your development tools.
    cd test
    npm install

will install all of the dependency libraries needed for vue project.
    npm install vue-resource vuetable-2 --save-dev

will (additionally) install vue-resource and vuetable-2 to your project, so that you can import and use it.
Normally, you should not put --save-dev at the end. I'll leave you to research more on that.

@ratiw If you take a closer look the steps I listed, you'll see that I did exactly that. Probably because I do "understand the purpose of npm and why it is needed in [my] project" ;-)
Coming back to the remaining question:
The only difference is that I additionally ran "npm install" inside node_modules/vuetable-2. (and flipped the order of "npm install" and "npm install vue-resource vuetable-2 --save-dev", which should not have any effect).
Therefore I was asking why this makes the entire process fail. IMHO it should not.

@fivethousand Sorry, upon a closer look it does make sense.
Then, I think that the installation process may not went through correctly due to unstable connection and might miss some libraries. Or, if you can reproduce it every time you follow those steps, it might be the internal working of npm that we might not know that cause this problem.
However, npm install before adding new libraries have never failed me. :)


What are expected to submit for the leaderboard integration?

Checked https://pile.eleuther.ai but found:

TBH we never updated the website since the day the website launched. It's not really a leaderboard, and we should change the website.

TBH we never updated the website since the day the website launched. It's not really a leaderboard, and we should change the website.

Any update?