When setting up hostie token gateway,  Account was locked after 5 getContactInfo call within a second.

Important：Please file the issue follow the template, or we won't be able to help you to solve the problem.

I am following the document to [setup Hostie gateway with my padplus token] (https://github.com/wechaty/wechaty/issues/1985).  After scanned the QR code, the wechat account was locked.  Attached steps and logs as below.
ps: The same token can be used in  with ding-dong-bot in nodejs project with no issue.
0. Report Issue Guide

Please run the following command and check whether the problem has been fixed：
rm -rf package-lock.json
rm -rf node_modules
npm install

Using lastest wechaty docker version.
docker images | grep wechaty
wechaty/wechaty                                                  latest              293d5affb07a        10 days ago         1.74GB

Please search in FAQ List first, and make sure your problem has not been solved before.

Done

Please search in the issue first, and make sure your problem had not been reported before

Done
1. Versions

What is your wechaty version?

Answer:
Use latest Docker version
docker images | grep wechaty
wechaty/wechaty                                                  latest              293d5affb07a        10 days ago         1.74GB

Which puppet are you using for wechaty? (hostie/puppeteer/padchat/...)

Answer:
v10.17.0

What is your node version? (run node --version)

Answer:

What os are you using

Answer:
Mac OSX
2. Describe the bug

Give a clear and concise description of what the bug is.

I am following the document to [setup Hostie gateway with my padplus token] (https://github.com/wechaty/wechaty/issues/1985).  After scaned the QR code, the wechat account was locked.  Attached steps and logs as below.
3. To Reproduce

This part is very important: if you can not provide any reproduce steps, then the problem will be very hard to be recognized.

How to create a Minimal, Reproducible Example
Steps to reproduce the behavior:

set up env variables and run docker image.  It is successful. and prompt the QR code
Open the QR code image and scan by wechat
Account login and a few seconds, the account is banned.

4. Expected behavior
Shall be able to login and not get account banned.
5. Actual behavior

If applicable, add screenshots to help explain your problem. But do not paste log screenshots here.

6. Full Output Logs

Set env WECHATY_LOG=silly in order to set log level to silly, then we can get the full log (If you dosen't set log env, log level is info as default, we cannot get the full log)

We need full log instead of log screenshot or log fragments!

Show Logs

$ WECHATY_LOG=silly node yourbot.js

-> PASTE YOUR FULL(DO NOT ONLY PROVIDE FRAGMENTS) LOG MESSAGES HERE

➜  hostie_docker ./docker_start.sh

 __        __        _           _
 \ \      / /__  ___| |__   __ _| |_ _   _
  \ \ /\ / / _ \/ __| '_ \ / _` | __| | | |
   \ V  V /  __/ (__| | | | (_| | |_| |_| |
    \_/\_/ \___|\___|_| |_|\__,_|\__|\__, |
                                     |___/
____________________________________________________
            https://www.chatie.io
  ____                            _   _
 / ___|___  _ __  _ __   ___  ___| |_(_)_ __   __ _
| |   / _ \| '_ \| '_ \ / _ \/ __| __| | '_ \ / _` |
| |__| (_) | | | | | | |  __/ (__| |_| | | | | (_| |
 \____\___/|_| |_|_| |_|\___|\___|\__|_|_| |_|\__, |
                                              |___/
  ____ _           _   ____        _
 / ___| |__   __ _| |_| __ )  ___ | |_ ___
| |   | '_ \ / _` | __|  _ \ / _ \| __/ __|
| |___| | | | (_| | |_| |_) | (_) | |_\__ \
 \____|_| |_|\__,_|\__|____/ \___/ \__|___/

WECHATY Environment Variables: 6
WECHATY_TOKEN=xxxx
WECHATY_DOCKER=1
WECHATY_PUPPET_PADPLUS_TOKEN=xxxx
WECHATY_LOG=verbose
WECHATY_PUPPET=wechaty-puppet-padplus
WECHATY_HOSTIE_PORT=8788

Starting Docker Container for Wechaty v0.46.4 with Node.js v12.18.3 ...
   ____ _           _   _        _
  / ___| |__   __ _| |_(_) ___  (_) ___
 | |   | '_ \ / _` | __| |/ _ \ | |/ _ \
 | |___| | | | (_| | |_| |  __/_| | (_) |
  \____|_| |_|\__,_|\__|_|\___(_)_|\___/

     _         _   _     _               ____
    / \  _   _| |_| |__ (_)_ __   __ _  | __ ) _   _ _
   / _ \| | | | __| '_ \| | '_ \ / _` | |  _ \| | | (_)
  / ___ \ |_| | |_| | | | | | | | (_| | | |_) | |_| |_
 /_/   \_\__,_|\__|_| |_|_|_| |_|\__, | |____/ \__, (_)
                                 |___/         |___/

WECHATY_TOKEN=xxxx

/wechaty ~

><EMAIL_ADDRESS>io-client /wechaty
> ts-node bin/io-client

10:51:15 INFO Config registering process.on("unhandledRejection") for development/debug
10:51:15 VERB Config constructor()

| __        __        _           _
| \ \      / /__  ___| |__   __ _| |_ _   _
|  \ \ /\ / / _ \/ __| '_ \ / _` | __| | | |
|   \ V  V /  __/ (__| | | | (_| | |_| |_| |
|    \_/\_/ \___|\___|_| |_|\__,_|\__|\__, |
|                                     |___/

=============== Powered by Wechaty ===============
       -------- https://www.chatie.io --------

My super power: download cloud bot from www.chatie.io

__________________________________________________

10:51:17 INFO Client Starting for WECHATY_TOKEN: xxxx
10:51:17 VERB Wechaty constructor()
10:51:17 VERB StateSwitch constructor(Wechaty, "{"log":{"enableTimestamp":true,"logLevel":4,"prefixFilter":{}}}")
10:51:17 VERB StateSwitch constructor(WechatyReady, "{"log":{"enableTimestamp":true,"logLevel":4,"prefixFilter":{}}}")
10:51:17 VERB IoClient constructor({xxxx, wechaty:Wechaty#ckdwyyayo000015o895xjc14p<>(), port:8788})
10:51:17 VERB StateSwitch constructor(IoClient, "{"log":{"enableTimestamp":true,"logLevel":4,"prefixFilter":{}}}")
10:51:17 VERB IoClient start()
10:51:17 VERB StateSwitch <IoClient> on(pending) <- (false)
10:51:17 VERB IoClient initWechaty()
10:51:17 VERB Wechaty on(login, listener) registering... listenerCount: 0
10:51:17 VERB Wechaty on(logout, listener) registering... listenerCount: 0
10:51:17 VERB Wechaty on(message, listener) registering... listenerCount: 0
10:51:17 VERB Wechaty on(scan, listener) registering... listenerCount: 0
10:51:17 VERB IoClient startIo() with token xxxx
10:51:17 VERB StateSwitch constructor(Io, "{"log":{"enableTimestamp":true,"logLevel":4,"prefixFilter":{}}}")
10:51:17 VERB Io instantiated with apihost[api.chatie.io], token[xxxx], protocol[io|0.0.1], cuid[ckdwyyayo000015o895xjc14p]
10:51:17 VERB Io start()
10:51:17 VERB StateSwitch <Io> on(pending) <- (false)
10:51:17 VERB Io initEventHook()
10:51:17 VERB Wechaty on(error, listener) registering... listenerCount: 0
10:51:17 VERB Wechaty on(heartbeat, listener) registering... listenerCount: 0
10:51:17 VERB Wechaty on(login, listener) registering... listenerCount: 1
10:51:17 VERB Wechaty on(logout, listener) registering... listenerCount: 1
10:51:17 VERB Wechaty on(message, listener) registering... listenerCount: 1
10:51:17 VERB Wechaty on(scan, listener) registering... listenerCount: 1
10:51:17 VERB Io initWebSocket()
10:51:18 VERB Io initWebSocket() connected with protocol [io|0.0.1|ckdwyyayo000015o895xjc14p]
10:51:18 VERB Wechaty on(scan, listener) registering... listenerCount: 2
10:51:18 VERB StateSwitch <Io> on(true) <- (pending)
10:51:18 VERB Wechaty <wechaty-puppet-padplus>(xxxx) start() v0.46.4 is starting...
10:51:18 VERB Wechaty id: ckdwyyayo000015o895xjc14p
10:51:18 VERB StateSwitch <WechatyReady> off(true) <- (true)
10:51:18 VERB StateSwitch <Wechaty> on(pending) <- (false)
10:51:18 VERB MemoryCard constructor("xxxx")
10:51:18 VERB MemoryCard getStorage() for storage type: N/A
10:51:18 VERB getStorage name: xxxx, options: {"type":"file"}
10:51:18 VERB StorageFile constructor(xxxx, ...)
10:51:18 VERB StorageBackend constructor(xxxx, { type: file })
10:51:18 VERB MemoryCard load() from storage: StorageFile</wechaty/xxxx.memory-card.json>
10:51:18 VERB StorageFile load() from /wechaty/xxxx.memory-card.json
10:51:18 VERB MemoryCard load() file not exist, NOOP
10:51:18 VERB Wechaty initPuppet()
10:51:18 VERB MemoryCard multiplex(puppet)
10:51:18 VERB MemoryCard static multiplex(MemoryCard<xxxx>, puppet)
10:51:18 VERB MemoryCard constructor({"name":"xxxx","multiplex":{"name":"puppet","parent":{"options":{"name":"xxxx"},"name":"xxxx","payload":{},"multiplexNameList":[],"storage":{"name":"xxxx","options":{"type":"file"},"absFileName":"/wechaty/xxxx.memory-card.json"}}}})
10:51:18 VERB PuppetManager resolve({puppet: wechaty-puppet-padplus, puppetOptions: undefined})
10:51:18 VERB PuppetManager resolveName(wechaty-puppet-padplus)
10:51:18 VERB PuppetManager checkModule(wechaty-puppet-padplus)
10:51:19 VERB Puppet constructor({}) #0
10:51:19 VERB StateSwitch constructor(PuppetPadplus, "{"log":{"enableTimestamp":true,"logLevel":4,"prefixFilter":{}}}")
10:51:19 VERB MemoryCard constructor(undefined)
10:51:19 VERB MemoryCard getStorage() for storage type: N/A
10:51:19 VERB MemoryCard load() from storage: N/A
10:51:19 VERB MemoryCard load() no storage
10:51:19 VERB Puppet constructor() watchdog timeout set to 60 seconds
10:51:19 VERB HotImport callerResolve(., /wechaty/node_modules/wechaty-puppet/dist/src/puppet.js)
10:51:19 VERB Puppet constructor() childClassPath=/wechaty/node_modules/wechaty-puppet-padplus/dist/src
10:51:19 VERB PadplusManager constructor()
10:51:19 VERB Puppet constructor() memory.load() done
10:51:19 VERB Puppet setMemory()
10:51:19 VERB Wechaty initPuppetEventBridge(Puppet#0<PuppetPadplus>(xxxx))
10:51:19 VERB Wechaty initPuppetEventBridge() puppet.on(friendship) (listenerCount:0) registering...
10:51:19 VERB Wechaty initPuppetEventBridge() puppet.on(login) (listenerCount:0) registering...
10:51:19 VERB Wechaty initPuppetEventBridge() puppet.on(logout) (listenerCount:0) registering...
10:51:19 VERB Wechaty initPuppetEventBridge() puppet.on(message) (listenerCount:0) registering...
10:51:19 VERB Wechaty initPuppetEventBridge() puppet.on(room-invite) (listenerCount:0) registering...
10:51:19 VERB Wechaty initPuppetEventBridge() puppet.on(room-join) (listenerCount:0) registering...
10:51:19 VERB Wechaty initPuppetEventBridge() puppet.on(room-leave) (listenerCount:0) registering...
10:51:19 VERB Wechaty initPuppetEventBridge() puppet.on(room-topic) (listenerCount:0) registering...
10:51:19 VERB Wechaty initPuppetEventBridge() puppet.on(scan) (listenerCount:0) registering...
10:51:19 VERB Wechaty initPuppetEventBridge() puppet.on(dong) (listenerCount:0) registering...
10:51:19 VERB Wechaty initPuppetEventBridge() puppet.on(error) (listenerCount:0) registering...
10:51:19 VERB Wechaty initPuppetEventBridge() puppet.on(heartbeat) (listenerCount:1) registering...
10:51:19 VERB Wechaty initPuppetEventBridge() puppet.on(ready) (listenerCount:0) registering...
10:51:19 VERB Wechaty initPuppetEventBridge() puppet.on(reset) (listenerCount:1) registering...
10:51:19 VERB Wechaty wechatifyUserModules(Puppet#0<PuppetPadplus>(xxxx))
10:51:19 INFO PuppetPadplus start()
10:51:19 VERB StateSwitch <PuppetPadplus> on(pending) <- (false)
10:51:19 VERB PadplusManager on(scan, function) registered
10:51:19 VERB PadplusManager on(login, function) registered
10:51:19 VERB PadplusManager on(message, function) registered
10:51:19 VERB PadplusManager on(ready, function) registered
10:51:19 VERB PadplusManager on(reset, function) registered
10:51:19 VERB PadplusManager on(heartbeat, function) registered
10:51:19 VERB PadplusManager on(logout, function) registered
10:51:19 VERB PadplusManager on(room-leave, function) registered
10:51:19 VERB PadplusManager on(error, function) registered
10:51:20 VERB MemoryCard <puppet> get(WECHATY_PUPPET_PADPLUS)
10:51:20 VERB MemoryCard <puppet> get(WECHATY_PUPPET_PADPLUS)
10:51:20 VERB StateSwitch <PuppetPadplus> on(true) <- (pending)
10:51:20 VERB Wechaty on(heartbeat, listener) registering... listenerCount: 1
10:51:20 VERB StateSwitch <Wechaty> on(true) <- (pending)
10:51:20 VERB IoClient startHostie()
10:51:20 VERB PuppetServer constructor({endpoint: "<IP_ADDRESS>:8788", puppet: "Puppet#0<PuppetPadplus>(xxxx)", token: "xxxx"})
10:51:20 VERB PuppetServer start()
10:51:20 VERB EventStreamManager constructor(Puppet#0<PuppetPadplus>(xxxx))
10:51:20 VERB StateSwitch <IoClient> on(true) <- (pending)
10:51:23 VERB PadplusManager setContactAndRoomData() can not proceed due to no cache.
10:51:23 INFO IoClient [2] http://weixin.qq.com/x/YdclPiJVXLwHjP5Ixv-I]
Online QR Code Image: https://wechaty.github.io/qrcode/http://weixin.qq.com/x/YdclPiJVXLwHjP5Ixv-I
10:51:48 VERB PadplusManager setContactAndRoomData() can not proceed due to no cache.
10:51:48 INFO PadplusManager
            =================================================
            QRCODE_SCAN MSG : 已扫码，请在手机端确认登陆...
            =================================================

10:51:48 INFO IoClient [3] ]
Online QR Code Image: https://wechaty.github.io/qrcode/
10:51:50 INFO PadplusManager
            =================================================
            QRCODE_SCAN MSG : 已确认
            =================================================

10:51:50 INFO IoClient [4] ]
Online QR Code Image: https://wechaty.github.io/qrcode/
10:51:52 VERB MemoryCard <puppet> set(WECHATY_PUPPET_PADPLUS, [object Object])
10:51:52 VERB MemoryCard <xxxx> save() to StorageFile</wechaty/xxxx.memory-card.json>
10:51:52 VERB StorageFile save() to /wechaty/xxxx.memory-card.json
10:51:52 VERB PadplusManager init cache manager
10:51:52 VERB CacheManager init()
10:51:52 VERB CacheManager initCache(wxid_37gn4v1xgwvf22,{"baseDir":"/wechaty","type":"flashStore"})
10:51:52 VERB CacheManager initCache() inited [object Promise] Contacts,  cachedir="/bot/.wechaty/puppet-padplus-cache/flash-store-v0.14/"
10:51:52 VERB Puppet login(wxid_37gn4v1xgwvf22)
10:51:52 VERB Contact load(wxid_37gn4v1xgwvf22) init pool
10:51:52 VERB PadplusContact syncContacts()
10:51:52 VERB ContactSelf name()
10:51:52 INFO IoClient 無名 logged in
**10:51:53 VERB PadplusContact getContactInfo(weixin)
10:51:53 VERB PadplusContact getContactInfo(weixin)
10:51:53 VERB PadplusContact getContactInfo(weixin)
10:51:53 VERB PadplusContact getContactInfo(weixin)
10:51:53 VERB PadplusContact getContactInfo(weixin)
10:51:54 VERB PadplusContact getContactInfo(weixin)
10:51:54 INFO PuppetPadplus logout(true, 为了你的帐号安全，请重新登录。)**
10:51:54 VERB Puppet selfId()
10:51:54 VERB Puppet reset(padplus reset)
10:51:54 VERB ContactSelf name()
10:51:54 INFO IoClient 無名 logged out
10:51:54 INFO PuppetPadplus stop()
10:51:54 VERB StateSwitch <PuppetPadplus> off(pending) <- (false)
10:51:54 INFO PuppetPadplus logout(true, logout in wechaty)
10:51:54 VERB PadplusContact getContactInfo(weixin)
10:51:54 VERB PadplusContact getContactInfo(weixin)
10:51:54 VERB PadplusContact getContactInfo(weixin)
10:51:54 VERB PadplusContact getContactInfo(weixin)
10:51:55 VERB PadplusContact getContactInfo(weixin)
10:51:55 VERB PadplusContact getContactInfo(weixin)
10:51:55 VERB PadplusContact getContactInfo(weixin)
10:51:55 VERB PadplusContact getContactInfo(weixin)
10:51:58 ERR Config ###########################
10:51:58 ERR Config unhandledRejection: Error: get contact timeout
    at Timeout._onTimeout (/wechaty/node_modules/wechaty-puppet-padplus/src/padplus-manager/padplus-manager.ts:1169:47)
    at listOnTimeout (internal/timers.js:549:17)
    at processTimers (internal/timers.js:492:7) [object Promise]
10:51:58 ERR Config ###########################
10:51:58 ERR Config process.on(unhandledRejection) promise.catch(get contact timeout)
Config Error: get contact timeout
    at Timeout._onTimeout (/wechaty/node_modules/wechaty-puppet-padplus/src/padplus-manager/padplus-manager.ts:1169:47)
    at listOnTimeout (internal/timers.js:549:17)
    at processTimers (internal/timers.js:492:7)

7. Additional context

Add any other context about the problem here.

The same token can be used in  with ding-dong-bot in nodejs project with no issue.
From the log,  after the login,  the bot issues 5 getContactInfo call within a second.  And the account is locked after that. This may be suspicious to wechat, and might be the cause of the ban.
10:51:53 VERB PadplusContact getContactInfo(weixin)
10:51:53 VERB PadplusContact getContactInfo(weixin)
10:51:53 VERB PadplusContact getContactInfo(weixin)
10:51:53 VERB PadplusContact getContactInfo(weixin)
10:51:53 VERB PadplusContact getContactInfo(weixin)
10:51:54 VERB PadplusContact getContactInfo(weixin)
10:51:54 INFO PuppetPadplus logout(true, 为了你的帐号安全，请重新登录。)

I'm sorry to hear that!

ps: The same token can be used in with ding-dong-bot in nodejs project with no issue.

However, I believe the #1985 is doing exactly the same thing no matter than you are using a Token Gateway server or not, because the token gateway server is using nodejs as it's implementation.
You'll agree with me after you inspect the source code of it.

After a few days,  I retried the same account, with the same version and steps.  It is working in hostie gateway.  I suspect it is due to the account status in wechat.
Maybe related to this advice,  but not 100% sure.  Anyway I will close this issue for now
https://github.com/juzibot/Welcome/wiki/Everything-about-Wechaty#53padplus-项目地址基于ipad协议
因为微信风控策略调整，可能会导致部分账号无理由下线。
如果发生掉线，需要扫码重新登录，然后无操作养号一天，第一天晚上如果再次掉线，第二天再扫码登录，再养号一天，然后即可按照之前规则正常使用。
为了降低封号风险，我们提醒各位用户，近期适度减少主动营销行为

Glad to know that it works for you now, cheers!


Support loading custom bpf programs through the jsonc configuration

Enable a user to load their own bpf program on the interface being used for AF_XDP.
Note: this is partially enabled through the bpf map pinning support. Perhaps Also document this better to allow the end user to use whatever their preferred BPF loader is.

This is enabled through the pinned map support that's been merged to CNDP. Demonstrated in the cndp-frr demo. As such I will mark this feature as closed


feature: allow for decoding of unknown types

Is it currently possible to decode an unknown CBOR type?
That is to say, with prior knowledge of a set of possible encoded types, is it possible to decode the CBOR blob without knowing which type it is?
I'm using CBOR for a wire protocol where each CBOR blob is length prefixed. However the CBOR blobs are of unknown type... but they are certainly of one of the types in a known set of types. What I want is somewhat akin to the golang switch type assertion.

@david415 thanks for opening this issue.

Is it currently possible to decode an unknown CBOR type?

Yes.  You can decode CBOR data to empty interface interface{} and then use type switch to handle different types.
Decoding tagged CBOR data to empty interface
CBOR tag is tag number + tag content.  Tag number is a positive integer.  Tag content is an encoded CBOR blob.  Tag number is used to give tag content additional meaning.  In this case, you can use tag number to indicate encoded type.
When decoder is registered with tag number and Go type, decoder decodes tagged CBOR data to registered Go type.
// Create TagSet with tag number and Go type
tags := cbor.NewTagSet()
err := tags.Add(
    cbor.TagOptions{EncTag: cbor.EncTagRequired, DecTag: cbor.DecTagRequired},
    reflect.TypeOf(MyType{}),    // your custom type
    MyTypeCBORTagNumber,         // CBOR tag number for your custom type
)

// Create decoding mode with TagSet
dm, err := cbor.DecOptions{}.DecModeWithTags(tags)

// Decode unknown CBOR blob
var v interface{}
err = dm.Unmarshal(b, &v)

// Use type switch to handle different types
switch v := v.(type) {
case MyType:  // custom type
    ...
default:
    ...
}

Decoding not tagged CBOR data to empty interface
Decoder decodes not tagged CBOR data to boilerplate Go types.  Please refer to Unmarshal documentation for more details.
// Decode unknown CBOR blob
var v interface{}
err := cbor.Unmarshal(b, &v)

// Use type switch to handle different types
switch v := v.(type) {
case []interface{}:                // boilerplate Go type for CBOR array
    ...
case map[interface{}]interface{}:  // boilerplate Go type for CBOR map
    ...
default:
    ...
}

I'm using CBOR for a wire protocol where each CBOR blob is length prefixed. However the CBOR blobs are of unknown type... but they are certainly of one of the types in a known set of types. What I want is somewhat akin to the golang switch type assertion.

Many CBOR based protocols, such as COSE and CWT, use CBOR tags to flag content types.  I think it would be easier and cleaner if CBOR tags can be used in this case.
Please let me know if it works for you.

Thanks! That first code example was exactly what I was looking for. I did recently make my code work with a wrapping struct type... but using tags is certainly a lot nicer. I think we can close this ticket since it sufficiently documents how to use this feature.

Hey @fxamacker,
I am trying to reproduce what you described here.
type Transaction struct {
	Value any
}

func transactionCBORTags() (cbor.TagSet, error) {
	ts := cbor.NewTagSet()

	types := []struct {
		reflectType reflect.Type
		txType      TransactionType
	}{
		{
			reflect.TypeOf(DeclareTransaction{}),
			Declare,
		},
		{
			reflect.TypeOf(DeployTransaction{}),
			Deploy,
		},
		{
			reflect.TypeOf(InvokeTransaction{}),
			Invoke,
		},
	}

	for _, aType := range types {
		err := ts.Add(
			cbor.TagOptions{EncTag: cbor.EncTagRequired, DecTag: cbor.DecTagRequired},
			aType.reflectType,
			// https://www.iana.org/assignments/cbor-tags/cbor-tags.xhtml
			// 65536-15309735 	Unassigned
			65536+uint64(aType.txType),
		)
		if err != nil {
			return ts, err
		}
	}

	return ts, nil
}

func (t *Transaction) MarshalCBOR() ([]byte, error) {
	if tags, err := transactionCBORTags(); err != nil {
		return nil, err
	} else if enc, err := cbor.CanonicalEncOptions().EncModeWithTags(tags); err != nil {
		return nil, err
	} else {
		return enc.Marshal(t.Value)
	}
}

func (t *Transaction) UnmarshalCBOR(data []byte) error {
	if tags, err := transactionCBORTags(); err != nil {
		return err
	} else {
		dec, err := cbor.DecOptions{}.DecModeWithTags(tags)
		if err != nil {
			return err
		}

		return dec.Unmarshal(data, t.Value)
	}
}

But after UnmarshalCBOR t.Value ends up being a cbor.Tag I was expecting it to be one of the types in transactionCBORTags. Am I missing something here? Thanks!
expected: core.Transaction(core.Transaction{Value:core.DeployTransaction{ContractAddressSalt:(*felt.Felt)(0xc0000d8ba0), ContractAddress:(*felt.Felt)(0xc0000d8b80), Class:core.Class{APIVersion:(*felt.Felt)(nil), Externals:[]core.EntryPoint(nil), L1Handlers:[]core.EntryPoint(nil), Constructors:[]core.EntryPoint(nil), Builtins:[]*felt.Felt(nil), ProgramHash:(*felt.Felt)(nil), Bytecode:[]*felt.Felt(nil)}, ConstructorCallData:[]*felt.Felt{(*felt.Felt)(0xc0000d8bc0), (*felt.Felt)(0xc0000d8be0), (*felt.Felt)(0xc0000d8c00), (*felt.Felt)(0xc0000d8c20), (*felt.Felt)(0xc0000d8c40)}, CallerAddress:(*felt.Felt)(0xc0000d8c60), Version:(*felt.Felt)(0xc0000d8c80)}})
actual  : cbor.Tag(cbor.Tag{Number:0x10001, Content:map[interface {}]interface {}{"CallerAddress":[]interface {}{0x0, 0x0, 0x0, 0x0}, "Class":map[interface {}]interface {}{"APIVersion":interface {}(nil), "Builtins":interface {}(nil), "Bytecode":interface {}(nil), "Constructors":interface {}(nil), "Externals":interface {}(nil), "L1Handlers":interface {}(nil), "ProgramHash":interface {}(nil)}, "ConstructorCallData":[]interface {}{[]interface {}{0xda916bfd882dd42b, 0x9c4585d186f2d4bd, 0x71cba698f15a4fed, 0xc751deb1d413e6}, []interface {}{0xc797bef5653f44fa, 0x666b58474fbd32e8, 0x3d1f703ac6cac73c, 0x1d82c96c08a21fc}, []interface {}{0xffffffffffffffc1, 0xffffffffffffffff, 0xffffffffffffffff, 0x7fffffffffffbd0}, []interface {}{0x7e8bf9c0391cdecd, 0xa9b31a178fffc54c, 0x934c56ec03a4ab9b, 0x29b690d37e1ca7a}, []interface {}{0x369c9ec7d94a62c7, 0x5eab02988056eccf, 0x8ea4c24f310eead3, 0x19d74d80d073ec1}}, "ContractAddress":[]interface {}{0x3def68e3f99fba4d, 0x259a461dbe85aef7, 0xd573b8811ab8727d, 0x761cb960196403a}, "ContractAddressSalt":[]interface {}{0xc99f9d6ecf083ff1, 0xc676a0d2f3c398f9, 0xf78347edfd46d8ab, 0x1e1149897d65d99}, "Version":[]interface {}{0x0, 0x0, 0x0, 0x0}}})

Got it working this way


feat: enable running nginx containers with read-only root fs

Refs #172

@ne20002 @enibache This PR enables the use of read-only root fs. It's certainly not perfect but I din't want to rewrite the entire build setup and documentation. So for now you can run this image as follows with Docker:
docker run \
  --rm \
  --readonly \
  --tmpfs /etc/nginx:rw,mode=777 \
  --tmpfs /etc/modsecurity.d:rw,mode=777 \
  --tmpfs /opt/owasp-crs:rw,mode=777 \
  --tmpfs /tmp:rw,mode=777 \
  --tmpfs /var/cache/nginx:rw,mode=777 \
  owasp/modsecurity-crs:nginx
```bash
The container will copy files at startup to those `tmpfs` directories. In writeble root fs mode, the container behaves the same as before, in read-only mode, the `tmpfs` are required and the files will be copied there.

I'd appreciate some feedback.

You can build the image from this PR with (for example):
```bash
docker buildx bake --load --set "*.platform=linux/amd64" nginx

Sorry. I'm still fiddling with the 3.3.5 and can't get my exclusion for local ips get to work. Also, it seems as if there is no version 4 docker image available at hub.docker.com. I'd need to get it working first before I try to use it with a readonly setup.

Thanks for the hint @ne20002. We thought we had published the images but really didn't. I've created the PR to fix that.

@ne20002 The 4.0 images are now available.

Well, I don't want to merge this without proper testing. Unless we create a root-only image variant, so that the other images continue to work. Maybe that would be the better approach anyway?

Hi @theseion
I'm currently a bit busy. I got my Friendica setup working so far (still a few things to opimize) and will continue to update my Nextcloud setup (which seems to have a number of changes with the new plugin mechanism).


feat(github): github added to footer

Fixes #4028
Describe the changes you have made in this PR -
added a github repository link in footer
Screenshots of the changes (If any) -

Note: Please check Allow edits from maintainers. if you would like us to assist in the PR.

@harshsharma-11 remove the background of github logo, as that will not look good in dark background

@tachyons please kindly review the pr as discuss in #4028

cc@tachyons

cc @tachyons

update this image in PR description as well

@tachyons @Arnabdaz please check i made bg transparent


Support specifying release via cli

I'd like to support specifying the release version string via CLI, because I want to build the same project for multiple different distributions, and include a distribution tag in the release, e.g 1.el7 or 2.fc35.
But I want my Cargo.toml to remain distro-agnostic - I currently have to edit Cargo.toml and revert before each build to achieve this.

Thank you, but I have received similar requests a lot in the past, so I'm considering introducing a more general configuration method #36  and then, if necessary, a simplified option.

reject by #36. Use the command line option -s 'release = "1.el7"' instead.


Can't respond to requests in the past

Subject: Can't respond to requests in the past
Description:
Missed a request.
Results:
I know it's not technically a bug but I don't like the fact that I can't respond to a couchsurfing request that I missed simply because "it's in the past". And I don't want to send a friend request just for that.
Backend version: develop-d04e9dbe
Frontend version: develop-d04e9dbe
User Agent: Mozilla/5.0 (Android 11; Mobile; rv:92.0) Gecko/92.0 Firefox/92.0
Page: https://app.couchers.org/messages/request/706
User: tomas (368)

I don't think there's much to action on here, given that host request will eventually be re-designed @lucaslcode?


doc/4: Added design

Closes #4

A general question, why JS in the backend? And what are the implications of using Json?


User info popup

Work started in commit https://github.com/fourtf/chatterino2/commit/b010d90689c0a61af44ebf50ef5175e73640d2c2


.NET 2.1.003 Breaking continuous delivery to azure app service

.NET 2.1.003 Breaking continuous delivery
I've been developing a project using asp.net core 2.0, I'm using CI/CD from VSTS today I pushed changes that triggered the CI/CD. Everything was successful, but when I trying to access my appservice it was throwing a HTTP Error 502.5 - Process Failure.
Afte looking into the "Diagnostics and solve problems" section of the app service in azure portal I find out that the application was faling to start. I headed to the Advanced tools section, in here I found the site\wwwroot folder of my app and ran the command that was failing in order to see the complete error message.
D:\home\site\wwwroot>dotnet API.dll
Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'Microsoft.AspNetCore.Hosting.Abstractions, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
at API.Program.Main(String[] args)
Then I checked the runtime version using:
D:\home\site\wwwroot>dotnet --version
2.1.300
Workaround
After checking this, I installed the new SDK and upgraded my ASP.NET Core API project to 2.1 and updated all my nuget references, then just push another CI/CD and my issue was fixed.

@natemcmaster @muratg

What did your project look like before you upgraded to 2.1? Can you share a minimal repro?

Sorry for the late reply, the code where this issue happen can't be shared due to a privacy agreement with the company I work for. In my spare time I've been trying to reproduce this issue in a project that could be shared but no luck so far, the original project has many components and the error thrown by the azure portal's diagnostic tool doesn't help as much to identify the exact component that is causing this issue. I'll update the post once I get to reproduce the error.

Thanks @daemnin - will keep this open for a time then.

At this point I haven't been able to replicate this issue, so I'm closing it, if I manage to consistently recreate it I will reopen including a minimal repository


FIX: Post Form (HomePage) Outline

Current PostForm component's text area shows the default css outline.
Either it could be set to none (for which I can create a PR) or we can use the new form fields created by Shuvo.

Having the outline is good for accessibility when the component is focused.  I don't think this should be adressed


Needless extra parameter required to avoid TS errors

Describe the bug
When using the createI18nServer (or client) function to create internationalization providers with locales provided from an external source, the t function (e.g., t("example")) generates a TypeScript error, indicating that two arguments are expected, but only one is provided.
To Reproduce
Steps to reproduce the behavior:

Define locales using an external source, as described in the code snippet below.
Use the t function with a single parameter, e.g., t("example").

import { createI18nServer } from "next-international/server";

// External source for locales, for example purposes, provided as an array.
const locales = ["en", "pt"];

export const { getI18n } = createI18nServer(
  Object.fromEntries(
    locales.map((locale) => [locale, () => import(`./${locale}`)]),
  ),
);

Expected behavior
I expected the t function to work with a single parameter (t("example")) without generating TypeScript errors.
Screenshots

About (please complete the following information):
next-international version: 1.1.1
Next.js version: 13.5.4
TypeScript version: 5.2.2
Additional context
I created a CodeSandbox to illustrate the issue. Despite the TypeScript error, the translated text ("example in en") appears as expected. It seems that the usage of Object.fromEntries() in conjunction with external locales may be causing this issue.

As expected, the issue comes from this Object.fromEntries that doesn't narrow the correct type information:

You can manually cast the result to get the correct type:
import { createI18nServer } from "next-international/server";

const locales = ["en", "pt"] as const;

export const { getI18n } = createI18nServer(
  Object.fromEntries(
    locales.map((locale) => [locale, () => import(`./${locale}`)]),
  ) as Record<(typeof locales)[number], () => Promise<typeof import('./en')>>
);

Perfect, I'll give it a try. I almost tried to do this but thought it wouldn't work and gave up (I was having trouble understanding the return precisely, which, in the end, was exactly the same problem that TS was having because of my mistake haha). Anyway, I thought TS would be able to understand the return on its own, but it seems to be having some kind of issue with Object.fromEntries() that starts returning an any instead of the precise type (even when using as consts).

const locales = ["en", "pt"] as const;

Hi, I tried it, but when I call globalT, it seems that it doesn't solve the problem. :(
  const globalT = await getServerSideI18n();
  globalT('')

Yeah unfortunately many of these internal JS methods often return types that aren't narrowed properly and are too wide, for reasons that I ignore. I've tried on your CodeSanbox and it was working fine!


feat(substrait): update to Substrait v0.29.0

I'll merge this at the end of the day if there's no objections.


MB-9074 TOO sees tags if max billable weight needs updating on MTO tab

Description
Explain a little about the changes at a high level.
Reviewer Notes
Is there anything you would like reviewers to give additional scrutiny?
Setup
Add any steps or code to run in this section to help others prepare to run your code:
echo "Code goes here"

Code Review Verification Steps

[ ] If the change is risky, it has been tested in experimental before merging.
[ ] Code follows the guidelines for Logging
[ ] The requirements listed in Querying the Database Safely have been satisfied.
Any new migrations/schema changes:

[ ] Follow our guidelines for zero-downtime deploys (see Zero-Downtime Deploys)
[ ] Have been communicated to #g-database
[ ] Secure migrations have been tested following the instructions in our docs

[ ] There are no aXe warnings for UI.
[ ] This works in Supported Browsers and their phone views (Chrome, Firefox, IE, Edge).
[ ] Tested in the Experimental environment (for changes to containers, app startup, or connection to data stores)
[ ] User facing changes have been reviewed by design.
[ ] Request review from a member of a different team.
[ ] Have the Jira acceptance criteria been met for this change?

References

Jira story for this change
this article explains more about the approach used.

Screenshots
If this PR makes visible UI changes, an image of the finished UI can help reviewers and casual
observers understand the context of the changes. A before image is optional and
can be included at the submitter's discretion.
Consider using an animated image to show an entire workflow instead of using multiple images. You may want to use GIPHY CAPTURE for this! 📸
Please frame screenshots to show enough useful context but also highlight the affected regions.

Messages

:book:
:link: MB-9074

  Generated by :no_entry_sign: dangerJS against a246f85e8c7edd0c30201f9f06b1a0789f04b5cc

Just a behavioral thing that maybe is expected, but if you click on review billable weight but don't update it (or you do, but re-type the same value), you see both the success message along with the alert message. I guess it's about the intention of the review - will someone ever come in and keep the weigh the same?

Just a behavioral thing that maybe is expected, but if you click on review billable weight but don't update it (or you do, but re-type the same value), you see both the success message along with the alert message. I guess it's about the intention of the review - will someone ever come in and keep the weigh the same?

Good question. I would think that if they update it, but possibly not enough to bump it over that 90% threshold, the alert should still be showing because it will still be at risk. So, the way I'm seeing it, I think it's valid that both the alert and flash message could be visible at the same time.


ion-fab no longer handles horizontal and vertical props as expected

Ionic version:  (check one with "x")
(For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1)
[ ] 2.x
[ ] 3.x
[x] 4.x
I'm submitting a ...  (check one with "x")
[x] bug report
[ ] feature request

Current behavior:
The ion-fab remains inline, even when the horizontal and vertical props are provided.
Expected behavior:
The ion-fab should be rendered towards the bottom right of the page (or containing positioned element)
Steps to reproduce:
Add the following to HTML:
<ion-fab horizontal='right' vertical='bottom'>
  <ion-fab-button>
    <ion-icon name='options' />
  </ion-fab-button>
</ion-fab>

Related code:
Working in previous version (0.1.4-9):
https://codepen.io/kgroat/pen/GxeLwW
Fails in 4.0.0-alpha.1:
https://codepen.io/kgroat/pen/pLYBQO
Additional Information:
It looks like the fab-horizontal-right and fab-vertical-bottom are no longer being applied as expected.  Also fails for other horizontal and vertical values.

@kgroat that's for the report! this is already fixed in alpha.2!
https://codepen.io/anon/pen/eMwzeJ
We have been removing "left", "right" from everywhere in the framework. Now it's called "start", "end" this is because of our support for right-to-left languages.
Start/end is the right thing to do regarding UI.
Left -> start
Right -> end
Thanks!


Issue 323

@Vinatorul Wow, #322 must have made a huge difference...that was fast! :+1:

Will be merged as part of #328


crashes when trying to update a model with a new association-record-to-create

title is self explanatory i believe.. here is the error i get:
/usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/utils/nestedOperations/update.js:532
    this.create(record).exec(function(err, val) {
         ^
TypeError: Object #<Object> has no method 'create'
    at createRecord (/usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/utils/nestedOperations/update.js:532:10)
    at createRunner (/usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/utils/nestedOperations/update.js:521:20)
    at /usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:125:13
    at Array.forEach (native)
    at _each (/usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:46:24)
    at Object.async.each (/usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:124:9)
    at mapAssociations (/usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/utils/nestedOperations/update.js:524:11)
    at /usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:125:13
    at Array.forEach (native)
    at _each (/usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:46:24)

Thanks for sharing you investigation in details. I encountered the same issue, and the fix you are suggesting seems to be properly working ... I hope we will have a followup on this soon.

Bump

bump

can you PR already ?

https://github.com/balderdashy/waterline/pull/850

can you PR already ?

If you're too lazy to submit your own patch, you're not allowed to complain.

@tjwebb paquettea already committed my suggestion on his own repo so what is wrong here to ask him to PR ? moreover, i'm not complaining

See #934 .


When is something going to be done here?

warning coinbase > request ><EMAIL_ADDRESS>This version has been deprecated. Please upgrade to the latest version to get the best features, bug fixes, and security patches.
warning coinbase > request > hawk ><EMAIL_ADDRESS>This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning coinbase > request > hawk ><EMAIL_ADDRESS>This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning coinbase > request > hawk ><EMAIL_ADDRESS>This version has been deprecated. Please upgrade to the latest version to get the best features, bug fixes, and security patches.
warning coinbase > request > hawk > sntp ><EMAIL_ADDRESS>This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning coinbase > request > hawk ><EMAIL_ADDRESS>This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning coinbase > request > hawk > cryptiles ><EMAIL_ADDRESS>This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning coinbase > request > hawk > boom ><EMAIL_ADDRESS>This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning coinbase > request > hawk > cryptiles > boom ><EMAIL_ADDRESS>This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).

@kbcbhq

This hasn't been touched in more than a year, I am starting to ask myself if the package is even under development, or maintenance of any kind.

Seems like they are too busy making a profit.  Not good Coinbase.  Focus on your developer libraries and you can be earning 100x more.

Maybe someone maintained an up to date version ?


Rename ConditionFull->ConditionTrue, ConditionNone->ConditionFalse

Close #5701

LGTM. I think you'll need to rebase?

Rebased

I re-ran shippable and it passed. (I guess it doesn't automatically update the issue?)
Merging now.

Oops, actually it hadn't finished running yet. Reverting merge.

Never mind, it just finished successfully. Not reverting.


Removing post processing

I never liked the idea of having a post processing function, since it doesn't really make the conversion any more powerful. It felt like a hack (because it was) and now I decided to remove the generic post processing functions and instead have their functionality built into the mappings and moved specific processing to the functions they belong in (no need to make a public API for that). This feels much cleaner than having extra complexity that doesn't add expressibility. The extra processing done in the toKana and toRomaji functions could theoretically also be built into the mapping, but that would create much more memory consumption than it needs to and having that processing as part of the internal workings of the function, rather than an outside interface seems like a good compromise, as the implementation details can always be changed, if an even cleaner solution is desired.

Selected the wrong branches to merge


False Negative: jsonrpc_estimate_fee test

In starknet-providers->tests->jsonrpc.rs the jsonrpc_estimate_fee test sets max_fee to zero but then asserts that all estimated fees should be greater than zero.
max_fee: FieldElement::ZERO,
...
assert!(estimate.gas_consumed > 0);
assert!(estimate.overall_fee > 0);

Issue:
Setting max_fee as zero actually requires estimate.overall_fee and estimate.gas_consumed to be zero, not bigger than zero.

This is actually not true. The zero value here merely acts as a placeholder. You're literally asking the node what the max_fee field should be, after all. The max_fee field technically shouldn't even exist in this request, but is required by the specs so here we are.

As a server, you can't expect the client to provide a meaningful max_fee value when they're literally asking you for a max_fee value. Closing this optimistically. Feel free to re-open though.

This is actually a limitation on blockifier. It respects the max_fee field regardless of the execution context.


Allow the use of an environment variable to set the sendmail smtp address

Use case:
I'm testing software that mails to localhost:25 in production but in my test environment, I want to deliver to the mailpit container on port 1025.
Setting the MH_SENDMAIL_SMTP_ADDR to mailpit:1025 would enable me to leave the sendmail-using software identical.

If I understand correctly, you are wanting to use Mailpit's sendmail to route to another type of SMTP server eg: postfix or something (please confirm)?

Mmm, I think I was a bit confused here. As a former mailhog (which shipped mhsendmail) user, I assumed  the mailpit sendmail binary was actually talking smtp to mailpit. But since sendmail is just another name/command of the mailpit binary itself, it doesn't make sense to have this environment variable.
Sorry for this unnecessary issue! please close this issue..
ps: In the meantime, I'm using mailpit in the same container as my application for testing.

Well, you're not wrong. Mailpit's sendmail implementation does use regular SMTP to talk to Mailpit, so it will technically work with any SMTP server. It is basically just another sendmail port (of sorts), as are the other dozen or so sendmail implementations commonly installed is systems. I'm just saying that this one was created specifically to communicate with Mailpit, and isn't extensively tested on anything other than Mailpit, so your mileage may vary.

So to further my previous message, it sounds like this is exactly what you want to do - use Mailpit's sendmail to relay messages directly to a third party SMTP server. Provided that SMTP server does not require authentication, it should technically work. If this is what you want to achieve, then I can add support for an environment variable. Is this what you are still wanting after my explanation about its intended purpose?

Let me explain my use case:
In one container:

I have code that calls sendmail in my dev-container
This container has the mailhog sendmail (go install github.com/mailhog/mhsendmail@9e70164f299c9e06af61402e636f5bbdf03e7dbb/usr/bin/sendmail ) as /usr/sbin/sendmail
the environment variable MH_SENDMAIL_SMTP_ADDR=mail:1025
all calls to sendmail result in an attempt to deliver mail to mail:1025 without any modifications to applications/scripts.

The mail  container runs mailpit.

So you're wanting to do this with Mailpit's sendmail too. There is already an undocumented MP_SENDMAIL_SMTP_ADDR (eg: MP_SENDMAIL_SMTP_ADDR=mail:1025) variable you should be able to use. Please confirm if this works for you?

Great! This works and is exactly what I need ;-)
MP_SENDMAIL_SMTP_ADDR=mailpit:1025 sendmail<EMAIL_ADDRESS>< mail

Could you add it to https://mailpit.axllent.org/docs/configuration/runtime-options/ ?

I've added it now to the sendmail page rather than the runtime options as the runtime options are "server related" flags & environment variables :+1:  Thanks for testing / confirming!

Many thanks!


Delete .gitignore

Prerequisites

[ ] I have written a descriptive pull-request title
[ ] I have verified that there are no overlapping pull-requests open
[ ] I have verified made sure that I am following the Nancy code style guidelines
[ ] I have provided test coverage for your change (where applicable)

Description

a

@ozanberk really?


Wrap candidate knot selection algorithm into a single function

Currently the candidate knot selection process is nested within marge2()
This makes debugging more complex for both functionalities due to the length of marge2()
Modularizing will make maintenance easier, as well as make it possible to identify candidate knots without fitting models

closing as this isn't actually worth doing in retrospect


fix: empty ServiceEntry WorkloadSelector cause panic

Signed-off-by<EMAIL_ADDRESS><EMAIL_ADDRESS>What this PR does / Why we need it:

Pre-Submission Checklist:

[ ] Did you explain what problem does this PR solve? Or what new features have been added?
[ ] Have you added related test cases?
[ ] Have you modified the related document?
[ ] Is this PR backward compatible?

I didn't modify any file about license. I have no idea with this checker, please help me, thanks. @zhaohuabing


I2C: stm32-i2c-v2 Driver (F0/F3/F7) gets stuck in endless loop when handling restart conditions

in drivers/i2c/i2c_ll_stm32_v2.c:
When an i2c-message prepends a restart condition (I2C_MSG_RESTART flag is set) in function msg_init auto end mode is beeing disabled for this message, but function msg_done gets stuck in a loop forever, waiting for a stop condition on the bus.
Tested with stm32f3_disco board and samples/drivers/i2c_fujitsu_fram modified to use I2C_1

@DWagenk Thanks for reporting. I will check it. I have done i2c_burst_reads (which sets I2C_MSG_RESTART flag) multiple times without facing such an issue.

@ydamigos Just checked it with burst_read function, the problem stays the same.
I also just noticed, that stm32-i2c-(v1 and v2) internally use the I2C_MSG_RESTART flag different from the API description.
API: I2C_MSG_RESTART = This message starts with a restart condition
STM32: I2C_MSG_RESTART = This message is followed by a restart condition

@DWagenk Does it loop forever in write_bytes or read_bytes function (as they are named in main.c of i2c_fujitsu_fram sample)?

Sorry, my first post was not completely acurate, I've been looking at the same problem for too long.
I get stuck during write operation. It sends Message 0 (main.c line 34-36), then in msg_done it waits for the stop condition (i2c_ll_stm32_v2.c line 60) and afterwards issues another stop condition (Line 63).
When trying to send Message 1 [main.c line  39-41) it gets stuck in stm32_i2c_msg_write waiting for TXIS or NACK flag (i2c_ll_stm32_v2.c line 206). When I look into the registers with the debugger theres no flag except STOPF set.
So I guess theres some time correlation and the 2nd stop condition prevents TXIS or NACK events from happening.
This part gets fixed by following patch
--- a/drivers/i2c/i2c_ll_stm32_v2.c
+++ b/drivers/i2c/i2c_ll_stm32_v2.c
@@ -60,7 +60,7 @@ static inline void msg_done(struct device *dev, unsigned int flags)
while (!LL_I2C_IsActiveFlag_STOP(i2c)) {
;
}

  LL_I2C_GenerateStopCondition(i2c);

  LL_I2C_ClearFlag_STOP(i2c);

}

But then theres other errors in read transactions. I'll post more on that.

With the patch from my previous post I've got the following problems with read transactions:
I expect:
(with  as start or repeated start,  as stop condition)
<SLAVE_ADDR|W><FRAM_ADDR_HIGH><FRAM_ADDR_LOW><SLAVE_ADDR|R><BYTE_0>[...]
<BYTE_n>
I get:
<SLAVE_ADDR|W><FRAM_ADDR_HIGH><FRAM_ADDR_LOW><SLAVE_ADDR|R><BYTE_0>[...]<BYTE_n>______timeout/next transfer
Diagnose:
During Message 0 (FRAM ADDR) AutoEndMode is disabled. Now while preparing Message 1 (read bytes) AutoEndMode gets enabled again. This happens to fast -> transmission of last byte from Message 0 is not finished yet. When message 0 finishes then AutoEndMode is already turned on again, so it issues a stop condition. The read transfer afterwards misses the stop condition, because it needs to be triggered manually via the LL_I2C_GenerateStopCondition function.
Best guess for a solution: We need to wait for TC Flag beeing set before sending Message 1.

Another hint: the missing stop conditions after read transactions disappear when I set a breakpoint before LL_I2C_Disable(i2c); in i2c_ll_stm32.c line 102.
So theres one problem with the unwanted
P - S
where we want a single repeated start
S
between write and read message. and another problem with stop conditions becoming lost, because I2C is beeing disabled without waiting for the stop condition.

I expect:
(with S as start or repeated start, P as stop condition)
S - SLAVE_ADDR|W - FRAM_ADDR_HIGH - FRAM_ADDR_LOW - S - SLAVE_ADDR|R - BYTE_0 - [...] -
BYTE_n - P
I get:
S - SLAVE_ADDR|W - FRAM_ADDR_HIGH - FRAM_ADDR_LOW - P - S - SLAVE_ADDR|R - BYTE_0 - [...] -
BYTE_n timeout/next transfer

I checked the manual of the FRAM (Fujitsu MB85RC256V). The Write Page command should be:
S - SLAVE_ADDR|W - FRAM_ADDR_HIGH - FRAM_ADDR_LOW - BYTE_0 - [...]  BYTE_n - P
There is no STOP or REPEATED start condition between the FRAM address and the data.
It seems that the I2C API expects a different behavior from the driver than handling a Message as:
S - SLAVE_ADDR|W - DATA - P or Sr
It is like the data in Message 1 in i2c_burst_write are appended as data if there is no I2C_MSG_RESTART (Message 1) or I2C_MSG_STOP (Message 0) flags:
Message 0: S - SLAVE_ADDR|W - FRAM_ADDR_HIGH - FRAM_ADDR_LOW
Message 1: BYTE_0 - [...]  BYTE_n - P
I don't know if this is the expected behavior from the I2C API. I will have to check the I2C driver implementation of the vendors.

judging from the API doc

I2C_MSG_STOP (1 << 1)
Send STOP after this message.
I2C_MSG_RESTART (1 << 2)
RESTART I2C transaction for this message.

I'd say this is expected behaviour for the I2C API. If first message doesn't have I2C_MSG_STOP set and second message doesn't have I2C_MSG_RESTART set they appear as one long message on the bus. I actually need this functionality, otherwise I have to copy data back and forth to connect a multi-part-message into one big message.
I'll check with a frdm_kw41z board later how it behaves using the i2c_burst_write functions.

@ydamigos
I've got my original problem (endless loop) solved and tested. I'll submit the fix as a pullrequest and close this issue.
Looking into the source of stm32-i2c-v1 driver the problem with API and driver not beeing consistend exists there too, so I'd move that to a seperate issue.
OK?

OK, reopend


Can we encrypt and decrypt the images using this library ?

I want to encrypt the image in IOS(swift 4) and Decrypt in C# , using this framework  can any one help me out.
Thanks in advance

Currently, it only encrypts text.

@mataprasad I am assuming @bpraveen078  can maybe achieve this by first converting the images to base64 ?   and then apply the encryption, transport it and then decrypt it and again recompile the base64 content to image?
wouldn't that work?


Version code on android defaults to 0

Describe the bug
If not specified RNV will default to 0
[ warn ] [configure] You are missing version prop in your config. will default to 0

However, android now fails with
* What went wrong:
A problem occurred configuring project ':app'.
> com.android.builder.errors.EvalIssueException: android.defaultConfig.versionCode is set to 0, but it should be a positive integer.
  See https://developer.android.com/studio/publish/versioning#appversioning for more information.

Check the versionCode prop inside your appConfigs/renative.json. If it is non-existent or set to zero change it to a positive number.

@mihaiblaga89 is there a way to test this?

@ElenaDiachenko cc

@GabrieleKaceviciute Check platformBuilds//app/build.gradle.
Version code by default based on the renative version (  ReNative Version: 1.0.0-rc.4   => versionCode =  1000004). You can change this value in renative.json (platforms.android.versionCode). But keep in mind if this value is less than  value of the previous installed app, you'll get an error. This is expected behaviour .

@ElenaDiachenko
I get an error, the only way - if I set the "versionCode" value lower than zero, in all other cases - there is no error. Is it how it should be or is it bug?

VersionCode only accepts positive integers. Error, fixed here https://github.com/flexn-io/renative/pull/1323


nixos/jellyfin: Disable PrivateDevices from systemd service hardening

Following the feedback received in https://github.com/NixOS/nixpkgs/pull/163491, we disable PrivateDevices to allow Jellyfin to interface with GPU endpoints.
Should fix https://github.com/NixOS/nixpkgs/issues/152008
Description of changes

Things done

Built on platform(s)

[X] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[X] Tested basic functionality of all binary files (usually in ./result/bin/)
22.05 Release Notes (or backporting 21.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[ ] Fits CONTRIBUTING.md.

@D4Delta, can you test this PR as well please? Thank you!

Works fine on my machine!

Great, thanks for testing!


Week 22: Making Sense of Regular Expressions

Please provide your feedback by posting a comment against this issue.

In such an example it would to have a list of words that are not to be matched or someone could write '\b\S+\b'

Great post. Keep them coming :)


Certificate profile property for custom type/provider

Certmonger has the ability to ask the CA to process the request using the named profile or template (i.e. the -T PROFILE option). It would be great if the custom type/provider had support for this as well. I'd like to refactor the certmonger::request_ipa_cert defined type so that it uses the custom type/provider (i.e. instead of the execs), and I can't do that yet due to the lack of certificate profile support.

This should be addressed by https://github.com/earsdown/puppet-certmonger/pull/6

Is it worth updating the unit tests for this as well?

That's probably a good idea. I can do that on monday. Gotta go for today :/

Alright, #6 should now fix the issue and add unit tests.

Is it ok to merge it?

Looks good to me. I'll try to find some time over the next few days/weeks to play with the new type/provider. Do you want this on the forge straight away or happy to wait?

No problem, I can wait.
On 7 Jun 2016 17:01, "earsdown"<EMAIL_ADDRESS>wrote:

Looks good to me. I'll try to find some time over the next few days/weeks
to play with the new type/provider. Do you want this on the forge straight
away or happy to wait?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/earsdown/puppet-certmonger/issues/5#issuecomment-224289661,
or mute the thread
https://github.com/notifications/unsubscribe/AAI4nAl5FnoQPzO5UzASq2yDmCvQuWhfks5qJXnMgaJpZM4IuD0M
.

Cool, thanks again for everything @JAORMX


fadeIn fadeOut easing option?

Hello, nice slide carousel, i want to implement, but i see that has 'ease-out' option only, How can i set up with fade-in and fade-out or 'fade' mode, is it possible?
many thanks

All of the easing is handled by https://github.com/pawelgrzybek/siema - I support what siema supports :)


video/fb: changed circbuf_write assert to warning

Summary
changed circbuf_write assert to warning
Impact
fb
Testing
fb demo

Could you please explain more about this change?

Done.


Add deleting state to kube

Coverage decreased (-2.4%) to 57.311% when pulling fd52ad940f4080a2e533e714bb95061177fe2ec4 on stgleb:cluster_state_deleting into af8f57ce5b982dfd35e0fda48981e88850c61dfa on supergiant:master.


udemy courses dataset

🛠 Fixes Issue

👨💻 Changes proposed

✔ Check List (Check all the applicable boxes)

[ ] My code follows the code style of this project.
[ ] This PR does not contain plagiarized content.
[ ] The title of my pull request is a short description of the requested changes.

📄 Note to reviewers

📷 Screenshots

This one is really uexpected @riyajaiswal25 :))
Congrats 🎉, your PR got merged. To be eligible for the swags from ClueLess. Follow these steps.

Star this repository. ⭐
Follow Clueless on GitHub
SignIn / SignUp in [ClueLess Website](https://www.clueless.tech/) .
Go to the profile section from the top right-hand corner.

Comment your profile URL under this comment tagging the person who merged your PR.

That’s it. Follow the leaderboard!
And don’t forget to share your achievement with your friends.

https://www.clueless.tech/profile/admin/103094597252603482714 @nikhil25803


[Feature Request] Open link to extension repo directly from VS Code extension page?

For example, I'd like to open the repo that hosts the code for the extension dnicolson.binary-plist  directly from within VS Code, but I couldn't find a way to do it:

Instead, I had to search for this extension on https://marketplace.visualstudio.com/ and then click on the github link on this page:

, which is really inconvenient.
I'd really love to see the extension page in VS Code to show as much information as the market place page, like the Rating & Review tab and the info the on right side on the market place page. Thanks!

It would still be nice to see inside vscode:

Last commit date
Number of opened issues & pull requests

@gjsjohnmurray Thanks! That's almost exactly what I need. But it would be better if it shows more details about the repo, e.g. if it's on GitHub, display <username>/<reponame>, or show this info on hover.

Seems like the requested feature has been added in v1.59. Thanks!


Delete Branches

Hi, I see we have a view branches that seem to be out of date or not used anymore.
Should we delete them to keep the repo tidy?

Of course. I deleted a few. We now have only main, dev, and feature/arm-kill, which hasn't been merged and seems to be a little old.

I think feature/arm-kill can be deleted as well since we have the arm and kill switches working


Curbside Pullover Driving Logic in Simulation

Driving Logic

The Driving logic is currently setup to drive for 3 seconds, find a spot to pullover, start the pullover maneuver, and become IDLE (break) after reaching the target.
The point within the curbside furthest from other Agents is chosen as the pullover target.

Intent

The Klampt Visualization is updated to display the Intent in the top left corner and the pullover target.
The intent object is updated to provide the pullover target to other components.
PULL_OVER and PULL_OVER_PICKUP Intents are added

Logical Roadgraph Elements

The curbside RoadgraphRegion seen below is automatically created based on a curb RoadgraphCurve and width

Planning

A PickupDropoffRoutePlanner planner is created to handle the different Intents.
For the pullover maneuver, a sigmoid-shaped motion is generated. This can be replaced by the A* planner in the future (I marked the area with a #TODO in route_planning.py).

https://github.com/krishauser/GEMstack/assets/15055342/042b9c74-d2d8-4227-900a-57da964b3e4c

I moved the driving logic to planning and removed intent logic from trajectory tracking.

The changes are reverted.


Issue/Bug of Mod of Hesk 2.5.2?: Unable to recover password so I cant login. Recover password make a ban.

I has been banned for try too many time to log in, now I am unbanned from the system but when i receive the email for recover password and click it is printed a blank page an so I'Am unable to log in and reset password.
I am completely out of the Help Desk.
How can I do'
IS a bug with the new version?
I can't find error log on the server relative to this.

After clicking on the reset link i see a blank page and if I try to request new reset email I see I AM banned... so maybe there is a bug or something similar. I have not done any access today only reset password and i have this only admin account... I am unable to log in.

OK I have used the hesk tool for unban than I remember the old password so able to log in.
I have do the log out and tried to send an email for reset password.
Clicked on the link and blank page is again showed.
When I come back to the hesk and opened the password recovery I see I Am Banned.
I think there is a BUG in the new Hesk who make impossible reset password also the system do a ban after clicking the link for reset password.
Is an mod for hesk issue or just only my issue?
How to solve?

Hi,
I can't see any update for now here.
Please let me know if you need more information or if you are able to reproduce that in the new version 2.5.2 of Mod of Hesk.
Hope this can be fixed soon in the next Hesk release.

@PeopleInside sorry for the delay.... I have been very busy lately :laughing: . The fix for this issue is at 4a87f9e if you want to make the change yourself. Otherwise, the next Mods for HESK release will contain this fix.

Thanks for fixing ^_^


If all medicines are marked inactive the UI still shows an empty dropdown

Move the buildItemList() function into a useEffect()

Fixed with #221


Topic recognition-Siamese network classifier

Pull Request Description
Purpose
This pull request implements a Siamese Network that is  trained to generate embeddings of images of the ADNI dataset. A classifier (fully connected layers) is added at the end of the trained Siamese Network to classify Alzheimer's Disease on the dataset.
Description
Task Chosen: 7. Create a classifier based on a Siamese network [10] to classify either Alzheimer’s disease (normal and AD) of the ADNI brain data set having an accuracy of around 0.8 on the test set [Hard Difficulty].
Model: The backbone architecture of the Siamese network is based on PyTorch's ResNet-18 with modifications. The classifier's architecture consists of fully connected layers to do classification tasks. A trained Siamese model sits at the end of the classifier with its weights frozen.
Performance: The best classifier reached 0.82 accuracy on the test set.
Dataset Preparation (dataset.py):
This code defines a custom dataset class, SiameseADNIDataset for loading and processing ADNI dataset images for use in Siamese Network training and testing. It also provides functions to get train and test datasets from a specified data path. and  validating. This also include custom dataloader to handle Pair Dataset for Siamese model.
Network classifier Modules (modules.py):
This code defines a Siamese Network architecture for image similarity comparison. The network is built upon the ResNet-18 architecture with modifications to handle grayscale images. It includes custom weight initialization and forward pass methods.
Training Script (train.py):
This script is used to train a Siamese Network model on a dataset, with support for validation .It includes training and validation loops, model saving, and TensorBoard logging.
Testing  Script (predict.py):
This script is used to test a Siamese Network model on a dataset. It loads a trained Siamese Network model, evaluates its performance on a test dataset, and reports the accuracy and loss.
Kindly assess the alterations made in this pull request, and if you find them satisfactory, contemplate merging the request. In the event that you have particular adjustments or enhancements in mind, I would appreciate your valuable feedback.

This is an initial inspection, no action is required at this point
Difficulty: Hard
Readme: Good

clear flow of information
algorithm and training choices explained well
loss and accuracy plots provided for the siamese, but only for the training set, not very useful

Commit messages: Good
Code:

design is OK
well commented
only implemented a siamese network, no classifier

Functionality/Performance:

only performing similarity detection between pairs of images, no classification of single images
achieves good accuracy for similarity detection with the siamese

General comments:

algorithm solves the respective problem only half-way
you need to have added a classifier that can classify an individual image as AD or NC with their features extracted by the trained siamese network

Marking
Good Practice (Design/Commenting, TF/Torch Usage)
Adequate design and implementation
Good spacing and comments
Header blocks
Recognition Problem
Solves problem partially no classification of single images -3
Driver Script present
File structure present
Shows Usage & Demo & Visualisation & Data usage
Module present
Commenting
No Data leakage
Difficulty: Hard
Commit Log
Meaningful commit messages
Progressive commits used
Documentation
ReadMe good but missing usage -1
Model/technical explanation
Good Description and Comments
Markdown used and PDF submitted
Pull Request
Successful Pull Request (Working Algorithm Delivered on Time in Correct Branch)
No Feedback required
Request Description good


Jedis should use SLF4J instead of Java logging

Java Logging in not the industry standard anymore. User should be able to use the logging implementation he wants in order not to end up with several logging configuration files to maintain.
SLF4J provide a facade to the most commons logging formats: log4j, java logging and LogBack.
It also improve performances by having string build when needed
Example:
java logging
log.fine("Sentinel " + host + ":" + port + " published: " + message + ".");

will always build the string
slf4j
LOG.debug("Sentinel {}:{} published: {}.",host,port,message);

will build the string only if logging level is set to debug.

@PatrickSauts we try to keep Jedis as plain as possible regarding external dependencies. If you check the code you'll realize that Jedis doesn't have any logging at all, and we decided that we'll try to keep logging as minimal as possible as pretty much everything can be debugged from the redis logs / monitor commands.
If you check the code you'll realize that there's no logging at all, so unless we really have the need to support logging, I don't think we'll be addressing this soon.

Thank you for your answer.
Still the strings are built. This could be improved. But I guess that's minor.

Actually JedisSentinelPool uses
protected Logger log = Logger.getLogger(getClass().getName());
That's why I was talking about logging.
By the way I'm writing a JedisElasticachePool to use Elasticache Redis.
The difference with a regular redis master slave configuration is that Amazon prevent from writing to a slave an they have implemented a way to promote a new master. it's based on https://github.com/mrniko/redisson/pull/244
So my question is should I use Java logging ?

@PatrickSauts standard redis master / slave also prevents writing to slaves by default. It can be configured however with the slave-read-only configuration parameter.
Regarding adding ElastiCache failover mechanism I'd check if it's possible to do it as a separate library instead of bundling it into Jedis directly. The main reasons for this are:

Why try to keep jedis as close to the redis spec as possible (basically a Redis driver). Adding third party providers functionalities is something that we usually avoid unless it's entirely necessary.

We're currently a few active contributors to the project. Adding another module means that it's necessary to keep it up to date which will take away time for the core features

Having a thirt party library implementing this functionality means that this library can grow organically without depending what happens to Jedis. Basically the library can have it's own release cycle and shouldn't wait for Jedis for new features.

Hope this helps to understand our reasons.

@PatrickSauts
Adding a dependency is what we try to avoid since Jedis claims itself as a lightweight library.
Jedis itself barely leaves log message, so I think you can just add jul-to-slf4j as your dependency and choose underlying logging framework to non jdk14.
http://www.slf4j.org/legacy.html#jul-to-slf4j
Please give it a try and share the result. Thanks!

Thank you !
@HeartSaVioR Just once again the strings are always built.
@marcosnils If you have a third party library for that kind of things I'll gladly give them the code.

@PatrickSauts
I'm sorry but I know how logging frameworks work. I'm also a user to slf4j with logback / log4j2.
I'm saying that logging at Jedis is minimized so it shouldn't affect the performance.

@PatrickSauts
If we agree to add slf4j as a dependency, then what underlying logging framework should we choose?
If we choose one as a underlying framework, users should exclude selected framework if users already use slf4j and want to depend on other underlying framework.
If we don't choose underlying framework, and if users don't add underlying framework as a dependency, slf4j doesn't work properly.
I don't think Jedis should participate exclusion hell...

@HeartSaVioR
since SLF4J 1.6
If no binding is found on the class path, then SLF4J will default to a no-operation implementation.
so if no binding no logging.

@PatrickSauts
No, no logging is not we want.
Scenario, users don't use slf4j and add Jedis as a dependency then it stopped logging whole log in process.

@HeartSaVioR
I understand.
Jedis would perform better it's a pitty.
Some documentation could help.
SLF4J is the most popular logging framework nowadays. One who uses Redis must know about SLF4J.
But that's probably just me who think like that.

@PatrickSauts
Please say that thing to Java.
I believe Java should address logging when releasing language at the first time.
And I also think SLF4J is nearly de facto, but it's not for putting someone down.
Btw, Redis is not related on SLF4J, it's just a C language server. ;)

Jedis would perform better it's a pitty.

We currently have almost no logging at all in Jedis. So how could it perform better?

@marcosnils my bad I had JedisSentinelPool in mind. Not all the classes are like this one.

How about introducing a logging factory? I fell myself over logging with mp911de/logstash-gelf. The logger tries to write a log event using Redis and the logging code causes a recursion :/
See https://github.com/netty/netty/blob/4.1/common/src/main/java/io/netty/util/internal/logging/InternalLoggerFactory.java#L51
This approach allows to declare slf4j, log4j, ... as optional dependencies which do not pollute the class path of a user.

@mp911de
While InternalLoggerFactory can help us to add logging framework dependencies as 'provided', I don't think Jedis needs logger framework as dependency at all. Please refer comment from @marcosnils.

The great advantage would be to be able to replace a particular logger to disable logging at all. That would be my use case. There's a difference between almost no logging and no logging at all.

Hi,
I have following log that are output by redis
Jun 03, 2016 10:17:09 AM redis.clients.jedis.JedisSentinelPool initSentinels
INFO: Trying to find master from available Sentinels...
Jun 03, 2016 10:17:09 AM redis.clients.jedis.JedisSentinelPool initSentinels
INFO: Redis master running at xxx.xxx.xxx.xxx:6379, starting Sentinel listeners...
Jun 03, 2016 10:17:09 AM redis.clients.jedis.JedisSentinelPool initPool
INFO: Created JedisPool to master at xxx.xxx.xxx.xxx:6379
Is there any way to disable the logging completely?

Mailing list please


Mahler v4 release

[x] Refactor sensor interface to return Operation instances
[x] Update agent runtime to report changes via Operation to the observer
[x] Fix state rollback for parallel branches in the plan
[x] Modify agent interface to receive a single trace logger, move human logging to mahler/utils
[x] Abort planning stage if it takes over some time (configurable)

Closes: #68
Release Notes
Breaking changes
Simplified Sensor interface
The ouput of a Sensor is now a Subscribable instance that emits Operation values. The sensor no longer modifies the agent state but only returns changes that are applied by the Agent runtime.
This makes state management more robust as state is only modified by the agent runtime, preventing non-determinism on state reporting because of concurrency.
Removed logger option when constructing an Agent
The option has been replaced by a single trace option, which expects a void function that will be called for each agent runtime event. The function can be used to generate human readable logs or to log agent progress on disk. The agent runtime events relate to each other according to the following diagram.

Note that this also means that the Agent runtime no longer produces human readable logs by default. In order to get a readable log a readableTrace function has now be added on mahler/utils. The function accepts a Logger instance.
import { readableTrace } from 'mahler/utils';

const agent = Agent.from({
	initial: 0,
	tasks: [/* task list */],
	// readableTrace requires a Logger instance
	opts: { trace: readableTrace(console) },
});

Minor improvements

Improved state management on the Agent runtime. Previously, the internal agent state could be modified by different operations within the runtime lifecycle, action execution, rollbacks,  sensors, etc. While the generated plans ensure that two actions cannot modify the same part of the state at the same time, the Agent state could still be affected by concurrency, because of the need to clone the state for some of these operations. With this new version, state changes are propagated using Operation events, limiting the number of places where state changes are allowed. This reduces the need for state cloning and ensures the state remains consistent event if some actions of the plan fail.
A new plannerMaxWaitMs configuration option has been added to the Agent constructor. This value defaults to 60 seconds and allows the agent to interrupt planning if it's taking too long. A long planning time usually means that there is some scenario not being considered and that a Method should be added to the task knowledge databased to help prune the search tree. A planning timeout is reported to the trace function with the event name plan-timeout.

Other improvements
Other changes include refactoring, better linting, improved types and some updated dev dependencies.

I self-certify!


cmd/cue: unnecessary scanning every directory for cue.mod

What version of CUE are you using (cue version)?

$ cue version
cue version v0.9.0-alpha.5

go version go1.21.0
      -buildmode exe
       -compiler gc
     CGO_ENABLED 1
          GOARCH ppc64le
            GOOS linux
         GOPPC64 power8
cue.lang.version v0.9.0

Does this issue reproduce with the latest stable release?
No, only on pre-release.  Also happens with CUE_EXPERIMENT=modules on earlier v0.9.0 alpha versions.  Does not reproduce with the new modules disabled.
What did you do?
cue eval --out json example.com/pkg/foo
I have a large project where cue is only a small component.  So the cue module root contains many directories and sub-directories un-related to the cue module.  But these directories are separate from the foo package above, so I'd expect them to not effect this evaluation.
What did you expect to see?
I expected similar evaluation time to doing cue eval --out json test.cue  Where test.cue just imports the exact same foo package.  Which takes less than 1 second in this case.
I expect cue commandline to only look a the foo directory and directories leading to the module root, and nothing else, as described in the package instances https://cuelang.org/docs/concept/modules-packages-instances/#instances
What did you see instead?
The command-line version recursively walks every directory starting at the module root looking for cue.mod.  Since my project has 100s if not 1000s of directories in total, this now takes ~14 seconds.  (note: it does find one in the actual root, but does not stop until it's searched every directory)
used strace -f -t -e trace=file cue eval --out json example.com/pkg/foo to determine this behavior.
I'm unable to share my actual data, but I can probably create reproducer if necessary.

Thanks for the report. I can reproduce in our repository as well:
$ go install ./cmd/cue && strace -f -t -e trace=file cue fmt ./internal/ci |& grep 'cue\.mod"' | wc -l
360
$ go install ./cmd/cue && CUE_EXPERIMENT=modules=0 strace -f -t -e trace=file cue fmt ./internal/ci |& grep 'cue\.mod"' | wc -l
8

Note how the same command tries to stat eight cue.mod directories (althoug that is already somewhat wasteful), and the new code that as many as 360 times.

I also don't think this is limited to cue.mod files; when the new modules mode is enabled, we also open (and read and parse) pretty much every CUE file in the entire module, even when they aren't related to a package pattern like ./internal/ci:
$ go install ./cmd/cue && CUE_EXPERIMENT=modules=0 strace -f -t -e trace=file cue fmt ./internal/ci |& wc -l
51
$ go install ./cmd/cue && strace -f -t -e trace=file cue fmt ./internal/ci |& wc -l
924

So I think this is a larger problem with the new cue/load and not just about statting cue.mod files to find module boundaries.

I believe https://review.gerrithub.io/c/cue-lang/cue/+/1194921 should fix the issue with cue.mod directories; @Bryant-Cockcroft-IBM let me know how this affects your cue eval times.

The number of syscalls across our repo is nearly halved, from about 920 to 540:
$ go install ./cmd/cue && strace -f -t -e trace=file cue fmt ./internal/ci |& wc -l
543

Most of the remaining syscalls relate to us walking the entire module directory tree to list all package imports in CUE files upfront, which is technically not necessary in most cases.

I do see that about half the elapsed time with that change, but still significantly slower than CUE_EXPERIMENT=modules=0.
0.61s  CUE_EXPERIMENT=modules=0
14.07s  v0.9.0-alpha.5
7.76s  Your change

Most of the remaining syscalls relate to us walking the entire module directory tree

I'm not sure if this is a general problem, or if we're just doing something weird here with our directory structure.  But we have a ton of directories that are unrelated to cue that look as if they're in the module.
Taking some guesses at the strace with your change.  About 11s total (some overhead from strace itself).  9s of that is spent searching our unrelated directories.  When it switches to actually looking at the imports for the files it found, that only takes 1-2s.
For the record, if we decide my use-case is too odd, I think I can workaround this by specifying the files directly instead of the package.

Thanks @Bryant-Cockcroft-IBM for your update, that halving of wall time makes sense to me - if you have a repository with many directories that don't contain CUE files, the new modules mode used to do two syscalls per directory (one to read its contents, another to check if cue.mod exists inside), and now we do one syscall per directory after my partial fix.
Traversing the entire CUE module directory tree is something that has to happen in some form for commands like cue mod tidy or cue vet ./..., as those need to find all CUE packages. However, for any command involving just one package like cue eval ./some/package, there is a regression with the new CUE_EXPERIMENT=modules default where we still find all CUE packages upfront, even though it's not actually needed.
@rogpeppe is looking into a fix for this for the upcoming release, as we are treating this as a significant enough regression - it will affect any CUE user with a large enough directory structure. It just won't be a trivial fix so it might take us a couple of days to have something ready.

Thanks that all sounds good to me!

In order to fix this issue, we need to evaluate exactly the packages
that are specified on the command line and no more. That's
straightforward when the root packages are listed explicitly, because
we can then trace out their dependencies. But it's a harder job when
there are patterns involved.
Package pattern matching
The cue command supports package patterns of the form xxx...yyy. The
... matches any sequence of characters in a package import path.
In order to do a complete job, we would need to list an arbitrary
number of repositories from the registry, but OCI registries do not in
general support repository enumeration.
Instead of enumerating all possible match candidates, we can use the
build graph itself as the source of possible candidates. This is what
Go does.
However, that approach introduces a potential feedback loop: because
the build graph is limited to modules that contain packages that are
actually used by the main module, the build graph can change if there
are patterns that match packages outside of that set, which can in
turn affect the set of matched packages.
A way forward
The above consideration implies a rather deep change to the code and
is a bigger change than we'd like to introduce at this late stage in
the v0.9.0 release cycle.
Instead, we propose that for now all patterns must be rooted inside
the main module only. That is, either a pattern of the form
./xxx...yyy for some xxx and yyy or of the form
$module/xxx...yyy where $module is the name of the main module.
All other pattern matches would be rejected.
This leaves us open to applying the proper fix at a later date, and
hopefully covers the by-far-most-common use cases.

@Bryant-Cockcroft-IBM we are done with our first round of fixes for this performance regression. The original number of syscalls for loading a single package (and its few dependencies) in our repo ballooned by about 6x with the experiment as of May 20th, as I explained above:
$ go install ./cmd/cue && CUE_EXPERIMENT=modules=0 strace -f -t -e trace=file cue eval ./internal/ci/repo |& grep '/home/mvdan/src' | wc -l
81
$ go install ./cmd/cue && strace -f -t -e trace=file cue eval ./internal/ci/repo |& grep '/home/mvdan/src' | wc -l
517

With all the changes above, we are now down to a modest ~35% increase in syscalls:
$ go install ./cmd/cue && strace -f -t -e trace=file cue eval ./internal/ci/repo |& grep '/home/mvdan/src' | wc -l
112

This is still not perfect by any means, and we will continue to make improvements to the loading code to be less wasteful, but I think we're most of the way there in terms of fixing the performance regression.
Could you please try the latest master and let me know what the performance is like for your repository?

Yes, it looks so much better!  I'm now seeing a net performance increase from v0.8 too!
2.86s v0.8.0
0.61s CUE_EXPERIMENT=modules=0 v0.9.0-alpha.5
14.07s v0.9.0-alpha.5
7.76s Your change (from May 18th)
0.92s latest master on May 30th

Oh, excellent :) There were some other speed-ups for cmd/cue along the way. It looks like CUE_EXPERIMENT=modules is still giving you a minor slow-down, similar to what I showed above, but overall we're still in net benefit territory from the last stable release, and the performance still seems reasonable :)


Oryx 1 project link is broken in oryx/src/site/markdown/index.md

The link in main site:

is broken as below:

This is trivial but I can't fix it because I don't know if it is simply decided to be removed out or just a broken link.

Hm, the link works OK for me right now. The project is still there: https://github.com/cloudera/oryx

Oh, wait, it's been made private. That's why I can see it, because I'm part of the Cloudera org.
Yeah, they are cleaning out a lot of old projects from the corporate github that are defunct. I will see if I can transfer ownership of it just so it's available somewhere, or else make the source available in the new repo.
I'll update the docs in any event.


[SPARK-49518][CORE][BUILD] Change to using build-helper-maven-plugin to manage the code for opentelemetry

What changes were proposed in this pull request?
The main changes in this pr are as follows:

In core/pom.xml, the build-helper-maven-plugin configuration has been added for the opentelemetry profile to ensure that when the profile is activated with -Popentelemetry, the opentelemetry/src/main/scala directory under the core module is treated as an additional source path, and opentelemetry/src/test/scala is treated as an additional test code path.

<build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>add-opentelemetry-source</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>opentelemetry/src/main/scala</source>
              </sources>
            </configuration>
          </execution>
          <execution>
            <id>add-opentelemetry-test-sources</id>
            <phase>generate-test-sources</phase>
            <goals>
              <goal>add-test-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>opentelemetry/src/test/scala</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

Removed the management configuration for opentelemetry-related source/test code in https://github.com/apache/spark/pull/47763.

Since Spark uses the sbt-pom-reader plugin in its sbt configuration, the behavior of the build-helper-maven-plugin will also propagate to the sbt build process. Therefore, no additional configuration is required in SparkBuild.scala after this pr.
Why are the changes needed?
The previous configuration way was not very friendly to IntelliJ developers: when debugging code in IntelliJ, regardless of whether they were needed or not, the opentelemetry profile had to be activated; otherwise compilation errors would occur when running tests that depended on the core module's source code, for example DataSourceV2SQLSuiteV2Filter :

Does this PR introduce any user-facing change?
No
How was this patch tested?

Pass GitHub Actions

https://github.com/LuciferYang/spark/actions/runs/10697633945/job/29663999051

It can be seen that the test cases OpenTelemetryPushReporterSuite  and OpenTelemetryPushSinkSuite have been successfully executed.

Manual Testing Using sbt

Run build/sbt "core/testOnly *OpenTelemetryPushReporterSuite *OpenTelemetryPushSinkSuite", and without -Popentelemetry, no tests will be executed:

[info] Passed: Total 0, Failed 0, Errors 0, Passed 0
[info] No tests to run for core / Test / testOnly

Run build/sbt "core/testOnly *OpenTelemetryPushReporterSuite *OpenTelemetryPushSinkSuite" -Popentelemetry, and with -Popentelemetry, OpenTelemetryPushReporterSuite and OpenTelemetryPushSinkSuite will pass the tests:

[info] OpenTelemetryPushReporterSuite:
[info] - Normalize metric name key (10 milliseconds)
[info] - OpenTelemetry actions when one codahale gauge is added (5 milliseconds)
[info] - OpenTelemetry actions when one codahale counter is added (2 milliseconds)
[info] - OpenTelemetry actions when one codahale histogram is added (4 milliseconds)
[info] - OpenTelemetry actions when one codahale meter is added (1 millisecond)
[info] - OpenTelemetry actions when one codahale timer is added (1 millisecond)
[info] OpenTelemetryPushSinkSuite:
[info] - fetch properties map (2 milliseconds)
[info] - OpenTelemetry sink with one counter added (3 milliseconds)
[info] Run completed in 713 milliseconds.
[info] Total number of tests run: 8
[info] Suites: completed 2, aborted 0
[info] Tests: succeeded 8, failed 0, canceled 0, ignored 0, pending 0
[info] All tests passed.

Manual Testing Using Maven

Run build/mvn clean test -pl core -am -Dtest=none -DwildcardSuites=org.apache.spark.metrics.sink.opentelemetry.OpenTelemetryPushReporterSuite,org.apache.spark.metrics.sink.opentelemetry.OpenTelemetryPushSinkSuite, and without -Popentelemetry, no tests will be executed:

Discovery starting.
Discovery completed in 764 milliseconds.
Run starting. Expected test count is: 0
DiscoverySuite:
DiscoverySuite:
Run completed in 779 milliseconds.
Total number of tests run: 0
Suites: completed 2, aborted 0
Tests: succeeded 0, failed 0, canceled 0, ignored 0, pending 0
No tests were executed.

Run build/mvn clean test -pl core -am -Dtest=none -DwildcardSuites=org.apache.spark.metrics.sink.opentelemetry.OpenTelemetryPushReporterSuite,org.apache.spark.metrics.sink.opentelemetry.OpenTelemetryPushSinkSuite -Popentelemetry, and with -Popentelemetry, OpenTelemetryPushReporterSuite and OpenTelemetryPushSinkSuite will pass the tests:

Discovery starting.
Discovery completed in 1 second, 33 milliseconds.
Run starting. Expected test count is: 8
OpenTelemetryPushReporterSuite:
- Normalize metric name key
- OpenTelemetry actions when one codahale gauge is added
- OpenTelemetry actions when one codahale counter is added
- OpenTelemetry actions when one codahale histogram is added
- OpenTelemetry actions when one codahale meter is added
- OpenTelemetry actions when one codahale timer is added
OpenTelemetryPushSinkSuite:
- fetch properties map
- OpenTelemetry sink with one counter added
Run completed in 1 second, 142 milliseconds.
Total number of tests run: 8
Suites: completed 4, aborted 0
Tests: succeeded 8, failed 0, canceled 0, ignored 0, pending 0
All tests passed.

Testing in IntelliJ (both imported as a Maven project and as an sbt project):

By default, do not activate opentelemetry, and confirm that opentelemetry-related code is not recognized as source/test code, and does not affect the compilation and testing of other code.
Manually activate opentelemetry, and confirm that opentelemetry-related code is recognized as source/test code, and can be compiled and tested normally.

Was this patch authored or co-authored using generative AI tooling?
No

Test first.
Before updating the PR description, I will take some time to conduct additional verification (by this Sunday).

cc @TQJADE , FYI.

It can be seen that the test cases OpenTelemetryPushReporterSuite  and OpenTelemetryPushSinkSuite have been successfully executed.

cc @dongjoon-hyun
The Pr description has been updated, and a number of manual tests have been conducted, all of which align with expectations. If this is acceptable, a similar refactoring could also be applied to the code management of the volcano profile in the future.

Thank you, @LuciferYang . Please proceed toward volcano as an independent PR.
Given the current discussion status, opentelemetry code might be reverted from Apache Spark code.

Got ~

BTW, I love this improvement because volcano module itself was a headache for me. Thank you really for looking at this part.

close this one due to SPARK-49241 has been reverted


About running this code on iwslt Dataset

I get empty files containing .parse when I run the code to preprocess and I have installed jq
LANG=en_US.UTF-8 LC_ALL= CLASSPATH=./stanford-corenlp-full-2018-10-05/* python3 main.py   --dataset iwslt_en_de_parsed --span 6 -d raw/iwslt -p preprocessed/iwslt -v pass

It seemed that I have dealt with this problem, Thanks


Method descriptions not being copied

Hello,
I just realized that the method descriptions are not being copied.
Here's the original system:

And here's the target system:

Any idea why?
The surprising thing is that it took me so long to notice this!!
Cheers,
Nuno

heh, yeah, I have reproduced the error
need to implement it sometime

Ah! For a moment I thought I was crazy. Glad you get it too :)

I do not use the method descriptions, so I've also never noticed :smile:

@nununo Can you please retest this? Fixed with #480

Hello, @EduardoCopat, I finally managed to test it and it is now working fine. Thanks!!


Black and white problem

https://www.codechef.com/submit/RING_GAME
I just wanna share my code which i had done in codechef inorder to help another persons

Can you please assign this task to me. As i am a 5 star coder at Codechef - Userhandle(yati1103).
And can i do it under a hacktoberfest'22?


Fixes windows-base naming

Issue #, if available:
Description of changes:
We made a last min change to the repo name and i forgot to update the last PR.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/approve


Discover Answers: A Blog-Style FAQ

Related Issue
Fixes #449
Description
@SUGAM-ARORA I have made the FAQ Page styling like the Blog Page. Kindly review this.
Type of PR

[ ] Bug fix
[x] Feature enhancement
[ ] Documentation update
[ ] Other (specify): _______________

Screenshots / videos (if applicable)
[Attach any relevant screenshots or videos demonstrating the changes]
Checklist:

[x] I have performed a self-review of my code
[x] I have read and followed the Contribution Guidelines.
[x] I have tested the changes thoroughly before submitting this pull request.
[x] I have provided relevant issue numbers, screenshots, and videos after making the changes.
[x] I have commented my code, particularly in hard-to-understand areas.

Additional context:
[Include any additional information or context that might be helpful for reviewers.]

@SUGAM-ARORA done


Cannot create a Keybase public chat

Keybase GUI Version: 1.0.18-20170208165022+dc66461
keybase chat send --public zmanian "Hello public keybase"
Creating a new PUBLIC CHAT conversation: zmanian.
▶ ERROR creating conversation error: error creating conversation: unknown TLF ID: cfc5b8a3b92e938cd3c612fa7bea2f17

Thanks @zmanian, we're tracking down this bug, it happens to some but not others.  Can you keybase log send?  Many thanks!

Hey @zmanian, we actually don't need the log send, we seem to have found the root cause here and are working on a fix.

I've got version 1.0.37, got the same error

thanks, cc: @mmaxim, that original bug should be fixed, i wonder if there is a new one.

I think this is fallout from the server problems this morning @maxtaco, going to close. @charlie-wasp feel free to re-open if you try again and it doesn't work.

Thank you for your replies, it seems working now 👍 Keep up the good work and thank you for the Keybase!