App Launch Failure After Upgrading to React Native 0.72.15

Describe the bug

After upgrading to React Native v0.72.15, the app fails to launch.
The issue seems related to the @sendbird/chat library, which is a minified ES5 codebase, suspected cause: Babel loader may be unable to process the minified ES5 code in the @sendbird/chat library.

Error when running app:
Exception in native call from JS
com.facebook.react.devsupport.JSException: Can't find variable: exports
                                                                                at com.facebook.jni.NativeRunnable.run(Native Method)
                                                                                at android.os.Handler.handleCallback(Handler.java:959)
                                                                                at android.os.Handler.dispatchMessage(Handler.java:100)
                                                                                at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
                                                                                at android.os.Looper.loopOnce(Looper.java:232)
                                                                                at android.os.Looper.loop(Looper.java:317)
                                                                                at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:228)
                                                                                at java.lang.Thread.run(Thread.java:1012)
                                                                                Caused by: com.facebook.jni.CppException: Can't find variable: exports                                                                                ./node_modules/@sendbird/chat/message.js@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.bellepro.app.dev&modulesOnly=false&runModule=true:302722:30
http://localhost:8081/index.bundle?
....

webpack.config.mjs
import { createRequire } from 'node:module';
import path from 'node:path';
import TerserPlugin from 'terser-webpack-plugin';
import * as Repack from '@callstack/repack';
import { deps } from './shared/dependencies.mjs';

const dirname = Repack.getDirname(import.meta.url);
const { resolve } = createRequire(import.meta.url);

/**
 * More documentation, installation, usage, motivation and differences with Metro is available at:
 * https://github.com/callstack/repack/blob/main/README.md
 *
 * The API documentation for the functions and plugins used in this file is available at:
 * https://re-pack.dev
 */

/**
 * Webpack configuration.
 * You can also export a static object or a function returning a Promise.
 *
 * @param env Environment options passed from either Webpack CLI or React Native CLI
 *            when running with `react-native start/bundle`.
 */
export default (env) => {
  const {
    mode = 'development',
    context = dirname,
    entry = './index.js',
    platform = process.env.PLATFORM,
    minimize = mode === 'production',
    devServer = undefined,
    bundleFilename = undefined,
    sourceMapFilename = undefined,
    assetsPath = undefined,
    reactNativePath = resolve('react-native'),
  } = env;
  if (!platform) {
    throw new Error('Missing platform');
  }

  /**
   * Using Module Federation might require disabling hmr.
   * Uncomment below to set `devServer.hmr` to `false`.
   *
   * Keep in mind that `devServer` object is not available
   * when running `webpack-bundle` command. Be sure
   * to check its value to avoid accessing undefined value,
   * otherwise an error might occur.
   */
  // if (devServer) {
  //   devServer.hmr = false;
  // }

  /**
   * Depending on your Babel configuration you might want to keep it.
   * If you don't use `env` in your Babel config, you can remove it.
   *
   * Keep in mind that if you remove it you should set `BABEL_ENV` or `NODE_ENV`
   * to `development` or `production`. Otherwise your production code might be compiled with
   * in development mode by Babel.
   */
  process.env.BABEL_ENV = mode;

  return {
    mode,
    /**
     * This should be always `false`, since the Source Map configuration is done
     * by `SourceMapDevToolPlugin`.
     */
    devtool: false,
    context,
    /**
     * `getInitializationEntries` will return necessary entries with setup and initialization code.
     * If you don't want to use Hot Module Replacement, set `hmr` option to `false`. By default,
     * HMR will be enabled in development mode.
     */
    entry: [
      ...Repack.getInitializationEntries(reactNativePath, {
        hmr: devServer && devServer.hmr,
      }),
      entry,
    ],
    resolve: {
      /**
       * `getResolveOptions` returns additional resolution configuration for React Native.
       * If it's removed, you won't be able to use `<file>.<platform>.<ext>` (eg: `file.ios.js`)
       * convention and some 3rd-party libraries that specify `react-native` field
       * in their `package.json` might not work correctly.
       */
      ...Repack.getResolveOptions(platform),
      /**
       * Uncomment this to ensure all `react-native*` imports will resolve to the same React Native
       * dependency. You might need it when using workspaces/monorepos or unconventional project
       * structure. For simple/typical project you won't need it.
       */
      alias: {
        '@src': path.resolve(dirname, 'src'),
        'react-native': reactNativePath,
        '@config': path.resolve(dirname, 'config'),
        pako: new URL('./node_modules/pako', import.meta.url).pathname,
        '@turf': new URL('./node_modules/@turf', import.meta.url).pathname,
        i18next: new URL('./node_modules/i18next', import.meta.url).pathname,
        url: new URL('./node_modules/url', import.meta.url).pathname,
        'amazon-cognito-identity-js': new URL(
          './node_modules/amazon-cognito-identity-js',
          import.meta.url,
        ).pathname,
        '@react-native-async-storage/async-storage': new URL(
          './node_modules/@react-native-async-storage/async-storage',
          import.meta.url,
        ).pathname,
        '@aws-amplify': new URL('./node_modules/@aws-amplify', import.meta.url).pathname,
        'react-native-svg': new URL('./node_modules/react-native-svg', import.meta.url).pathname,
        'libphonenumber-js': new URL('./node_modules/libphonenumber-js', import.meta.url).pathname,
        domhandler: new URL('./node_modules/domhandler', import.meta.url).pathname,
        domutils: new URL('./node_modules/domutils', import.meta.url).pathname,
        htmlparser2: new URL('./node_modules/htmlparser2', import.meta.url).pathname,
        domelementtype: new URL('./node_modules/domelementtype', import.meta.url).pathname,
      },
    },
    /**
     * Configures output.
     * It's recommended to leave it as it is unless you know what you're doing.
     * By default Webpack will emit files into the directory specified under `path`. In order for the
     * React Native app use them when bundling the `.ipa`/`.apk`, they need to be copied over with
     * `Repack.OutputPlugin`, which is configured by default inside `Repack.RepackPlugin`.
     */
    output: {
      clean: true,
      hashFunction: 'xxhash64',
      path: path.join(dirname, 'build/generated', platform),
      filename: 'index.bundle',
      chunkFilename: '[name].chunk.bundle',
      publicPath: Repack.getPublicPath({ platform, devServer }),
    },
    /**
     * Configures optimization of the built bundle.
     */
    optimization: {
      /** Enables minification based on values passed from React Native CLI or from fallback. */
      minimize,
      /** Configure minimizer to process the bundle. */
      minimizer: [
        new TerserPlugin({
          test: /\.(js)?bundle(\?.*)?$/i,
          /**
           * Prevents emitting text file with comments, licenses etc.
           * If you want to gather in-file licenses, feel free to remove this line or configure it
           * differently.
           */
          extractComments: false,
          terserOptions: {
            format: {
              comments: false,
            },
          },
        }),
      ],
      chunkIds: 'named',
    },
    module: {
      /**
       * This rule will process all React Native related dependencies with Babel.
       * If you have a 3rd-party dependency that you need to transpile, you can add it to the
       * `include` list.
       *
       * You can also enable persistent caching with `cacheDirectory` - please refer to:
       * https://github.com/babel/babel-loader#options
       */
      rules: [
        {
          test: /\.[cm]?[jt]sx?$/,
          include: [
            /node_modules(.*[/\\])+react\//,
            /node_modules(.*[/\\])+react-native/,
            /node_modules(.*[/\\])+@react-native/,
            /node_modules(.*[/\\])+react-freeze/,
            /node_modules(.*[/\\])+@react-native/,
            /node_modules(.*[/\\])+@react-navigation/,
            /node_modules(.*[/\\])+@react-native-community/,
            /node_modules(.*[/\\])+pretty-format/,
            /node_modules(.*[/\\])+abort-controller/,
            /node_modules(.*[/\\])+@callstack\/repack/,
            /node_modules(.*[/\\])+@google-cloud\//,
            /node_modules(.*[/\\])+@react-native-async-storage\//,
            /node_modules(.*[/\\])+@react-native-camera-roll\//,
            /node_modules(.*[/\\])+@react-native-community\//,
            /node_modules(.*[/\\])+@sendbird\/uikit-chat-hooks/,
            /node_modules(.*[/\\])+@sendbird\/uikit-react-native-foundation/,
            /node_modules(.*[/\\])+@sendbird\/uikit-utils/,
            /node_modules(.*[/\\])+@sendbird\/chat/,
            /node_modules(.*[/\\])+@sendbird\/react-native-scrollview-enhancer/,
            /node_modules(.*[/\\])+@sendbird\/uikit-react-native/,
            ....
          ],
          use: 'babel-loader',
        },
        {
          test: /\.[cm]?[jt]sx?$/,
          include: [
            /node_modules(.*[/\\])+@react-native-async-storage\//,
            /node_modules(.*[/\\])+@react-native-camera-roll\//,
            /node_modules(.*[/\\])+@react-native-community\//,
            /node_modules(.*[/\\])+@sendbird\/uikit-chat-hooks/,
            /node_modules(.*[/\\])+@sendbird\/uikit-react-native-foundation/,
            /node_modules(.*[/\\])+@sendbird\/uikit-utils/,
            /node_modules(.*[/\\])+@sendbird\/chat/,
            /node_modules(.*[/\\])+@sendbird\/react-native-scrollview-enhancer/,
            /node_modules(.*[/\\])+@sendbird\/uikit-react-native/,
            ...
          ],
          use: {
            loader: 'babel-loader',
            options: {
              presets: [['@babel/preset-typescript']],
            },
          },
        },
        {
          test: /\.[cm]?[jt]sx?$/,
          include: [
            /node_modules(.*[/\\])+@sendbird\/uikit-chat-hooks/,
            /node_modules(.*[/\\])+@sendbird\/uikit-react-native-foundation/,
            /node_modules(.*[/\\])+@sendbird\/uikit-utils/,
            /node_modules(.*[/\\])+@sendbird\/chat/,
            /node_modules(.*[/\\])+@sendbird\/react-native-scrollview-enhancer/,
            /node_modules(.*[/\\])+@sendbird\/uikit-react-native/,
            ...
          ],
          use: {
            loader: 'babel-loader',
            options: {
              presets: [
                ['module:metro-react-native-babel-preset', { disableImportExportTransform: true }],
              ],
            },
          },
        },
        /**
         * Here you can adjust loader that will process your files.
         *
         * You can also enable persistent caching with `cacheDirectory` - please refer to:
         * https://github.com/babel/babel-loader#options
         */
        {
          test: /\.[cm]?[jt]sx?$/,
          exclude: /node_modules/,
          use: {
            loader: 'babel-loader',
            options: {
              /** Add React Refresh transform only when HMR is enabled. */
              plugins: devServer && devServer.hmr ? ['module:react-refresh/babel'] : undefined,
            },
          },
        },
        /**
         * This loader handles all static assets (images, video, audio and others), so that you can
         * use (reference) them inside your application.
         *
         * If you wan to handle specific asset type manually, filter out the extension
         * from `ASSET_EXTENSIONS`, for example:
         * ```
         * Repack.ASSET_EXTENSIONS.filter((ext) => ext !== 'svg')
         * ```
         */
        {
          test: Repack.getAssetExtensionsRegExp(Repack.ASSET_EXTENSIONS),
          use: {
            loader: '@callstack/repack/assets-loader',
            options: {
              inline: false, // TODO: host app can set inline asset to false (not parse asset to base64)
              platform,
              devServerEnabled: Boolean(devServer),
              /**
               * Defines which assets are scalable - which assets can have
               * scale suffixes: `@1x`, `@2x` and so on.
               * By default all images are scalable.
               */
              scalableAssetExtensions: Repack.SCALABLE_ASSETS,
            },
          },
        },
      ],
    },
    plugins: [
      /**
       * Configure other required and additional plugins to make the bundle
       * work in React Native and provide good development experience with
       * sensible defaults.
       *
       * `Repack.RepackPlugin` provides some degree of customization, but if you
       * need more control, you can replace `Repack.RepackPlugin` with plugins
       * from `Repack.plugins`.
       */
      new Repack.RepackPlugin({
        context,
        mode,
        platform,
        devServer,
        output: {
          bundleFilename,
          sourceMapFilename,
          assetsPath,
        },
      }),
      new Repack.plugins.ModuleFederationPlugin({
        /**
         * The name of the module is used to identify the module in URLs resolver and imports.
         */
        name: 'bpro_app_modules',

        exposes: {
          './appContainer': './src/app.component',
        },

        /**
         * Shared modules are shared in the share scope.
         * React, React Native and React Navigation should be provided here because there should be only one instance of these modules.
         * Their names are used to match requested modules in this compilation.
         */
        shared: deps,
      }),
    ],
  };
};

