text:
[H5179] Visible in HomeBridge but not showing up in HomeKit

Description
In Homebridge Accessories, I can see two H5179 sensors updating their data accurately. However, I'm facing an issue as the sensors are not visible in the HomeKit app. I followed these steps to add them: opening HomeKit, selecting Add accessory, and then clicking on More option. I checked the logs but couldn't find any error message.
Screen captures

Details of your setup.

Homebridge v1.6.1 running in a docker container on a Synology Nas
homebridge-govee v9.0.2
Homebridge UI-X

Logs
[5/8/2023, 11:56:24 AM] Homebridge v1.6.1 (HAP v0.11.1) (Homebridge 2456) is running on port 51401.
[5/8/2023, 11:56:24 AM] [Govee] [LAN] disabling client as disabled in config.
[5/8/2023, 11:56:25 AM] [Govee] [HTTP] client enabled and found 2 device(s).
[5/8/2023, 11:56:25 AM] [Govee] [AWS] disabling client as disabled in config.
[5/8/2023, 11:56:25 AM] [Govee] [BLE] disabling client as disabled in config.
[5/8/2023, 11:56:25 AM] [Govee] [Maelys bedroom] initialising with options {"lowBattThreshold":20}.
[5/8/2023, 11:56:25 AM] [Govee] [Maelys bedroom] initialised with id [C8:8F:E0:13:D4:13:60:A9] [H5179].
[5/8/2023, 11:56:25 AM] [Govee] [Camera thermometer] initialising with options {"lowBattThreshold":20}.
[5/8/2023, 11:56:25 AM] [Govee] [Camera thermometer] initialised with id [96:E0:E0:17:54:C2:FC:94] [H5179].
[5/8/2023, 11:56:25 AM] [Govee] [BLE] sync for thermo-hygrometer sensors disabled as required hardware/packages not available.
[5/8/2023, 11:56:25 AM] [Govee] [Maelys bedroom] current temperature [23.3°C / 73.9°F].
[5/8/2023, 11:56:25 AM] [Govee] [Camera thermometer] current temperature [23.6°C / 74.5°F].
[5/8/2023, 11:56:25 AM] [Govee] ✓ Setup complete. This plugin has been made with ♥ by bwp91, please consider a ☆ on GitHub if you are finding it useful!

After a while, the sensors appeared on Homekit 🤷 .


text:
turning off harmony activity

Is it possible to turn off a specific harmony activity and not only use the PowerOff (-1) activity for all?

Not sure what you are trying to do. Do you have activities for one given hub which control completely independant devices (activities 1 involve A-B-C and activity 2 involve E-F-G?). I think the Harmony hub was designed to control on hometheatre at a time so only one TV, one Receiver, multiple sources... It isn't so much of an HAbridge hub question, It is more of how the Harmony hub was designed. If you do have multiple independant activities, best way is to use multiple hubs... The harmony hub is only designed to be in Activity 1, Activity 2 etc or off state. It was not designed to have activities 1 and 2 running concurrently for example.

Well, that is not entirely true. There was a conversation few months ago regarding this:
https://github.com/bwssytems/ha-bridge/issues/54
But it was closed due to the topic opener was not interested anymore in the solution.
Digging the internet few weeks ago regarding the Harmony API I stumbled across a fork on github were someone has managed to identify and implement the correct "end" or "stop" activity command. So it must exist. But, I have lost it.

Am 24.02.2017 um 22:08 schrieb rafale77 notifications@github.com:
Not sure what you are trying to do. Do you have activities for one given hub which control completely independant devices (activities 1 involve A-B-C and activity 2 involve E-F-G?). I think the Harmony hub was designed to control on hometheatre at a time so only one TV, one Receiver, multiple sources... It isn't so much of an HAbridge hub question, It is more of how the Harmony hub was designed. If you do have multiple independant activities, best way is to use multiple hubs... The harmony hub is only designed to be in Activity 1, Activity 2 etc or off state. It was not designed to have activities 1 and 2 running concurrently for example.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@cipher2k That is actually my fork and I have not found any end activity item as of yet. It is still considered poweroff -1 to end the activity, or you just select the next activity you want. That is all my ultimate remote shows me anyway.

It is my understanding anyway that the hub only has one activity state and not one state per activity so you cannot turn an activity on and off. The state is an activity number or off (-1). It is designed that way so that when you switch from one activity to another, it easily switches the appropriate devices to that target activity without power cycling each device. (switching inputs, turning the target sources on, and the others off)

I understand. I found something else:
https://docs.google.com/document/d/1fjPMr0eLJWaFoZw0JMu449dgKFXR0K1m6EoxsDbgt8I/pub
It seems to be some kind of an official Harmony API document. There is this sentence that puzzles me somehow:
"Start an Activity. If the Activity is an AV Activity, the hub's current AV Activity (if any) will be ended. Starting a non-AV Activity does not affect the current AV Activity."
And right below it there is "end activity" request.... Does anyone know this document? I found via google.

I think this was related to the newer version of the hub firmware where light controls were added to the hub. There might be some non AV activities but I have never used it since all my non AV devices are controlled by another system. Would have to find out how to define an activity as being AV or non-AV.

that document is for the cloud api. what is being used is the local api, which is in xml requests. the end activity is something special for non av setups. not sure how that is used

source: gharchive/issue

repo: bwssytems/ha-bridge

license_type: permissive

license_source: bigquery


text:
Update Home Assistant State

Would it be possible to have the state of my Home Assistant lights update in the HA Bridge?

This has been discussed before here
To sum it up: HA-Bridge doesn't keep track of your Home Assistant device states, it does so only for hue passthrough devices. For everything else the state gets only updated if you control the device through HA-Bridge.
However, if you can edit you HASSIO devices to execute an additional HTTP command you could notify HA-Bridge that the state has changed like described here

authors: FloFoer TheCellMC


text:
Добавить возможность использовать один сервер на нескольких сокетах

Нужен функционал, который позволит привязывать несколько сокетов к одному серверу. Полная поддержка должна включать также перезапуск и дополнительный параметр в _connection для диспетчера, указывающий на то, в какой сокет пришел запрос.

Если для решения #76 единственным корректным решением является создание уникальных сокетов, то данную задачу необходимо перевести в категорию приоритетных.

добавлена полная поддержка (запуск, остановка, перезапуск, передача дополнительного параметра в _connection для диспетчера) для gevent-бекенда.
осталось добавить тотже функционал для werkzeug-бекенда

Полная поддержка добавлена, базовые тесты пройдены. Позже нужно добавить отдельный пример использования.

repo: byaka/flaskJSONRPCServer


text:
treeshake imports based on guest content

This is a WIP as I have not tested it much yet. I am not sure how transitive imports will be passed down. Since we only pass in the imports directly present in the guest content.

And I could immediately see that happening in practice, too: we support top-level await, which means code could dynamically decide to import component interfaces, which the lexer wouldn't be able to see.

We do not currently support dynamic import() currently in StarlingMonkey, since we do not register a JS::SetModuleDynamicImportHook hook. If and when we do I agree this question definitely comes up.
Note that ComponentizeJS performs source transforms using the same lexer already, as it has to perform a replacement of the world imports with the generated bindings modules.
Separately, we don't currently support transitive imports at all - which we probably should as well. But since this is a missing feature, again could be a follow-up to this PR in supporting the transitive rewriting and not just for the top-level source.
If we did want to move more of this process into StarlingMonkey, what would be needed is a full loader API - the ability to define source transforms and resolver hooks at the engine level. One problem here is how to communicate the source transform without causing the code for the source transform to be linked in unnecessarily to the final build. So a solution would likely need to be found for that communication problem (eg via a Wizer-time dedicated "resolve" / "loadSource" host call technique).

Thank you for the excellent context, @guybedford! With all that understood, I think it's more than fine to land this with the external lexer, and eventually look into moving more of this and other things into StarlingMonkey itself.

I made an attempt to update this PR based on https://github.com/bytecodealliance/ComponentizeJS/pull/116#discussion_r1658935176. I am not entirely sure if I am on the right track. I am also not sure how to debug the failing test (my suspicion is that it has something to do with transitive imports in the wit level).  Some guidance here would be really appreciated. Thanks!

I have updated the PR to fix the failing test and also addressed the comment.

I tested this out with a simple scenario and it seems to work well!
I've added an update here to properly handle export aliases. It doesn't fully handle the alias deduping logic yet which is supposed to only support aliases when they don't conflict. To handle that we should move the alias conflict detection logic to a preprocessing stage that is not related to the esm_bindgen like we currently rely on for populate_export_aliases.
It could be nice to even handle treeshaking for function import bindings off of an interface ie import { name } from 'pkg:name@v/iface' to support knowing only name is used from iface, but that can be a follow-up separately.
This code looks good to land to me, please test it out once more there @karthik2804 and let me know if you are happy to release.
We will need a test that verifies the export and import tree-shaking in this PR to land it though. Just let me know if you want to discuss how to set up the wiring for that if you want more feedback on that.

I've pushed up a simple failing test case here to verify that imports and exports get treeshaking applied. In the process I discovered two remaining issues:

