Br v4.0.0

This PR:

BREAKING CHANGE: introduces is_required boolean property at the output_type level to configure whether the output type is required for submissions to be considered valid (#99).
BREAKING CHANGE: Disallows optional property in output_type_id objects. As such, when a given output type is submitted, values for all output type IDs much be submitted (#100,#101, #102).
Introduces optional derived_task_ids property to enable hub administrators to define derived task IDs (i.e. task IDs whose values depend on the values of other task IDs) at a hub level. This allows primarily validation functionality to ignore such task IDs when appropriate which can significantly improve validation efficency (#96 ). For more information see hubValidations documentation on ignoring derived task IDs.
Add descriptions to repository object (#98)
Also clarified branch naming instruction to align with expectation in hubDocs

\diff

/diff

/diff

/diff

/diff

/diff

admin-schema.json
39,43c45,51
<             "examples": [{
<                 "host": "github",
<                 "owner": "hubverse-org",
<                 "name": "example-simple-forecast-hub"
<             }],
---
>             "examples": [
>                 {
>                     "host": "github",
>                     "owner": "hubverse-org",
>                     "name": "example-simple-forecast-hub"
>                 }
>             ],
49c57,59
<                     "enum": ["github"]
---
>                     "enum": [
>                         "github"
>                     ]
51a62
>                     "description": "The hub repository owner (user or organisation).",
54a66
>                     "description": "The name of the hub repository.",

Note I did manage to re-indent with jq but it expanded all arrays to multiple rows too with no clear way how to avoid that. I've tried to manually focus the diff on what's important in v4.0.0 instead.
If someone has better ideas let me know!

/diff

Note I did manage to re-indent with jq but it expanded all arrays to multiple rows too with no clear way how to avoid that.

I think we should just bend to the formatter. One thing we could do to avoid this is to run 3.0.1 through the formatter in this PR as well so that the diff appears the same. The formatter will not change any structural information of the JSON, just its format.
From there, we can add guidance for future additions to run it through the formatter.

I think we should just bend to the formatter. One thing we could do to avoid this is to run 3.0.1 through the formatter in this PR as well so that the diff appears the same. The formatter will not change any structural information of the JSON, just its format.

Good option! See #106

From there, we can add guidance for future additions to run it through the formatter.

I opened the following issue to discuss approach: #107

/diff

/diff

\diff

/diff

\diff

Hey @LucieContamin ! I added a round level property now too so you can now use that to override the global property.
Glad you asked for this feature as going back to introduce it I found that the global derived_task_ids property was nested at the wrong level!!  🙈

/diff

/diff

point estimates
Something that was brought up in response to https://github.com/reichlab/variant-nowcast-hub/pull/117#issuecomment-2423170370 is that the "NA" is a bit confusing because it sure looks like a character, but when we expand the grid the output_type_id columns become NA (which is an intentional move by Ooms described in section 2.1.1 of the JSONlite package paper)
Now that we are using is_required for point estimate types, we might be able to take this opportunity to set the required property to a single element null array. This will have exactly the same result as the "NA" array, but with the following advantages:

inter-language compatibility can be achieved since null is a concept that even JSON can understand
we can clearly communicate that this should be a missing value in the data as opposed to a character string.

This is what I think it would look like in the schema:
"required": {
    "description": "Not relevant for point estimate output types. Must be a single array of null"
    "type": "array"
    "items": {
        "const": null,
        "maxItems": 1
    }
}

Demo
Here's a demo that shows that ["NA"] and [null] are equivalent by modifying a tasks.json file and reading them in with jsonlite
hub_con <- hubData::connect_hub(
  system.file("testhubs/simple", package = "hubUtils")
)
hp <- attributes(hub_con)$hub_path
# Get the tasks file which has a `mean` output type
tasks <- fs::path(hp, "hub-config", "tasks.json")

# copy the file to a new temp file
tmp <- withr::local_tempfile()
fs::file_copy(tasks, tmp, overwrite = TRUE)
# The two files are identical
unname(tools::md5sum(tmp) == tools::md5sum(tasks))
#> [1] TRUE

cfg <- readLines(tmp)
writeLines(cfg[231:240]) # optional is NA
#>                 "output_type": {
#>                     "mean": {
#>                         "output_type_id": {
#>                             "required": null,
#>                             "optional": ["NA"]
#>                         },
#>                         "value": {
#>                             "type": "integer",
#>                             "minimum": 0
#>                         }

# Change '["NA"]' to '[null]'
nullcfg <- sub('["NA"]', '[null]', cfg, fixed = TRUE)
writeLines(nullcfg[231:240]) # optional is now null
#>                 "output_type": {
#>                     "mean": {
#>                         "output_type_id": {
#>                             "required": null,
#>                             "optional": [null]
#>                         },
#>                         "value": {
#>                             "type": "integer",
#>                             "minimum": 0
#>                         }
writeLines(nullcfg, con = tmp) # changing to null

# The two files are no longer identical
unname(tools::md5sum(tmp) == tools::md5sum(tasks))
#> [1] FALSE
waldo::compare(cfg, nullcfg)
#> old[81:87] vs new[81:87]
#>   "                    \"mean\": {"
#>   "                        \"output_type_id\": {"
#>   "                            \"required\": null,"
#> - "                            \"optional\": [\"NA\"]"
#> + "                            \"optional\": [null]"
#>   "                        },"
#>   "                        \"value\": {"
#>   "                            \"type\": \"integer\","
#>
#> old[232:238] vs new[232:238]
#>   "                    \"mean\": {"
#>   "                        \"output_type_id\": {"
#>   "                            \"required\": null,"
#> - "                            \"optional\": [\"NA\"]"
#> + "                            \"optional\": [null]"
#>   "                        },"
#>   "                        \"value\": {"
#>   "                            \"type\": \"integer\","

# The resulting R object after reading in JSON are identical
identical(
  jsonlite::fromJSON(tasks, simplifyDataFrame = FALSE),
  jsonlite::fromJSON(tmp, simplifyDataFrame = FALSE)
)
#> [1] TRUE

Created on 2024-10-18 with reprex v2.1.1

/diff


Azure support

Description
Provided is the access to the azure_openai API, which requires the configuration of llm and embedder in the config. If the API keys for the two are different, they need to be configured separately; otherwise, it is sufficient to configure the environment variables for llm only.
Fixes # (azure_openai support)
Type of change
Please delete options that are not relevant.

[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested?
To run the azure_test.py file under the test directory directly, you can do so. However, you must first input the keys for llm and embedder, as well as the endpoint and version.
Please delete options that are not relevant.

[ ] Unit Test

Checklist:

[ ] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes
[ ] Any dependent changes have been merged and published in downstream modules
[ ] I have checked my code and corrected any misspellings

Maintainer Checklist

[ ] closes #xxxx (Replace xxxx with the GitHub issue number)
[ ] Made sure Checks passed

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

@crazyxixi Can you please resolve the conflicts?

@crazyxixi Can you please resolve the conflicts?

I've submitted new support to accommodate the new version

Hey @crazyxixi Can you please create one PR with all the necessary changes for Azure support?

Hey @crazyxixi Can you please create one PR with all the necessary changes for Azure support?

I have submitted a new pull request called "Azure embedding support."

Closing this PR as changes have already been implemented.


Update SteamWeb.cs

Authenticate SteamWeb with cookies

Not sure why this would be necessary, but it couldn't affect existing code so I'll merge it


Winter Of Blockchain Introduction/Tracking

👋 Hello @Swarnendu0123 ,
I am Durgesh Kumar Prajapati (Program Manager) Winter Of Blockchain. I'll be collaborating with you on preparing your repo for WoB'24 Program
Why are these changes required?
After Analysing contributions and feedback it would be great for students to have a couple of standard readme files on the repo to understand what the project is all about and some issues detailing what they can contribute. This will help you to see increased engagement in your repository as well.
As mentioned students get a chance to learn step by step, how to build this project as well as invite mentors to collaborate and add features to this repo. I will generate issues, which will provide guidance on how to prepare your repository.
This issue will serve as a tracking issue to track all issues related to WoB. I recommend creating a new branch for every issue and opening a pull request to track changes so we can effectively collaborate with each other and merge changes when you and I feel like those changes are ready to be merged on your primary branch.
If you have any questions or concerns, please feel free to leave a comment on this issue or any of the other issues that are generated.
I look forward to working with you

[ ] #3
[ ] #4
[ ] #5
[ ] #6
[ ] #7

Hello @Durgesh4993, welcome here. Your proposal looks good to me.


🐛 [firebase_auth] Apple sign in throws "unknown" exception when user cancels the sign in

Bug report
Apple sign in on iOS opens a separate dialog for processing the user authenticating with Apple sign in. The user can choose to cancel the sign in by clicking off of the dialog or clicking the dialog's "X" button. FlutterFire returns a FirebaseAuthException with code set to "unknown". Since cancelling is a valid user choice we would choose to catch this exception and silently take no action - effectively ignoring this "unknown" exception. However, it appears that the "unknown" exception can occur in many other cases that should not be ignored.
Steps to reproduce
    try {
      final appleProvider = AppleAuthProvider();
      return firebaseAuth.signInWithProvider(appleProvider);
    } on FirebaseAuthException catch (ex, stackTrace) {
      if (ex.code == "unknown") return;
      rethrow;
    }

Running on an iOS simulator when the user cancels the above sign in, the console displays:
Sign in with Apple errored: Error Domain=com.apple.AuthenticationServices.AuthorizationError Code=1001 "(null)"
FLTFirebaseAuth: An error occurred while calling method Auth#signInWithProvider, errorOrNil => {
}

and the exception thrown is FirebaseAuthException with code "unknown" that when printed gives [firebase_auth/unknown] An unknown error has occurred.
Expected behavior
We should be able to know when the user has taken a valid user action to cancel the sign in.
One way to know would be to have the signInWithProvider return a Future<UserCredential?> <-- note nullable. A null would indicate that no sign in was made - i.e. cancel. Yes, this would require an API change.
Another option would be to return an explicit cancel exception such as an FirebaseAuthException code of "cancel".
This same issue is present on other methods such as signInWithPopup.
Additional context
Looking at the underlying platform code the catch-all exception code that is returned is "unknown" (also capitalized "Unknown" is also sometimes returned which could be a separate issue). We would generally choose that these "unknown" exceptions at least be logged and investigated. But we shouldn't need to waste our time investigating valid user cancel choices.
Flutter dependencies
firebase_auth: ^4.1.5

Thanks for the report. I am able to replicate it using plugin example running on iOS device. The console error log is below:

 console error log

Syncing files to device Darshan's iphone...
[core] Authorization failed: Error Domain=AKAuthenticationError Code=-7003 "(null)" UserInfo={AKClientBundleID=com.nevercode.triage}
Sign in with Apple errored: Error Domain=com.apple.AuthenticationServices.AuthorizationError Code=1001 "(null)"
FLTFirebaseAuth: An error occurred while calling method Auth#signInWithProvider, errorOrNil => {
}
flutter: Error [firebase_auth/unknown] An unknown error has occurred.
#0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:653:7)
#1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:315:18)
<asynchronous suspension>
#2      MethodChannel.invokeMapMethod (package:flutter/src/services/platform_channel.dart:518:43)
<asynchronous suspension>
#3      MethodChannelFirebaseAuth.signInWithProvider (package:firebase_auth_platform_interface/src/method_channel/method_channel_firebase_auth.dart:590:12)
<asynchronous suspension>
#4      FirebaseAuth.signInWithProvider (package:firebase_auth/src/firebase_auth.dart:648:9)
<asynchronous suspension>
#5      main (package:triage/main.dart:38:39)
<asynchronous suspension>
fopen failed for data file: errno = 2 (No such file or directory)
Errors found! Invalidating cache...
fopen failed for data file: errno = 2 (No such file or directory)
Errors found! Invalidating cache...
Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service

/cc @Lyokone

@rich-j
For Desktop you can check how it's done by the firebase_ui package: packages/firebase_ui_oauth/lib/src/platform_oauth_sign_in.dart
I've opened a PR to have more details on iOS

@Lyokone the ui package that you reference shows a sign in call for the desktop that explicitly returns null when the user cancelled. For our Google sign in we have similar code since the call to GoogleSignIn().signIn() explicitly returns Future<GoogleSignInAccount?> that returns a null when the user cancels. Also note the Google sign in implementation has two parts: get Google authentication (null on cancel), then call Firebase auth signInWithCredential. (Facebook is also 2 part)
Apple sign in (doc link) is a single call to .signInWithProvider() or .signInWithPopup() that does not return a null on user cancel. A user cancel instead throws an unknown exception that also appears to be thrown under more critical error conditions. The documentation suggests that other providers (Microsoft, Twitter, GitHub, ...) and platforms (iOS, Android, Web) will also have this issue.


chore(main): release 1.1.4

:robot: I have created a release beep boop
1.1.4 (2023-07-03)
Miscellaneous 🧹

deps: update dependency @types/node to v18.16.19 (82a0eeb)
deps: update dependency eslint to v8.43.0 (692c77c)
deps: update dependency eslint to v8.44.0 (6aa335f)
deps: update dependency eslint-plugin-jest to v27.2.2 (891b6f1)
deps: update dependency ts-jest to v29.1.1 (a90c385)
deps: update dependency typescript to v5.1.6 (0fc1ab2)
deps: update typescript-eslint monorepo to v5.60.0 (c30614b)
deps: update typescript-eslint monorepo to v5.60.1 (2e99471)
deps: update typescript-eslint monorepo to v5.61.0 (7a09878)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/paulschuberth/regex-extract-action/releases/tag/v1.1.4 :sunflower:


CoreBot doesn't render welcome card in webchat

When you start CoreBot in the emulator, the bot renders the welcome card when is open.
if you host the bot in webchat, the welcome card won't render and you need to type hi or something else for the card to show.

Per @cwhitten

The Bot Framework protocol sends two ConversationUpdates, one for the Bot when it enters the conversation and one for the User after they have sent their first message. This is not governed by WebChat, but built-in to the protocol events themselves itself. As a group we are discussing how to change this behavior for a better user experience, but this is what we have in place today.

https://github.com/microsoft/BotFramework-WebChat/issues/2049
If we want the welcome message to send before the user messages Core Bot in Web Chat, we would have to configure Web Chat to send a back channel event to the bot when the DirectLine Connection is fulfilled to trigger the message instead like the Web Chat Welcome Message sample.

That is pretty obscure, do we need to add that to the CoreBot sample to help developers discover this nuance? Or document it in the readme for CoreBot? Or document this in https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-send-welcome-message?view=azure-bot-service-4.0&tabs=csharp?
As it is, I don't think devs will be able to find the issue above in GitHub and learn about this.

@gabog , were you able to fix the welcome message issue in the Core Bot (v4). I am pulling my hairs out for the same and nothing works including referring to this article -
https://blog.botframework.com/2018/07/12/how-to-properly-send-a-greeting-message-and-common-issues-from-customers/
The Web Chat (UI) version that I use is BotFramework-WebChat-0.11.4, I have done certain customizations in it to implement facebook Like/Unlike feature with comment. Please revert if you have found a solution for this.

@mutanttech It looks like you asked this question on StackOverflow. I will be sure to help you with your issue there. In the meantime, I would recommend taking a look at https://github.com/microsoft/BotFramework-DirectLineJS/issues/184#issuecomment-505162246 to see how to send a Welcome Message using DirectLineJs.

@gabog
The Direct Line Connector Service has been updated to send one conversation update event with both the bot id and the user id in the activity's membersAdded property if the token used to start the conversation was generated with a user id. Otherwise, the second conversation update for the user is still sent after the user messages the bot the first time.
In the example below, the user id is added to the token request and the welcome message is sent from the onMembersAdded handler.
Web Chat
(async function () {
  const secret = '<DIRECT_LINE_SECRET>';
  const res = await fetch('https://directline.botframework.com/v3/directline/tokens/generate', {
    method: 'POST',
    headers: {
      Authorization: `Bearer ${secret}`,
      'Content-type': 'application/json'
    },
    body: JSON.stringify({ user: { id: 'dl_user_id', name: 'username' }})
  });
  const { token } = await res.json();

  window.WebChat.renderWebChat({
    directLine: window.WebChat.createDirectLine({ token })
  }, document.getElementById('webchat'));

  document.querySelector('#webchat > *').focus();
})().catch(err => console.error(err));

Bot - Node SDK v4
this.onMembersAdded(async (context, next) => {
    const { membersAdded } = context.activity;

    for (let member of membersAdded) {
        if (member.id !== context.activity.recipient.id)
            await context.sendActivity("Welcome Message from `onMembersAdded` handler!");
    }
    await next();
});

### Screen Capture

![screengif](https://user-images.githubusercontent.com/17039790/61333554-26f8e400-a7dc-11e9-99f9-9bc4235865d9.gif)

@tdurnford, I read your comment today. Is this applicable for v3 as well. And does this mean the changes we have done for sending a backchannel event and handling the event activity can be simplified?

@mutanttech Yes, this should also apply to Web Chat v3. We're working on putting together better documentation for Web Chat Welcome Messages.

Hi @tdurnford, testing this right now, will let you know how it goes soon but preliminary tests look promising.

Hi again @tdurnford, I tested the webchat script in my code and conversation update works as expected now. thanks for the help.
Gabo


Fixed #334: Sort attributes before computing the hashcode

Sort attributes by attribute key

You are right, in getAttributesFiltered there's no real need for sorted attributes and TreeMap is safer than ConcurrentHashMap .
Add a new method int getHashCodeByAttributes(ConcurrentMap attributes) when get hashcode  is the best way to solute this question.
But how to get hashcode? Convert ConcurrentHashMap  to TreeMap and Serialize the TreeMap again ?

Without further checking I'd think that instead of final ConcurrentMap<String, Object> attributes = _session.getAttributesFiltered(); this would be sufficient: final Map<String, Object> attributes = new TreeMap(_session.getAttributesFiltered());.

I meant i don't know how to get hashcode by sorted attributes.
Can you give me some advice?

Can't you just pass the sorted attributes to serializeAttributes to get back attributesData?

ConcurrentMap is be required in serializeAttributes method, if the attributes change to Map , serializeAttributes method is need to modify?

 We'd also have to make sure that this sorted map is actually serialized, therefore it might be a good idea to change serializeAttributes etc to accept a SortedMap to make the contract more explicit (alternatively the javadoc would have to mention that SortedMaps must be handled accordingly)
I stepped a bit through the code, and AFAICS the only msm external modification is needed for kryo-serializer's CopyForIterateMapSerializer, which the KryoTranscoder uses if msm is configured with copyCollectionsForSerialization=true. The CopyForIterateMapSerializer would create a new HashMap from the provided map and therefore would not have entries ordered deterministically.
The JavolutionTranscoder and XStreamTranscoder differ from other transcoders in that they serialize the class name of the attributes map (previously ConcurrentHashMap, then TreeMap), which means that these transcoders have to deserialize the original map and create a ConcurrentHashMap from the deserialized map.
We could also change deserializeAttributes to return a Map only, then implementations have more freedom. The TranscoderService.deserialize method could then check if a ConcurrentMap was returned from deserializeAttributes and if not create a ConcurrentHashMap from the returned map.
So the change seems to be a bit more involved... ;-)

This is my worry.
Are there any other solutions?

I've not yet clearly understood the original observation: why the same session data was serialized differently. If we know what exactly caused this there might be another solution or workaround.

Another solution could be to use a ConcurrentSkipListMap for attributes instead of ConcurrentHashMap. This would require also some changes to replace previous usages of CHM, but it should be significantly fewer.

There is a test case:
public class MapSerializerTest {

    private Kryo _kryo;

    @BeforeTest
    public void setUp() throws Exception {
        _kryo = new Kryo();

        MapSerializer.registerSerializers(_kryo);
    }

    @Test
    public void testDeserialize() throws Exception {
        ConcurrentMap<String ,Object> obj = new ConcurrentHashMap<String ,Object>();
        obj.put("iccid","12345");
        obj.put("cityCode","heibei");
        final byte[] serializedByObj = serialize(_kryo, obj);
        final ConcurrentMap deserialized = deserialize(_kryo, serializedByObj, ConcurrentHashMap.class);
        // that is ok
        assertEquals(obj,deserialized);

        final byte[] serializedByDeserialized = serialize(_kryo, deserialized);
        // serializedByObj not equals serializedByDeserialized
        assertNotEquals(serializedByObj,serializedByDeserialized);
        // copy deserialized obj  to a new obj
        ConcurrentMap<String ,Object> obj2 = new ConcurrentHashMap<String ,Object>();
        for (Object key : deserialized.keySet()) {
            obj2.put((String) key,deserialized.get(key));
        }
        assertEquals(obj2,deserialized);
        // serialize obj2
        final byte[] serializedByObj2 = serialize(_kryo, obj2);
        // compare serializedByObj with serializedByObj2
        assertEquals(serializedByObj,serializedByObj2);
    }
}

I guess the problem caused by the deserialized obj, so i used a copy of deserialized attributes to compute hascode in my solution.

Sorry, I can't follow you. Can you please rephrase what you want to say?

The same data serialized differently. Maybe it's  because of that the deserialized data is not deep equals with the original data.
When I run this test:
@Test
public void testDeserialize() throws Exception {
    ConcurrentMap<String ,Object> obj = new ConcurrentHashMap<String ,Object>();
    obj.put("iccid","12345");
    obj.put("cityCode","heibei");
    final byte[] serializedByObj = de.javakaffee.kryoserializers.KryoTest.serialize(_kryo, obj);
    final ConcurrentMap deserialized = de.javakaffee.kryoserializers.KryoTest.deserialize(_kryo, serializedByObj, ConcurrentHashMap.class);

    de.javakaffee.kryoserializers.KryoTest.assertEquals(obj,deserialized);
    de.javakaffee.kryoserializers.KryoTest.assertDeepEquals(obj,deserialized);
}

I got the error:
java.lang.AssertionError: expected [iccid] but found [cityCode]
Expected :iccid
Actual   :cityCode

That's what we/you observed originally, and therfore is expected, isn't it?
This should not happen with ConcurrentSkipListMap.

Yes, this not happen with ConcurrentSkipListMap.
When we put the attributes into ConcurrentHashMap with the different order of keys, we will get the different serialized data, sometimes we will get the same data also.
If we put the attributes  into ConcurrentHashMap with the same order of keys. we will get the same serialized data, is it right?


mobile styling

floating search bar instead of sidebar:

TODO:

[ ] replace marker popup with bottom drawer
[ ] swipe bottom drawer to show next/previous and highlight marker

@kielni You're probably already down a good road here, but I noticed a potentially-useful swipe plugin (since jquery is already on board).

@kielni Wow; this looks great!

In the interest of a quick iterate-and-ship cycle I think this is good to go. Swiping through events is a nice addition that can fit in another PR, but this UI stands on its own. I'll merge in ~30mins.


Use stdint.h and stdbool.h for communication protocol

Currently, we are using the standard C data types in our structs.
This issue is about using the data types defined in stdint.h and stdbool.h instead such as int8_t, uint8_t and so on instead.
Then we can reimplement management.c and expand json.c to support all of these

@jesperpedersen I can work on this!(while working on the direct io issue)

@shikharish This is a complex issue - as we basically require a full implementation of JSON data types

@jesperpedersen Can you tell more about the issue? Do I have to replace all the structs with defined data types? And then reimplement management.c to support the data types similar to the current implementation of int64 and so?

@shikharish I would begin with supporting all intXX_t, uintXX_t and bool in json.h - a lot of can probably be copy'n'paste once you get started.
Then look at management.c and see what it uses and work your way backwards through the structs

Remember the _array version as well...


How to stop ActivatedRoute.queryParams.subscribe to be called on back navigation?

How to stop ActivatedRoute.queryParams.subscribe to be called on back navigation?
platform(s) the issue occur on

iOS
iOS 11
ipad mini2 , iphone 6 plus, Nativescript playground

the following version numbers:
tns-core-moduels 4.2.0
tns-ios 4.2.0
angular/compiler-cli 6.1.2
angular/router 6.1.2
nativescripte-angular 6.1.0
the steps to reproduce it:
There are 3 page: home, entity, contact.
they are root level page and using page-router-outlet

In home page, go to entity page with param id = 1

this.routerExtensions.navigate(['/entity'],
            {
                queryParams: {
                    id: '1'
                }
            }
        );

In entity page, go to contact page with param id = 2

this.routerExtensions.navigate(['/contact'],
			{
				queryParams: {
					id: '2'
				}
			}
		);

In contact page, tap the system back button on top-left to go back to entity page

expect result:
In entity page, router.queryParams.subscribe should NOT be called on back navigation and show entity page without any refresh.
export class EntityComponent implements OnInit {
...
ngOnInit(): void {

	//if it's from Home page, that's OK;  but how to stop it to be called on navigating back?
	this.router.queryParams.subscribe(params => {
	console.log("EntityComponent queryParams with id : " + params.id);

	//To refresh page on regular navigating using id = 1.
	//On back navigation, the page shouldn't be refreshed.

        });
}

actual result:
this.router.queryParams.subscribe is called with param id= 2 ( the contact page id)
code :
https://play.nativescript.org/?template=play-ng&id=SgrzAJ&v=9

hi, @tsonevn ，

this.router.queryParams.unsubscribe();

has compile problems in the playground.　this.router.queryParams doesn't have the 'unsubscribe' method.　I've moved the question to here

Hi @anorthwolf,
I have researched your case further and found this thread in StackOverflow. You can try to unsubscribe as follows:
import { Component, OnInit } from "@angular/core";
import { ActivatedRoute } from "@angular/router";
import { RouterExtensions } from "nativescript-angular/router";

@Component({
	selector: "Entity",
	moduleId: module.id,
	templateUrl: "./entity.component.html",
	styleUrls: ['./entity.component.css']
})
export class EntityComponent implements OnInit {
	private subs;
	constructor(private routerExtensions: RouterExtensions, private router: ActivatedRoute) {
	}

	ngOnInit(): void {
		console.log('EntityComponent ngOnInit');

		//if it's from Home page, that's OK; but how to stop it to be called on back navigation?
		this.subs=this.router.queryParams.subscribe(params => {
			console.log("EntityComponent queryParams with id : " + params.id);

			//To refresh page using id = 1.  But On back navigation, the page shouldn't be refreshed.
		});

	}

	onButtonTap(): void {
		this.subs.unsubscribe();

        console.log("Entity Button was pressed, go to contact Page with id = 2");
		this.routerExtensions.navigate(['/contact'],
			{
				queryParams: {
					id: '2'
				}
			}
		);
    }

Hope this helps.

hi, @tsonevn , this solution works. Thanks for your help.
I've posted my implement on StackOverflow


update set_syntax helper

closes #150

build is failing because pylint was updated to 1.8.4 (1.8 released inconsistent-return-statements check)

Coverage decreased (-1.9%) to 96.543% when pulling c726514a35f091307050750c763cfcc63d72cfe9 on cyberhck:150-gist-syntax-highlight into 2eabc3f3cf853014a9b3f3ee17fca8f0e76bdc89 on condemil:master.


feat(http_body_limit): add initial support for DefaultBodyLimit

I hereby agree to the terms of the GreptimeDB CLA
What's changed and what's your intention?
Use DefaultBodyLimit layer to avoid the default 2MB limit on the body
Checklist

[x]  I have written the necessary rustdoc comments.
[x]  I have added the necessary unit tests and integration tests.

Refer to a related PR or issue link
https://github.com/GreptimeTeam/greptimedb/issues/1842

@evenyag @zyy17 @waynexia @killme2008
Could I kindly request review for this draft? Does that match your expectations?
I decided to pick this up as I feel this feature could be quite handy.
Once you agree with the approach, I'm happy to move forward and add more tests (at the moment there are only in frontend.rs) and add the parsing logic similar to the one to datanode.rs
I also encourage @ItIsOHM to watch this ticket and share suggestions as well

Ah thanks @etolbakov for looping me in! This is very helpful to a beginner like me :D

@evenyag @zyy17 @waynexia @killme2008 Could I kindly request review for this draft? Does that match your expectations? I decided to pick this up as I feel this feature could be quite handy.
Once you agree with the approach, I'm happy to move forward and add more tests (at the moment there are only in frontend.rs) and add the parsing logic similar to the one to datanode.rs
I also encourage @ItIsOHM to watch this ticket and share suggestions as well

It's great, please go ahead!
One of our community users has requested this feature, their payload size may be greater than 6GB.

@evenyag
Could you please take a look when you have time?

@evenyag I've updated the PR according to the suggestions.
Could you please take a look once again?


[meta][xs]: include creation time in dp.json - fixes #38

first changes in specstore should be merged https://github.com/datahq/specstore/pull/39

Coverage increased (+0.05%) to 83.388% when pulling 374ce4bbd1c15238895c90edf34a86e30c69cecb on fix/dataset-create-time into 5970e9628f0f565c634c54f5bf294f0fbedf1dfe on master.


Adds "Command Timeout" connection string option

This allow the default CommandTimeout of 30 seconds to be overridden, without any code changes.
fixes #614
QUESTION re missing docs:
I am not familiar with the way XML docs are created here, should I add something similar to this:
https://github.com/dotnet/SqlClient/blob/master/doc/snippets/Microsoft.Data.SqlClient/SqlCommand.xml#L1217
in the SqlConnection.xml and SqlConnectionString.xml files?

QUESTION re missing docs:
I am not familiar with the way XML docs are created here, should I add something similar to this:
https://github.com/dotnet/SqlClient/blob/master/doc/snippets/Microsoft.Data.SqlClient/SqlCommand.xml#L1217
in the SqlConnection.xml and SqlConnectionString.xml files?

Hi @ErikEJ
Yes, that's correct. Basically the XML files contain 1:1 documentation of all public APIs in the driver in order to use them in both NetFx and NetCore source.

@cheenamalhotra This is ready for review now :smile:

Thanks for getting this in, a very useful new feature imho.


Add kraken extension

This PR add the kraken extension for zenbot 4

Special thanks to @crubb, @nibzo1
close #177

New PR #207 without squash to allow contributors to be properly attributed.


Query widget Builder execute 2 or 3 times for each request

When I execute a certain request with the Query widget from v4 of graphql_flutter, the request execute 2 or 3 times:

Here we see the I'M HERE 2 ! print executed 3 times just for one call to this query.
But the I'M HERE 1 executed just one time, as exepected.
Steps to reproduce the behavior:

Clone this repo from master and launch it with VSCode
Paste a Ğ1 publickey (as this one for example: D2meevcAHFTS2gQMvmRW5Hzi25jDdikk4nC4u1FkwRaU) on "Tappez/collez une clé publique, ou scannez" placeholder of TextField on Home view.
See the result in debug console on VSCode.  (this line in code)

Expected behavior
This request should execute only one time, not 2 or 3.
Smartphone (please complete the following information):

Device: [Pixel 4]
OS: [Android]
Version [10 (SDK 29)]

Slightly incorrect. The builder executes several times, the request does not (you can check the network tab of the Flutter devtools to verify only one request is sent). The build executes each time the status changes (for example from loading to not loading because the request is completed).
You can check that by moving the print below the if statement starting in L108 in your screenshot to not print when it's loading and only when you have data.
Now even then it can happen that the print appears more than once. This is because the Query widget uses the fetchPolicy cacheAndNetwork by default (here you can see client.watchQuery being called which is here which uses the default policies for watchQueries defined here). That means that it will first set the result to loading (I believe), then send the network request, while that is going look in the cache if a matching result there already. If there is, the builder function is called with that. Then, once the network request returns a valid result, the builder function is called once more with the updated result from that.
That would result in a total of 3 calls (first call with loading, second call with cache result, third call with network result) which matches your output.
You can check if that is actually the case by also printing result.source.isEager (from the docs: 'Whether this result source is considered "eager" (is cache or optimisticResult)').

Thank you @geisterfurz007 for your explanations.
I discovered the network view of the Flutter devtools thanks to you, and indeed the request to be executed only once, as expected.
I still have a hard time understanding this behavior but I will dig it.
Thank you very much for your time and your work.


How to use high_voltage pages as main site home page

Hi,
I am unable to use high_voltage gem static pages as my main site home page. I would like to use static html pages for my home page(first site home page), which I can achieve easily using high_voltage gem, but I am unable to do once I add camaleon-cms gem to my existing rails app, because camaleon-cms overriding high_valotage gem root routes, please let me know how I can solve this issue and use high_voltage gem static as my main site home page.

I am getting below error if I try to add high_voltage gem and set static page as root page
Exiting

/Users/mazharoddin/.rvm/gems/ruby-2.2.2@rails4.2.5/gems/actionpack-4.2.5/lib/action_dispatch/routing/route_set.rb:549:in `add_route': Invalid route name, already in use: 'root'  (ArgumentError)

You may have defined two routes with the same name using the `:as` option, or you may be overriding a route already defined by a resource with the same naming. For the latter, you can restrict the routes created with `resources` as explained here:
http://guides.rubyonrails.org/routing.html#restricting-the-routes-created

I am getting below error if I try to add high_voltage gem and set static page as root page
Exiting

/Users/mazharoddin/.rvm/gems/ruby-2.2.2@rails4.2.5/gems/actionpack-4.2.5/lib/action_dispatch/routing/route_set.rb:549:in `add_route': Invalid route name, already in use: 'root'  (ArgumentError)

You may have defined two routes with the same name using the `:as` option, or you may be overriding a route already defined by a resource with the same naming. For the latter, you can restrict the routes created with `resources` as explained here:
http://guides.rubyonrails.org/routing.html#restricting-the-routes-created

I could able to fix this issue by using subdomain constraints in route file, I am adding code for reference if in case any one face similar issue.
class SubdomainPresent
  def self.matches?(request)
    request.subdomain.present? && request.subdomain != "www"
  end
end
class SubdomainBlank
  def self.matches?(request)
    request.subdomain.blank?  || request.subdomain == "www"
  end
end

Rails.application.routes.draw do
  constraints(SubdomainBlank) do
    root  'high_voltage/pages#show', id: 'home'  # This is my static home page route configured using high_voltage gem
    get 'privacy-policy' => 'high_voltage/pages#show', id: 'privacy-policy'
    get 'terms-of-use' => 'high_voltage/pages#show', id: 'terms-of-use'
  end
end

Thanks for share! @mazharoddin

Closing as I could resolve the issue.


Change WindowBuilder to a more conventional builder pattern

Following up on the discussion in Zulip, this PR changes WindowBuilder methods &mut self argument to mut self and return value to Self, so that methods could be chained. Besides that, I took a liberty to also remove set_ prefix from WindowBuilder methods, and also changed WindowBuilder for all backends to keep it consistent with the top-level one. Let me know if any of that is undesired, I'll revert.
I've tested all examples except accesskit on X11 backend, and tested their compilation on Wayland and GTK backends (I have issues running on these backends same as on main: GTK segfaults, Wayland has transparent window). I hope the CI will make sure others compile?

One thing I've noticed in the other code in the projects here is often both the builder pattern functions and the basic set_ functions have been available.
Because the functions are now returning Self, it moves the value, so if you don't want to use the builder pattern like this, you still need to re-assign the values, which is annoying and could confuse beginners. That's why it may make sense to have them both.
If you have them both, you can still reduce redundancy by calling the set_ functions from within the builder pattern functions, reducing the possibility of accidental differences in behavior between the two functions.
What do others think?

so if you don't want to use the builder pattern like this, you still need to re-assign the values

Hm.. I didn't think of that. What are some use cases where one wouldn't want to use builder methods moving the value? Wrapping into another builder is an example I can think of (like the top-level WindowBuilder wraps the backend's one), but I'd guess it's fairly uncommon in the application code.
I guess some extra cost of providing both ways is, if we want to keep all backends WindowBuilder-s consistent with the top-level one then we'd have to provide both ways for all of them. But maybe they don't need to have exactly the same API, idk.

Thanks for a quick review. I think I can merge. Should I wait for more reviews? Also, when ready, should I just merge or squash & merge?

One approval is enough, so go ahead and merge when you're ready. Usually we squash, but if you have artisanal hand-crafted commits that you want to preserve, a rebase+merge is also ok.


resolveJsonModule transpile does not strip trailing commas

TypeScript Version:  2.9.1

Search Terms:
JSON
resolveJsonModule
json trailing comma
Code
import * as ts from 'typescript';
console.log(ts.version);
const output = ts.transpileModule(
    `
        {"foo": 123,} // note trailing comma
    `,
    {
        fileName: 'foo.json',
        compilerOptions: {
            resolveJsonModule: true,
            removeComments: true
        },
        reportDiagnostics: true
    }
);
console.dir(output.diagnostics); // no errors
console.dir(output.outputText); // '{ "foo": 123, }\r\n' still has trailing comma

Expected behavior:
Emitted JSON does not have trailing comma: { "foo": 123 }
...or compiler emits a diagnostic to tell me the trailing comma is not allowed in input json.
Actual behavior:
Emitted JSON has trailing comma: { "foo": 123, } and no diagnostics are reported.
Playground Link:
N/A because Playground assumes .ts file extension.
Related Issues:

@sheetalkamat can you take a look please.


Extract statistics plugin

Closes #241

It looks pretty clean. I am wondering how this will work for all the static information we put in the collector. That would require a bunch of extra events

It depends, if all this information is for example present in the launcher.run method we could create an event which contains all this information, such that we can extract the static information. For example, we could create an event which requires the current configuration as argument.

@mitchellolsthoorn Do you think this plugin should be called statistics? Or maybe something related to research.
This PR is a step up to the research mode we discussed.
We could also later create a research mode plugin which makes use of this statistics plugin.
Could also call it "metrics"

It looks pretty clean. I am wondering how this will work for all the static information we put in the collector. That would require a bunch of extra events

It depends, if all this information is for example present in the launcher.run method we could create an event which contains all this information, such that we can extract the static information. For example, we could create an event which requires the current configuration as argument.

That could work.
I was thinking though if the collector (or future MetricManager) will be in the plugin, how will other modules add information to the collector? This logic is defined in this module and the collector is unreachable for these modules.

@mitchellolsthoorn Do you think this plugin should be called statistics? Or maybe something related to research. This PR is a step up to the research mode we discussed.
We could also later create a research mode plugin which makes use of this statistics plugin.
Could also call it "metrics"

We should most likely step away from the concept of this research module. Since we now have the ability to have separate tools. A big part of the "research mode" can be in the experiment tool. The collection of metrics is pretty common and could be separated from the "research mode". I would even say that the collection of metrics is so common, part of it could be in the core. Even for the values we print out to the CLI, we could collect them first in the collector and print them from this central place, so that we have one single source of truth.
We could then have different modules/plugins store additional information in the collector (in a common format) that can be outputted to files.
What do you think? This would also influence the naming of the module.
Although I like how this approach disconnects the metric collection from the core code base, I am not fully convinced yet.

It looks pretty clean. I am wondering how this will work for all the static information we put in the collector. That would require a bunch of extra events

It depends, if all this information is for example present in the launcher.run method we could create an event which contains all this information, such that we can extract the static information. For example, we could create an event which requires the current configuration as argument.

That could work.
I was thinking though if the collector (or future MetricManager) will be in the plugin, how will other modules add information to the collector? This logic is defined in this module and the collector is unreachable for these modules.

We can simply track any fired event, its timing etc. We could also make a general "trackTimeSeries" event with specific arguments such that any module can use it.
However, I see your point. I then propose to make a separate library for the metric manager where every module can store things. The statistics plugin is then purely for capturing and writing the statistics. If we keep the statistics stuff in the core it will be search specific which is not what I want for the statistics plugin.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 0.0%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
0

Relevant Lines:
0

💛  - Coveralls


Provide a way to load a viewer function from a file

In PR #155 which provides a SCI nREPL implementation, there is a hack to load source from a file and then evaluate within SCI + resolving a function after that. When we move to async SCI evaluation (e.g. to load stuff from CDNs using require) such has here, this trick doesn't work anymore. Instead, we should provide a nice API for loading viewer functions from files. E.g.:
:render-fn {:path "..." :fn foo/bar} or :render-fn {:resource "..." :fn foo/bar}.

PR: https://github.com/nextjournal/clerk/pull/190
Notebook: https://snapshots.nextjournal.com/clerk/build/c40b0523567f048870ee2bfc915f68389e71cce9/index.html#/notebooks/eval_cljs.clj


Feature/exit codes

This adds two options exit-on-error and exit-on-aggregated-error.
exit-on-error directly cancels everything with process.exit(1) as soon as an error occurs on a sub command.
exit-on-aggregated-error waits until all sub commands have run and then exits with process.exit(1).
I added the options, because without them I didn't find any way to have the exit code on the original meta call reflect that errors occured on one of the commands.
This PR also involves PRs for meta-exec, meta-loop and loop itself.
I didn't clean up the commit history and I had to do some version changes during the process to test the changes on my local setup.
I'll gladly clean up everything as soon as you reviewed it, but would like to keep it until then for testing purposes. If you want I can also provide you with a test setup if that might be an issue (wasn't easy for me ;).

Mind adding yarn-error.log to .gitignore, while you're at it? :D

Will do ;)

fixed in 887636de05841690b9ad4f069b11a6cb1e44a155. only difference is renaming option to --exit-on-aggregated-error


Poor documentatin

Hi,
I own several of these epaper boards, but are not even sure, which ones. One (2.9, white) says "T5_v2.2 20181116", while the other (seems to be a 2.13 inch epaper board, looks like the one on the picture bottom left, but with four blue LEDs) does not even tell what it is.
No clue about what the LEDs mean or how to use them, how to use the speaker, pin layout of the connector, or just even how to program them. The arduino IDE claims to program them, but nothing happens. No hint about which ESP32 board to select.
While the board themselves seem to be technically good, the documentation is poor (worse: non-existing) and renders them more or less useless.

Hi,
I own several of these epaper boards, but are not even sure, which ones. One (2.9, white) says "T5_v2.2 20181116", while the other (seems to be a 2.13 inch epaper board, looks like the one on the picture bottom left, but with four blue LEDs) does not even tell what it is.
No clue about what the LEDs mean or how to use them, how to use the speaker, pin layout of the connector, or just even how to program them. The arduino IDE claims to program them, but nothing happens. No hint about which ESP32 board to select.
While the board themselves seem to be technically good, the documentation is poor (worse: non-existing) and renders them more or less useless.

Hi hadmut,
I have already noticed that the information is incomplete. I am working hard to ask the team to improve it. At present, the repository I submitted contains pin descriptions and schematics. The library of lilygo was too messy. Now I am trying to perfect it. . You said the four led lights, like the lower left corner is the old version of the T5-V2.0, the four led are just the battery charging indicator, you can remove it if you don't need it.

Pinout on the board is wrong for version T5v2.2.
I hav found 3 pinsdifferent,dont hav time to look further.

Taken from the Schematic.... which is probably wrong too... because Ground and 3.3V are correct.


Timeout while running FlashDeflateData command

My mcu is ESP32C3 with 16MB flash size, when I am running the following command to flash I got a timeout error

cargo espflash flash --release  --partition-table ./default_16MB_one_ota.csv

the output:
[2023-06-21T14:06:50Z INFO ] Serial port: '/dev/ttyACM0'
[2023-06-21T14:06:50Z INFO ] Connecting...
[2023-06-21T14:06:51Z INFO ] Using flash stub
    Finished release [optimized] target(s) in 0.21s
Chip type:         esp32c3 (revision v0.3)
Crystal frequency: 40MHz
Flash size:        16MB
Features:          WiFi, BLE
MAC address:       60:55:f9:77:6d:6c
Bootloader:        /drn/RustProjects/pomodoro/target/riscv32imc-esp-espidf/release/build/esp-idf-sys-9c7a5783fe78fcfb/out/build/bootloader/bootloader.bin
Partition table:   ./default_16MB_one_ota.csv
App/part. size:    8,298,752/12,976,128 bytes, 63.95%
[00:00:01] [========================================]      13/13      0x0
[00:00:00] [========================================]       1/1       0x8000
Error: espflash::timeout

  × Communication error while flashing device
  ╰─▶ Timeout while running FlashDeflateData command

here is my partition table file:
#Name,   Type, SubType, Offset,  Size, Flags
nvs,      data, nvs,     0x9000,  0x5000,
otadata,  data, ota,     0xe000,  0x2000,
app0,     app,  ota_0,   0x10000, 0xc60000,
spiffs,   data, spiffs,  0xc70000,0x370000,

I just found that when the size of my app is reduced, the program can be flashed successfully. However, when I add more codes, timeout issues occur.
I would greatly appreciate any suggestions or assistance you can provide！

Thank you for opening an issue, sorry that you're having issues.
Just out of curiosity, would you be able to share which version of espflash you are using as well as which development kit or board you are using? If you are not using the latest version of espflash (which is 2.0.0) then please try again using this version. I don't believe we offer an ESP32-C3 module with 16MB of flash, so it seems to me that this is some third-party offering.
This problem is reminiscent of a previous issue we faced where the watchdog timer was causing a reset, however this issue should have been resolved in a previous PR. However it's possible there is another issue which we had missed previously.

@jessebraham Thank for your reply.  My espflash is 2.0.0 version. and I'm using  third-party development board, its default flash size is 4MB, because my app is a little bigger, so I replaced it with 16MB external flash.

@hbhong How long does it flash for before reporting this error? The timeout for erase is 120 seconds, perhaps erasing 16MB could take longer?

@MabezDev with my current partition table, it takes 02:25. But I think that flash memory produced by different manufacturers may have speed differences.

I resolved this problem by recompiling the espflash,  I change the value of ERASE_WRITE_TIMEOUT_PER_MB from 40 to 400 (I know this value is too large, but I'm sorry I don't have much time to measure how much time is more appropriate. For me, this value ensures that I don't have to worry about such incidents happening again.)

Thank you for the additional information! I will discuss this issue with some colleagues next week and try to determine what the best path forward for this is; possibly it's been solved in another tool already.
Perhaps we can simply increase the timeout length, determined by some experimentation. Otherwise, as you suggested maybe we can allow the user to specify this value in some way.

I just bumped into this issue with a LOLIN S3 1.0.0 board:
% cargo run
    Finished dev [unoptimized + debuginfo] target(s) in 0.31s
     Running `espflash flash --monitor target/xtensa-esp32s3-none-elf/debug/pancake-legend-lights`
[2023-10-06T03:53:46Z INFO ] Detected 8 serial ports
[2023-10-06T03:53:46Z INFO ] Ports which match a known common dev board are highlighted
[2023-10-06T03:53:46Z INFO ] Please select a port
[2023-10-06T03:53:53Z INFO ] Serial port: '/dev/cu.usbserial-12420'
[2023-10-06T03:53:53Z INFO ] Connecting...
[2023-10-06T03:53:53Z INFO ] Using flash stub
Chip type:         esp32s3 (revision v0.1)
Crystal frequency: 40MHz
Flash size:        16MB
Features:          WiFi, BLE
MAC address:       68:b6:b3:28:6c:bc
App/part. size:    613,024/16,384,000 bytes, 3.74%
[00:00:01] [========================================]      14/14      0x0
[00:00:00] [========================================]       1/1       0x8000
Error: espflash::timeout

  × Communication error while flashing device
  ╰─▶ Timeout while running FlashDeflateData command

Hi! Would any of the affected users mind testing #488?
cargo install --git https://github.com/SergioGasquez/espflash --branch fix/deflate-timeout cargo-espflash espflash

Issue persists with https://github.com/esp-rs/espflash/commit/2c7ee4c66cee14a0b3a1222ccbf08782fdab7a23
[2023-11-20T08:52:38Z INFO ] Using flash stub
   Compiling esp32c6-hal v0.6.0 (C:\_Hobby\esp-hal\esp32c6-hal)
   Compiling esp-wifi v0.1.0 (https://github.com/esp-rs/esp-wifi.git?rev=0db7a70#0db7a706)
   Compiling card_io_fw v0.1.0 (C:\_Hobby\CardIO\card-io-fw)
    Finished dev [optimized + debuginfo] target(s) in 8.64s
Chip type:         esp32c6 (revision v0.0)
Crystal frequency: 40MHz
Flash size:        8MB
Features:          WiFi 6, BT 5
MAC address:       40:4c:ca:41:db:68
Partition table:   \\?\C:\_Hobby\CardIO\card-io-fw\partitions.csv
[2023-11-20T08:52:47Z INFO ] Erasing otadata (Data(Ota))...
App/part. size:    1,373,072/2,097,152 bytes, 65.47%
[00:00:00] [========================================]      13/13      0x0
[00:00:00] [========================================]       1/1       0x8000
Error: espflash::timeout

  × Communication error while flashing device
  ╰─▶ Timeout while running FlashDeflateData command


Fix lotus seeder checkpoints height

Hi @schancel,
I try to implement the fix for the seeder but I got some issues:

When running the seeder on a vps, it can only crawl the directly connected node, not the other nodes.
Even though the nslookup returns the node's addresses (I can see it while debugging), but no data is sync for lotusd (with config: dnsseed=1, connect=1)

My DNS config for the domain abcpay.cash is:

Type
Host
Value

A Record
seeder
<IP_ADDRESS>

NS Record
dnsseed
seeder.abcpay.cash

The command I ran the dnsseed is:
 sudo ./lotus-seeder -ns=seeder.abcpay.cash<EMAIL_ADDRESS>-chain=test -host=dnsseed.abcpay.cash -port=53

Could you help to check?
Thanks!

sudo ./lotus-seeder -ns=seeder.abcpay.cash
This should be dnsseed.abcpay.cash right?

Yeah you have the ns records specified backwards.

Hi @schancel ,
I tried both your suggestion on change the vSeeds value or swap the -ns and -host value in seeder command but it still does not work for now.
I followed the guide at https://github.com/LogosFoundation/lotusd/tree/master/src/seeder
"seeder.abcpay.cash" equals to "vps.example.com" and "dnsseed.abcpay.cash" equals to "dnsseed.example.com" in the guide.
vSeeds.emplace_back("seeder.abcpay.cash");

The domain "seeder.abcpay.cash" are used for 2 things:

As the bootstrap address for the lotus-seeder's crawler. The seeder start to crawl from this domain, So "seeder.abcpay.cash" should be a A record points to a machine with a running node.
As the seed address which is used by nodes to query all the associated IPs which the seeder return (if set seeder=1). But in the code the query address is "x1.seeder.abcpay.cash". If I use the option -overridednsseed=seeder.abcpay.cash then I can see the address returned successfully.

The prefix x1 is from the line:
std::string host = strprintf("x%x.%s", requiredServiceBits, seed);

I still think that the config is correct since if I use -overridednsseed option I can see the address return from the seeder, just wondering what is "x1" prefix and how should I configure it.
Hope that provides you more context.

Here's what @KarolTrzeszczkowski told me:

The [seeder] we've inherited from core is broken. Port some commits from BCHN or Bitcoin Static. I'll send you which ones in the morning, but it should be easy to find them in my repo, there is an accumulation of seeder related commits

He then linked commits https://github.com/Ergon-moe/Bitcoin-Static/commit/f29c7d82d4adcf2bea31bce0f4aabc76a18f4c04 to https://github.com/Ergon-moe/Bitcoin-Static/commit/a3cbe05ec348704f7d61f09602fc02cc917e271a on the Ergon node as a potential fix.

They are mostly from sipa seeder, the main seeder repo
https://github.com/sipa/bitcoin-seeder

Seems to not be needed now?


Help in reimplementation of annotation framework

Hello @ysu1989 @xiang-deng @MarcelRuoff @boyuanzheng010 , is there an opportunity to share the technical details of the annotation tool implementation through playwright? Maybe there are some integration features, on whose side playwright was raised, something else that will allow to reproduce your annotation workflow
Hope for your answer

Thank you for your interests. While we are not releasing the annotation tool, we did have released SeeAct, from which it should be reasonably easy to develop an annotation tool of one's own.

@ysu1989 Thanks for reply! I'll take a look, I hope it helps


User without team now returns proper 403

... if he has no permission, rather than blowing up

Codecov Report

:exclamation: No coverage uploaded for pull request base (develop@a9212cd). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             develop     #607   +/-   ##
==========================================
  Coverage           ?   96.48%
==========================================
  Files              ?      126
  Lines              ?     3817
  Branches           ?      327
==========================================
  Hits               ?     3683
  Misses             ?       95
  Partials           ?       39

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 a9212cd...b434761. Read the comment docs.


Do we have keywords?

Are syntax identifiers like lam, error etc. keywords?

The spec says no: there is nothing in the grammar that says they're invalid identifiers.
The parser says yes: you'll get an unexpected token error if you try to use one

echo "(program 1.0.0 (lam error (forall a (type) a)) error" | plc typecheck --stdin
Unexpected 'error' at 1:21

Can I close this? Or do we want to note this somewhere in the spec?

If we have keywords then IMO that should be in the spec. I don't buy that there is "no concrete syntax" - the figure says "lexical grammar of Plutus Core" which sure sounds like it's telling us how to tokenize it!
IMO builtin names should also not be keywords, but that would be a parser change. We know that we're getting a builtin name from context, so we can just parse an arbitrary identifier, try to map it to a builtin, and fail if it's missing.

I'm just in the process of trying to get the spec sorted out, so I'll deal with this shortly.

I've now modified the spec to say that con, lam, etc. are all keywords (it's not merged yet though).  I agree that names of builtins shouldn't be keywords, but that shouldn't be a problem now that we always have to prefix them with the builtin keyword everywhere. Also, we'll have to modify the parser anyway when we get the new infrastructure for extensible builtins.  I'm going to close this issue but I'll add a note to the one for extensible builtins.


Update readthedocs based on 1.0 changes

Need to through the docs in detail, and update them to reflect all the new changes.  Also consider a more general reorganization.
Priority is on installation and quick start, in the mean time a disclaimer should be in place warning that some sections are out of date.
Should also address #41 in this update.

Working on this on the docs branch:

[x] Overview
[x] Quickstart
[x] Installing Brownie
[ ] Initializing a New Project
[ ] Compiling Contracts
[ ] Interacting with a Project
[ ] Writing Scripts
[ ] Deploying Contracts
[ ] Debugging Tools
[ ] Unit Testing
[ ] Checking Test Coverage
[ ] The Configuration File
[ ] Brownie as a Python Package
[ ] Brownie API

Only the API remains, merged #88 so docs are otherwise up to date.  Revised todo list:

[ ] API Index
[ ] Brownie
[ ] Network
[ ] Project
[ ] Test
[ ] Types
[ ] Utils


Documentation for dataset templating

I don't think it's documented anywhere (except in the tutorial video) how to edit the pbtxt for templating. Hopefully we will make this obsolete with https://github.com/open-reaction-database/ord-editor/issues/63

Duplicate of #531

Duplicate of #531


CONCAT9999

DAT_143bcce50 = CONCAT412(uStack12,CONCAT48(DAT_1430fb9b8,(ulonglong)DAT_1430fb9a4));

How to disable CONCAT and export readable code instead of CONCAT????

CONCAT412 mean that size of first argument is 4 bytes (uStack12) and second is 12 bytes (CONCAT48 4+8 bytes)

🤣 Or maybe the first argument is 41 bytes and the second is two bytes? 🤣
(just ignore me.)

CONCAT412 mean that size of first argument is 4 bytes (uStack12) and second is 12 bytes (CONCAT48 4+8 bytes)

🤣 Or maybe the first argument is 41 bytes and the second is two bytes? 🤣
(just ignore me.)

But what if it is though?

Well i don`t encounter problem like this, but this is definitely possible read that way.
Perhaps some kind of separator would make it more readable, but it also will eat some horizontal space.
May be someone want to create issue about that?

This code is unreadable... Need decode this functions!!!


Clarification of Language around "Application Ratio" in context of DBU Consumption

In the "Prepurchase discount application" section there are DBU Application Ratios which are unclear how to apply these to our purchase agreements.
If we pre-purchase 100,000 DBU, and our workloads run on "All Purpose Compute" in the "Premium Tier" which has a DBU Application Ratio of 0.55, is this to say that if we use 2 DBU worth of compute, we're only charged 1.1 =  2 * (0.55) ?
Thanks for the clarification.

Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: 4b7565dd-43fa-bac8-c58e-4eeae0066a46
Version Independent ID: fe333aa2-73eb-f5eb-1bd3-5cf78253d452
Content: How an Azure Databricks prepurchase discount is applied - Microsoft Cost Management
Content Source: articles/cost-management-billing/reservations/reservation-discount-databricks.md
Service: cost-management-billing
Sub-service: reservations
GitHub Login: @bandersmsft
Microsoft Alias: banders

@nova-jj
Thanks for your feedback! We will investigate and update as appropriate.

@nova-jj Sorry for the delay. Yes, your understanding is correct. We updated the examples a while back to better explain DBU usage.
#please-close


python3-pybind11: fix bug with casts to void *

Building python3-tensorrt fails with:
error: void value not ignored as it ought to be
|   219 |             PYBIND11_OVERLOAD_PURE_NAME(
|       |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
This bug is fixed upstream in subsequent versions, patch is applied by this commit.

Even though this passed the layer check, we can't be making changes to how recipes from other layers build for everyone, even if this is a good change for everyone.  Making the patch and package arch to be tegra-specific for tegra builds would be OK (see the haveged bbappend for an example).  Even better would be to submit a patch to openembedded-devel to update the meta-python recipe.

Thanks, that's right. I updated it to just apply to tegra.
I feel like this is gray area since the problem is exposed by the bindings we require in this layer, at least it won't need to be carried forward.

In retrospect since this is actually for the native version, it's too awkward to do this here.


Hubsize chart

the hubSize value needs to be included in each of the values.yaml files.
There is one template that has not yet been updated, cluster-permission, as that values.yaml file is copied directly from the git repository https://github.com/stolostron/cluster-permission.git. This will need to be updated there before it can be updated here.

@ngraham20 We also need to update the MultiClusterHub CRD default value from Medium to Small.

Yep, I figured we'd want that to be in a separate PR, but I don't mind including it in this one


Cloud-Init is ignored when using MicroOS

System Information
Linux distribution
openSUSE 15.3
Terraform version
Terraform v0.15.5
Provider and libvirt versions
0.6.3
for OpenSuse 15.2 (even though I am on 15.3)

Description of Issue/Question
Cloud-Init is ignored when using MicroOS as the the guest-os. The machine is provisioned but no configuration from cloud-init is applied.
According to the MicroOS/Kubic docs for cloud-init, a mounted filesystem should be picked up

To setup the network to access configuration files on the network local configuration files can be used. NoCloud will search on all devices, which do not contain a partition table and contain a vfat or iso9660 filesystem. The filesystem volume label must be cidata. So this could be a ISO-image, USB-Stick or an unpartitioned harddisk.

I checked the libvirt-provider source, and as far as I can tell it looks correct.
However, using the libvirt-provider with an Ubuntu image works as expected. For instance when following this article. So there must be a difference in how cloud-init is recognized. It seems to me that the cloud-init files must reside in the root of the filesystem, which I could not verify. Maybe one of the prerequisites mentioned above are not met (vfat or iso9660, not partition-table, etc).
Setup
provider "libvirt" {
  uri = "qemu:///system"
}

variable "libvirt_disk_path" {
  description = "path for libvirt pool"
  default     = "/opt/kvm/pool1"
}

variable "micro_os_img_url" {
  description = "micro os image"
  default     = "https://download.opensuse.org/tumbleweed/appliances/openSUSE-MicroOS.x86_64-kvm-and-xen.qcow2"
}

variable "vm_hostname" {
  description = "vm hostname"
  default     = "kubic"
}

variable "ssh_username" {
  description = "the ssh user to use"
  default     = "kubic"
}

variable "ssh_private_key" {
  description = "the private key to use"
  default     = "~/.ssh/vnet_rsa"
}

resource "libvirt_pool" "kubic" {
  name = "kubic"
  type = "dir"
  path = var.libvirt_disk_path
}

resource "libvirt_volume" "kubic-qcow2" {
  name = "kubic-qcow2"
  pool = libvirt_pool.kubic.name
  source = var.micro_os_img_url
  format = "qcow2"
}

data "template_file" "meta_data" {
  template = file("${path.module}/config/meta_init.yml")
}

data "template_file" "user_data" {
  template = file("${path.module}/config/cloud_init.yml")
}

data "template_file" "network_config" {
  template = file("${path.module}/config/network_config.yml")
}

data "template_file" "ignition_config" {
  template = file("${path.module}/config/config.ign")
}

resource "libvirt_ignition" "ignition" {
  name    = "config.ign"
  pool    = libvirt_pool.kubic.name
  content = data.template_file.ignition_config.rendered
}

resource "libvirt_cloudinit_disk" "commoninit" {
  name           = "commoninit.iso"
  meta_data      = data.template_file.meta_data.rendered
  user_data      = data.template_file.user_data.rendered // empty
  network_config = data.template_file.network_config.rendered // not relevant
  pool           = libvirt_pool.kubic.name
}

resource "libvirt_domain" "domain-kubic" {
  name   = var.vm_hostname
  memory = "512"
  vcpu   = 1

//  coreos_ignition = libvirt_ignition.ignition.id
  cloudinit = libvirt_cloudinit_disk.commoninit.id

  network_interface {
    network_name   = "default"
    wait_for_lease = true
    hostname       = var.vm_hostname
  }

  console {
    type        = "pty"
    target_port = "0"
    target_type = "serial"
  }

  console {
    type        = "pty"
    target_type = "virtio"
    target_port = "1"
  }

  disk {
    volume_id = libvirt_volume.kubic-qcow2.id
  }

  graphics {
    type        = "spice"
    listen_type = "address"
    autoport    = true
  }

  provisioner "remote-exec" {
    inline = [
      "transactional-update pkg install docker"
    ]

    connection {
      type                = "ssh"
      user                = "root" //var.ssh_username
      host                = libvirt_domain.domain-kubic.network_interface[0].addresses[0]
      private_key         = file(var.ssh_private_key)
      timeout             = "2m"
    }
  }
}

Cloud-Init
#cloud-config
# vim: syntax=yaml
debug: True
disable_root: False
chpasswd:
  list: |
    root:password
  expire: False
ssh_pwauth: True
ssh_deletekeys: False
ssh_authorized_keys:
  - ssh-rsa AAAAB3Nza...
hostname: kubic
fqdn: kubic.vnet.de
timezone: Europe/Berlin
ntp:
  servers:
    - 0.de.pool.ntp.org
    - 1.de.pool.ntp.org
    - 2.de.pool.ntp.org
runcmd:
  - /usr/bin/localectl set-keymap de-latin1-nodeadkeys
  - /usr/bin/systemctl enable --now ntpd

Steps to Reproduce Issue

Run terraform apply with above configuration.
Try to login on the machines console with root and password (which is enabled via cloud-init)

Additional information:
It seems that cloud-init configuration is different based on the distribution. For Micro-OS the docs are here.

As far as I'm aware cloud-init is only support on Openstack's flavor of Kubic/MicroOS
Examples can be found here using ignition

https://github.com/anthr76/kubic-terraform-kvm
https://github.com/kubic-project/kubic-terraform-kvm


Added failing test for SSR

There is a new failing test to show whether the styles generated
for different request are shared as discussed in https://spectrum.chat/thread/536fcaf2-138c-41bd-aa9b-165dcf2569ef

Ref #1605 which should fix this test, /cc @kitten

Yep, that'll be taken care of by #1605


DOC:configuration.md: Change description of interval.

Signed-off-by: Masataka Mizukoshi<EMAIL_ADDRESS>I've modified the docs/configuration.md.
The notifications interval and  timeout was deprecated values.
And Fixed some configuration related with timeout/interval.
See this issue #2231

Sorry I accidentally closed this request.

Not sure how this got this way. Here is the development configuration for examples of correct values.
@dmcgowan PTAL

LGTM

LGTM


test(danger): see if danger.js is working

TESTING
https://danger.systems/guides/dangerfile

Danger seems to be working now 👍


Complete the migration of the tests to ginkgo and gomega

In the v2 we started to migrate the tests to ginkgo and gomega. We have to complete the migration before releasing the v2.

@teivah I can pick this up.

@RahulZoldyck Please do. Just make sure to start from the v2 branch. Cheers.

Abandoned: https://github.com/ReactiveX/RxGo/pull/205


Removed unnecessary check of data.

This allows for writing of 'empty' ARFF files.

Personally, I think this is a reasonable change. It makes little sense to disallow writing an empty data set. This prevents users from creating a file which just has attributes, where as the proposed change allows the behavior, and still doesn't developers from manually checking for an empty data set.
To fix the failure, the test script test_encode.py needs to test at lines 102-107 removed.


uniform pdf for flat param

This is an update to the following PR #830 so should be merged after that one

Still needs some work as logic is missing some types - ideally need to move the creation of prior outside of loop over nuisances... Will fix in next commit

Yes you're right, we should just comment this print out.
On Wed, 19 Apr 2023, 15:08 Aliya Nigamova, @.***> wrote:

@.**** commented on this pull request.
In python/ModelTools.py
https://github.com/cms-analysis/HiggsAnalysis-CombinedLimit/pull/834#discussion_r1171402757
:

         self.doObj("nuisancePdf", "PROD", ",".join(["%s_Pdf" % n for n in setNuisPdf]))

       self.doSet("globalObservables", ",".join(globalobs))

       self.doSet("globalObservables", ",".join(self.globalobs))

def doAutoFlatNuisancePriors(self):

   if len(self.DC.toCreateFlatParam.keys()) > 0:

       for flatNP in self.DC.toCreateFlatParam.items():

           c_param_name = flatNP[0]

           c_param_details = flatNP[1]

           print(c_param_name, c_param_details)

Probably this should be printed if verbose option is on or not printed at
all?
—
Reply to this email directly, view it on GitHub
https://github.com/cms-analysis/HiggsAnalysis-CombinedLimit/pull/834#pullrequestreview-1392161784,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAMEVW2GCMX7YJM6HPATDGTXB7WXLANCNFSM6AAAAAAWVJQSGU
.
You are receiving this because you authored the thread.Message ID:
<cms-analysis/HiggsAnalysis-CombinedLimit/pull/834/review/1392161784@
github.com>

ok, fixed print out and ready to merge


Fixing flacky test_id:3202

The feature that we require in the test might be the same feature we disable and that cause flackiness.
Signed-off-by: bmordeha<EMAIL_ADDRESS>
What this PR does / why we need it:
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #
Special notes for your reviewer:
Release note:

NONE

@iholder-redhat
I agree i'm not sure what is the value of this test
Maybe we should delete it? @enp0s3

BTW, this part:
By("Verifying VirtualMachineInstance's status is Succeeded")
Eventually(func() v1.VirtualMachineInstancePhase {
	currVMI, err := virtClient.VirtualMachineInstance(vmi.Namespace).Get(vmi.Name, &metav1.GetOptions{})
	Expect(err).ToNot(HaveOccurred(), "Should get VMI")
	return currVMI.Status.Phase
}, 120, 0.5).Should(Equal(v1.Running), "VMI should be succeeded")

Is completely redundant. Before this is executed, the test calls tests.WaitForSuccessfulVMIStart(vmi) which validates that the VMI is in "Running" phase.

Thanks @Barakmor1! Left some small comments.
@enp0s3 Do you know what is this test's purpose? The description (the vmi with cpu.features matching nfd labels on a node should be scheduled) is not very clear to me. What's NFD? Why are we disabling "fpu" feature?

I think that nfd is node feature discovery

Thanks @Barakmor1! Left some small comments.
@enp0s3 Do you know what is this test's purpose? The description (the vmi with cpu.features matching nfd labels on a node should be scheduled) is not very clear to me. What's NFD? Why are we disabling "fpu" feature?

I think that nfd is node feature discovery

So nfd is a CPU feature? Does it have anything to do with the test?

BTW, this part:
By("Verifying VirtualMachineInstance's status is Succeeded")
Eventually(func() v1.VirtualMachineInstancePhase {
	currVMI, err := virtClient.VirtualMachineInstance(vmi.Namespace).Get(vmi.Name, &metav1.GetOptions{})
	Expect(err).ToNot(HaveOccurred(), "Should get VMI")
	return currVMI.Status.Phase
}, 120, 0.5).Should(Equal(v1.Running), "VMI should be succeeded")

Is completely redundant. Before this is executed, the test calls tests.WaitForSuccessfulVMIStart(vmi) which validates that the VMI is in "Running" phase.

Yes that's right but still i don't see any reason to keep this test.

I discussed with Igor privately and he agreed that we can delete this test @iholder-redhat

I discussed with Igor privately and he agreed that we can delete this test @iholder-redhat

@ksimon1 Can you charm in please?

NFD is node feature discovery (https://github.com/kubernetes-sigs/node-feature-discovery). Node-labeller functionality is based on NFD (node labeller labels the node with cpu features, models, hyper-v features which is host cpu able to emulate).
I would not disable this tests, because this test a functionality, when user requires a special cpu feature and if VMI is scheduled on correct node

NFD is node feature discovery (https://github.com/kubernetes-sigs/node-feature-discovery). Node-labeller functionality is based on NFD (node labeller labels the node with cpu features, models, hyper-v features which is host cpu able to emulate). I would not disable this tests, because this test a functionality, when user requires a special cpu feature and if VMI is scheduled on correct node

Thanks for providing that info!
I suggest to test the following:

Create a disk-less VM (with no guest OS)
Enable / disable features randomally

But ensure that we only use features that are supported, etc.

Create the VM and verify that it's in Running phase

Since we don't actually boot to any OS and only check the scheduling mechanism, this would be the most generalized way of checking what needs to be checked. Does anyone have any objections?
I would also change the test's title to make it clearer.

I would not disable this tests, because this test a functionality, when user requires a special cpu feature and if VMI is scheduled on correct node

Perhaps it will be valuable to add a fake non-existing feature and expect the VM to never be scheduled.

NFD is node feature discovery (https://github.com/kubernetes-sigs/node-feature-discovery). Node-labeller functionality is based on NFD (node labeller labels the node with cpu features, models, hyper-v features which is host cpu able to emulate). I would not disable this tests, because this test a functionality, when user requires a special cpu feature and if VMI is scheduled on correct node

This test create a vm with Random feature enabled and with fpu disabled .
When you say correct node do you mean node with the feature label?
Because if you do test_id:6246 already verifies that the node labeller add labels to the nodes.
( https://github.com/kubevirt/kubevirt/blob/db06a2df9ad14f392a46f00a4e8df0697f08a2de/tests/infra_test.go#L1234 )
And  about scheduling the nodes we also have tests that verify that virt-launcher pod has the right node selector for instance:
https://github.com/kubevirt/kubevirt/blob/db06a2df9ad14f392a46f00a4e8df0697f08a2de/tests/migration_test.go#L3832
https://github.com/kubevirt/kubevirt/blob/db06a2df9ad14f392a46f00a4e8df0697f08a2de/pkg/virt-controller/services/template_test.go#L1182
Therefore i still think that we should delete this test and use less resources  in the ci.

Update:
Resolved all the comments above.
Will create a followup PR if we will decide to remove this test after the discussion
to avoid flakiness in the ci.

Update: Resolved all the comments above. Will create a followup PR if we will decide to remove this test after the discussion to avoid flakiness in the ci.

For the sake of CI's health let's merge this.
We should continue the discussion and determine how to fix the test and do so in a follow-up PR.
/lgtm

/retest-required


Allow irrefutable patterns in if-let statements

This might seem a bit strange but not allowing them has brought up some strange results for me.
The equivalent can be done with a plain match statement which is defiantly not as clean. In the docs it says to just use a plane let statement, but that is not always possible because of macros. If you accept a pattern in a macro then the ability to have the following -
if let $p = $val {
    $b
}

instead of
#[allow(unreachable_patterns)]
match $val {
    $p => {
        $b;
        break;
    },
    _ => ()
}

This might not be very important but the disallowing of irrefutable patterns is nearly saying: totality detected reformat code to remove totality in the following statement:
let x = if true { 5 } else { 0 }

They could simply be allowed, and the dead_code lint could trigger on the else path (if there is one). Imo that should happen for if true, too, as long as the bool doesn't depend on cfg!.

How would you tell if bool depends on cfg!. What is cfg!?

The issue is e.g. if cfg!(target_pointer_width = "32") { foo } else { bar }, which executes foo on 32bit systems and bar on all others. If you just take the bare value, it'll be true on 32bit and false on others.

What is cfg!?

https://doc.rust-lang.org/book/first-edition/conditional-compilation.html#cfg

Ah, that makes sense. Is there a way to tell automatically if a value's true value for the dead_code lint on an else case is platform specific or does it have to be hardcoded?

Is there a way to tell automatically if a value's true value for the dead_code lint on an else case is platform specific or does it have to be hardcoded?

There isn't right now, but it's also not too hard to add such a feature.

Shall I start writing up a pull request to this repo?

Sure. But I'd limit the RFC to just the if let part and leave out the if part. They are orthogonal imo. Turning the error into a lint should totally suffice, since your macro can then allow the lint.

That makes sense. Should I then include that the cfg! macro include that allow?

You have a much bigger chance of getting a single targeted RFC through, than a collection of features

Then why not two different ones?

Nothing speaks against that!

Two RFC PR now live: #2086 and #2087

#2086 was merged.


Share profile

Subject: Share profile
Description:
Link to share the profile
Results:
Can't find a botton with the profile link to share by WhatsApp and others apps
Backend version: develop-948446a4
Frontend version:
User Agent: Mozilla/5.0 (Linux; Android 12; SAMSUNG SM-A528B) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/18.0 Chrome/99.0.4844.88 Mobile Safari/537.36
Page: https://couchers.org/profile
User: anais_laso (20807)

not a bug


"clang-format" changes behavior of ServiceObject constructor in nodejs-common

As a developer, I expect that my reformatter won't change the runtime behavior of my code. Unfortunately under some conditions clang-format injects non-cosmetic whitespace. See this section of code in nodejs-common:
            return (
                // All ServiceObjects need `request`.
                // clang-format off
                !/^request/.test(methodName) &&
                // clang-format on
                // The ServiceObject didn't redefine the method.
                this[methodName] === ServiceObject.prototype[methodName] &&
                // This method isn't wanted.
                !config.methods![methodName]);

If I remove the off/on comments,clang-format produces the following output:
            return (
                // All ServiceObjects need `request`.
                ! / ^request /.test(methodName) &&
                // The ServiceObject didn't redefine the method.
                this[methodName] === ServiceObject.prototype[methodName] &&
                // This method isn't wanted.
                !config.methods![methodName]);

The spaces inserted into the regex change it's runtime behavior.
Note: I'm filing this mostly to help make my case for a switch to Prettier in googleapis/google-cloud-node#2842 . I'll be adding a comment there soon that references this issue. If we switch to tslint + prettier (via tslint-plugin-prettier and tslint-config-prettier), this issue will be fixed "for free".

Fixed by #259


Idiomatic macro usage in 2018 edition requires #[allow(deprecated)]

In 2018 Edition, importing the assert_that! macro via use hamcrest2::assert_that;, rather than using #[cfg(test)] #[macro_use] extern crate hamcrest2; at the crate root, the former of which is now idiomatic, requires using #[allow(deprecated)], because hamcrest2 root bring into scope and republishes the deprecated core::assert_that via use hamcrest2::prelude::*;.
It would be best if hamcrest2::prelude did not include the pub use core::assert_that; line to avoid this name clash.

Apologies for the delay!
Just release 0.3.0 that fixes this. Thanks for the heads-up!


Fix tabs,spaces,indentation

Hi, just a small comment. The userChrome.css is badly formatted.
There are lots of white spaces in between lines, and maybe the comments should have 1 white space each letter for readability? :)
Maybe format it with a tool such as prettier? Although I can't find CSS support for prettier at the moment, maybe another tool?
Anyways, thanks for your release. Tested it, looks pretty simple and solid
For example:
/* Config */
:root {
    --bar-bg: #303035;
    --tab-active-bg: #404045;
}

/* General */
window,
#main-window,
#toolbar-menubar,
#TabsToolbar,
#PersonalToolbar,
#navigator-toolbox,
#sidebar-box,
#nav-bar {
    background-color: var(--bar-bg) !important;
    -moz-appearance: none !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
}

.titlebar-buttonbox {
    display: none;
}

#tabbrowser-tabs[haspinnedtabs]:not([positionpinnedtabs])>#tabbrowser-arrowscrollbox>.tabbrowser-tab[first-visible-unpinned-tab] {
    margin-inline-start: 0 !important;
}

#TabsToolbar {
    margin-top: -1px !important;
    margin-bottom: 1px !important;
    margin-left: 25vw !important;
}

Hey there, thanks for your Input. I'm glad you're liking it. c:
I know that I have a really weird way to write CSS. Especially with all the whitespaces and grouping of things in one line. Be assurred: there is a system and I actually find it to be readable a lot better than other ways to structure CSS.  I'll take some time to reformat this for maintainability – I can always keep my weird formatting for me and have Beautify run on compilation/push.

closed due to rewrite

@andreasgrafen Anyway just wanna say thank you. This theme really make me love firefox again. it's really really compact that make me able to save space even with menu bar enabled! Thank you!


reject wlc in rationals

In particular, shows the rationals are not hemicompact as noted in https://math.stackexchange.com/questions/4209303/a-sigma-compact-but-not-hemicompact-space (based on my fall 2022 comment, we must have known this in the pi-Base previously, but perhaps this was lost during cleaning at some point?)

I added the same thing (referring to Steen & Seebach) in the pending #261.  Do you think we should go with that instead?
I am a little confused about your argument to show that $\mathbb Q$ is not WLC.  Not quite seeing why the copy of the infinite discrete subspace must be closed?

Z is closed within Q. Then we have compact => no subspace-closed copy of an infinite discrete set.
Call me out if I'm being sloppy though; referencing S&S is fine anyway.

will review #261 when I can; guess I should have peeked a bit closer before doing this however :-)

Z is closed within Q. Then we have compact => no subspace-closed copy of an infinite discrete set.

I get that much.  But what is not clear to me is whether the particular Q in the sentence above is the full space Q, or one of the copies of Q in "Open neighborhoods are disjoint unions of copies of $\mathbb Q$".
Still, the argument in S&S is also a bit too terse I think: saying "compact sets are nowhere dense" is about the same amount of work as showing WLC = false it seems.  We could combine referring S&S together with something borrowing your ideas, maybe along the lines below.  (or just refer to something in mathse)
Assume there is a compact subset $C\subseteq\mathbb Q$ with nonempty interior.  We can then find a sufficiently small interval $U=[\alpha,\beta]\cap\mathbb Q \subseteq C$ with $\alpha$, $\beta$ irrational.  Since $U$ is closed in $\mathbb Q$, $U$ is compact.  And $U$ is homeomorphic to $\mathbb Q$.  But $\mathbb Q$ is not compact as it contains the infinite discrete (thus non-compact) subspace $\mathbb Z$ as a closed set.


fix: add more tcp client options

Description
Add more TCP client options so we can customize them when needed

Gravitee.io Automatic Deployment
🚀 A prerelease version of this package has been published on Gravitee's private artifactory, you can:

use it directly by updating your project with version: 7.0.0-add-more-tcp-options-SNAPSHOT
download it from Artifactory here

:tada: This PR is included in version 7.0.0-alpha.12 :tada:
The release is available on:

7.0.0-alpha.12
GitHub release

Your semantic-release bot :package::rocket:

:tada: This PR is included in version 7.0.0 :tada:
The release is available on:

7.0.0
GitHub release

Your semantic-release bot :package::rocket:


Workaround for Zookeeper config bug

This is not a Peel  but rather a Zookeeper (tested 3.3.6) bug that could be addresses easily by the respective Peel extension. The zookeeper mustache emplate generates an output like:
# The number of milliseconds of each tick
....
# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just
# example sakes.
# dataDir=/tmp/zookeeper
...
# the port at which the clients will connect
# clientPort=2181
...
clientPort=2181
dataDir=/root/zookeeper/data
dataLogDir=/root/zookeeper/log
server.1=<IP_ADDRESS>:2888:3888
server.2=<IP_ADDRESS>:2888:3888
server.3=<IP_ADDRESS>:2888:3888
which is valid. All entries that begin with # were supposed to be comments. At least dataDir=/tmp/zookeeper is wrongly  interpreted as a config item  by Zookeeper and it tries to write to files to /tmp/zookeeper.
A very easy workaround is to remove the comments from the template file. Or generally: Can I override a mustache template for an existing extension?

Answering my own question:
The provided templates can be overridden creating a template file that is located in a path that is more specific (i.e. it refers to the version declared in systems.scala):
resources/templates/zookeeper/3.3.6/conf/zoo.cfg.mustache


Ship free-threaded wheels

My real goal with #100 was to enable shipping free-threaded wheels. I'm actively working on improving the state of free-threaded support for popular packages on PyPI and this package is one of them. I'll be linking to this issue from https://py-free-threading.github.io/tracking/. See that website for lots more information on supporting free-threaded Python.
Looking at the existing tests, they don't use the python threading module at all and there aren't any rust-level tests. Is that correct?
One thing we could try without writing tests for explicit multithreaded use is running pytest-run-parallel on the full test suite. That wouldn't catch thread safety issues caused by sharing data structures provided by rpds between threads, but it would catch issues due to use of global state.
I see this library already uses new_sync to create the rpds data structures, so according to the rpds docs everything should be thread safe. Do you agree with that assessment?
But also I don't actually see any multithreaded tests in the rust rpds library itself, so I'm not sure how carefully validated that is besides the fact that cargo parallelizes tests automatically.
Do you have any ideas for ways to validate the thread safety of the python library before we upload wheels and declare the rpds module is thread-safe?

Looking at the existing tests, they don't use the python threading module at all and there aren't any rust-level tests. Is that correct?

Correct.

I see this library already uses new_sync to create the rpds data structures, so according to the rpds docs everything should be thread safe. Do you agree with that assessment?

Yes that was my understanding as well, though I did less work than it sounds like you did already to check how well this is tested in rpds itself.

Do you have any ideas for ways to validate the thread safety of the python library before we upload wheels and declare the rpds module is thread-safe?

I like your pytest-run-parallel idea certainly -- I'd otherwise have likely added at least one test which explicitly spins up a few threads and then perhaps uses hypothesis to randomly add data across them -- but I don't think it should block calling the package thread-safe if we're relying on rpds meeting what it claims.
Said more "brutally", I'm personally OK with letting someone tell us if it turns out there are thread safety issues.
(And again sincere thanks for all the help so far and for the work you're doing more broadly!)

OK great, I'll keep the hypothesis idea on the backburner, I don't think I want to take on setting up hypothesis to do that since I've never set up hypothesis from scratch, let alone in a multithreaded context. That said, I bet we could leverage hypothesis to make it easier to productively start from scratch on writing multithreaded tests for sharing data structures here and in many other packages. I'll bring this up at our next internal sync on our ecosystem compatibility team.

hypothesis

Hm, while I love hypothesis this, might lead to a bunch of work, considering https://hypothesis.readthedocs.io/en/latest/details.html#thread-safety-policy

I'm seeing test failures on Linux if I run the tests with pytest-run-parallel. See this actions run on my fork.
The failures look like:
FAILED tests/test_hash_trie_map.py::test_views_abc[Set-values] - TypeError: 'dict' object cannot be converted to 'HashTrieMap'
FAILED tests/test_hash_trie_map.py::test_views_abc[MappingView-keys] - TypeError: descriptor 'keys' for 'rpds.HashTrieMap' objects doesn't apply to a 'dict' object
FAILED tests/test_hash_trie_map.py::test_views_abc[MappingView-items] - TypeError: descriptor 'items' for 'rpds.HashTrieMap' objects doesn't apply to a 'dict' object
FAILED tests/test_hash_trie_map.py::test_views_abc[KeysView-items] - TypeError: descriptor 'items' for 'dict' objects doesn't apply to a 'rpds.HashTrieMap' object
FAILED tests/test_hash_trie_map.py::test_views_abc[ValuesView-values] - TypeError: descriptor 'values' for 'dict' objects doesn't apply to a 'rpds.HashTrieMap' object
FAILED tests/test_hash_trie_map.py::test_views_abc[ItemsView-values] - TypeError: descriptor 'values' for 'dict' objects doesn't apply to a 'rpds.HashTrieMap' object
FAILED tests/test_hash_trie_map.py::test_views_abc[ItemsView-items] - TypeError: descriptor 'items' for 'rpds.HashTrieMap' objects doesn't apply to a 'dict' object

I can reproduce this on my Ubuntu 22.04 developer machine using a pyenv-built 3.13.0t and the python-build-standalone python3.13t that uv installs (I was thinking that might be related, it's not).
The error is coming from PyObject internals and sort of looks like some sort of thread safety issue in PyO3. HashTrieMapPy uses pyclass(mapping) which I don't think I ran across when I was working with PyO3, that could be related.

Oh actually I wonder if this is hitting the thread-safety issues in collections.abc that were fixed in CPython: https://github.com/python/cpython/pull/125415

No, I still see if it I build Python using the latest version of the CPython 3.13 branch.
Some more info:
The errors are coming from the isinstance calls in this test:
https://github.com/crate-py/rpds/blob/2597aa44d76e0d789043b1028fa25cc7eb90110d/tests/test_hash_trie_map.py#L364-L380
And here's what the call stack looks like from inside gdb - somehow a corrupt PyObject struct is being passed into descr_check: https://gist.github.com/ngoldbaum/c855789fefc7f15496907b114afc44d1
Ping @davidhewitt and @colesbury in case this rings any bells as a PyO3 or CPython bug related to collections.abc protocols.

No, sorry, doesn't ring any bells. For what it's worth, it looks to me like the error happens during the execution of view(m) or view(d), before isinstance() is actually invoked.

I think I was able to reproduce this in just pure Python (using a modification of your code). So I think it's a bug in CPython, not PyO3 or rpds:
https://gist.github.com/colesbury/0d3fa451b4b47e661952d2a1b88be461
Once every 5-10 runs, I get:
TypeError: descriptor 'keys' for 'dict' objects doesn't apply to a 'HashTrieMap' object
``

OK, in that case I think we're OK to move forward with a PR setting up pytest-run-parallel in CI and declaring free-threading support. I'll just go ahead and skip the test that fails on the free-threaded build, with the expectation that 3.13.1 or another future python release will fix it.

...except it looks like I'll need to do some work in maturin to make it possible to build free-threaded wheels:
$ maturin build --target aarch64-apple-darwin --release --out dist --interpreter 3.9 3.10 3.11 3.12 3.13 3.13t pypy3.9 pypy3.10
📦 Including license file "/Users/goldbaum/Documents/rpds-py/LICENSE"
🔗 Found pyo3 bindings
⚠  Warning: skipped unavailable python interpreter 'pypy3.10' from pyenv
💥 maturin failed
  Caused by: Invalid python interpreter minor version '13t', expect a digit
  Caused by: invalid digit found in string