System Info
- MacOS
- NodeJS v18.18.2

"react-native": "0.72.15",
"@sendbird/chat": "4.10.0",
...
"@callstack/repack": "^4.0.0",

Re.Pack Version
4.0.0
Reproduction
No response
Steps to reproduce
May you try to init new RN 0.72 and using @sendbird/chat

Init RN 0.72.0
Install repack v4
Install @sendbird uikit for Rn
Facing that issue.

Could you please help me resolve this issue? If you have any questions or need further information, feel free to contact me.
Thank you very much for your assistance.

Hi @quan-nh-torus
an example from sendbird seems overly complicated and involving many other unrelated libraries, could you please create a minimal reproduction repository where the problem is happening? Thanks!

Hi @jbroma,
Apologies for the delayed response. I’ve created a sample chat project using Sendbird. Could you please review it when you have a moment? Here’s the link: repack-sendbird-example.
Thanks in advance!

Hi @quan-nh-torus,
please apply these changes in webpack.config.mjs to fix the issue you were having:
diff --git a/webpack.config.mjs b/webpack.config.mjs
index 027c45c..27589e9 100644
--- a/webpack.config.mjs
+++ b/webpack.config.mjs
@@ -161,7 +161,6 @@ export default (env) => {
             /node_modules(.*[/\\])+metro/,
             /node_modules(.*[/\\])+abort-controller/,
             /node_modules(.*[/\\])+@callstack[/\\]repack/,
-            /node_modules(.*[/\\])+@sendbird[/\\]chat/,
             /node_modules(.*[/\\])+@sendbird[/\\]uikit-react-native/,
             /node_modules(.*[/\\])+@sendbird[/\\]uikit-chat-hooks/,
             /node_modules(.*[/\\])+@sendbird[/\\]uikit-react-native-foundation/,
@@ -170,6 +169,21 @@ export default (env) => {
           ],
           use: 'babel-loader',
         },