When treeshaking, we are going to change the offset indices of the generated functions. We therefore need to main an offset diff table that can be applied to all function offset lookup functions (specifically in the splicer import lookup function). We should specifically test the case where a middle import is removed that the second import in world order doesn't bindgen to the wrong function.
The current treeshaking work does not support filtering resources at all - and as a result all resource bindgen is still being performed. We need to more carefully consider and handle a proper resource tree-shaking ability, similarly to how Jco dynamically pulls in resources as they are needed during function bindgen (see how create_resource_fn_map is called per function generation in https://github.com/bytecodealliance/jco/blob/main/crates/js-component-bindgen/src/transpile_bindgen.rs#L1755).

There is therefore still quite some work to do here. Sorry I can't be of more help.

An alternative to (1) would be to carefully ensure that in all bindgen, exports ordering is defined to be the ordering after treeshaking. Either way though requires careful review of the ordering.

@guybedford can you walk me through the 2 remaining issues a little more? I do not fully grasp it. My apologies if I am being slow.

@karthik2804 I took another look at this today and was able to resolve most of the remaining concerns I had:

It turned out we just needed to move the world merge to before encoding the component, as opposed to before the bindgen. I think this should work out correctly now!
With this model imports and exports are now the world imports and exports only, BEFORE merging with the engine world. I think this makes sense because you can always analyze the output component to get the merged imports and exports. Perhaps we should call them, guestImports and guestExports in the API?
I feel more confident that ordering is not an issue in bindgen now, given that all imports and exports lists in the JS and Rust code correspond to this same list that is the original world after treeshaking, but before the engine merge.
Resource treeshaking seems fine to do as a follow-up further, where we walk resources as functions are used to only pull in what is used by functions as opposed to all resources. This seems like it could be a nice refactoring to the resource bindgen as well as discussed in https://github.com/bytecodealliance/jco/blob/main/crates/js-component-bindgen/src/transpile_bindgen.rs#L1755. I have no problem deferring that work, and we can create an issue to track it further as needed.

The tests for imports treeshaking are now fully passing.
There is only one final thing then that we need to discuss now and that is the exports treeshaking, which still has a failing test.
Strictly speaking, I believe exports are supposed to be mandatory for component generation - that is a component can only be encoded to a world when it provides all of the expected exports. Not providing an export is typically seen as an error.
Therefore I'd like to understand more about exports treeshaking and how it might be used in this case? And then if we want to support this exports treeshaking feature then we must also add support for removing unused exports from the world itself before encoding the component.

@guybedford That sounds exciting!
On the note of exports tree shaking - the original intent of the PR started with only the goal of imports tree shaking. The reason we started analyzing the guest exports was to implement what #116 took a stab at. (i.e) retain the fetch event if the guest does not export an explicit incomingHandler. I do not think we need to tree shake exports otherwise. I fully agree that not having all the exports defined in a world should be an error. I do not see an issue with retaining even unused exports as the output component will still be compliant with the target world.

@karthik2804 okay, in that case, let's remove the exports treeshaking entirely for now then. As for the imports listing, we should probably have two lists like imports and guestImports to use in the test. Your approach is correct but I think ideally we should avoid unnecessary processing, by finding another approach or via precomputing the list of engine exports.

We could pre-compute the list of engine exports as a part of the build step possibly? run it between the build of Starlingmonkey and before the splicer is built?

Also with removing the exports tree-shaking, would we still need #116? cc: @tschneidereit

I've updated the exports treeshaking to instead provide a missing guest export error and added a test for that.
For the incoming handler, we probably do still want to support that case, as that is about the engine itself?
I'm happy to just document for now that imports is the guest imports and that the component should be analyzed directly to get the full component imports. The actual used guest imports seems more useful to me? Does that make sense?
If so, let's land and release.

That makes sense to me! I really appreciate you guiding me and helping take this over the line! Thanks!

Ok will do. This is a fantastic feature to have, thanks for working on it! Hopeful we can get to interface analysis for cases like import { fn } from 'interface' knowing only fn is used from the given interface, and also resource tree-shaking in due course. But this is a great start.

Released in 0.10.0.

Thank you!

source: gharchive/pull-request

authors: guybedford karthik2804 tschneidereit

repo: bytecodealliance/ComponentizeJS

license_source: github-api


text:
Generate codes that are successfully executed

I want to generate the codes that are successfully executed on the target. I see that most of the rejected cases are because of imports. So I am running it like :
wasm-tools smith --max-imports 0
I want to know if it affects other language features to be generated by wasm-smith?
Best,

Nah that should be sufficient! You might also be interested in --available-imports which is a way to specify import signatures if there are some imports on your platform. Either that or --exports can generate a module with exactly the exports specified.
Otherwise though, no, if you don't allow imports that still enables everything else to get generated.

Thank you very much for the prompt answer!

Sure thing! I'm going to close this since I think it's been answered, but feel free to continue to post here if there's anything else.

authors: alexcrichton khagankhan

repo: bytecodealliance/wasm-tools


text:
Stack depth mistracking error

So for months now we've had a miscompilation that is preventing us from integrating Lightbeam into Substrate. What we know about what causes the bug:

It appears to manifest inside the Rust generated runtime for the wasm32-unknown-unknown target
It appears not to manifest inside any of the testcases created by the fuzzer, but I think that's because the fuzzer isn't very good at generating webassembly modules with valid export sections. Even though I wrote a script to export every function with the correct signature from every module in the corpus, it seems like the fuzzer tries to remove the export section relatively quickly.

The bug itself appears to be that something (unknown what) causes the stack pointer differential (i.e. the difference between the stack pointer and the stack pointer that the function started with) tracked by the backend to be misaligned with the actual stack pointer differential, so when we try to emit an instruction to put the stack pointer back to where it should be for the ret instruction we add the wrong amount to the pointer and ret jumps to a garbage location, which appears to currently always be 0x10. As far as I know, 0x10 isn't special, it's just that the function just happens to always have that on the stack because the compilation and execution is deterministic on a per-function basis. It's not clear what function is actually causing this, I'm looking into getting wasmi or another interpreter to print out a call tree during execution (far better than a statically-generated calltree because of the kooky semantics of call_indirect) so that we can do a kind of binary search using wasm-snip or a similar tool. Alternatively, we can just implement emitting debuginfo in Lightbeam so that rr can print a backtrace. The latter is probably more work, but it's something we should do anyway. Once we have it down to a single function we might be able to get a better idea of what is causing this.
My guess is that it's related to one of the following:

Our calling convention code with either br_table or br_if. Both have quite complex code to handle calling conventions, and although both have assertions to ensure that we never accidentally ignore the calling convention of a block, it's possible that something is going wrong with it anyway
Code related to passing arguments, either to functions or to blocks - they use similar, but not identical, code (although the similarities are extracted into separate functions so there shouldn't be unintended differences). One possible suspect is the code to handle cycles in the register allocator, which can push items to the physical stack. This shouldn't be a problem, as we directly set the stack depth after handling cycles, but it's possible that something is wrong here.
Any generated control flow that isn't reflected by control flow in the Microwasm. Although the calling conventions of the Microwasm control flow should be pretty well-handled, the internal control flow in div and call_indirect (plus maybe some other instructions) can lead to complexity where two control paths that end at the same point after converging could change the stack depths by different amounts, with only one of them (or even neither of them!) being correctly reflected in the stack_depth field. I did a pass that tried to fix any lingering issues with this a month or two ago, but I don't know for sure if I caught everything or if my fixes were bug-free.

minimized testcase
(module
  (type (;0;) (func (param i32)))
  (type (;1;) (func ))
  (func (;0;) (type 0) (param i32)
    call 1)
  (func (;1;) (type 1)
    unreachable)
  (export "_start" (func 0))
)

Testing
$ cargo build --release --features lightbeam
$ ./target/release/wasmtime --lightbeam test.wasm -- 13
FuncIndex(0)
FuncIndex(1)
warning: using `--invoke` with a function that takes arguments is experimental and may break in the future
Error: failed to process main module `test.wasm`

Caused by:
    0: failed to invoke `_start`
    1: trapped: Ref(Trap { message: "wasm trap: call stack exhausted, source location: @-" })

expected result with wasmtime/cranelift
$ ./target/release/wasmtime test.wasm -- 13
warning: using `--invoke` with a function that takes arguments is experimental and may break in the future
Error: failed to process main module `test.wasm`

Caused by:
    0: failed to invoke `_start`
    1: trapped: Ref(Trap { message: "wasm trap: unreachable, source location: @002d" })

Lightbeam was removed in https://github.com/bytecodealliance/wasmtime/pull/3390 as explained in RFC 14, so I'm going to close this.

authors: Vurich alexcrichton pventuzelo

repo: bytecodealliance/wasmtime


text:
Add SSE and abort incomplete multipart upload rule to log bucket

We have another process automatically adding these, so this should reduce the diff in our Terraform plans.
Example of TF plan before

I think I need to wait for an automated process to re-add a server-side encryption configuration to the existing bucket. We took it down after a recent PR. One goal of this PR is to make us stop taking off SSE with each PR.

repo: byu-oit/hw-fargate-api


text:
leveldb 打不开. MANIFEST文件丢失

What steps will reproduce the problem?
我在zeroc-ice的两个接口函数里，
频繁的打开/读写/关闭leveldb数据库.
现在leveldb不能打开了, MANIFEST文件丢失了。
有办法恢复吗？

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
leveldb 1.1 on centos6.2

Please provide any additional information below.

Original issue reported on code.google.com by liuhengl...@gmail.com on 7 Mar 2012 at 5:49

// this code damaged leveldb
#include <assert.h>
#include "leveldb/db.h"
#include "iostream"

using namespace std;

void *threada(void *)
{
	char i = 'a';

	while (1) {
		leveldb::DB* db;
		leveldb::Options options;
		options.create_if_missing = true;
		leveldb::Status status = leveldb::DB::Open(options, "./db", &db);
		if (!status.ok())
			continue;

		string key = "c04e873dabbf66de02";
		key += i;
		i++;

		db->Put(leveldb::WriteOptions(), key, "{\"conf\":5,\"endTime\":\"86400\",\"pushWeek\":\"127\",\"startTime\":\"0\"}");

		delete db;
	}

}

void *threadb(void *)
{
	while (1) {
		leveldb::DB* db;
		leveldb::Options options;
		options.create_if_missing = true;
		leveldb::Status status = leveldb::DB::Open(options, "./db", &db);
		if (!status.ok())
			continue;
//		assert(status.ok());

		leveldb::Iterator* it = db->NewIterator(leveldb::ReadOptions());
		for (it->SeekToFirst(); it->Valid(); it->Next()) {
			cout << it->key().ToString() << ": "  << it->value().ToString() << endl;
		}

		delete it;
		delete db;
	}
}

int main(int argc, char *argv[])
{
	pthread_t ptid = 0;
	pthread_create(&ptid, NULL, threada, NULL);
	pthread_detach(ptid);
	pthread_create(&ptid, NULL, threadb, NULL);
	pthread_detach(ptid);

	sleep(1000);

	return 0;
}

Original comment by liuhengl...@gmail.com on 7 Mar 2012 at 8:45

sorry!! leveldb version is:
Release 1.2 2011-05-16

Original comment by liuhengl...@gmail.com on 7 Mar 2012 at 5:51

不论怎么个用法， 数据库得稳定，健壮，不能坏。

Original comment by liuhengl...@gmail.com on 22 Mar 2012 at 7:40

楼上正解。

一处打开，多线程共用。

Original comment by Allnul...@gmail.com on 22 Mar 2012 at 7:36

帮你修改了一下。测试 应该还行。就是 什么时候结束
这个应该你来做一下。。

// this code damaged leveldb
#include <assert.h>
#include "leveldb/db.h"
#include "iostream"
#include <unistd.h>

using namespace std;
	leveldb::DB* db;
	leveldb::Options options;
	leveldb::Status status ;
void *threada(void *)
{
	char i = 'a';

	while (1) {
	if(db){
		string key = "c04e873dabbf66de02";
		key += i;
		i++;
		db->Put(leveldb::WriteOptions(), key, "{\"conf\":5,\"endTime\":\"86400\",\"pushWeek\":\"127\",\"startTime\":\"0\"}");
	}
		usleep(10);
	}

}

void *threadb(void *)
{
	while (1) {
	if(db){
		leveldb::Iterator* it = db->NewIterator(leveldb::ReadOptions());
		for (it->SeekToFirst(); it->Valid(); it->Next()) {
			cout << it->key().ToString() << ": "  << it->value().ToString() << endl;
		}
		delete it;
		usleep(10);
		}
	}
}

int main(int argc, char *argv[])
{
	options.create_if_missing = true;
    status= leveldb::DB::Open(options, "./db", &db);
	assert(status.ok());

	pthread_t ptid = 0;
	pthread_create(&ptid, NULL, threada, NULL);
//	pthread_detach(ptid);
	pthread_create(&ptid, NULL, threadb, NULL);
//	pthread_detach(ptid);
    std::cout<<"Over!!!!!!!!!\n";

	sleep(1000);
	delete db;
	return 0;
}

Original comment by anyanmw on 22 Mar 2012 at 7:55

干什么要 在两个线程打开同一个db？？？
直接 一个 全局变量 ，打开一次 db就可以了么。。
leveldb是支持 single进程  multi线程 读写的。

Original comment by anyanmw on 22 Mar 2012 at 6:07

对啊 不过你的程序，我运行起来 提示：
总线错误
两个线程同时打开数据库 肯定是不行的！！！而且还是
while(1）的循环 这 数据库 伤不起 啊。。。

Original comment by anyanmw on 22 Mar 2012 at 8:00

又对你的程序 分析了下：
在 continue 前面加一个 printf("Cannot Open DB in threada /b \n");;delete
db ;sleep(1); while(1){结束前 再加一个 sleep(1);

可以运行一段时间，但是运行一段时间后
数据库就不行了，就两个线程 都无法打开了。所以
对leveldb的操作还是一个db的好！！

Original comment by anyanmw on 22 Mar 2012 at 8:24

楼上说的都很有道理。学习了

Original comment by boyhail...@gmail.com on 28 Dec 2012 at 4:57

Sorry, but I can't read the text of this report.

It is possible that you are running into a problem reported by somebody else
(there is corruption if the same db is opened multiple times from the same
process).  That problem is fixed in 1.6.0.

Please reopen this bug and give an English description of the problem if your
problem is different.

Original comment by san...@google.com on 12 Oct 2012 at 8:12

Changed state: Fixed

repo: byzhang/leveldb


text:
Update to version 1.6 of Jackson as soon as it is released

It turns out that the bug that prevents our POJO:s/documents from having cyclic
dependencies have been fixed in version 1.6, to be released quite soon.

http://jira.codehaus.org/browse/JACKSON-235

Original issue reported on code.google.com by mats.hen...@gmail.com on 30 Aug 2010 at 7:36

Fixed.

Original comment by sergio.b...@gmail.com on 11 Sep 2010 at 6:51

Changed state: Fixed
Added labels: Milestone-0.7.0
Removed labels: Milestone-0.6.1

Original comment by sergio.b...@gmail.com on 31 Aug 2010 at 7:17

Changed state: Accepted
Added labels: Type-Enhancement, Priority-Medium, Project-Terrastore, Milestone-0.6.1

repo: byzhang/terrastore


text:
🛑 www.ssc.sk is down

In 5e49ace, www.ssc.sk (https://www.ssc.sk/sk/Aktualne.ssc) was down:

HTTP code: 403
Response time: 812 ms

Resolved: www.ssc.sk is back up in ca04a22.

Resolved: www.ssc.sk is back up in c03bf40.

license: MIT


text:
🛑 www.sokratovinstitut.sk is down

In 0706434, www.sokratovinstitut.sk (https://www.sokratovinstitut.sk) was down:

HTTP code: 0
Response time: 0 ms

Resolved: www.sokratovinstitut.sk is back up in 6a249b6 after 25 minutes.


text:
Add ability to use SSL

Add the ability to use SSL to encrypt requests traffic if consul is fronted by an SSL offloading load balancer.

I think this would be straight forward? Just need to allow scheme to be customizable.

I submitted a pull request. No tests written, but in my testing it works. Probably a bunch of different ways to skin the cat, so if you think there's a better way that fits your model, go nuts!
Pete

Thanks Pete, appreciate the patch. Yeah, I can't think of a practical way to test this one.

repo: cablehead/python-consul

license: mit


text:
Kolla multidisk ceph final

What does this PR do?
This will enable the support of multi disk ceph storage for each host
Do you have any concerns with this PR?
No
How can the reviewer verify this PR?
By deploying OpenStack with multiple disk for ceph  for compute/ controller
Any background context you want to provide?
No
Screenshots or logs (if appropriate)
NA
Questions:

Have you connected this PR to the issue it resolves?
No
Does the documentation need an update?
Yes
Does this add new Python dependencies?
No
Have you added unit or functional tests for this PR?
No

physical deployment verified in lab2

repo: cablelabs/snaps-openstack


text:
🛑 CBTB Coffee House Shop is down

In 6d8258f, CBTB Coffee House Shop (https://shop.cbtb.coffee/) was down:

HTTP code: 403
Response time: 1126 ms

Resolved: CBTB Coffee House Shop is back up in 68861dd.

repo: cachetech/service-status


text:
🛑 CBTB Coffee House Shop is down

In b643077, CBTB Coffee House Shop (https://shop.cbtb.coffee/) was down:

HTTP code: 403
Response time: 825 ms

Resolved: CBTB Coffee House Shop is back up in 77a27e1 after 13 minutes.


text:
🛑 CBTB Coffee House Shop is down

In 7cbf09b, CBTB Coffee House Shop (https://shop.cbtb.coffee/) was down:

HTTP code: 403
Response time: 1067 ms

Resolved: CBTB Coffee House Shop is back up in 7ccb676 after 28 minutes.


text:
🛑 CBTB Coffee House Shop is down

In 0c50a27, CBTB Coffee House Shop (https://shop.cbtb.coffee/) was down:

HTTP code: 403
Response time: 1049 ms

Resolved: CBTB Coffee House Shop is back up in 76093ba after 13 minutes.


text:
Add Hasura support

Someone has asked me if we support hasura, it shouldn't be that much work to write a service for pkgs.hasura-graphql-engine.

Huh, what a coincidence. We use that. Currently AFAIK the package is broken. I did a somewhat working flake build, but it's not easy.
The service code should be trivial once the binary is packaged. It can be fully configured with env vars.

See: https://github.com/hasura/graphql-engine/pull/9160

Which brings us back to https://github.com/NixOS/nixpkgs/pull/184041

Which brings us back to NixOS/nixpkgs#184041

Continued in https://github.com/NixOS/nixpkgs/pull/216857, which is now merged.

repo: cachix/devenv


text:
Merge develop into master

dist

:tada:

authors: jnmarcus tdooner

repo: caciviclab/disclosure-frontend-alpha


text:
add caddy_conf_filename variable to support json format

If --config arg ends with Caddyfile, specifying --adpater json won't force caddy to treat it as json. Therefore I add caddy_conf_filename to control config format (only caddyfile and json seem to be supported now).

Hi. Thanks for the PR. As far as I can see you could use Lookups instead?

Please try limiting changes in this PR to one feature. Removing things like the duplicate download makes the PR harder to review.

Each commit is separable. I don't want to open four PRs. Maybe you should review each commit individually?

:+1: I did not realize that you cleanly separated everything.

LGTM :+1:  I see you removed the caddy_config_file variable and will probably use file lookups? Could you refrain from deleting the duplicate download and extract tasks and create a new PR for those? That part is very brittle and currently works as far as I can tell.

All looks good to me, sorry it took so long for me to get to the review. Many thanks for the contribution @xiruizhao (and the others you have waiting).

authors: joelnb lbischof xiruizhao

repo: caddy-ansible/caddy-ansible


text:
New tag/release with DNS01Solver support

Hi,
There has been no certmagic release (/Git tag) for a while. The README mentions how to use the new DNS implementation, by setting ACMEManager.DNS01Solver, but the last tag was published before that, and we have to go get from master to use it.
Is there any chance you could push a new tag/release when you have time?

Coming soon, trying to work through my backlog of about 70 notifications/issues.

v0.12.0 has been tagged a few weeks ago.

authors: delthas mholt

repo: caddyserver/certmagic


text:
How can I plug forwardproxy pluging into source code of Caddy ?

What are you trying to do?
I am trying to develop the forwardproxy plugin to add some custom functions.
But I can't plug your plugin.
I have add import '_ "github.com/caddyserver/forwardproxy"' into run.go, but got error "___go_build_main_go flag redefined: https-port"
It suggest that have some conflict with "github.com/mholt/caddy/caddyhttp", both of plugin  use the args "https-port".
+++++++++++++++++++++++++++++++++++++++++++++++
/private/var/folders/2z/t_s4dwc130l7z3xq0mbdmppc0000gn/T/___go_build_main_go flag redefined: https-port
panic: /private/var/folders/2z/t_s4dwc130l7z3xq0mbdmppc0000gn/T/___go_build_main_go flag redefined: https-port
goroutine 1 [running]:
flag.(*FlagSet).Var(0xc000094180, 0x1eaa680, 0x261d880, 0x1d7c6e2, 0xa, 0x1d89afc, 0x1d)
/usr/local/go/src/flag/flag.go:805 +0x6e3
flag.StringVar(0x261d880, 0x1d7c6e2, 0xa, 0x1d76888, 0x3, 0x1d89afc, 0x1d)
/usr/local/go/src/flag/flag.go:714 +0x99
github.com/caddyserver/forwardproxy/vendor/github.com/mholt/caddy/caddyhttp/httpserver.init.1()
/Users/sweetdreams/go/src/github.com/caddyserver/forwardproxy/vendor/github.com/mholt/caddy/caddyhttp/httpserver/plugin.go:39 +0x73

@RunningToTheEdgeOfTheWorld  from what I can see, the error is not related to forwardproxy itself: github.com/caddyserver/forwardproxy/ does not even have vendor subfolder, but your machine seems to have it.
I just rebuilt Caddy on a completely fresh machine with Go 1.11.1 and added instructions to README:
https://github.com/caddyserver/forwardproxy#build-from-source
Do those instructions work for you?

Thanks, I remove my vendor subfolder, then it work~
This issues might be I use some Go package mangers and it cause the httpserver plugin upload twice.

Glad that it works for you now!
Not sure what makes your package managers "cause the httpserver plugin upload twice", probably some sort of version mismatch

authors: RunningToTheEdgeOfTheWorld sergeyfrolov

repo: caddyserver/forwardproxy


text:
Edited English resource file

Some very minor changes for more natural sounding English
Double '' strangely needed for single quote to show up in line
Learn more about {0} and it''s rules.
Removed one accent that was causing problems with some English editors

@csokol ok here

authors: JamesSullivan felipeweb

repo: caelum/mamute


text:
Type 3 passenger fights fail on part validation error

Large airliner missions fail on part validation if the required parts mod are not installed.
Reducing parts list to squad only. Players can add additional components from their favourite mods as they see fit.

Closed with v2.1.4

repo: caerfinon/KerbinSideRemasteredGAP


text:
Add python predictor

Python wrapped predictor class

Dang, so the appveyor build is really annoying right now because it keeps showing failure - I'll turn it off until when it succeeds on my local branch.

deprecated, closing

authors: Yangqing bwasti


text:
need to train my own object

hi . sorry for my bad language
I really need to train my own object . I follow https://github.com/tue-robotics/image_recognition this package to create .pb file

this package give me this 2 file (dont give me any .pbtxt)
So would you please help me? what should I do ?

Hi,
Thanks for your interest. I had a quick look at the package that you sent. I think it is just for recognition, so the trained model with that package will not be suitable for this package.
Rather, you should use this procedure to train object detectors for this package.

Thanks for quick answer  and attention .
I follow your solution
and I have another question . This tutorial create .pbtxt for me? honestly I'm not familiar with object training and detection sorry for my low level question

.pb file is what you will get after training.
I am sorry that I cannot give you a detailed explanation here, you should read the descriptions of the files in tensorflow and tensorflow/models/object_detection.

hello again . In addition to the .pb file do I need a special dataset? if yes how can I create it?

Closing this issue for inactivity.

authors: cagbal melikavhf


text:
data: migration script for porting the data

Implement a mechanism for porting the data from the file-based database to the backend system (including the separation along the new relations).

Done.

repo: cahoots-extension/api


text:
Fix typo: replace address with balance

In the example where term address is being used the Wallet struct doesn't have that field rather there is a balance field.

This change is

@enitrat Can you please tal ?

repo: cairo-book/cairo-book


text:
Can't specify hash algorithm for the Sign command

There are no properties in SignToolSignSettings to specify:

the use of a RFC 3161 timestamp server (/tr instead of /t)
the digest algorithm to use for the signature (/fd)
the digest algorithm to use for the timestamp (/td)

Worse, it's also not possible to use ArgumentCustomization to add these settings manually, because all options must come before all file arguments. If they're added at the end, SignTool treats them as files, which of course don't exist.
Suggested solution :

a UseRfc3161TimestampServer property in SignToolSignSettings to control whether /t or /tr is used
A SignatureDigestAlgorithm to control the /fd option
A TimestampDigestAlgorithm to control the /td option

OR
A way to insert options before the file names with ArgumentCustomization. I suspect it would be more complex, since this is handled in the Tool<TSettings> base class.

@thomaslevesque yes this would be nice, good feedback.
FYI though, meanwhile you actually can use ArgumentCustomization it's a  Func<ProcessArgumentBuilder, ProcessArgumentBuilder> so you could just ignore what comes in and replace it.
Example cake script, this is 2 min thrown together so not correct but hopefully you get the gist of it.
FilePath assembly = File("assembly.dll");

SignToolSignSettings settings;
settings = new SignToolSignSettings
            {
                ArgumentCustomization = args => new ProcessArgumentBuilder()
                                                    .Append("SIGN")
                                                    .AppendSwitchQuoted("/tr", settings.TimeStampUri.AbsoluteUri)
                                                    .AppendSwitchQuoted("/sha1", settings.CertThumbprint)
                                                    .Append("/fd")
                                                    .Append("/td")
                                                    .AppendQuoted(assembly.MakeAbsolute(Context.Environment).FullPath),
                TimeStampUri = new Uri("http://localhost"),
                CertThumbprint ="0101010010101001"
            };
Sign(
    assembly,
    settings
    );

This will ouptut something like
SIGN /tr "http://localhost/" /sha1 "http://localhost/" /fd /td "C:/temp/assembly.dll"
While testing things you can even to hacky things like ArgumentCustomization = args =>  args.Render().Replace("SIGN /t", "SIGN /tr")

FYI though, meanwhile you actually can use ArgumentCustomization it's a Func<ProcessArgumentBuilder, ProcessArgumentBuilder> so you could just ignore what comes in and replace it.

True, but it's equivalent to redoing most of the work done by SignToolSignRunner, so at this point I might as well just use StartProcess directly :wink:
(which is what I'm doing now)

Well you get tool resolution and validation of known parameters so a little more than just StartProcess 😉

Fixed by #1308

authors: devlead thomaslevesque

repo: cake-build/cake


text:
🛑 XMR Asia Servers is down

In b80480d, XMR Asia Servers ($XMR_ASIA) was down:

HTTP code: 0
Response time: 0 ms

Resolved: XMR Asia Servers is back up in 3ddcadb after 5 minutes.

repo: cake-tech/upptime-cakewallet


text:
🛑 XMR Asia Servers is down

In 6d0b041, XMR Asia Servers ($XMR_ASIA) was down:

HTTP code: 0
Response time: 0 ms

Resolved: XMR Asia Servers is back up in 654d0f0 after 6 minutes.


text:
🛑 XMR Asia Servers is down

In 159a05a, XMR Asia Servers ($XMR_ASIA) was down:

HTTP code: 0
Response time: 0 ms

Resolved: XMR Asia Servers is back up in 1faa911 after 47 minutes.


text:
🛑 xmr-node.cakewallet.com:18081 is down

In 887bf0d, xmr-node.cakewallet.com:18081 (xmr-node.cakewallet.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: xmr-node.cakewallet.com:18081 is back up in b37eaea after 5 minutes.

repo: cake-tech/upptime-monerocom


text:
Revert back to original documentation

Revert back to Phinx documentation until the cake documentation is sorted out?
IMO, the Phinx documentation should be standalone and not be included alongside all of the CakePHP documentation. The Cake documentation also doesn't have a phinx-specific search, which makes it much more difficult to find what you're looking for.
Is there a specific reason why we can't stick to the original Phinx site anyway?

Codecov Report

Merging #1219 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1219   +/-   ##
=======================================
  Coverage   72.19%   72.19%
=======================================
  Files          35       35
  Lines        5549     5549
=======================================
  Hits         4006     4006
  Misses       1543     1543

Continue to review full report at Codecov.

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

I think we can just merge the whole sphinx documentation into a single page, so you can search the page using your browser search function.
One of the reason to have it in the same place is (apart that it is easier to deploy) that in the newer future we will be using the cake database layer. So looking for its documentation will make sense there as well.
Do you think having the whole docs in a single page would help with the search?

@lorenzo Yes, single page could work as a solution - if you're happy with that? Another issue for me is the left nav - https://book.cakephp.org/3.0/en/phinx.html - all related to Cake framework. Isn't helpful and is cluttered for users who do not use Cake

@JayPHP we are considering having a different book installation for each "plugin" in cake. So I guess sphinx will be covered by that soon. For the time being a single page doc is the way to go imo. Would you like to do that?

no worries

authors: JayPHP codecov-io lorenzo

repo: cakephp/phinx


text:
Develop to Main - publish 2.0.0

I vote to push Develop to Main and publish 2.0 on nuget
agree @floyd-may ?

I fixed the wf and it re-ran successfully. 👍

Publishing FakeAuth 2.0

repo: calebjenkins/FakeAuth


text:
MaterialTransitionGroup

Adding a polymer like animation element/component for full page transitons might be very helpful :D as of now the CSSTransitionGroup is limited

Yeah. I guess that's the only thing we're missing.

I've been attempting to work on a solution for this. However it will need to sit in the router layer. Haven't had too much success. Willing to bounce ideas around though.

I think it can be done as polymer does it ... react will only create a new
instantiation of your component if required usually it just changes props
that could be used as a root of where transitions are required then get the
elements of final and first state with same classname and call a transition
there
On Feb 20, 2015 1:40 AM, "Brandon Clark" notifications@github.com wrote:

I've been attempting to work on a solution for this. However it will need
to sit in the router layer. Haven't had too much success. Willing to bounce
ideas around though.
—
Reply to this email directly or view it on GitHub
https://github.com/callemall/material-ui/issues/333#issuecomment-75126327
.

@darkyen This is possible and is somewhat similar to how react-router "achieves" this result. However this requires you to load all "pages" on initial load and store them on the page. I don't think it is optimal to have all "pages" rendered into the page and use classes with state transitions. If there is a heavy data load, the browser will start seeing some major hits.
I'm going to try and leverage flux stores to hold the state until a view requirement is met. But not sure if this will work either.

So, https://github.com/chenglou/react-animation was released yesterday - how would one use that with Material-UI, if you want to do page transitions and what not?

I think React-transition group already helps achieve all these. Closing this.

Not it does not. React is extremely primitive when talking about animations.

Closing this issue for #4117.

authors: darkyen luisrudge oliviertassinari seivan tintin1343 yhbrandon

repo: callemall/material-ui


text:
SVG Icon: HoverColor not working...

After onClick event on wrapper , hoverColor prop stops working on SVGIcon.
Steps to reproduce
(1) Structure: Span -> IconButton -> SVGIcon
(2) the hoverColor attribute on the inner SVGIcon works fine until onClick event is triggered.
For extra confirmation, I user an observable element to control a Boolean, on the basis of which hoverColor attribute changes.
The concerning part is that, after the onClick event, the console statements of 'mouse enter' and 'mouse leave' no longer work.
Note: It seems similar to this, but it was closed so...
Code:
import React, { Component, PropTypes } from 'react';

import { observable } from 'mobx';
import { observer } from 'mobx-react';

import Badge from 'material-ui/Badge';
import IconButton from 'material-ui/IconButton';
import EditorInsertDriveFile from 'material-ui/svg-icons/editor/insert-drive-file';
import Chip from 'material-ui/Chip';
import {lightBlueA200, greenA200} from 'material-ui/styles/colors';

@observer
export class ShowFile extends Component {
  @observable hoverColor = Boolean(false); // Initialise as false...

  handleOnClick() {
    console.log(this.props.file.taxItemName);
  }

  handleMouseEnter() {
    console.log('mouse enter');
    this.hoverColor = !this.hoverColor;
  }

  handleMouseLeave() {
    console.log('mouse leave');
    this.hoverColor = !this.hoverColor;
  }

  render() {
    const styles = {
      mediumIcon: {
        width: 48,
        height: 48,
      },
      medium: {
        width: 96,
        height: 84,
        padding: 24,
      },
      chip: {
        display: 'block',
        margin: 'auto',
      },
    };

    return (
      <span>
        <IconButton
          iconStyle={styles.mediumIcon}
          style={styles.medium}
          onClick={this.handleOnClick.bind(this)}
        >
          <EditorInsertDriveFile
            color={lightBlueA200}
            hoverColor={ (this.hoverColor) ? greenA200 : ''}  // if true, show color...
            onMouseEnter={this.handleMouseEnter.bind(this)}
            onMouseLeave={this.handleMouseLeave.bind(this)}
          />
        </IconButton>
        <Chip style={styles.chip}>{this.props.file.taxItemName}</Chip>
      </span>
    );
  }
}

ShowFile.propTypes = {
  libs: PropTypes.array.isRequired,
  file: PropTypes.object.isRequired,
  user: PropTypes.object.isRequired,
};

Versions

Material-UI: material-ui@0.15.4
React: react@15.3.0
Browser: Version 52.0.2743.82 unknown (64-bit) [I'm on Ubuntu using Chrome]

I also ran into this issue. Did you find a solution or workaround yet?

I had this problem. If I set disableTouchRipple={true} on the IconButton, then hovering still works even after clicking. It's a quick fix, but you have to make a trade-off between responding to hover or having a ripple effect.

@tathagatbanerjee why was this closed without a resolution?

Can we assume its because I'm a muppet and got confused. Apologies. Have reopened.

We have been porting the component on the v1-beta branch. We reimplemented it from the ground-up. While we haven't tested it, I think that the issue is most likely fixed on that branch. Hence, I'm closing it.
Still, we will accept PR fixes until v1-beta takes over the master branch.

authors: nmaves oliviertassinari sangthebui tathagatbanerjee taylorgoolsby


text:
pick up interpolated values and integrate with Animated

Describe the Feature

Currently as you drag, you pick up a value from the slider, and the range between the last value you pick up and the next one is  related to how fast you scroll.
I'd like to be able to pick up interpolated values in the rage on an evenlyspaced timed event loop so that I could get smooth animations on related svg graphics - e.g. changing the value on an svg graphics arc as  I am moving the slider thumb.

Hello @misbell!
Unfortunately I don't think this is an option - Slider exposes native components which has their props and their "under-the-hood" implementations that we don't want to affect. And to achieve what you described it would be required to modify the outcome of what native components calculates.
I will close this issue as not planned, but let me know if you have anything more in that topic to discuss.

authors: BartoszKlonowski misbell

repo: callstack/react-native-slider


text:
Fix check in IsTokenChar

Hi @callumbwhyte
I recommended somebody to use this package on the forum : https://our.umbraco.com/forum/using-umbraco-and-getting-started/111021-examinemanager-search-in-certain-tree#comment-343501
This person is not able to get a query on path working. I knew we had the list value type in one of our own projects (we did not need the entire package). Turned out my colleague was having the same issue and already fixed in our project.
This PR fixes the issue in the package.
Dave

Great spot @dawoe! #h5yr!
It looks like this was overlooked when I migrated to v9+.
I'll get this merged later today and have a release out on NuGet.

Thanks again @dawoe, this is released as v3.0.1 now on NuGet!

authors: callumbwhyte dawoe

repo: callumbwhyte/umbraco-search-extensions


text:
[WIP] #497 Bit slicing

This PR addresses the implementation of the proposed bit-slicing operation per #497 .
This module accepts as arguments, a begin_index and end_index, to specify the range of the slice, and outputs the value of the specified range from the input.
I have included an example in the example/tutorial directory that uses this implementation and the expected output file. @sampsyo, I need some assistance on how to write automated tests for this implementation.
I'll appreciate all feedback on improving this implementation.
PS: For now I am calling the module std_bit_slice. Does that sound good? Suggestions are welcome
Thank you.

@anthonyabeo anything blocking the merge? If you have questions, feel free to bump the thread in Zulip.

Closing this in favor of #1906

authors: anthonyabeo rachitnigam

repo: calyxir/calyx


text:
Change Subproject Scope

I propose expanding the scope of this subproject to include all mobile connection standards. Right now the scope is limited to 4G and 5G. Ensuring that our APIs are standardized across different mobile network technologies will enhance their versatility and usability.
I would suggest:

Either to delete the "Note" Statement complete
Or to expand the scope also to 2G, 3G in the Note.

good observation @NoelWirzius . My suggestion is to expand the scope of this subproject to include support for 2G and 3G alongside 4G and 5G.

authors: NoelWirzius sachinvodafone

repo: camaraproject/DeviceStatus


text:
Upload Meeting 20231212 document

What type of PR is this?

documentation

What this PR does / why we need it:

To share the meeting material showed at the meeting on December 12, 2023.

All, please look at the yesterday's meeting material, especially page 7 Revised Timeline, and understand we have to rush.

Hi @fernandopradocabrillo ,
Could you try to approve this pr, please?  Just upload the meeting document.
Many thanks,
Toshi

repo: camaraproject/KnowYourCustomer


text:
Update some package config files

npm likes lowercase no space package names
change module resolution to node instead of bundler
update conflicting dependencies
Bundler
resolve dependencies not found by node
fix types resolution

Verified that the updated platform can be deployed on Docker for all environments

authors: Ushcode qhouyee

repo: cambridge-cares/TheWorldAvatar


text:
Restore missing lb

The initial lb was missing because the display code filtered them out to avoid outputting a superfluous additional line break at the start of every paragraph. The logic of that filtering need to be revisited the next time this code is refactored since it might result in some other line breaks being omitted from the output. For the time being, however, I have modified it so that any lb with a facs attribute is processed.

We might want to think about using spans or an alternative representation for the coords.  We'd have to revise the logic to insert the links in the display.


text:
Add hints to search dialog

Add hints to the bottom of the search dialog.

Every time user opens the dialog a random hint should be displayed:

"You can open search with Ctrl + F or Ctrl + G shortcuts"
"You may press any character to open search"
"You can close search with Esc"
"Press Enter to open first link"

From what I understand, I think I'm doing this right.  Ive submitted a pull request for this feature.

authors: BleileJustin flaksp

repo: camellia-app/camellia


text:
Issue camgunz/cmp#27  - fix permissions on cmp.c

Issue camgunz/cmp#27  - fix permissions on cmp.c
tada!

Thanks!

repo: camgunz/cmp


text:
basic review of assessment points explorer page (not a redesign — yet!)

since the assessment points explorer page was created a lot of things changed in Lanttern, but we never had the chance to look back at it again. it's a good idea to review the page, specially looking at the production database. e.g. there's no pagination and we have 2k+ assessment points registered.
I think it's crashing in production

I decided to simply remove the assessment points explorer page and related code (including assessment points filter view). the context when it was created is very different from the current context, and for this reason I think there's no advantage in keeping it for future reuse.
the exception is the assessment point details page, where there are some useful ideas and features (e.g. feedback) we can leverage in the future, so I'll keep it.

repo: camino-school/lanttern


text:
Find a good way to configure partitionCount in Optimize

See https://camunda.slack.com/archives/C02UT3T8DQR/p1650536952860079
Optimize needs to be configured with the partition count. Currently, this information is located in the Zeebe sub-chart. Helm doesn't allow sharing of information between child /sub-charts.
The following solutions I see:

We add a new property, which is globally available. Like: global.zeebePartitionCount The problem I see here is that currently, we have zeebe.partitionCount which people use. We could drop the property and print a warning if this property is still in use. If we want to keep the value: we could use the value of global.zeebePartitionCount in zeebe.partitionCount, to only configure one property. But this will not help with users which already use zeebe.partitionCount and are not aware of the new property.
We add just a new property in the Optimize sub chart and the user needs to configure the partition count in two places. In zeebe and optimize section.
I could investigate an idea I had recently. In the root we have access to all properties, so we might be able to deploy a config map for Optimize, which contains the properties from Zeebe.
Optimize can somehow self-detect the partition count like operate does, mentioned by JOSh here

blocks #126

The problem with one is that if users use zeebe.partitionCount and update the other value will not be updated. It is possible to reference other values BUT they need to be available when the template is evaluated.
Example:
We have:

zeebe:
  value: two # this is only available in zeebe sub chart

optimize:
  value : three # this is only available in optimize sub chart

If we now introduce
global:

 otherKey: value

This will be available in all other charts and we can do things like:
zeebe:
  value: {{ .Values.global.otherKey }}

If zeebe chart access it will resolve to the value set in otherKey. But this works because it has access to the variable.
We can't do things like:
global:

 otherKey: {{ .Values.zeebe.value }}

If now optimize access global.otherKey this will fail since the values from Zeebe are not available.
Concluding: We can only do zeebe.value: {{ .Values.global.otherKey }}, which helps to update default value and reference the new property. But if the user already overwrites this variable than he wouldn't update the other value.
Do you get what I mean @npepinpe ?

I think the Operate team regretted doing the partition count detection

From memory, I think there was a potential error in the scenario where not all partitions had exported records. In this case, Operate would start up and incorrectly deduce based on the existing records that have been exported that there are less partitions than there really are in Zeebe. Configuration seems a much "safer" way of doing this. I think this is also why we never explored trying to do similar so far

After some discussions we decided to go with the simplest (and potentially more flexible) way, for now, means adding a property to the optimize sub-chart which sets the partitionCount.
See related discussion from slack https://camunda.slack.com/archives/C02UT3T8DQR/p1650886285532609?thread_ts=1650869104.388169&cid=C02UT3T8DQR

We discussed in todays Team meeting the topic "Disabling Optimize" and "Partition count in Optimize". We agreed on keeping it simple and flexible as possible.
This means:

We will support for Optimize an separate toggle to turn off and on, even if identity is disabled
We will support for Identity an toggle
We will support an toggle for the web app authentication mechanism, might help later for Optimize id we want to support different mechanism.

This keeps our implementation simple and the usage flexible, with the downside that if the user wants to disable Identity he has to toggle three flags. We will see whether this will be an issue for the users or not.
Regarding the topic of partition count, same here to keep it simple for now we will add a separate value in the optimize chart. Means, if the user wants to increase the partitions he has to do it in zeebe and optimize, if he uses optimize. This allows us to keep the implementation easy to maintain and still flexible. We currently see no easy way to set it in one place without doing some breaking changes.

If we see complains about this a potential addition would be to add a global variable which can be set once and change the defaults of the existing partitionCounts to a reference to it. Like described above https://github.com/camunda/camunda-platform-helm/issues/286#issuecomment-1105212953

authors: RomanJRW Zelldon

repo: camunda/camunda-platform-helm


text:
Update README.md - fixing broken links

Fixed links to canada.ca for French and English. Didn't make sense to me to create an issue for housekeeping issue like broken links. First github edit, hope it's all good.

If you checked the PRs I currently already had a fix in queue for this 👍

You beat me by an hour! Looks like you did one while I was figuring out how to do one :)

@gc-ianbell @KenMorencyTC Thanks for your help updating these links!!!

authors: KenMorencyTC gc-ianbell ptd-tbs

repo: canada-ca/cloud-guardrails


text:
🛑 Ubuntu.com CVE list is down

In 513c2f0, Ubuntu.com CVE list (https://ubuntu.com/security/cve) was down:

HTTP code: 503
Response time: 143 ms

Resolved: Ubuntu.com CVE list is back up in 87453d6.

repo: canonical-web-and-design/upptime


text:
Adapting our pytest integration tests for pytest-asyncio v0.19.0

Background
pytest-asyncio is a pytest plugin we use to enable async tests and fixtures in our integration tests.  This is done by decorating tests and fixtures like:
import pytest
import pytest_asyncio

@pytest_asyncio.fixture()  # <-- pytest_asyncio version of pytest.fixture
def some_async_fixture():
  await something_async()
  yield "something-useful"

@pytest.fixture()  # <-- regular pytest.fixture for anything not async
def some_regular_fixture():
  yield "something-useful"

@pytest.mark.asyncio() # <-- tells pytest_asyncio this should be async
def test_with_async_call():
  await something_async()
  assert True

@pytest.mark.asyncio
def test_with_async_fixture(some_async_fixture):
  stuff = some_async_fixture
  assert True

def test_some_regular_test(some_regular_fixture):  # <-- does not need a decorator
  assert True

pytest-asyncio has several modes of operation.  When in strict mode, the code author must always decorate their test functions and fixtures as shown above, and failing to do so will raise Exceptions.  However, in auto mode, pytest-asyncio considers all tests and fixtures as async, regardless of whether they're decorated, meaning that omiting all @pytest.mark.asyncio above and using regular pytest fixtures would still run properly.
Prior to release v0.19.0, the default mode has been auto, so all our tests run properly even if we've forgotten the asyncio marks and decorators.  As of v0.19.0, however, the default mode has been changed to strict.  This means that for some of our CI, we're now getting caught with missing decorators (this case is missing the @pytest_asyncio.fixture() on the async fixture).
enter pytest-operator...
Adding a little extra confusion, pytest-operator (which we use in all our integration tests) automatically adds @pytest.mark.asyncio to all async tests.  This means that, even with asyncio-mode=strict, our charm's test suites can omit @pytest.mark.asyncio calls.  But, pytest-operator does not automatically convert pytest.fixture()s into pytest_asyncio.fixture()s, so we must always use the async fixture if asyncio-mode=strict.  This is why when going from pytest-asyncio v0.18.3 to v0.19.0 (which changed the default mode from auto to strict, some tests using fixtures started failing (dashboard).
Solutions
There are a few solution options.
set asyncio-mode=auto
This can be done in a pytest.ini, pyproject.toml, or command line arg to pytest.  I lean toward using a pyproject.toml which is what the template operator repo uses for similar things and we should probably move to.
use @pytest_asyncio.fixture() for any async fixtures
This will make us compliant with asyncio-mode=strict, and then our tests should work fine.  It also makes it a bit clearer the intent behind what we're doing, at the cost of a little extra awareness and effort on our part when writing charms

Closing this issue as it isn't really something we need to do, so much as just a documentation of something that's happened

Note that this conversation was a precursor to the above doc and might be useful background context

repo: canonical/bundle-kubeflow


text:
changing the journalctl log collection with  -o with-unit as default

In sos project there is a current PR sosreport/sos#3346 that may cause issues in interpretation and analysis of logs.
This issue has been created to see if this is indeed the case and have discussion around this

as I understand it the above pull request affects the "logs" plugin output which is a text representation of the journal itself (which is also included in sosreports). We (hotsos) do not use the logs plugin at all and instead make queries on the journal itself so I don't believe the above PR affects us.

Thanks @dosaboy, will close this one off

authors: arif-ali dosaboy

repo: canonical/hotsos


text:
Ensuring compatibility with Juju 3.X

Description

Fixes watchdog to be compatible with Juju 3.X
Fixes lots of minor things

Checklist

[x] My code follows the style guidelines of this project.
[x] I have performed a self-review of my own code.
[x] I have made corresponding changes to the documentation.
[x] I have added tests that validate the behaviour of the software.
[x] I validated that new and existing unit tests pass locally with my changes.
[x] Any dependent changes have been merged and published in downstream modules.
[x] I have bumped the version of any required library.

And integration tests are failing

authors: Gmerold gruyaume


text:
jsonschema update has indirect build dependency on rust compiler

Bug Description
The prometheus k8s operator fails to build from a fresh clone
To Reproduce

git clone git@github.com:canonical/prometheus-k8s-operator.git
cd prometheus-k8s-operator/
charmcraft pack --verbose

Environment
Using Charmcraft 2.3.0.post12+gitd244e61 (latest/edge),
Relevant log output
::    :: Collecting rpds-py>=0.7.1
::    ::   Downloading rpds_py-0.8.8.tar.gz (16 kB)
::    ::   Installing build dependencies: started
::    ::   Installing build dependencies: finished with status 'error'
::    ::   ERROR: Command errored out with exit status 1:
::    ::    command: /root/parts/charm/build/staging-venv/bin/python3 /root/parts/charm/build/staging-venv/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-_k8xehix/overlay --no-warn-script-location --no-binary :all: --only-binary :none: -i https://pypi.org/simple -- 'maturin>=1.0,<2.0'
::    ::        cwd: None
::    ::   Complete output (65 lines):
::    ::   Collecting maturin<2.0,>=1.0
::    ::     Downloading maturin-1.1.0.tar.gz (181 kB)
::    ::     Installing build dependencies: started
::    ::     Installing build dependencies: finished with status 'done'
::    ::     Getting requirements to build wheel: started
::    ::     Getting requirements to build wheel: finished with status 'done'
::    ::       Preparing wheel metadata: started
::    ::       Preparing wheel metadata: finished with status 'done'
::    ::   Collecting tomli>=1.1.0; python_version < "3.11"
::    ::     Using cached tomli-2.0.1.tar.gz (15 kB)
::    ::     Installing build dependencies: started
::    ::     Installing build dependencies: finished with status 'done'
::    ::     Getting requirements to build wheel: started
::    ::     Getting requirements to build wheel: finished with status 'done'
::    ::       Preparing wheel metadata: started
::    ::       Preparing wheel metadata: finished with status 'done'
::    ::   Building wheels for collected packages: maturin, tomli
::    ::     Building wheel for maturin (PEP 517): started
::    ::     Building wheel for maturin (PEP 517): finished with status 'error'
::    ::     ERROR: Command errored out with exit status 1:
::    ::      command: /root/parts/charm/build/staging-venv/bin/python3 /tmp/tmpog3p69_s build_wheel /tmp/tmp7bzppdjd
::    ::          cwd: /tmp/pip-install-kzlounls/maturin
::    ::     Complete output (33 lines):
::    ::     running bdist_wheel
::    ::     running build
::    ::     running build_py
::    ::     creating build
::    ::     creating build/lib.linux-x86_64-cpython-38
::    ::     creating build/lib.linux-x86_64-cpython-38/maturin
::    ::     copying maturin/__main__.py -> build/lib.linux-x86_64-cpython-38/maturin
::    ::     copying maturin/__init__.py -> build/lib.linux-x86_64-cpython-38/maturin
::    ::     copying maturin/import_hook.py -> build/lib.linux-x86_64-cpython-38/maturin
::    ::     running egg_info
::    ::     creating maturin.egg-info
::    ::     writing maturin.egg-info/PKG-INFO
::    ::     writing dependency_links to maturin.egg-info/dependency_links.txt
::    ::     writing requirements to maturin.egg-info/requires.txt
::    ::     writing top-level names to maturin.egg-info/top_level.txt
::    ::     writing manifest file 'maturin.egg-info/SOURCES.txt'
::    ::     reading manifest file 'maturin.egg-info/SOURCES.txt'
::    ::     reading manifest template 'MANIFEST.in'
::    ::     warning: no files found matching '*.json' under directory 'src/python_interpreter'
::    ::     writing manifest file 'maturin.egg-info/SOURCES.txt'
::    ::     running build_ext
::    ::     running build_rust
::    ::     error: can't find Rust compiler
::    ::
::    ::     If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.
::    ::
::    ::     To update pip, run:
::    ::
::    ::         pip install --upgrade pip
::    ::
::    ::     and then retry package installation.
::    ::
::    ::     If you did intend to build this package from source, try installing a Rust compiler from your system package manager and ensure it is on the PATH during installation. Alternatively, rustup (available at https://rustup.rs) is the recommended way to download and update the Rust compiler toolchain.
::    ::     ----------------------------------------
::    ::     ERROR: Failed building wheel for maturin
::    ::     Building wheel for tomli (PEP 517): started
::    ::     Building wheel for tomli (PEP 517): finished with status 'done'
::    ::     Created wheel for tomli: filename=tomli-2.0.1-py3-none-any.whl size=12758 sha256=b57d53172b3432857125ceaa4b9b2d28e4ae0510c95c5cf031955ada144ba3ff
::    ::     Stored in directory: /root/.cache/pip/wheels/bb/b6/90/165ed2d4e3933c7567df3ca84de8db1cf47278a1673e8c476c
::    ::   Successfully built tomli
::    ::   Failed to build maturin
::    ::   ERROR: Could not build wheels for maturin which use PEP 517 and cannot be installed directly
::    ::   ----------------------------------------
::    :: ERROR: Command errored out with exit status 1: /root/parts/charm/build/staging-venv/bin/python3 /root/parts/charm/build/staging-venv/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-_k8xehix/overlay --no-warn-script-location --no-binary :all: --only-binary :none: -i https://pypi.org/simple -- 'maturin>=1.0,<2.0' Check the logs for full command output.

Additional context
Adding jsonschema as a binary package (to prevent downloading and trying to build rpds-py) would be a valid workaround.

I can confirm the jsonschema binary package workaround does work. Checking if just adding rustc and cargo as build packages works...

Closing the issue as this was solved in #494 :)

authors: lengau lucabello


text:
test-branch/execute-job/quoted-authorization/2076cee7-b9f7-4d56-ac7f-34cde5c47028

PR for testing 341e9a38a89d5e61de75cb01ca82e63d5e93809b

/canonical/self-hosted-runners/run-workflows 341e9a38a89d5e61de75cb01ca82e63d5e93809b

repo: canonical/repo-policy-compliance-tests


text:
Tcp routing

Fixes #18
Solution
Added a TCP routing mode via ingress-per-unit, only applicable in combination with path routing mode.

IPU requirer databag updated with a mode: tcp|http
Traefik updated to provide tcp routing.

Context
This is implemented by adding a per-unit entryPoint in traefik's static configuration. This means that on each change, Traefik needs to restart. This means that we might drop requests-in-flight. Do we need some rolling-graceful-reboot to mitigate?
Testing Instructions
Itests under test_charm_tcp should provide some inspiration.
Please check out:
I would appreciate especially a second pair of eyes on how I refactored the pebble-ready flow. Reason for that is that I needed to re-run some 'setup and start traefik' code on TCP config changes since these require a traefik reboot. Container.replan was not enough because the service hadn't in fact changed, only its static config did. So I added a conditional Container.restart(traefik-service-name).
Release Notes

added TCP routing support for Traefik.

All in all looks good! Can you add a test that runs tcp and http in parallel for different relations?

Technically, that is already the case.
If you run all tests in a single model (like it happens in the CI pipeline since we pass --model something in the workflow, you'll get tcp and ipa/ipu tests all in the same model.
Although I guess it's possible that since the suites are run sequentially, the tcp suite might 'break' the earlier suites, so we could do something like

test ipa
test ipu
test tcp
test ipu again

to catch that scenario?
Or how would you propose to test them 'in parallel'?

All in all looks good! Can you add a test that runs tcp and http in parallel for different relations?

Technically, that is already the case.

If you run all tests in a single model (like it happens in the CI pipeline since we pass --model something in the workflow, you'll get tcp and ipa/ipu tests all in the same model.
Although I guess it's possible that since the suites are run sequentially, the tcp suite might 'break' the earlier suites, so we could do something like

test ipa
test ipu
test tcp
test ipu again

to catch that scenario?
Or how would you propose to test them 'in parallel'?

test ipa
test ipu
test tcp
test ipa to one charm and TCP to another one
test ipu to one charm and TCP to another one

While I agree that it implicitly does this already, I'd like to see it become an explicit test to lessen the risk for regression down the line.
:)

@simskij took me a while to refactor things to avoid duplication, but I think I found a decent solution.
Added a compatibility test that verifies that a tcp relation + regular ipa/ipu work simultaneously

authors: PietroPasotti simskij


text:
feat: add secrets backend relation

Description
This PR introduces the Vault-kv relation to vault-k8s.
The vault-kv interface can be discussed here
This interface is a port from the machine charm interface with some note worthy differences:

Secret role id is no longer access by the requirer through a wrapped token
The provider side shall fill in the vault_url in the app databag
isolated is not allowed anymore as this concept is not really translatable to k8s charms

Note worthy change to Vault charm:

The default vault k8s svc is no longer patched to become a load balancer type, instead a new one is created. This results in a ClusterIP svc and a LoadBalancer svc (allows for outside access). A ClusterIP svc is necessary to allow ACLs based on related units' IP addresses

Checklist:

[X] My code follows the style guidelines of this project
[X] I have performed a self-review of my own code
[ ] I have made corresponding changes to the documentation
[X] I have added tests that validate the behaviour of the software
[X] I validated that new and existing unit tests pass locally with my changes
[ ] Any dependent changes have been merged and published in downstream modules

Convert to draft to make sure interface PR is merged first

Force push is only rebasing on main, with no noticeable change (except the part on vault SVC to align with main).
Will now take into account the comments on interface, and on this pull request. Thank you for all your feedback.

Still WIP, mainly a rebase over main branch + integration of charm-relation-interface

Rebase on main to get Ingress address into vault server's certificate.
Adding ca_certificate as relation data, cf: https://github.com/canonical/charm-relation-interfaces/pull/105
Storing secret ids in peer relationship because getting secret by label only lead you (after a grant) to get a secret id in short form, which does not work over CMRs


text:
WIP: (feat) Add controller created and destroyed event.

Work in progress: Do not merge!
Closes https://github.com/canoo/dolphin-platform/issues/794.

Will be fixed in #20. Closing this.

repo: canoo/dolphin-platform-polymer


text:
:whale: Fix CI process

Mancada minha, acabei adicionando os arquivos na pasta errada. Obrigado @canove pela ajuda.

@canove só aceita o merge se rodar aqui na PR.

Tive que aprovar para os arquivos irem para a pasta certa. Agora na próxima PR deve disparar...

Funcionou, quando atualizei a branch do dialogflow rodou corretamente. Obrigado @canove

saludos tienes esa sistema en saas con todo el funcion por se tienes estoy muy interesado lo agradezco se me escribe al correo autolavadoelpana@hotmail.com o al whatsapp mas facil +50687021496

authors: canove llantasghasham ricardoapaes

repo: canove/whaticket


text:
Add "Start Again" button to the "Installation Complete" page

Currently, if you have finished deployment and want to deploy another set of modules, you need to refresh the page. A simple button that would allow you to start the process over again would be helpful

Resolved by #53.

authors: Eugene-Varghin can-anierzad

repo: cantarus/PolyDeploy


text:
Huginn docker template for Unraid v6

Knocked together a quick little unraid docker template for using the huginn docker container in unraid v6
https://github.com/alias1/unraid-docker-templates/blob/master/cantino/huginn.xml
( See unraid forums for other examples: http://lime-technology.com/forum/index.php?topic=37958.0 )
There may be some tweaks/better options to set with it, I've basically only done it as a proof of concept so far, but it seems to start up and let me log in.
Was planning on listing it in that forum thread, but was thinking it might make more sense to be in a repo hosted by @cantino first?
It also doesn't have the icon/banner set in the xml yet. Is there a logo that should be used?

Cool @alias1!
I don't think I totally know what unraid is, but you can feel free to post it on a forum if you like.  We don't have a final logo yet... which reminds me, I should ping that thread.

Unraid is basically a NAS distro/interface, and in v6 they're adding proper virtualisation support, most interestingly (to me at least) being docker containers.
A good use for my otherwise super overpowered/under-utilised 32gb ram Xeon 3U :p
—
Sent from Mailbox
On Thu, Mar 5, 2015 at 5:27 AM, Andrew Cantino notifications@github.com
wrote:

Cool @alias1!
I don't think I totally know what unraid is, but you can feel free to post it on a forum if you like.  We don't have a final logo yet... which reminds me, I should ping that thread.
Reply to this email directly or view it on GitHub:
https://github.com/cantino/huginn/issues/726#issuecomment-77215604

That's cool!

That is pretty neat. I'll have to give unraid a try myself :)

I'm going to close this issue since we have a good Docker setup.  Please reopen if you want to discuss further.

authors: alias1 cantino ianblenke

repo: cantino/huginn


text:
Massive logs

https://github.com/syncthing/syncthing/issues/1579#issuecomment-89516413

@borissamardzija That's an impressively large logfile! It will be automatically deleted after a week, but I agree it should never get that large in the first place. It looks like Syncthing's logging an awful lot to stdout, which SyncTrayzor is capturing: the syncthing.xxxx.log logfiles are a record of stdout. Normally syncthing only logs a lot if something's gone a bit wrong - can you take a look inside the logfile and give me a representative snippet?
So, there's about 2GB of stdout logs, and the rest is probably mainly Syncthing's events.
I don't want to stop logging Syncthing's stdout - it's important information. However, we can tweak the log rotation config so they get archived, and then deleted, more frequently.
I'll fix this in the next release. In the meantime, you can:

Open C:\Program Files\SyncTrayzor\SyncTrayzor.exe.config (or if you've got the portable version, SyncTrayzor.exe.config)
Replace the <nlog ... > section at the bottom with:

    <nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <targets>
        <target name="logfile" type="File"
                fileName="${gdc:item=LogFilePath}\SyncTrayzor.log"
                createDirs="True"
                archiveFileName="${gdc:item=LogFilePath}\logs archive\SyncTrayzor.{#}.log"
				archiveAboveSize="10485760"
                archiveEvery="Day"
                archiveNumbering="Sequence"
                maxArchiveFiles="5"
                AutoFlush="True"
                layout="${longdate} [${level}] ${logger}: ${message} ${exception:format=type,message,method,stacktrace,tostring:maxInnerExceptionLevel=10:innerFormat=shortType,message,method}"/>
        <target name="debugger" type="Debugger"
                layout="${time} [${level}] ${logger:shortName=true} ${message}"/>
        <target name="syncthinglogfile" type="file"
                fileName="${gdc:item=LogFilePath}\syncthing.log"
                createDirs="True"
                archiveFileName="${gdc:item=LogFilePath}\logs archive\syncthing.{#}.log"
				archiveAboveSize="10485760"
                archiveEvery="Day"
                archiveNumbering="Sequence"
                maxArchiveFiles="5"
                layout="${message}"/>
      </targets>
      <rules>
		<logger name="SyncTrayzor.SyncThing.SyncThingProcessRunner" minlevel="Debug" writeTo="syncthinglogfile"/>
        <logger name="*" minlevel="Debug" writeTo="logfile"/>
        <logger name="*" minlevel="Debug" writeTo="debugger"/>
      </rules>
  </nlog>

Delete the logs archive folder.

That will limit the disk usage of SyncTrayzor's logs to 100MB, and that's in extreme cases (with lots of stdout output).

Yes, I was also shocked when I found this.
It's caused by
https://github.com/syncthing/syncthing/issues/1295
https://github.com/syncthing/syncthing/issues/504
so my log files consist mainly of someting like this
[7DEKR] 00:52:30 INFO: Puller (folder "Cloud", file "Dropbox\\Apps\\Money by Jumsoft\\com.jumsoft.money3.sync\\Documents\\45454E72-D091-449A-9307-52D4E13A8F1B\\SyncChanges\\B2E23A5C-17A1-4962-B1DC-BEB9E4654180-222-000000498A607DDB\\0439059709,110088-EC55D290-B456-4C41-BE55-86999B485109-27232-00001143122A365D.syncchg"): dst create: open D:\Cloud\Dropbox\Apps\Money by Jumsoft\com.jumsoft.money3.sync\Documents\45454E72-D091-449A-9307-52D4E13A8F1B\SyncChanges\B2E23A5C-17A1-4962-B1DC-BEB9E4654180-222-000000498A607DDB\~syncthing~.0439059709,110088-EC55D290-B456-4C41-BE55-86999B485109-27232-00001143122A365D.syncchg.tmp: The system cannot find the path specified.
The problem is, that line is generated about 400 times a second!
I will now try what you suggested and get back with results.
Thank you for support!

Cool - the new config will rotate the logs after they reach 10MB, and reduces the number of archived files to 5. So the max you can end up with is 510MB for SyncTrayzor and 510MB for Syncthing. I don't want to keep less than that in case I need to debug a user issue.

You mean, 5x10MB for SyncTrayzor and 5x10MB for Syncthing
Yup, I filled that already so I think this works fine now! :)

Cool, thanks for testing that! The next release will make this the default


text:
[QUESTION] Why entity.association('') is not same as entity?.association?.('') in cds-typer?

Question
HI! I have q very weird issue in my project.
Let's say i have a code like this:
const result = await SELECT.from(OBJECTS, (o) => {
    o.OBJECT_TYPE, o.OBJECT_OID, o.SCHEMA_NAME, o.OBJECT_NAME;
    o.view &&
      o.view((v) => {
        v('*');
        v.columns('*');
      });

By default it won't run because of the TS error:
Cannot invoke an object which is possibly 'undefined'.ts(2722)
(property) columns?: cds.ql.QLExtensions_<VIEW_COLUMNS_> | undefined

So here are two possible ways how to solve it:

using condition

 o.view((v) => {
        v('*');
        v.columns && v.columns('*');
      });

and it works

using optional notation ( also preferred by AI )

  o.view &&
      o.view((v) => {
        v('*');
        v?.columns?.('*');
      });

and this doesn't work!
Here is what I have in the console:
/workspace/node_modules/@cap-js/db-service/lib/infer/index.js:876
        throw new Error(
              ^
Error: "call" not found in the elements of "VIEWS"
    at stepNotFoundInCombinedElements (/workspace/node_modules/@cap-js/db-service/lib/infer/index.js:876:15)
    at /workspace/node_modules/@cap-js/db-service/lib/infer/index.js:576:13
    at Array.forEach (<anonymous>)
    at inferQueryElement (/workspace/node_modules/@cap-js/db-service/lib/infer/index.js:529:18)
    at handleRef (/workspace/node_modules/@cap-js/db-service/lib/infer/index.js:453:7)
    at /workspace/node_modules/@cap-js/db-service/lib/infer/index.js:331:16
    at Array.forEach (<anonymous>)
    at inferQueryElements (/workspace/node_modules/@cap-js/db-service/lib/infer/index.js:300:15)
    at infer (/workspace/node_modules/@cap-js/db-service/lib/infer/index.js:71:22)
    at resolveExpand (/workspace/node_modules/@cap-js/db-service/lib/infer/index.js:842:42)

Do you know why? Thank you!

@chgeo  do you know why? Can it be a bug? Thanks!

repo: cap-js/cds-typer


text:
fix: creates drafts property only at entities that are truly draft enabled

Uses a new approach taken from @sap/cds-compiler/lib/transform/draft.js#generateDraft to detect draft enabled entities.
In essence there are only 2 cases when a draft table will be generated for an entity and therefore the .drafts property of an entity will return a valid CSN entity reference during runtime.

Entity A is exposed in a service and has the annotation @odata.draft.enabled

Entity B is used as composition in Entity A or an Entity (C-Z) that is a composition of Entity A
// model.cds
entity A { b : Composition of B }
entity B { c : Composition of C }
entity C { d: Composition of D }
entity D { }

// service.cds
serivce Service {
  @odata.draft.enabled
  entity P1 as projection on A;
}

Service.P1 is draft enabled via annotation
Service.B, Service.C and Service.D are draft enabled via composition relationship
A, B, C, D remain as is and won't have access to a .drafts property

Further remarks

The refactoring uses the inferred csn model, because the xtended one does not include the autoexposed entities.
The draft state is no longer propagated top-down, as the model entities must not get the drafts properties. Instead, all draft enabled service-entities are collected in an array

Fixes #68

Admittedly, I lack the deeper user-side understanding required to evaluate if this fully covers all cases, but as the current approach is just a heuristic, and your approach eliminates some of the use of extended CSN, I am strongly in favour of rolling with it to see if gaps pop up.
Thanks for the contribution! :)

authors: daogrady stockbal


text:
Please document cds.entities

Documentation is missing for cds.entities in the documentation for cds facade. It is a shortcut to cds.db.entities, is it not? But there are references in release notes (example) where cds.entities is used as a function with namespace as an argument. So, is documentation of cds.Service.entities complete? It does not mention the extra argument.

Hi @dinurp,
thanks for you question. I'll get back to you next week.

authors: dinurp renejeglinsky

repo: cap-js/docs