+        {
+          test: /\.js$/,
+          include: [/node_modules(.*[/\\])+@sendbird[/\\]chat/],
+          use: {
+            loader: 'babel-loader',
+            options: {
+              presets: [
+                [
+                  'module:metro-react-native-babel-preset',
+                  {disableImportExportTransform: true},
+                ],
+              ],
+            },
+          },
+        },
         /**
          * Here you can adjust loader that will process your files.
          *


Cann't connect to my device

When I'm trying to connect to my device, I get this "10060" error. I wanna know how to fix it anxiously.
`D:\Space\ASSpace\android>adb tcpip 5555
restarting in TCP mode port: 5555
D:\Space\ASSpace\android>adb connect <IP_ADDRESS>
unable to connect to <IP_ADDRESS>:5555: cannot connect to <IP_ADDRESS>:5555: 由于连接方在一段时间后没有正确答复或连接的主机没有反应，连接尝试失败。
(10060)
`

Hi @DysaniazzZ I need more info.
What's your device model and OS version?
Did you get that trace executing that commands?
Is that the IP of your device?
Is the device connected to the usb cable while you execute the commands?

Oh, My device is Meizu MX2 that is assembled in China. Its OS is Flyme OS 3.8.5A, which is based on Android 4.4.4. My Android Studio version is 2.1.2 and the Android WiFi ADB plugin version is the latest, v2.2. The "<IP_ADDRESS>" is the IP of my device and I can ping it. I keep my device connected to the usb cable while I execute the commands.

The problem is that your device does not support adb over wifi connection. That's why if you execute:
D:\Space\ASSpace\android>adb tcpip 5555
restarting in TCP mode port: 5555

D:\Space\ASSpace\android>adb connect <IP_ADDRESS>
unable to connect to <IP_ADDRESS>:5555: cannot connect to <IP_ADDRESS>:5555: 由于连接方在一段时间后没有正确答复或连接的主机没有反应，连接尝试失败。

The result is "cannot connect to.....". I'm sorry but if your device does not support adb over wifi I can not change the plugin code to get it working :(


Depot: Domain Items table not sorting on Domains

More column sorting problems, not sorting right.   Think it might have something to do with the labels.
Domains column in Domain items
Types column in Forensic/Entities Tab

fixed table headers for sorting and pushed to develop

This should be working now, confirm?

@michaelsframe Neither locations for the ones mentioned are working right.  Domain column in Domain Items.  For Forensic/Entities tab, Types is working right, but the URL column doesn't sort at all yet controls are present in the header.


Add upload_from_url support

Signed-off-by: Andrew-Butler<EMAIL_ADDRESS>

Thanks Andrew. I will give others a chance to look at it. Looks goof to me!

/lgtm


Can't use within app config

Hey,
I'm having the problem that ocLazyLoad doesn't work within the app config (where all my routing stuff is located). It does work in controllers but I need it in the config to make js files load on demand.
routing.js
app.config(['$routeProvider', "$locationProvider",'$translateProvider', '$ocLazyLoadProvider', function($routeProvider, $locationProvider, $translateProvider, $ocLazyLoadProvider)
index.html
<script type="text/javascript" src="assets/js/ocLazyLoad.js?v=1"></script>
application.js
var app = angular.module("arazpvp", [     'ngRoute',     'ngStorage',     'angular-encryption', 	'ui.tinymce', 	'smoothScroll', 	'ngCookies', 	'pascalprecht.translate', 	'oc.lazyLoad']);
When adding:
routing.js
$ocLazyLoad.load({files: ['forum/community-forum.controller.js']});
I get the following error:
Failed to instantiate module arazpvp due to:
ReferenceError: $ocLazyLoad is not defined
    at https://araz4story.com/pvp/app/bin/routing.js?v=187:5:2
    at Object.invoke (https://araz4story.com/pvp/assets/js/angular.js?v=4:155:70)
    at d (https://araz4story.com/pvp/assets/js/angular.js?v=4:148:171)
    at https://araz4story.com/pvp/assets/js/angular.js?v=4:149:125
    at p (https://araz4story.com/pvp/assets/js/angular.js?v=4:8:184)
    at g (https://araz4story.com/pvp/assets/js/angular.js?v=4:148:72)
    at eb (https://araz4story.com/pvp/assets/js/angular.js?v=4:156:654)
    at c (https://araz4story.com/pvp/assets/js/angular.js?v=4:79:175)
    at Pc (https://araz4story.com/pvp/assets/js/angular.js?v=4:79:488)
    at ue (https://araz4story.com/pvp/assets/js/angular.js?v=4:77:283

Can be closed


Fix generic parameter in Tuple

This PR adds a generic parameter to the abstract class Tuple. This change is needed  to address the usage of of Just class in combination with updated signature of the Policy.whenever() method.
Earlier the whenever() method returned Iterable<Message>. Recent PR updated the signature to return Iterable<EventMessage> because a policy returns only events, not other kinds of messages.
The change caused a problem in Policy classes implemented in Kotlin because, e.g. Just<Nothing> was not a subclass of Iterable<EventMessage>.  The problem was that Just did not pass a generic parameter to Tuple, which in turn implemented Iterable<Message>.
This PR adds the generic parameter for Tuple.
Other changes:

Improved documentation of the Policy class.
Policy now checks that it handles only one event in the constructor to fail faster.
Added type aliases NothingHappened  and NoReaction for Nothing event in order to help avoiding name clash with kotlin.Nothing.
Added test to a Policy which attempts to react to more than one event.
the static method isOptionalPresent() was moved into Tuple thus eliminating the Values utility class.

I had to turn it back to draft because there's the same issue with Either, but it's more complicated than with Just.


issue in installing AlphaFold on Linux Ubuntu

Hi, I am trying to install AlphaFold on Linux machine, but when I execute the file "./install_on_local.sh" only the first steps moves forward and "af2" is created. I tried to proceed step by step and I am stopped in following step.
conda install -y -c bioconda hmmer hhsuite==3.3.0 kalign2
I get following error:
"""
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: |
Found conflicts! Looking for incompatible packages.                                                                                failed
UnsatisfiableError: The following specifications were found to be incompatible with each other:
Output in format: Requested package -> Available versions
Package libgcc-ng conflicts for:
python=3.8 -> zlib[version='>=1.2.11,<1.3.0a0'] -> libgcc-ng[version='>=7.2.0']
python=3.8 -> libgcc-ng[version='>=7.3.0|>=7.5.0']
hhsuite==3.3.0 -> libgcc-ng[version='>=7.5.0|>=9.3.0|>=9.4.0']
hhsuite==3.3.0 -> python[version='>=3.7,<3.8.0a0'] -> libgcc-ng[version='>=7.2.0|>=7.3.0']
hmmer -> libgcc-ng[version='>=4.9|>=7.3.0|>=7.5.0|>=9.3.0']
kalign2 -> libgcc-ng[version='>=4.9|>=7.5.0|>=9.3.0']
Package libstdcxx-ng conflicts for:
python=3.8 -> libffi[version='>=3.2.1,<3.3a0'] -> libstdcxx-ng[version='>=7.2.0']
hhsuite==3.3.0 -> python[version='>=3.7,<3.8.0a0'] -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']
hmmer -> libstdcxx-ng[version='>=4.9|>=7.3.0|>=7.5.0|>=9.3.0']
hhsuite==3.3.0 -> libstdcxx-ng[version='>=7.5.0|>=9.3.0|>=9.4.0']
python=3.8 -> libstdcxx-ng[version='>=7.3.0|>=7.5.0']The following specifications were found to be incompatible with your system:

feature:/linux-64::__glibc==2.31=0
feature:|@/linux-64::__glibc==2.31=0
hhsuite==3.3.0 -> libgcc-ng[version='>=9.3.0'] -> __glibc[version='>=2.17']
hmmer -> libgcc-ng[version='>=9.3.0'] -> __glibc[version='>=2.17']
kalign2 -> libgcc-ng[version='>=9.3.0'] -> __glibc[version='>=2.17']

Your installed version is: 2.31
"""
I mostly appreciate to help me how I can resolve this issue and install the software with no error.
Thanks so much for your helps in advance
Maryam

I am no alphafold official, but I am willing to helpon the week end if you didnt already resolve your issue. just dm me

Hi,
./install_on_local.sh isn't a file in this repository - are you using a non-official version of the AlphaFold code?
We recommend following the instructions in the README.md of this repository to install AlphaFold with Docker. This minimizes the chance of version conflicts.

Closing this issue for now, feel free to reopen if this is still a problem.


As a data developer, I want to have tests on all ETL classes, so I have confidence I haven't introduced bugs into the code.

Description
Right now, only one of our ETL classes (national_risk_index) has tests on it.
We should develop a single preferred approach to ETL testing (the national_risk_index seems like a really good start), and then implement tests for all of the current ETL classes.
See also discussion at https://github.com/usds/justice40-tool/issues/1048 about updating pickles and CSVs.

Objective of this work:

Have a great testing framework for ETL we feel will catch most errors
Apply that framework to all classes

Punchlist of work to do:

[ ] Start with NRI tests, review to see if we want to make any updates
[ ] Create one new test based on that for another ETL class
[ ] Open pull request for review
[ ] When we feel pretty settled, create tests for every ETL class

1/27 brainstorm with @emma-nechamkin and @widal001 :

Conditional skip on tests in pytest - pass a flag when running pytest or set an environment variable to force that test to run.
Should it be in the testing code or not? Yes, should be near tests
Don't just rely on data snapshot tests -- explicitly write unit tests that check the logic of the code directly.
Add more validation steps that answer questions like: are all the tracts we expect to see represented?


[DOC] CoreML frontend tutorial

@zhreshold @zhiics, please help to review.

LGTM.  @yzhliu Please take a look since you wrote the CoreML Relay frontend.

@yzhliu, addressed your comment.  In addition, I added the original author @zhreshold to the author list.  Can you take a look again?

Thanks @kazum


In-function variables with property wrappers clash with macros

Description
When a property wrapper is applied to a variable inside a function, the compiler fails to correctly identify the end of the statement.
Steps to Reproduce

Inside a function, declare a variable with a property wrapper applied to it;
The value must be provided in the wrapper attribute, not after the variable’s name (see code snippets);
On a consecutive line, use a macro such as XCTAssertEqual.

Code Snippets
// Error:
func testValue1() {
    @State(initialValue: 123) var state

    XCTAssertEqual(state, 123)
}

// Same statement, no error:
func testValue2() {
    @State var state = 123

    XCTAssertEqual(state, 123)
}

Expected Behavior
The compiler treats the lines as two separate statements.
Actual Behavior
The following errors, warnings, and suggested fixes appear in the gutter:

[E] Consecutive statements on a line must be separated by ';' → Insert ';' (accepting the fix inserts a semicolon at an unexpected place: XCTAssertEqual;(state, 123))
[E] Found an unexpected second identifier in variable declaration; is there an accidental break? → Join the identifiers together (accepting the fix removes the line break, resulting in @State(initialValue: 123) var stateXCTAssertEqual(state, 123))
[W] Variable is unused (no suggested fixes)

Screenshots

Environment

macOS 13.0.1
Xcode 14.1

The same error occurs with property wrappers which take no external values:
@propertyWrapper
struct AlwaysTrue {
    var wrappedValue: Bool { true }
}

// Error:
func testValue3() {
    @AlwaysTrue var trueOrFalse

    XCTAssertTrue(trueOrFalse)
}

Unlike the original example with @State, a declaration with @AlwaysTrue can’t be rewritten in another way to avoid the error.

The fix I found is manually adding a semicolon to the end of the first line:
func testValue3() {
    @AlwaysTrue var trueOrFalse;

    XCTAssertTrue(trueOrFalse)
}

This issue is not limited to test methods and XCTest functions:
// Error:
func testValue1() {
    @State(initialValue: 123) var state

    doSomething()
}

However, consecutive lines which start with a keyword (tested with let, var, func (nested functions), defer, and return) don’t result in the error:
// No error:
func testValue1() {
    @State(initialValue: 123) var state

    let expectedValue = 123

    XCTAssertEqual(state, expectedValue)
}

Duplicate of #57542


Fix uninitialized variables in pmesh-fitting

Dear mfem developers,
while playing with pmesh-fitting, I faced some random bugs that I could trace to uninitialized variables in the case where surface marking is done through attributes (strategy 2).
It also seems to me that lines 561 to 564 could be simply replaced by means of a one line call to operator=. Furthermore, surf_fit_mat_gf and surf_fit_marker could maybe be initialized before choosing between strategy 1 and 2, as the initialization is now done in the two branches of the test.
If you think this is worthwhile, I can update the PR.
T.

PR
Author
Editor
Reviewers
Assignment
Approval
Merge

#4474
@tsokar
@tzanio
@kmittal2 + @vladotomov
9/6/24
⌛due 9/20/24
⌛due 9/27/24

PR Checklist

[ ] Code builds.
[ ] Code passes make style.
[ ] Update CHANGELOG:

[ ] Is this a new feature users need to be aware of? New or updated example or miniapp?
[ ] Does it make sense to create a new section in the CHANGELOG to group with other related features?

[ ] Update INSTALL:

[ ] Had a new optional library been added? If so, what range of versions of this library are required? (Make sure the external library is compatible with our BSD license, e.g. it is not licensed under GPL!)
[ ] Have the version ranges for any required or optional libraries changed?
[ ] Does make or cmake have a new target?
[ ] Did the requirements or the installation process change? (rare)

[ ] Update continuous integration server configurations if necessary (e.g. with new version requirements for each of MFEM's dependencies)

[ ] .github
[ ] .appveyor.yml

[ ] Update .gitignore:

[ ] Check if make distclean; git status shows any files that were generated from the source by the project (not an IDE) but we don't want to track in the repository.
[ ] Add new patterns (just for the new files above) and re-run the above test.

[ ] New examples:

[ ] All sample runs at the top of the example source file work.
[ ] Update examples/makefile:

[ ] Add the example code to the appropriate SEQ_EXAMPLES and PAR_EXAMPLES variables.
[ ] Add any files generated by it to the clean target.
[ ] Add the example binary and any files generated by it to the top-level .gitignore file.

[ ] Update examples/CMakeLists.txt:

[ ] Add the example code to the ALL_EXE_SRCS variable.
[ ] Make sure THIS_TEST_OPTIONS is set correctly for the new example.

[ ] List the new example in doc/CodeDocumentation.dox.
[ ] If new examples directory (e.g.examples/pumi), list it in doc/CodeDocumentation.conf.in
[ ] Companion pull request for documentation in mfem/web repo:

[ ] Update or add example-specific documentation, see e.g. the src/examples.md.
[ ] Add the description, labels and screenshots in src/examples.md and src/img.
[ ] In examples.md, list the example under the appropriate categories, add new categories if necessary.
[ ] Add a short description of the example in the "Extensive Examples" section of features.md.

[ ] New miniapps:

[ ] All sample runs at the top of the miniapp source file work.
[ ] Update top-level makefile and makefile in corresponding miniapp directory.
[ ] Add the miniapp binary and any files generated by it to the top-level .gitignore file.
[ ] Update CMake build system:

[ ] Update the CMakeLists.txt file in the miniapps directory, if the new miniapp is in a new directory.
[ ] Add/update the CMakeLists.txt file in the new miniapp directory.
[ ] Consider adding a new test for the new miniapp.

[ ] List the new miniapp in doc/CodeDocumentation.dox
[ ] If new miniapps directory (e.g.miniapps/nurbs), add it to MINIAPP_SUBDIRS in the makefile.
[ ] If new miniapps directory (e.g.miniapps/nurbs), list it in doc/CodeDocumentation.conf.in
[ ] Companion pull request for documentation in mfem/web repo:

[ ] Update or add miniapp-specific documentation, see e.g. the src/meshing.md and src/electromagnetics.md files.
[ ] Add the description, labels and screenshots in src/examples.md and src/img.
[ ] The miniapps go at the end of the page, and are usually listed only under a specific "Application (PDE)" category.
[ ] Add a short description of the miniapp in the "Extensive Examples" section of features.md.

[ ] New capability:

[ ] All new public, protected, and private classes, methods, data members, and functions have full Doxygen-style documentation in source comments. Documentation should include descriptions of member data, function arguments and return values, template parameters, and prerequisites for calling new functions.
[ ] Pointer arguments and return values must specify whether ownership is being transferred or lent with the call.
[ ] Any new functions should include descriptions of their intended use e.g. for internal use only, user-facing, etc., along with references to example code whenever possible/appropriate.
[ ] Consider adding new sample runs in existing examples to highlight the new capability.
[ ] Consider saving cool simulation pictures with the new capability in the Confluence gallery (LLNL only) or submitting them, via pull request, to the gallery section of the mfem/web repo.
[ ] If this is a major new feature, consider mentioning it in the short summary inside README (rare).
[ ] List major new classes in doc/CodeDocumentation.dox (rare).

[ ] Update this checklist, if the new pull request affects it.
[ ] Run make unittest to make sure all unit tests pass.
[ ] Run the tests in tests/scripts.
[ ] (LLNL only) After merging:

[ ] Update internal tests to include the new features.

@tsokar, that sounds reasonable. Please go ahead and update the PR.

@kmittal2, done: tell me if you need any other change !

This PR is now under review (see the table in the PR description). To help with the review process, please do not force push to the branch.

Merged in next for testing...


Create a footer blue -3

One need to make this component using HTML and Tailwind CSS. I would suggest to use Tailwind Playgrounds to make things faster and quicker.
Here is a reference to the component.

After building the component please raise a PR with a screenshot of the component and add the component in Footer/footer-blue3.html
If you need to use any icon please use it from Hero Icons
Good luck.

Hey @rupsha014 i want to work on this

Hello sir can you assign this issue to me?

Sir I have made a PR regarding #425 look if you need any changes


Make helm operations atomic

The behaviour introduced in this PR ensures that a deployment gets deleted when the initial installation fails and upgrades get reverted when they fail. Further reading: https://medium.com/polarsquad/check-your-helm-deployments-ffe26014804

The documentation linked points to Helm v2. We're using v3, is there any difference?

The documentation linked points to Helm v2. We're using v3, is there any difference?

No, i just added some documentation :-)

I'm not sure if this will work together with our example shipyard for blue-green deployments:
https://github.com/keptn/examples/blob/519680b56e270e9a59b09d864415df3d45643a09/onboarding-carts/shipyard.yaml#L40-L45
Here we have
        - name: "rollback"
          triggeredOn:
            - event: "staging.delivery.finished"
              selector:
                match:
                  result: "fail"

In case any step in delivery in stage staging fails.
What happens if the deployment step fails, but performs a rollback already?

@warber @johannes-b was this investigated during my absence?


sync compiled file with non-FileSystemStorage (cloud storage)

Fix for #608. More general solution than #609.
It works with FileSystemStorage, and cloud storages from django-storages package (like S3BotoStorage, S3Boto3Storage and etc).

Coverage remained the same at ?% when pulling b3f282435e429618c3b46c206ec0bfb9d00ebe5f on sharov:cloud_storage into 4314d1eb7d03a347bd200432d1441dabc0f91e72 on jazzband:master.

Any updates, questions, notes here?

Can we get this merged? I'm currently using this monkey patching way outlined here: https://github.com/jazzband/django-pipeline/pull/502#issuecomment-144008114


Insert method : no way to specify table name

Hello, Insert function of Xorm , uses struct name and inserts data in specific table as depicted from struct, If i wan to insert in other table, is there any way, for example
type NewOrder struct {
id int
order_nr int
}
order := NewOrder{"id":1,"order_nr":123}
engine.Insert($order)
I want to save the data in table "orders", please comment on this ...

There are two ways to do that:
func (NewOrder) TableName() string {
    return "orders"
}

another way is
engine.Table("orders").Insert(&order)

Thanks !!!


unused space

Description
on the website at the top there is about 20% space unused in the ledt of the div. I can align the div and also impore the UI of the navbar
Screenshots

@17Moons Go for it!

already working on it would like work on it😀

I would like to work on it.

I would like to work on it.

what is the progress? I don't want to create conflicts in my PR .


"Mod embeddium only supports 'textrues_embeddium_options' 0.0.0-NOT-COMPATABLE     Currently, 'textrues_embeddium_options' is 0.1.5+mc1.20.1"

Modpack will not boot past this point

This is on minecraft v1.20.1, forge v47.2.30

I believe you are asking on the wrong repository issue tracker. This mod doesn't have an official Forge port. https://github.com/ThinkingStudios/textrues-embeddium-options

@LunarAnticGitHub
see https://github.com/ThinkingStudios/textrues-embeddium-options/issues/9

а чё делать?


Update TeamCity VCS settings to new GitHub repository

Hi,
It seems to me that settings in TeamCity shoud be updated because Orchard is not tested.

Fixed, thanks.


[ISSUES #860] Support AdminBrokerProcessor get_broker_runtime_info part#1

Support AdminBrokerProcessor get_broker_runtime_info part#1

Which Issue(s) This PR Fixes(Closes)

Fixes #860
Brief Description

How Did You Test This Change?

Summary by CodeRabbit

New Features

Enhanced AdminBrokerProcessor to support runtime information retrieval.
Introduced new methods for tracking running statistics in ScheduleMessageService.
Added public modules for improved organization and access to system-level metrics.
Implemented new runtime info retrieval methods across various components for better performance monitoring.

Bug Fixes

Ensured state consistency by modifying initialization processes in the BrokerRuntime.

Documentation

Updated method signatures and public interfaces to enhance clarity and usability.

🚀Thanks for your contribution🎉. CodeRabbit(AI) will review your code first🔥


./Home returns 404

When visiting https://elliottdg.github.io/F1-Stats the URL is rewritten to https://elliottdg.github.io/F1-Stats/Home, which doesn't exist so the when refreshing the server responds with 404. This prevents lighthouse from running.

fixed by 7a25b7a2fb1dd2915db8ca724995e197882ab0a1


TS Type inference when converting interpreter to an Observable

Just as noticeable in this test - it seems to be impossible to use rxjs.from() with xstate interpreter without casting it to any.
Are there plans to support proper types for this? Is it even feasible?
https://github.com/davidkpiano/xstate/blob/07586ccbe165e5b88ff9149cd13022d9cbdb331b/packages/core/test/interpreter.test.ts#L1698

I've just checked this exact place in our code and it seems to work properly:

If you are experiencing a problem in your codebase then please share a runnable repro case for this so I could take a look.

I've just checked this exact place in our code and it seems to work properly:

Cool. Let me check it too. In that case at least the "as any" can now be removed from the test :)
I'm on version 4.16.0, and in my codebase, if I have:
const service: Interpreter<{}> = {} as any;
const x$ = from(service)

I get error:
Argument of type 'Interpreter<{}, any, EventObject, { value: any; context: {}; }>' is not assignable to parameter of type 'ObservableInput<any>'.
  Type 'Interpreter<{}, any, EventObject, { value: any; context: {}; }>' is not assignable to type 'Subscribable<any>'.
    Types of property 'subscribe' are incompatible.
      Type '{ (observer: Observer<State<{}, EventObject, any, { value: any; context: {}; }>>): Subscription; (nextListener?: ((state: State<{}, EventObject, any, { ...; }>) => void) | undefined, errorListener?: ((error: any) => void) | undefined, completeListener?: (() => void) | undefined): Subscription; }' is not assignable to type '{ (observer?: PartialObserver<any> | undefined): Unsubscribable; (next: null | undefined, error: null | undefined, complete: () => void): Unsubscribable; (next: null | undefined, error: (error: any) => void, complete?: (() => void) | undefined): Unsubscribable; (next: (value: any) => void, error: null | undefined, c...'.
        Types of parameters 'observer' and 'next' are incompatible.
          Type 'null | undefined' is not assignable to type 'Observer<State<{}, EventObject, any, { value: any; context: {}; }>>'.
            Type 'undefined' is not assignable to type 'Observer<State<{}, EventObject, any, { value: any; context: {}; }>>'.ts(2345)

If only we could get access to the interpreter in the invoke callback, it would be possible to get behaviour similar to epics in redux-observable:

It's an interesting use case - this one makes sense (IMHO) but usually, we discourage people from relying on the service instance beyond for simple reads, attaching callbacks etc. The preferred way of interacting with it is through events. So having that in mind - exposing the whole service there might be a little bit problematic - we wouldn't like people to abuse it. That being said - we already had a version on the next branch that did expose a similar thing there (a simplified actor ref to the service) and that could be exposed. I doubt this will happen in v4 though - the use case can be covered with callback actors (even if they are less ergonomic for this). Actually... could you open a separate issue about this so it can be properly tracked there?

As to the error - please prepare a runnable repro case and I will try to take a look at it some time later.

Ok. Here's the proposal: #1998

Ok. Looks like I can't reproduce on a clean environment :D
https://stackblitz.com/edit/typescript-dspqzq?file=index.ts
Looks like it does behave as expected.
Must be an issue on my end.

Sorry for the hassle. Reopening - in codesandbox the TS error is reproducable:
https://codesandbox.io/s/romantic-cookies-8est0?file=/src/index.ts

I'm not exactly sure how exactly are we supposed to satisfy TS here - as RxJS has a callable signature with multiple overloads in the Subscribable interface (which we need to match for this to work). Does that mean that our Subscribable~ should account for all those overloads as well? I would need to do more tests to assess that.
Just writing down some things that I've found during my investigation. TS expect us to match this deprecated overload:
https://github.com/ReactiveX/rxjs/blob/02219cc7b87b0942004f957985c18fac71ef0824/src/internal/types.ts#L44
which we doesn't.
The last overload actually handles our types correctly:
https://github.com/ReactiveX/rxjs/blob/02219cc7b87b0942004f957985c18fac71ef0824/src/internal/types.ts#L49
I wonder what's the reaso

The easiest workaround I use is to just augment and overload the from function:
// index.d.ts

import { Observable } from 'rxjs';
import { EventObject, Interpreter, State, StateSchema, Typestate } from 'xstate';

declare module 'rxjs' {
  function from<
    TContext,
    TStateSchema extends StateSchema = any,
    TEvent extends EventObject = EventObject,
    TTypestate extends Typestate<TContext> = { value: any, context: TContext }>
  (input: Interpreter<TContext, TStateSchema, TEvent, TTypestate>): Observable<State<TContext, TEvent, any, TTypestate>>
}

RxJS v7 no longer has the depracated methods, but XState's Interpreter still does not to work with Observable.from().
Compilation now fails with Argument of type 'Interpreter<Context, Schema, Event, State>' is not assignable to parameter of type 'ObservableInput<any>'.
This makes sense, since v7 also removed Subscribable<any>, on which the Interpreter was modeled, from the union type of ObservableInput<any>
One way to solve this, also for RxJS v6, I think, would be to include the interop Symbol.observable to the Subscribable interface.

One way to solve this, also for RxJS v6, I think, would be to include the interop Symbol.observable to the Subscribable interface.

Is there a way to do this without depending on rxjs?
Also, I'd appreciate a PR for this if you have an idea of how to make this work 🙏

Actually, I just noticed that symbol is already added in the Interpreter class ... so I have no idea why that would not work.

Btw: using Symbol.observable would exactly be NOT depending on RxJS, since that is a package-independent interop symbol.

Okay, so I got this to work in a project where we're using XState, and it was solved by adding the following line to the typing of the Interpreter:
[Symbol.observable](): Subscribable<State<TContext, TEvent, TStateSchema, TTypestate>>

However, I can't see why this would not already appear based on the current TS code, or how I would add it (but maybe I'm missing something obvious).

Symbol.observable: Subscribable<State<TContext, TEvent, TStateSchema, TTypestate>>

It's currently typed as any (for some reason) and seems like more of a runtime thing.
Made a PR for this, though: #2358

Indeed, wrote the same code locally, but it behaves differently than expected (which also makes the test fail).


Instrument creation of child processes in Go

For security purposes, it would be useful to be able to monitor when a child process is started in Go via os/exec's Cmd.
It looks like os/exec ends up calling os.StartProcess, which then calls syscall.StartProcess, which wraps syscall.ForkExec. It's unclear if that means it would be better to use a kprobe to monitor the exec syscalls directly instead of using a uprobe to monitor the Go process, but that is all of the information I could find at the moment.

Hi @toddtreece ! Thank you for your suggestion.
Could you develop more your suggestions? I mean, would you like to get this as a new metric/trace for the applications you instrument, or just auditing any new process created for the whole host?
We want to make Beyla as useful as we can for our users, so your input is really appreciated, but we'd need to locate this suggestion within a more concrete context. Beyla currently is an application/network observability tool, but we don't perform system-level security audits.

hi @mariomac, i spoke with @grcevski about this and it makes sense to close this given the scope of beyla. thanks!


Is there another way to monitor jaeger without prometheus

there's some resistance for me to using Prometheus, my question as the title describes. Could I have another way to monitor jaeger?
thanks to your help ~

What do you want to use instead? The /metrics endpoint is compatible with OpenMetrics, and can be read by most modern monitoring solutions. We also have a health check port that you can use for simple ping-like monitoring, like what Nagios would use.

Actually, I'm finding a way to use /metrics endpoint by Grafana directly ~, is this possible? I don't need all indicators in /metrics

@joe-elliott should correct me if I'm wrong, but isn't Grafana "just" a way to plot data (ie, dashboard)? You'd still need a Prometheus as a data source for Grafana.
But let me confirm something: you are talking about monitoring Jaeger, not your instrumentation applications, right?

Correct.  Grafana only plots data, it does not scrape metrics, store them or provide a query api.  Prometheus is a fantastic solution for this, but like @jpkrohling said there should be a lot of options to scrape and store an OpenMetrics endpoint.
Grafana supports most popular time series databases out of the box so regardless of what you choose @yeqown you should be able to visualize it with Grafana.

@jpkrohling right, I'm talking about monitoring Jaeger. Thank you all to resolve my confusion @jpkrohling @joe-elliott and I  have learned some useful knowledge about OpenMetrics. The way to resolve my question is choosing an option to scrape /metrics endpoint... right?


async_conn: Move getters and method runner to the connection class.

The eventual goal of this PR series is to get rid of the AsyncNode class.

Fixed.


Leetcode problem 264-Ugly Number II (Medium)

Leetcode problem 264-Ugly Number II
DP problem
Question
Solution
Time-Complexity : $O(n)$
Space-Complexity: $O(n)$

@Vanshika2063  can you please merge this?

this is amazing @Sreetama2001
thanks for the contribution in my repo and please share in social media and tag me on twitter


Which parser for USFM?

Hi @mvahowe
Very quick question:
index.js in the USFM parser looks like it has an argument that is the actual parser: https://github.com/mvahowe/proskomma-js/blob/072d2c25c7f24b8255b894ae173e3fc733938720/src/parser/lexers/usfm/index.js#L9
Which parser should you feed this function? Is that the SAX one define in the usx directory?
I was looking for a test like 'readUSFMfile.js', do you have something that comes close to that?
Thanks

Hi @jdejoode!
The parser in this case is https://github.com/mvahowe/proskomma-js/blob/072d2c25c7f24b8255b894ae173e3fc733938720/src/parser/index.js#L13
There's no USFM parser as such. USFM and USX both get lexed into the same set of preTokens, and those preTokens are then fed into the code above. That code defines the overall processing strategy and some arbitrary edge cases, but most of the per-tag logic is defined in https://github.com/mvahowe/proskomma-js/blob/072d2c25c7f24b8255b894ae173e3fc733938720/src/parser/parser_specs.js#L34
The plan for post-1.0 is to clean up the core parser engine and to support multiple parser specs.


⚠ Thumbnails API Endpoint has degraded performance

In ddccf8d, Thumbnails API Endpoint (https://thumbnails.roblox.com/v1/assets?assetIds=82738847&format=Png&isCircular=false&size=30x30) experienced degraded performance:

HTTP code: 200
Response time: 1598 ms

Resolved: Thumbnails API Endpoint performance has improved in 9fd0d60 after 13 minutes.


Make the Delegates Section More Informative At A Glance

Looking at this snip, when I see the menu of delegates, it is not immediately clear to me what I am looking at. Are these people who have delegated votes to me?

seeing the delegater name with the # of votes they've given me - like this - could help

It's also not clear  who is giving the votes and who is getting them, but some sort of graphic/movement on this screen is needed to aid in more immediate understanding.

I think  we should work arount your 2. idea.


Add Nix.gitignore

Reasons for making this change:
So nix builds locally some builds (like bin/obj).
And also produces links for custom "home" per git repo per user.
** Links **
https://devenv.sh/
https://nixos.org/manual/nix/stable/command-ref/nix-build

cc @martinwoodward @bdougie @astrojuanlu may you merge this or share with me rights to merge?


Get the entire header in a single call

Hi,
I've the same issue as issue #96!.
The problem is: I've to store the entire header for certain types of received emails.
The library allows me to easily get every single child, provided that I know it through getHeader('abc').
Is there a way to get the entire header with a single call?
IE: that's a generic delivery failure header, and I'd like to get it without loops.
Return-Path: <>
Delivered-To<EMAIL_ADDRESS>Received: from node.example.net
by node.example.net with LMTP
id sGhQFAHcBF5HgQAAzoayDw
(envelope-from <>)
for<EMAIL_ADDRESS>Thu, 26 Dec 2019 10:12:49 -0600
Return-path: <>
Envelope-to<EMAIL_ADDRESS>Delivery-date: Thu, 26 Dec 2019 10:12:49 -0600
Received: from mailnull by node.example.net with local (Exim 4.92)
id 1ikVkn-0003oo-96
for<EMAIL_ADDRESS>Thu, 26 Dec 2019 10:12:49 -0600
X-Failed-Recipients<EMAIL_ADDRESS>Auto-Submitted: auto-replied
From: Mail Delivery System<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Content-Type: multipart/report; report-type=delivery-status; boundary=1577376769-eximdsn-1777210027
MIME-Version: 1.0
Subject: Mail delivery failed: returning message to sender
Message-Id<EMAIL_ADDRESS>Date: Thu, 26 Dec 2019 10:12:49 -0600
Thanks again!

Awesome, I somehow managed to miss getRawHeaders() for an hour and then I found it one minute after opening the issue.
Time to rest.


Fix docs link to jQuery metadata

Fixing documentation link to jQuery metadata, as the current one is invalid.

This one fixes a part of https://github.com/christianbach/tablesorter/issues/44 . The rest would be fixed by simply updating the tablesorter version on the live site.


Deserialize Typesafe NetworkVersion

Summary of changes
Changes introduced in this pull request:

Adds the required change to allow for typesafe deserialization of NetworkVersion for custom chain configurations

Reference issue to close (if applicable)

Closes #1498
Other information and links

Also patch ChainConfig::network_version to remove last line and return directly the version.


Adding headers to client side queries.

Apologies if this has been addressed, I feel like i've look high and low.
I cannot find a way to attach  headers to queries made with useQuery on the client side.  I have tried both adding:
function makeClient() {
  const httpLink = new HttpLink({
    uri: process.env.NEXT_PUBLIC_GQL_API_URL,
    fetchOptions: { cache: "no-store" },
    headers: {
      Authorization: authTokens() ? `Bearer ${authTokens()}` : ""
    }
  });

  return new NextSSRApolloClient({
    cache: new NextSSRInMemoryCache(),
    link:
      typeof window === "undefined"
        ? ApolloLink.from([
            new SSRMultipartLink({
              stripDefer: true
            }),
            httpLink
          ])
        : httpLink
  });
}

when declaring the client
and also tried:
const { data, error } = useQuery(QUERY_THAT_NEEDS_AUTHTOKEN,
  {context: {
       headers: {
              Authorization: authTokens() ? `Bearer ${authTokens()}` : ""
        }
}});

on an individual query level.
The former doesn't seem to work client side, but attaching headers in the makeClient function server side work with the regular ApolloClient and InMemoryCache
The latter approach works with Mutations,  but not Queries.
If I remove the need for an Auth header on the backend, the query works as expected.
Is there a trick with Links?
What can I say, I'm losing my head for a lack of headers.

This works, based off the things I found deep in a thread on a still open issue.
"use client";

import { HttpLink, ApolloLink } from "@apollo/client";
import { setContext } from "@apollo/client/link/context";
import {
  ApolloNextAppProvider,
  NextSSRApolloClient,
  SSRMultipartLink,
  NextSSRInMemoryCache
} from "@apollo/experimental-nextjs-app-support/ssr";

import { authTokens } from "@/app/Apollo/authTokens";

const authLink = setContext(async (_, { headers }) => {
  if (!authTokens()) return { headers: { ...headers } };
  const token = authTokens();

  return {
    headers: {
      ...headers,
      Authorization: token ? `Bearer ${token}` : ""
    }
  };
});

function makeClient() {
  const httpLink = new HttpLink({
    uri: process.env.NEXT_PUBLIC_GQL_API_URL,
    fetchOptions: { cache: "no-store" }
  });
  return new NextSSRApolloClient({
    cache: new NextSSRInMemoryCache(),
    link:
      typeof window === "undefined"
        ? ApolloLink.from([
            new SSRMultipartLink({
              stripDefer: true
            }),
            authLink.concat(httpLink)
          ])
        : authLink.concat(httpLink)
  });
}

export function ApolloWrapper({ children }: React.PropsWithChildren) {
  return (
    <ApolloNextAppProvider makeClient={makeClient}>
      {children}
    </ApolloNextAppProvider>
  );
}


Update SDG's New Data Processor

Description

Motivation and Context

How has this been tested?

Types of changes

[ ] Maintenance (no change in code, maintain the project's CI, docs, etc.)
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

[ ] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.

Merge important file structure changes, other developers may work on modules in the data process separately.


[BUG] Infinite loop on round impact

Short Description
There seems to be a case scenario where bullets are sent into an infinite loop after hitting an entity. In the reported case, it was a visclipped entity that was part of a vehicle. I couldn't replicate this issue myself, so I'm leaving this here to not forget about it.
Update: It only seems to happen with HEAT ammo, and any ammo inherited from it.
Console Error Logs (Optional)
Lua Error: [acf-3] stack overflow
1. GetTable - [C]:-1
2. __index - lua/includes/extensions/entity.lua:23
3. CheckClips - addons/acf-3/lua/acf/base/util/sv_util.lua:405
4. Trace - addons/acf-3/lua/acf/base/util/sh_util.lua:158
5. TraceF - addons/acf-3/lua/acf/base/util/sh_util.lua:182
6. DoBulletsFlight - addons/acf-3/lua/acf/server/ballistics.lua:250
7. OnImpact - addons/acf-3/lua/acf/server/ballistics.lua:203
8. DoBulletsFlight - addons/acf-3/lua/acf/server/ballistics.lua:316
9. OnImpact - addons/acf-3/lua/acf/server/ballistics.lua:203
10. DoBulletsFlight - addons/acf-3/lua/acf/server/ballistics.lua:316
11. OnImpact - addons/acf-3/lua/acf/server/ballistics.lua:203
12. DoBulletsFlight - addons/acf-3/lua/acf/server/ballistics.lua:316
13. OnImpact - addons/acf-3/lua/acf/server/ballistics.lua:203
14. DoBulletsFlight - addons/acf-3/lua/acf/server/ballistics.lua:316
15. OnImpact - addons/acf-3/lua/acf/server/ballistics.lua:203

How to Reproduce (Optional)
Shoot any entity with a HEAT-based munition (HEAT, HEATFS, GLATGM).

Fixed on 77cf8f.


Add support for more flexible request routing

Presently Alpha has support for simple controller aliases for routing requests to a given controller via the following API in FrontController:

    /**
     * Used to register a controller alias to enable shorter URLs with mod_rewrite support enabled.  Note that
     * only controllers with a single parameter are supported.
     *
     * @param string $controller The name of the page controller class
     * @param string $alias The URL alias for the page controller
     * @param string $param The name of the GET parameter on the alias URL request
     * @since 1.0
     */
    public function registerAlias($controller, $alias, $param=null) {
        ....
    }

However we need this to be a lot more flexible.  The following API is suggested for the FrontController:
$front->addRoute('/user/{username}', function (Request $request) {
    $controller = new UserController();
    return $controller->execute($request); // this will return a Response object
})->value('username', ''); // here we can set default values for URL parameters

There is a nice example lib here: https://github.com/chriso/klein.php/

Most of this is done now, the only remaining feature is added support for default parameter values when adding a new route to the FrontController.

Default param values now supported, closing as feature complete and unit tested.


Allow for file and ttl file updates

Is your feature request related to a problem? Please describe.
At the moment, PASS is set up that you need to delete a previous file in a container in order to update the file and ttl file description.
Describe the solution you'd like
Refactor uploadDocument to just upload documents into pass and create a function that allows for file updates.
Describe alternatives you've considered
None
Additional context
None

PR #70 will deal with file updates. Updates to ttl files will be coming in a future PR.

PR #71 solves the issue of updating ttl files in Solid containers and was merged into Development. Closing issue.


Field.append() with np.array view does not hold data

Before submitting the issue

[X] I have checked for Compatibility issues
[X] I have searched among the existing issues
[X] I am using a Python virtual environment

Description of the bug
Appending data to a Field using an array slice does not hold onto the data for GrpcCLayer and InProcess. This results in the Field reporting unassigned values.
Using sliced_data.copy() does not solve the issue despite it reporting sliced_data.flags["OWNDATA"]==True and sliced_data.base!=None.
Basically the field does not hold the data when added this way.
The question is whether there is something we can actually do about it, as it seems there is no way to know where the data comes from.
Steps To Reproduce
result_field = dpf.field.Field(location=dpf.locations.elemental_nodal, nature=dpf.natures.scalar)
assert result_field.component_count == 1

input_data = np.array([[1,2],[3,4]])
sliced_data = input_data[:,0]

result_field.append(sliced_data, 1)
assert result_field.elementary_data_count == 2
print(result_field)
assert np.allclose(result_field.get_entity_data_by_id(1), sliced_data)

prints:
Location: ElementalNodal
  Unit:
  1 entities
  Data: 1 components and 2 elementary data

  IDs                   data
  ------------          ----------
  1                     4.243992e-314
                        8.487983e-314

Which Operating System causes the issue?
Windows
Which DPF/Ansys version are you using?
DPF Server 2024.2.pre0
Which Python version causes the issue?
3.11
Installed packages
NA

@janvonrickenbach FYI


Why is Content-Type set for empty requests?

Currently when making a POST to the /jwt-refresh endpoint the request gets a content-type set to application/json (see: https://github.com/FusionAuth/fusionauth-react-sdk/blob/main/src/providers/FusionAuthProvider.tsx#L141-L149). This seems odd since there is no BODY on the request. This can cause problems in some backends as they might choose to valid a body based on the the content-type. For example the default JSON parser in fastify (a node backend) throws if there is no body.
I see to possible solutions to this.

Don't set the content-type
If the idea was to set this to eventually pass something in the body but that was never implemented you could just set the body as an empty object for now.

Please let me know your thoughts.

@robotdan another one for you :)

Thoughts @bhalsey @mooreds or @sam-woodridge

Thank you for opening this issue, @osbornm.  I've created  https://github.com/FusionAuth/fusionauth-react-sdk/pull/45 to address this.

PR has been merged.


set of small and usefull commits

Sorry, I look into the problem and fix the cause.

merge pull request from Andrey
retry mechanism after connection lost stops working now.I will introduce a new state Timeout later and refactor related logics, and also fix this issue.

Thanks for merging.

Hi Andrey, I just pushed my refactoring. You can try it and let me know if there is any issue, thanks.


prettier --write on CONTRIBUTING.md and .release-please-manifest.json in PRs

TL;DR
I would like for the generated CONTRIBUTING.md and .release-please-manifest.json formatting to be prettier-compliant.
Detailed design
Could be a wrapper around the core logic that's already in the action

Additional information
No response

Also applies to the changelog that is created in the release PR.
@quinn-dougherty did you have a workaround?

This would need to be implemented on the upstream googleapis/release-please library


Application deployed to digital ocean

Deploy the app to digital ocean.
Add a section called “Deployment” on the project Home Page containing a link to the deployed application running on Digital Ocean.

http://<IP_ADDRESS>


build: Add a configure option to disable tests

Avoids forcing a libsoup/json-glib dependency

:+1:

Merged #269


covid19 tracker angola

Here, we have a conflict to repair so we need to adjust it.
Can you make a rebase first? later we can to valid to merge it.

Here, we have a conflict to repair so we need to adjust it.
Can you make a rebase first? later we can to valid to merge it.

link updated

link updated


test: write, read, timeout, codegen(ts-codegen)

Codecov Report

Merging #269 (b9806d6) into main (89d094b) will increase coverage by 5.02%.
The diff coverage is 86.66%.

@@            Coverage Diff             @@
##             main     #269      +/-   ##
==========================================
+ Coverage   76.62%   81.64%   +5.02%
==========================================
  Files          65       66       +1
  Lines        3816     3847      +31
  Branches      376      421      +45
==========================================
+ Hits         2924     3141     +217
+ Misses        892      706     -186

Impacted Files
Coverage Δ

...ackages/swagger-ts/src/generators/TypeGenerator.ts
66.09% <20.00%> (+0.84%)
:arrow_up:

packages/ts-codegen/src/codegen.ts
93.33% <95.65%> (+48.29%)
:arrow_up:

packages/core/src/utils/read.ts
97.77% <100.00%> (+37.36%)
:arrow_up:

packages/ts-codegen/src/types.ts
100.00% <100.00%> (ø)

... and 4 files with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Is buildah meant to be Linux only tool?

Given that buildah provides a binary that helps you create containers, and that many developers would use different Operating Systems on their laptop, is buildah targeting to work on multiple architectures, or it's just meant to run on linux?

We would be open to it running on any OS.  Pull requests accepted.

I would if I knew how, but you decided to do it in a different language than Java or bash, which are the only ones I can barely write.

Probably easiest thing to do would be launch VMs with linux in them to build linux containers.

@rhatdan so, that means developers will always need to use Docker to build containers, even if on the "cloud platform" (e.g. OpenShift) we run containers with runc through CRI-O and we build them with buildah.
Thanks for the answer. I guess from a user/developer point of view, we don't need to look into buildah then.

No,  You should be able to build a container through CRI-O/openshift.  Even in the docker case the user is using a VM to build it docker does not running natively on a MAC or windows (yet).
I think we should continue to discuss what you would need from buildah.

@rhatdan From a developer perspective, buildah needs to be a client tool that seamlessly build containers in Mac,Win and Linux.
I know that Docker uses a VM, but the client side of it works on mac, win and linux, hence whether the container builds in a VM or not, the experience for a user is transparent.
One of my "considerations" of us going cri-o, is the developer side of it. A developer creates containers in 2 different ways, either on his laptop or on a hosted platform (k8s,openshift,...). As you say, the hosted building is no problem, as the user will submit a Dockerfile to be built. How that's done, he don't care, and probably he'll be using a different experience that Docker (e.g. oc, draft,...)
On the other hand, when a developer works on his local machine, he'll want the easiest experience, which is what he currently get's using Docker. That means I will want to build and run containers locally. To run, I can use minishift, minikube, oc cluster, ...., (eventually kpod, runc,...). So that means that as a developer I will provide a Dockerfile for it to build.
As a developer I'm, left with 2 options, one, keep using Docker/moby or the other would be to build a container with buildah. If I go the Docker way, I can do "docker build ... && docker push" in my mac (even if things work on a B2D image). I would want to do the same with buildah, and not having to "create me a VM with a linux, install buildah, and use it in a VM via ssh or similar".
These developers can be of two types: the first, those that will never operate a platform in any way (minikube,minishift, k8s, openshift,...) so those will keep using Docker without an issue. But there are also those that will want to do builds and use same tools and technology on both sides, on their local as well as on the hosted platform, as otherwise they'll have to learn yet another way.
Do you see where I'm going?

Also, does this mean that buildah is meant to build only linux containers? Or are also windows containers in the scope?

Not something Linux engineers are working on, but if Windows engineers want to contribute, Patches welcome.  :^)

@jorgemoralespou  did you get buildah running on OSX?

No

A recent blog post by @haraldh on a Podman remote access solution that works also on macOS and Windows gives hope that this might eventually be addressed, i.e. I can see how varlink could be used to build a solution similar to "Docker for Mac", running the actual builder in a Linux VM on macOS: https://podman.io/blogs/2019/01/16/podman-varlink.html

@devurandom Yes we are concentrating on making podman work on Macs right now, which would inclue podman build.  This is based on top of the varlink calls talked about in this blog.  If you have a MAC and want to play with podman, the code can be built on a MAC Now.

What about using docker for portability at the moment as long as buildah does not work nativity on the desired platforms. I guess it could help increase the adoption of buildah. I am mainly using buildah because of its scripting features, usually I am on Linux and this can be tested on my workstation directly. Nevertheless, if you are not on Linux and want to debug, you could add a kind of wrapper script around buildah which leverages docker.
Example
Directory structure:
buildah-in-docker
├── buildah-docker-wrapper.sh
├── build-buildah.sh
├── Dockerfile
└── index.js

Package buildah into a docker image, e.g. with that Dockerfile (The build instructions can be found at https://github.com/containers/buildah/blob/master/install.md#ubuntu-1):

Dockerfile:
FROM ubuntu:18.04
RUN apt-get update && \
    apt-get -y install software-properties-common && \
    add-apt-repository -y ppa:alexlarsson/flatpak && \
    add-apt-repository -y ppa:gophers/archive && \
    apt-add-repository -y ppa:projectatomic/ppa && \
    apt-get -y -qq update && \
    apt-get -y install \
        bats \
        btrfs-tools \
        git \
        libapparmor-dev \
        libdevmapper-dev \
        libglib2.0-dev \
        libgpgme11-dev \
        libostree-dev \
        libseccomp-dev \
        libselinux1-dev \
        skopeo-containers \
        go-md2man \
        golang-1.10 && \
    apt-get clean
RUN mkdir ~/buildah && \
    cd ~/buildah && \
    export GOPATH=`pwd` && \
    git clone --branch v1.7.2 https://github.com/containers/buildah ./src/github.com/containers/buildah && \
    cd ./src/github.com/containers/buildah && \
    PATH=/usr/lib/go-1.10/bin:$PATH make runc all SECURITYTAGS="apparmor seccomp" && \
    make install install.runc && \
    buildah --help && \
    buildah --version

Add an example application, e.g. a Node.js hello world app, see: https://nodejs.org/es/docs/guides/getting-started-guide/

index.js:
const http = require('http');
const hostname = '<IP_ADDRESS>';
const port = 3000;
const server = http.createServer((req, res) => {
  res.statusCode = 200;
  res.setHeader('Content-Type', 'text/plain');
  res.end('Hello World\n');
});
server.listen(port, hostname, () => {
  console.log(`Server running at http://${hostname}:${port}/`);
});

Add a buildah shell script which would be executed directly with buildah.

build-buildah.sh:
#!/bin/bash
set -xe
CONTAINER=`buildah from docker.io/node:10.15.3-alpine`
buildah copy ${CONTAINER} `pwd` /home/node/
buildah config --workingdir /home/node ${CONTAINER}
buildah run ${CONTAINER} -- npm install
buildah run ${CONTAINER} -- chown -R node /home/node
buildah config \
    --user node \
    --port 3000 \
    --cmd "node index.js" \
    ${CONTAINER}
buildah commit --rm ${CONTAINER} mynodeimage

And finally add a docker wrapper.

buildah-docker-wrapper.sh:
#!/bin/bash
set -xe
# Build container with buildah installed
docker build -t buildah:1.7.2 .
echo "buildah has been compiled on ubuntu:18.04, now building app image with buildah"

# Privileged execution, because of CLONE_NEWUSER syscall
# -v /var/lib/containers because of overlay filesystem
DOCKER_CONTAINER_NAME=`docker run -d --privileged -v /var/lib/containers buildah:1.7.2 sleep 1000`

# Define trap handler to remove buildah container on script exit
function removeContainer {
    docker rm -f ${DOCKER_CONTAINER_NAME}
}
trap removeContainer EXIT

# Transfer files into docker build container
docker cp `pwd` ${DOCKER_CONTAINER_NAME}:/app
# Execute buildah build, on Linux host this could be executed nativly
docker exec -it ${DOCKER_CONTAINER_NAME} /bin/bash -c "cd /app && ./build-buildah.sh"
# Workaround to get back docker image on the host, export docker image as tar file
docker exec -it ${DOCKER_CONTAINER_NAME} buildah push mynodeimage docker-archive:/root/image.tar:mynodeimage
# Copy tar file to local host
docker cp ${DOCKER_CONTAINER_NAME}:/root/image.tar .
# Load image with local docker daemon
docker load -i image.tar
# Cleanup transfered image
rm -f image.tar

set +x
echo "Docker image has been built successfully with buildah!"
echo "Run the image with: docker run --rm -p 3000:3000 mynodeimage"

Please note that the wrapper script uses the --privileged flag, so it might not be the safest way to run buildah, but I think it should work on Mac as well (did not try that). It also uses a workaround to copy a tar file back on the host and import it with the docker cli in order to make the produced image available to the docker host.
Example execution (on RHEL 7)
The first time ./buildah-docker-wrapper.sh is executed, it will run a usual docker build. Afterwards builds will be using the docker build cache and directly started a buildah container.
$ ./buildah-docker-wrapper.sh
+ docker build -t buildah:1.7.2 .
Sending build context to Docker daemon  7.168kB
Step 1/3 : FROM ubuntu:18.04
 ---> 47b19964fb50
Step 2/3 : RUN apt-get update &&     apt-get -y install software-properties-common &&     add-apt-repository -y ppa:alexlarsson/flatpak &&     add-apt-repository -y ppa:gophers/archive &&     apt-add-repository -y ppa:projectatomic/ppa &&     apt-get -y -qq update &&     apt-get -y install         bats         btrfs-tools         git         libapparmor-dev         libdevmapper-dev         libglib2.0-dev         libgpgme11-dev         libostree-dev         libseccomp-dev         libselinux1-dev         skopeo-containers         go-md2man         golang-1.10 &&     apt-get clean
 ---> Using cache
 ---> f33879ddaabb
Step 3/3 : RUN mkdir ~/buildah &&     cd ~/buildah &&     export GOPATH=`pwd` &&     git clone --branch v1.7.2 https://github.com/containers/buildah ./src/github.com/containers/buildah &&     cd ./src/github.com/containers/buildah &&     PATH=/usr/lib/go-1.10/bin:$PATH make runc all SECURITYTAGS="apparmor seccomp" &&     make install install.runc &&     buildah --help &&     buildah --version
 ---> Using cache
 ---> 14eb76a8b536
Successfully built 14eb76a8b536
Successfully tagged buildah:1.7.2
+ echo 'buildah has been compiled on ubuntu:18.04, now building app image with buildah'
buildah has been compiled on ubuntu:18.04, now building app image with buildah
++ docker run -d --privileged -v /var/lib/containers buildah:1.7.2 sleep 1000
+ DOCKER_CONTAINER_NAME=8027eea826e5a1999e723ae9a8195d6965be221afa22a3ceaf5f9f93e827cc6f
+ trap removeContainer EXIT
++ pwd
+ docker cp /home/ohmsk/git/rba/buildah-demo/buildah-in-docker 8027eea826e5a1999e723ae9a8195d6965be221afa22a3ceaf5f9f93e827cc6f:/app
+ docker exec -it 8027eea826e5a1999e723ae9a8195d6965be221afa22a3ceaf5f9f93e827cc6f /bin/bash -c 'cd /app && ./build-buildah.sh'
++ buildah from docker.io/node:10.15.3-alpine
Getting image source signatures
Copying blob 5d2ca3ce7154 done
Copying blob ca2222b63ac5 done
Copying blob 8e402f1a9c57 done
Copying config 94f3c89564 done
Writing manifest to image destination
Storing signatures
+ CONTAINER=node-working-container
++ pwd
+ buildah copy node-working-container /app /home/node/
fc96c64aa176b4be461697dc709f69813d1f7fe6763a1a0bed9a08abb548bac6
+ buildah config --workingdir /home/node node-working-container
+ buildah run node-working-container -- npm install
npm WARN saveError ENOENT: no such file or directory, open '/home/node/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/home/node/package.json'
npm WARN node No description
npm WARN node No repository field.
npm WARN node No README data
npm WARN node No license field.

up to date in 0.828s
found 0 vulnerabilities

+ buildah run node-working-container -- chown -R node /home/node
+ buildah config --user node --port 3000 --cmd 'node index.js' node-working-container
+ buildah commit --rm node-working-container mynodeimage
Getting image source signatures
Copying blob bcf2f368fe23 skipped: already exists
Copying blob 980eb43e895d skipped: already exists
Copying blob d64a7e460154 skipped: already exists
Copying blob 97db84a37dc3 done
Copying config 6c9ab0783d done
Writing manifest to image destination
Storing signatures
6c9ab0783d7f143bc7609cd09ec4e3248d6cea5b95c8b3670778148393267b3d
+ docker exec -it 8027eea826e5a1999e723ae9a8195d6965be221afa22a3ceaf5f9f93e827cc6f buildah push mynodeimage docker-archive:/root/image.tar:mynodeimage
Getting image source signatures
Copying blob bcf2f368fe23 done
Copying blob 980eb43e895d done
Copying blob d64a7e460154 done
Copying blob 97db84a37dc3 done
Copying config 6c9ab0783d done
Writing manifest to image destination
Storing signatures
Successfully pushed /root/image.tar:docker.io/library/mynodeimage:latest@sha256:473cdd17be6ec9192554c08bcb208d5ee96d285e7f4fe81233848707a226a352
+ docker cp 8027eea826e5a1999e723ae9a8195d6965be221afa22a3ceaf5f9f93e827cc6f:/root/image.tar .
+ docker load -i image.tar
97db84a37dc3: Loading layer [==================================================>]  17.41kB/17.41kB
The image mynodeimage:latest already exists, renaming the old one with ID sha256:30797341064ed3a157b0d8ae217147996a766982167083d0052193c8f17cfbc7 to empty string
Loaded image: mynodeimage:latest
+ rm -f image.tar
+ set +x
Docker image has been built successfully with buildah!
Run the image with: docker run --rm -p 3000:3000 mynodeimage
8027eea826e5a1999e723ae9a8195d6965be221afa22a3ceaf5f9f93e827cc6f

Finally you can run docker run --rm -p 3000:3000 mynodeimage to start the Node.js app.

Looks like there is a more offical tutorial available now, at least for running buildah in a container: https://developers.redhat.com/blog/2019/04/04/build-and-run-buildah-inside-a-podman-container/

I think the goal, from a Mac and/or Windows perspective, is to use buildah because we don't want to have to run a resource intensive service like docker just to build and manage the life cycle of an image.
More generally, if any tool worked natively on my desktop platform without the requirement for an extra service to run, that's a win (think of it like a standard compiler).  If we have to use docker as a service to build, then buildah actually becomes a barrier:  I've already got docker, why add the extra overhead.
I think people are looking at buildah because it looks like it could potentially provide that non-service path.

We are working with podman build to run on a Mac or Windows.  Not Buildah, although podman build embeds the buildah code within it.
On a MAC and Windows we require you to use a VM, just Like docker does, that is running podman inside of it.
On Windows WSL2, people have had success with running podman there as well.

You mean containers/libpod will create binaries for mac, windows and linux? AFAIK, it doesn't even have a binary that can be directly downloaded from GitHub, but comes only packaged in Linux distro managers. Where would we be able to find these binaries?

On a MAC you should be able to do
brew install podman.
If you go to https://github.com/containers/libpod
and search for Windows or MAC, there are links their to install.

Well, yes, but no. Works via brew cask (works fine)
Error: No available formula with the name "podman"
Found a cask named "podman" instead. Try
  brew cask install podman


⚠ ClamAV has degraded performance

In e43abdd, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 73 ms

Resolved: ClamAV performance has improved in 592331c after 6 minutes.


Disable exponential backoff if registry cannot be reached

See the first problem from https://github.com/docker/docker/issues/10614#issuecomment-74160895.
Currently 3 retries happen resulting in 35s of blocking:
time="2015-02-07T14:20:56+03:00" level="debug" msg="Error contacting registry: Get http://docker-registry.s3.ceph.pretender.local/docker.core.tf/images/4efd95725e8aea4a31c77354041794c84960614914bccb7adcbb9fb585b4986a/layer?Signature=yqImCBGm0U6LwanUB1qpSGr2P%2FM%3D&Expires=1423309256&AWSAccessKeyId=D2D1MDB6UYCKF8FFCOXR: dial tcp <IP_ADDRESS>:80: connection refused"
time="2015-02-07T14:21:11+03:00" level="debug" msg="hostDir: /etc/docker/certs.d/docker.core.tf"
time="2015-02-07T14:21:11+03:00" level="debug" msg="Error contacting registry: Get http://docker-registry.s3.ceph.pretender.local/docker.core.tf/images/4efd95725e8aea4a31c77354041794c84960614914bccb7adcbb9fb585b4986a/layer?Signature=L%2FnK7I%2BITUzKnz8YLRbl0ymWJgA%3D&Expires=1423309271&AWSAccessKeyId=D2D1MDB6UYCKF8FFCOXR: dial tcp <IP_ADDRESS>:80: connection refused"
time="2015-02-07T14:21:31+03:00" level="debug" msg="hostDir: /etc/docker/certs.d/docker.core.tf"
time="2015-02-07T14:21:31+03:00" level="debug" msg="Error contacting registry: Get http://docker-registry.s3.ceph.pretender.local/docker.core.tf/images/4efd95725e8aea4a31c77354041794c84960614914bccb7adcbb9fb585b4986a/layer?Signature=xm5Cza%2BjDjp%2F7lX7QzKGhG44ljU%3D&Expires=1423309291&AWSAccessKeyId=D2D1MDB6UYCKF8FFCOXR: dial tcp <IP_ADDRESS>:80: connection refused"

cc @stevvooe, @dmp42

ping @stevvooe @dmcgowan

ping @stevvooe @aaronlehmann @dmcgowan

@LK4D4 We could probably adjust the exponential backoff to provide better convergence on recovery. My guess is that the bottom bound makes the expected recovery time balloon on connection failure.
@aaronlehmann Do you know where we calculate this backoff?

I don't think this is an issue anymore. The retry/backoff stuff is totally different now than a year and a half ago when this issue was filed. I don't think any retrying will happen if the registry can't be reached in the first place to fetch the manifest. The retries only happen on a per-layer basis.

@aaronlehmann thanks! Closing this.


Remove custom attribute on status in task list example

Custom attributes aren't currently supported on the status within the task list, only for the overall task list itself.
We could chose to support custom attributes on other elements within the task list (such as the status, title and hint) – but I'm not sure what the convention is for this across govuk-frontend?

@36degrees spotted this when working on the ruby implementation of the task list. Any thoughts on if/how custom attributes should be supported on lower-level elements within components?

Ah that's odd, Is it only the Ruby implementation that's affected?

Custom attributes aren't currently supported on the status within the task list…

I'm seeing the attributes being rendered here:
http://govuk-frontend-review.herokuapp.com/components/task-list/custom-attributes/preview

Forgot to add, it came up during code review to pass everything into govukTag(item.status.tag)

https://github.com/alphagov/govuk-frontend/pull/3951#discussion_r1260926518

Custom attributes
For comparison, form elements and hints always add the exact params including attributes
{{ govukHint({
  id: hintId,
  classes: params.hint.classes,
  attributes: params.hint.attributes,
  html: params.hint.html,
  text: params.hint.text
}) | indent(2) | trim }}

But the phase banner govukTag() only supports text, html and classes not attributes

@colinrotherham:

Ah that's odd, Is it only the Ruby implementation that's affected?

No, this is about the Nunjucks implementation.

Custom attributes aren't currently supported on the status within the task list…

I'm seeing the attributes being rendered here: http://govuk-frontend-review.herokuapp.com/components/task-list/custom-attributes/preview

That's only on overall list container, not the item status?
If we want to support custom attributes (as well as custom classes) on some or all of the item, status or title, then we'll have to update the Nunjucks macro, I think, and add some extra tests to cover it.
I think generally across the Design System, it's not super consistent whether sub-components will accept attributes in the nunjucks macros or not. I guess they’ve only been added where there’s been call for it?
The Summary List seems to accept attributes on the items, card and item, but not on rows, action.items, title or actions (all of which accept classes). 🤷

Opps I made a mistake - the attribute is being added to the tag, not the status, and there’s an existing test for it! 🤦   I somehow misread that completely.

Ah sorry @frankieroberto
Good points though regarding inconsistencies in passing params to nested components
Probably another reason a Nunjucks "merge objects" filter or global would be handy

https://github.com/alphagov/govuk-frontend/issues/995#issue-359364686
https://github.com/alphagov/govuk-frontend/pull/1172#issuecomment-460257465


[feat] Integrate new sources of data into generate_data.py

There are new sources of utxo, previous timestamps and timestamp median being developed in #208 and #210.
Your task is to integrate them into generate_data.py script:

previous timestamps from here should be used in this function
utxo data from here should be used here. Note that the utxo data returned by get_utxo_set from #208 is per block so you should pass relevant information to the resolve_outpoint from fetch_block .

Don't just overwrite existing functions, rather add a parameter to the script which will allow to fetch data in both ways.
Although this issue is blocked by #208, #210 you can start right now by mocking necessary inputs.

@lomasson I assigned you here, instead of #214 which is more suitable for a newcomer. Let me know if it is not ok for you.

@maciejka Yes i can this one, no pb

@lomasson please contact me on tg(@aundumla).

@lomasson see: #217

@lomasson and: #216


OneDrive API Share document for offline writing/updating

Hello.
I have created a web app which is making use of OneDrive API (https://docs.microsoft.com/en-us/onedrive/developer/rest-api/) to perform actions such as create/update/rename/delete of documents etc. I am authorizing requests with OAuth 2.0 (client side - that means every access token is valid for ~1h and then silently I am getting a new token) and then perform previous actions using that token.
I have a new requirement for the authorized user to share his/her documents for writing/updating them (I found out that API has option for inserting permissions (https://docs.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_invite).
Is it possible for a non-authenticated/ guest user to be able to write/update documents (programmatically - via OneDrive API or some other API?) that have been created from the authenticated user and shared these? (something that is similar to Microsoft Word online when a user is sharing his document and guest/non authorized users are able to edit it?
Thanks.

Is your scenario for OneDrive Consumer or OneDrive Business, or both?

hmm.. I don't think it's Business. It s a single page integrated with OneDrive via javascript calls .

Also, on Google cloud there is option for service accounts that solve that problem.
Is there something similar with Microsoft/ OneDrive?

Any update on that?
For Microsoft Office apps a guest user can edit/save a shared document. Can this be accomplished programmatically on OneDrive API?

It sounds like you may be able to create sharing links with edit permissions for the items you care about. You can use those links to call the API using the shares api, or users can use the link directly to get the web experience.

Yes this is clear for accessing shared items.. But is it also possible (any examples / documentation?)  to edit the content of the shared item (by a guest user)?

I guess that means there is no possible solution right?


Superscript not working in text fields

We will look into this.

Looks like CSS is missing, or style is broken.

Fixed via #1157


Tensor token_embed.weight has wrong shape

split from #2753

cc: @fotiecodes, opened an issue specific to your problem here

this should be fixed by #3044 assuming the model was created using the convert from safetensors feature

hey @mxyng  could you please explain what you mean or how it can be done, i am not so experienced in this and this is my first time creating a fine-tune from Llama2-7b.
In the main time, i completely uninstalled ollama from my mac and did a clean install converted and quantized the model with the following instructions at import.md. create a model file and tried to run it again but it still give me the same error.
Any idea how i can fix it?
I'd really appreciate some help:)
@BruceMacD

been stuck on this for days:(


:robot: Triggering CI on branch 'release-next' after synching to openshift/master

/retest

/retest

/lgtm

OCF Webhook is merging this PR


[WIP] Feature: git package verification

[x] verify that the installation is performed via --prefer-source
[x] scan installed packages and check each package's GPG signature
[x] find a better way to distinguish trusted vs valid signatures ( https://stackoverflow.com/questions/17371955/verifying-signed-git-commits/32038784#32038784 ) can't do until GIT 2.12
[x] use composer's API to discover package installation paths, rather than assuming vendor/*/*
[x] better exception messages (include signature key ID and email)
[ ] check for gpg and git commands existence and version
[x] move package to the Roave namespace
[x] code cleanup
[ ] document limitations
[ ] add Composer\Io messages at start/end of the process, making runtime of this plugin visible to the user
[ ] custom exception types

WOOP WOOP!
ocramius@ocramius-XPS-15-9560:~/Documents/roave/composer-gpg-verify$ ./vendor/bin/humbug

 _  _            _
| || |_  _ _ __ | |__ _  _ __ _
| __ | || | '  \| '_ \ || / _` |
|_||_|\_,_|_|_|_|_.__/\_,_\__, |
                          |___/
Humbug 1.0-dev

Humbug running test suite to generate logs and code coverage data...

   31 [==========================================================] 19 secs

Humbug has completed the initial test run successfully.
Tests: 31 Line Coverage: 96.67%

Humbug is analysing source files...

Mutation Testing is commencing on 5 files...
(.: killed, M: escaped, S: uncovered, E: fatal error, T: timed out)

........................................

40 mutations were generated:
      40 mutants were killed
       0 mutants were not covered by tests
       0 covered mutants were not detected
       0 fatal errors were encountered
       0 time outs were encountered

Metrics:
    Mutation Score Indicator (MSI): 100%
    Mutation Code Coverage: 100%
    Covered Code MSI: 100%

Remember that some mutants will inevitably be harmless (i.e. false positives).

Time: 15.53 seconds Memory: 4.00MB
Humbug results are being logged as JSON to: humbuglog.json
Humbug results are being logged as TEXT to: humbuglog.txt

Since I was banging my head on it without figuring out the issues around travis-ci not running the installation examples, just posting it here for reference: master is used to discover the package name, but master right now looks like this. That bit will only work after merge.

GROAN.


Slide component doesn't work with React.PropsWithChildren

Trying to use React.PropsWithChildren with slide component, yet the children is only allowed to be undefined, ReactElement<any, any> not null.

[x] The issue is present in the latest release. ( version: 5.0.0-beta.5)
[x] I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

import Slide from '@material-ui/core/Slide'
import type { TransitionProps } from '@material-ui/core/transitions'
import type { PropsWithChildren, Ref } from 'react'
import { forwardRef } from 'react'

const Transition = forwardRef((
  props: PropsWithChildren<TransitionProps>,
  ref: Ref<unknown>,
) => <Slide direction='up' ref={ref} {...props} />)
Transition.displayName = 'Transition'

Expected Behavior 🤔
I was expecting Slide to expect null as a children, so It should be working properly with PropsWithChildren.
Since it supports undefined, so it seems like it should be working with null as well.
Steps to Reproduce 🕹

https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBAZQDbACYFM4DMoRHAcgAEQBDGdKYUpAWgFdgB6AY2nSeTXQIChRIsODACeYTAG84AFSikAdgGdgMYBHkAFXGEVwAvtlz5iZClRoNmbKBxhylKtUr4Do8UeLhStEHQHUVAAsAYUDgJFQbeQAaOAAldCx9QzxCG1IWGBdwNy9saAB3UihUBKSDHFSCdMy+XjYleFkFZVV1OABefKgikrKACn7eODgwbUUALjgffyDQ8Mj0eQAeZoc2zXGAPmjhuBssKbLl+nkAa3kIAvkd3gBKTq24Za4MOFRgG0ynDoJ6MAI+0SHQkBwMEgAdFCxr5FAYmFs7rw1q0nBCPoowEhSCIAHKkECYLoEFGOdQEIA
Steps:
none; you can see the type error in the above sandbox's link.
Context 🔦

Give children to my props using modern React typing and avoid any
Your Environment 🌎

`npx @material-ui/envinfo`
System:
    OS: Windows 10 10.0.19043
  Binaries:
    Node: 16.1.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.5 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 7.12.1 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: Not Found
    Edge: Spartan (44.19041.1023.0), Chromium (92.0.902.84)
  npmPackages:
    @emotion/react: ^11.4.1 => 11.4.1
    @emotion/styled: ^11.3.0 => 11.3.0
    @material-ui/core: ^5.0.0-beta.5 => 5.0.0-beta.5
    @material-ui/icons: ^5.0.0-beta.5 => 5.0.0-beta.5
    @material-ui/lab: ^5.0.0-alpha.44 => 5.0.0-alpha.44
    @material-ui/private-theming:  5.0.0-beta.5
    @material-ui/styled-engine:  5.0.0-beta.5
    @material-ui/styles: ^5.0.0-beta.4 => 5.0.0-beta.4
    @material-ui/system:  5.0.0-beta.5
    @material-ui/types:  6.0.2
    @material-ui/unstyled:  5.0.0-alpha.44
    @material-ui/utils:  5.0.0-beta.5
    @types/react: ^17.0.19 => 17.0.19
    react: ^17.0.2 => 17.0.2
    react-dom: ^17.0.2 => 17.0.2
    typescript: ^4.4.2 => 4.4.2

PropsWithChildren types children as React.ReactNode. However, Slide requires exactly one React.ReactElement which is narrower than React.ReactNode. The type error is intended to prevent e.g. <Transition>test</Transition>.

I was expecting Slide to expect null as a children

Why did you expect that? The documentation for Slide should imply that null is not allowed since null is not a ReactElement.

With that in mind, should a Slide's children be non-optional instead?

Yep, good catch. We're currently missing this in the type declarations and propTypes. Probably in most transition components


All queues to get a number

A comment to be attached to the queue name values in QueueNameType for associating each name with a queue number.

Fixed with QosProfile_1.0.0-tsp.220405.1620.


start CI with github actions for linux and osx using conda

as suggested in #181 , it would be nice to have a CI in github

It is fine now, the CI is passing on my fork. I run the build, install, test for linux and osx for release and debug. You can squash the commits together when merging.


SentimentAnalysis::score() does not do what it says

Like a lot of API, this library computes the "chances" of the statement being positive, neutral and negative. For example, scores() can return:
@example ['negative' => 0.5, 'neutral' => 0.25, 'positive' => 0.25]
So, you would expect the score() function in this case to be less than 0.5 (ie. negative). It says:
    /**
     * Get the confidence of a decision for a result. The closer to 1, the better.
     *
     * @param string $string The given sentence
     *
     * @return float The confidence of a decision for a result. The close to 1, the better
     */

However looking at the code:
    public function score($string)
    {
        $scores = $this->scores($string);
        return max($scores);
    }

one can see that this will simply return 0.5, suggesting the score is "neutral".

Hey,
For me it does what it says. It is supposed to give the confidence of a decision for a result. You can therefore use the score to determine if the classification is reliable enough for you. You can have a confidence threshold (maybe 0.7?) under which you will not take any decision, and have it you will take into account the classification.
Is it better?

I guess I misunderstood the comments. Thanks for the clarification.