Record/text must not be longer than 300 graphemes

Software

OS: Linux 4.18.0-553.5.1.el8_10.x86_64 (Docker container)
Python library: atproto==0.0.55
Python version: Python 3.8.10

Issue
When attempting to send 2 (different) posts of mine (containing hashtags, links incl. external embed) using the atproto Python library, I received the following errors:
Response(success=False, status_code=400, content=XrpcError(error='InvalidRequest', message='Invalid app.bsky.feed.post record: Record/text must not be longer than 300 graphemes'), headers={'x-powered-by': 'Express', 'access-control-allow-origin': '*', 'cache-control': 'private', 'vary': 'Authorization, Accept-Encoding', 'ratelimit-limit': '5000', 'ratelimit-remaining': '4997', 'ratelimit-reset': '1731571232', 'ratelimit-policy': '5000;w=3600', 'content-type': 'application/json; charset=utf-8', 'content-length': '123', 'etag': 'W/"7b-5OYjOucrkx456vG6nIBiH/VZWIA"', 'date': 'Thu, 14 Nov 2024 07:00:32 GMT', 'keep-alive': 'timeout=90', 'strict-transport-security': 'max-age=63072000'})

Response(success=False, status_code=400, content=XrpcError(error='InvalidRequest', message='Invalid app.bsky.feed.post record: Record/text must not be longer than 300 graphemes'), headers={'x-powered-by': 'Express', 'access-control-allow-origin': '*', 'cache-control': 'private', 'vary': 'Authorization, Accept-Encoding', 'ratelimit-limit': '5000', 'ratelimit-remaining': '4991', 'ratelimit-reset': '1731571232', 'ratelimit-policy': '5000;w=3600', 'content-type': 'application/json; charset=utf-8', 'content-length': '123', 'etag': 'W/"7b-5OYjOucrkx456vG6nIBiH/VZWIA"', 'date': 'Thu, 14 Nov 2024 07:00:44 GMT', 'keep-alive': 'timeout=90', 'strict-transport-security': 'max-age=63072000'})

My code however, which calculates the length of the post to be sent to Bluesky mimicking the same way the web interface would've counted it based on my own test composing similar type of posts have failed to determine that it is exceeding the 300 character limit.
As confirmation, I took the exact contents of the 2 posts and put them right into Bluesky web interface's post "composer" and both of them returned the lengths, 240 and 295 respectively - both of which would've and should've went through instead of being met with this error.
Is this a known issue, and is there anything we could do to try and fix this? Please let me know if you require any further information.
Thank you.

I'll add here possibly related issues from this/other related projects I've found:

https://github.com/mattn/bsky/issues/17

I think if I'm not mistaken that this error is a server-side error, meaning the Python library tried to send your post but it got rejected by the Bluesky server.
It would be helpful to also see what the content of the post you were trying to send was, and also the code you were trying to send it with. Did the post include any other facets like embeds or links? How many of them? It might be that the way you constructed the post in Python was different to what you then tried in the app.
I haven't personally ran into issues with post length when sending posts with the Python SDK, so I would assume it's an issue with how you were writing the post up in Python.

Thank you for the feedbacks!
For better context, here's the general flow of my code before it gets sent:

I'd pass to a method a pending post's intended title, tags, and 1 link.
That method would form them into its intended shape and count/limit the length - or based on ur desc, it seems that what I was doing was count its graphemes. The link counts as a max of 23 based on a doc (tho I found, on the web interface this doesn't seem to be accurate) while things like emojis count as 1 each (based on web interface) instead of how many Python counts them as.
That formed post content is then passed into another method that makes the content rich, since Bluesky doesn't do that by default. This involves scanning through the content and building them into text, mentions, tags, or links. The first link, if any, will also produce and return the External embed object.
Send the (rich) post.

Here's a sample flow of the code:
if __name__ == "__main__":
    # test variables
    handle = "handle.example.com" # example only
    access_token = "OIZJ3aCRTbPeIhcHwn4" # example only

    # instantiate bluesky
    client = Client()
    login = client.login(
        handle,
        access_token,
    )

    # count/limit post length (grapheme)
    post_title = "Fahmi: Govt not blocking social media platforms that fail to apply for licensing after 1st Jan 2025"
    post_tags = ['apps', 'digitallife', 'mcmc', 'news', 'socialmedia', 'socialmedialicence', 'socialmedialicensing', 'socialmediaregulation']
    post_link = "https://soyacincau.com/2024/11/11/govt-not-blocking-social-media-platforms-fail-to-apply-for-licensing/"
    bluesky_post = validate_post_length(post_title, post_tags, post_link)
    ## bluesky_post = "Fahmi: Govt not blocking social media platforms that fail to apply for licensing after 1st Jan 2025 #apps #digitallife #mcmc #news #socialmedia #socialmedialicence #socialmedialicensing #socialmediaregulation\n\nhttps://soyacincau.com/2024/11/11/govt-not-blocking-social-media-platforms-fail-to-apply-for-licensing"

    # make post rich
    bluesky_post, link_embed = build_rich_post(client, bluesky_post)
    ## vars(bluesky_post) = {'_buffer': <_io.BytesIO object at 0x7ab718cfbf60>, '_facets': [Main(features=[Tag(tag='apps', py_type='app.bsky.richtext.facet#tag')], index=ByteSlice(byte_end=105, byte_start=100, py_type='app.bsky.richtext.facet#byteSlice'), py_type='app.bsky.richtext.facet'), Main(features=[Tag(tag='digitallife', py_type='app.bsky.richtext.facet#tag')], index=ByteSlice(byte_end=118, byte_start=106, py_type='app.bsky.richtext.facet#byteSlice'), py_type='app.bsky.richtext.facet'), Main(features=[Tag(tag='mcmc', py_type='app.bsky.richtext.facet#tag')], index=ByteSlice(byte_end=124, byte_start=119, py_type='app.bsky.richtext.facet#byteSlice'), py_type='app.bsky.richtext.facet'), Main(features=[Tag(tag='news', py_type='app.bsky.richtext.facet#tag')], index=ByteSlice(byte_end=130, byte_start=125, py_type='app.bsky.richtext.facet#byteSlice'), py_type='app.bsky.richtext.facet'), Main(features=[Tag(tag='socialmedia', py_type='app.bsky.richtext.facet#tag')], index=ByteSlice(byte_end=143, byte_start=131, py_type='app.bsky.richtext.facet#byteSlice'), py_type='app.bsky.richtext.facet'), Main(features=[Tag(tag='socialmedialicence', py_type='app.bsky.richtext.facet#tag')], index=ByteSlice(byte_end=163, byte_start=144, py_type='app.bsky.richtext.facet#byteSlice'), py_type='app.bsky.richtext.facet'), Main(features=[Tag(tag='socialmedialicensing', py_type='app.bsky.richtext.facet#tag')], index=ByteSlice(byte_end=185, byte_start=164, py_type='app.bsky.richtext.facet#byteSlice'), py_type='app.bsky.richtext.facet'), Main(features=[Tag(tag='socialmediaregulation', py_type='app.bsky.richtext.facet#tag')], index=ByteSlice(byte_end=208, byte_start=186, py_type='app.bsky.richtext.facet#byteSlice'), py_type='app.bsky.richtext.facet'), Main(features=[Link(uri='https://soyacincau.com/2024/11/11/govt-not-blocking-social-media-platforms-fail-to-apply-for-licensing', py_type='app.bsky.richtext.facet#link')], index=ByteSlice(byte_end=312, byte_start=210, py_type='app.bsky.richtext.facet#byteSlice'), py_type='app.bsky.richtext.facet')]}
    ## vars(link_embed) = {'external': External(description='The government has no intention to block internet messagin service and social media platforms that fail to apply for licensing after the 1st of January 2025.', title="Govt won't block platforms without licence after 1st Jan 2025", uri='https://soyacincau.com/2024/11/11/govt-not-blocking-social-media-platforms-fail-to-apply-for-licensing', thumb=BlobRef(mime_type='image/jpeg', size=236560, ref=IpldLink(link='bafkreiggqa543b2at3rd5wsfjmy7ytbilxkfzbzzpzdfrxh2gv6yoakika'), py_type='blob'), py_type='app.bsky.embed.external#external'), 'py_type': 'app.bsky.embed.external'}

    # send post call
    try:
        post_id = send_bluesky_post(
            client,
            bluesky_post,
            link_embed=link_embed
        )
    except Exception as e:
        print(e)
    ## e = Response(success=False, status_code=400, content=XrpcError(error='InvalidRequest', message='Invalid app.bsky.feed.post record: Record/text must not be longer than 300 graphemes'), headers={'x-powered-by': 'Express', 'access-control-allow-origin': '*', 'cache-control': 'private', 'vary': 'Authorization, Accept-Encoding', 'ratelimit-limit': '5000', 'ratelimit-remaining': '4985', 'ratelimit-reset': '1731634236', 'ratelimit-policy': '5000;w=3600', 'content-type': 'application/json; charset=utf-8', 'content-length': '123', 'etag': 'W/"7b-5OYjOucrkx456vG6nIBiH/VZWIA"', 'date': 'Fri, 15 Nov 2024 01:20:02 GMT', 'keep-alive': 'timeout=90', 'strict-transport-security': 'max-age=63072000'})

and here's the simplified method that sends the post:
def send_bluesky_post(client, content, **kwargs):
    link_embed = kwargs.get("link_embed", None)
    params = kwargs.get("params", {})
    post_id = kwargs.get("post_id")
    # include link embed object if applicable
    params.update(embed=link_embed) if link_embed else None
    # send bluesky post
    # NOTE: post update not currently supported on bluesky - alternative implementation would be to quote instead
    if post_id:
        quote_embed = atproto_models.app.bsky.embed.record.Main(
            record=atproto_models.ComAtprotoRepoStrongRef.Main(
                uri=post_id.split(",")[0],
                cid=post_id.split(",")[1]
            )
        )
        params.update(embed=quote_embed) if not link_embed else params.update(embed=atproto_models.AppBskyEmbedRecordWithMedia.Main(record=quote_embed, media=link_embed))
    post = client.send_post(text=content, **params)
    # return post id
    return "%s,%s" % (getattr(post, "uri"), getattr(post, "cid"))

For this sample post, composing it on the Bluesky web interface - which gives the exact same resulting post (superficially at least) with the built tags, link, and external embed - the perceived grapheme by the interface is 240 which I expect should've gone through.
Would appreciate any advice on what I could do better here to handle or work around this.

Thanks! But it would be helpful to see the source code in build_rich_post and maybe also validate_post_length too, as we can't actually see what the final post text you're trying to send is.

The final post (text) variable were included in the previous sample of mine, particularly the ones with double leading comments:
bluesky_post = validate_post_length(post_title, post_tags, post_link)
## bluesky_post = "Fahmi: Govt not blocking social media platforms that fail to apply for licensing after 1st Jan 2025 #apps #digitallife #mcmc #news #socialmedia #socialmedialicence #socialmedialicensing #socialmediaregulation\n\nhttps://soyacincau.com/2024/11/11/govt-not-blocking-social-media-platforms-fail-to-apply-for-licensing"

# make post rich
bluesky_post, link_embed = build_rich_post(client, bluesky_post)
## vars(bluesky_post) = {'_buffer': <_io.BytesIO object at 0x7ab718cfbf60>, '_facets': [Main(features=[Tag(tag='apps', py_type='app.bsky.richtext.facet#tag')], index=ByteSlice(byte_end=105, byte_start=100, py_type='app.bsky.richtext.facet#byteSlice'), py_type='app.bsky.richtext.facet'), Main(features=[Tag(tag='digitallife', py_type='app.bsky.richtext.facet#tag')], index=ByteSlice(byte_end=118, byte_start=106, py_type='app.bsky.richtext.facet#byteSlice'), py_type='app.bsky.richtext.facet'), Main(features=[Tag(tag='mcmc', py_type='app.bsky.richtext.facet#tag')], index=ByteSlice(byte_end=124, byte_start=119, py_type='app.bsky.richtext.facet#byteSlice'), py_type='app.bsky.richtext.facet'), Main(features=[Tag(tag='news', py_type='app.bsky.richtext.facet#tag')], index=ByteSlice(byte_end=130, byte_start=125, py_type='app.bsky.richtext.facet#byteSlice'), py_type='app.bsky.richtext.facet'), Main(features=[Tag(tag='socialmedia', py_type='app.bsky.richtext.facet#tag')], index=ByteSlice(byte_end=143, byte_start=131, py_type='app.bsky.richtext.facet#byteSlice'), py_type='app.bsky.richtext.facet'), Main(features=[Tag(tag='socialmedialicence', py_type='app.bsky.richtext.facet#tag')], index=ByteSlice(byte_end=163, byte_start=144, py_type='app.bsky.richtext.facet#byteSlice'), py_type='app.bsky.richtext.facet'), Main(features=[Tag(tag='socialmedialicensing', py_type='app.bsky.richtext.facet#tag')], index=ByteSlice(byte_end=185, byte_start=164, py_type='app.bsky.richtext.facet#byteSlice'), py_type='app.bsky.richtext.facet'), Main(features=[Tag(tag='socialmediaregulation', py_type='app.bsky.richtext.facet#tag')], index=ByteSlice(byte_end=208, byte_start=186, py_type='app.bsky.richtext.facet#byteSlice'), py_type='app.bsky.richtext.facet'), Main(features=[Link(uri='https://soyacincau.com/2024/11/11/govt-not-blocking-social-media-platforms-fail-to-apply-for-licensing', py_type='app.bsky.richtext.facet#link')], index=ByteSlice(byte_end=312, byte_start=210, py_type='app.bsky.richtext.facet#byteSlice'), py_type='app.bsky.richtext.facet')]}
## vars(link_embed) = {'external': External(description='The government has no intention to block internet messagin service and social media platforms that fail to apply for licensing after the 1st of January 2025.', title="Govt won't block platforms without licence after 1st Jan 2025", uri='https://soyacincau.com/2024/11/11/govt-not-blocking-social-media-platforms-fail-to-apply-for-licensing', thumb=BlobRef(mime_type='image/jpeg', size=236560, ref=IpldLink(link='bafkreiggqa543b2at3rd5wsfjmy7ytbilxkfzbzzpzdfrxh2gv6yoakika'), py_type='blob'), py_type='app.bsky.embed.external#external'), 'py_type': 'app.bsky.embed.external'}

but yes, for clarity, here are the simplified versions of those two following methods:

build_rich_post
def build_rich_post(client, text):
    link_embed = None
    rich_post = client_utils.TextBuilder()
    # define patterns
    hashtag_pattern = r"#\w+"
    mention_pattern = r"@\w+"
    url_pattern = r"http[s]?://\S+"
    # split the text using urls and keep the delimiters
    parts = re.split("(%s)" % url_pattern, text)
    # build rich post
    for part in parts:
        # build link
        if re.match(url_pattern, part):
            rich_post.link(part, part)
            # skip creating link embed object if one exists
            if link_embed:
                continue
            # get required metadata
            link_metadata = get_content_md(part)
            # create link embed object if sufficient metadata
            if link_metadata and ((description := link_metadata.get("description")) and (title := link_metadata.get("title"))):
                thumbnail_bin = getattr(requests.get(thumbnail), "content", None) if (thumbnail := link_metadata.get("thumbnail")) else None
                params = dict(
                    description=description,
                    thumb=client.upload_blob(data=thumbnail_bin).blob if thumbnail_bin else None,
                    title=title,
                    uri=part,
                )
                link_embed = atproto_models.AppBskyEmbedExternal.Main(
                    external=atproto_models.AppBskyEmbedExternal.External(**params)
                )
        else:
            # split by spaces to handle individual words and hashtags - keep the spaces as separate elements
            words = re.split(r'(\s+)', part)
            for word in words:
                # build hashtag
                if re.match(hashtag_pattern, word):
                    rich_post.tag(word, word[1:])
                # build mention if valid
                elif re.match(mention_pattern, word):
                    user_did = getattr(get_user(client, word[1:]), "did", None)
                    rich_post.mention(word, user_did) if user_did else rich_post.text(word)
                # add regular text
                else:
                    rich_post.text(word)
    return rich_post, link_embed

validate_post_length
def validate_post_length(title, tags, link):
    # set character limits
    char_limit = 300
    link_limit = sum((23, 2)) # additional 2 for 2 newlines
    # count characters
    title_count = len(title)
    tags_count = len(tags)
    link_count = 0 if not link else (link_limit if sum((len(link), 2)) > link_limit else sum((len(link), 2)))
    # emoji_count is how many emoji characters are in the post
    # emoji_length is the perceived length of all the emojis by python (which is inaccurate when counting graphemes)
    emoji_count, emoji_length = count_emoji(title + tags + link)
    # prioritise removing tags, then limiting title to accommodate link
    if sum((title_count, tags_count, link_count, emoji_count - emoji_length)) > char_limit:
        tags = ""
        emoji_count = count_emoji(title + tags + link)[0]
        title = title[:char_limit - (link_count + emoji_count)]
    # return post content
    return "{title}{tags}\n\n{link}".format(title=title, tags=tags, link=link)

I think that link will be included as general limit for graphemes. Try link shorter or add links not as facest, but as embeds insetad


fix(docs): context menu wide screen

Description
Missed a class on the new context menu

The context menu is positioned absolutely, but that's relative to the nearest relative parent. Because I forgot to make the logo relative, if the screen is wide enough it's positioned relative to the window:


Error with request "browserify.js" in the latest version

The CLI doesn't work, and I just noticed this in the browser:

It was working without any problems a few days ago

Where do you run redis-commander? Are you running it under Windows?
Which version of Redis-commander?
Works under Linux and inside Kubernetes without problem for us...

Thanks - strange ist working for me under linux with docker - What kind of browser? And can you please provide the logs from redis-commander server?
Maybe related to #232

`/usr/local/lib/node_modules/redis-commander # redis-commander
No Save: false
events.js:167
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE: address already in use <IP_ADDRESS>:8081
at Server.setupListenHandle [as _listen2] (net.js:1294:14)
at listenInCluster (net.js:1342:12)
at doListen (net.js:1480:7)
at process.internalTickCallback (internal/process/next_tick.js:72:19)
Emitted 'error' event at:
at emitErrorNT (net.js:1321:8)
at process.internalTickCallback (internal/process/next_tick.js:72:19)`
Tested in Chrome, Firefox, Opera and Edge, same behaviour in all of them

can u check with latest version again (github source or docker)? There is a fix incorporated that did helped others but was remove for some reason...

This problem should be fixed in current version.
If you think its not feel free to reopen issue with updated informations based on latest version.


Add missing slash

Fixes #2094

u merge that. No idea how to read codecov report

u merge that. No idea how to read codecov report


Support Kotlin suspending functions for annotated services

Motivation:
Currently, to implement annotated services, Kotlin users have to write mono or future many times redundantly.
It'd be nice if Kotlin users can implement annotated service with suspend functions.
Modifications:

Modify AnnotatedService

check if the method matched with the incoming request is a suspend function
and invokes a suspend function with a configured coroutine context

Add CoroutineContextService and CoroutineContextProvider so that users can configures a context easily

Result:
We can implement annotated services with suspending functions. With CoroutineContextService decorator, we can configure a coroutine context.
serverBuilder
    .annotatedService(object {
        @Get("/foo")
        suspend fun foo(): HttpResponse {
            ...
        }
    })
    .decorator(CoroutineContextService.newDecorator { ctx ->
        ctx.eventLoop().asCoroutineDispatcher() +
            CoroutineName(ctx.config().defaultServiceName() ?: "none")
    })

Todo:

add to examples

Could make use of optional dependencies instead of adding armeria-kotlin in
this case? It might be better adding a separate module in the long run, but
I guess we can keep it in the core for now since it will require
non-trivial changes.
2020년 8월 10일 (월) 오후 3:14, minux<EMAIL_ADDRESS>작성:

@minwoox commented on this pull request.
In
core/src/main/java/com/linecorp/armeria/internal/server/annotation/AnnotatedService.java
https://github.com/line/armeria/pull/2983#discussion_r467704062:

@@ -300,7 +304,14 @@ private Object invoke(ServiceRequestContext ctx, HttpRequest req,

     try (SafeCloseable ignored = ctx.push()) {

         final ResolverContext resolverContext = new ResolverContext(ctx, req, aggregatedRequest);

         final Object[] arguments = AnnotatedValueResolver.toArguments(resolvers, resolverContext);

       return method.invoke(object, arguments);

       if (CoroutineUtil.isSuspendingFunction(method)) {

           return CoroutineUtil.invokeSuspendingFunction(

What I meant was that making a separate module not a package so that we
can put
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-jdk8"
implementation "org.jetbrains.kotlin:kotlin-reflect"
these dependencies into that module so that core module does not depend
on Kotlin. 😄
We might name the module as kotlin /cc @trustin
https://github.com/trustin, @ikhoon https://github.com/ikhoon
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/line/armeria/pull/2983#discussion_r467704062, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AABKOXTS4AN4CRUNMRBTWBLR76F53ANCNFSM4PZJQE2A
.

Could make use of optional dependencies instead of adding armeria-kotlin in
this case? It might be better adding a separate module in the long run, but
I guess we can keep it in the core for now since it will require
non-trivial changes.

SGTM. Let's add the separate module when it grows. 😉

Ah, I see what you mean. If separating modules, AnnotatedService.invoke implementation is not so trivial.

In addition to dependencies issue, there're some issues:

Which is better as the response of suspending function, Publisher or CompletableFuture?

We can use this library to return Publisher

What context should armeria invoke coroutines with?

Dispatchers.Unconfined? (for now)
ctx.eventLoop().asCoroutineDispatcher()?
ctx.blockingTaskExecutor().asCoroutineDispatcher()?
or ThreadContextElement which propagates ServiceRequestContext?

This looks promising. 😄 How about adding the client side support as well in this PR, just in case there's something we can put into the common (or common.kotlin) package?

What context should armeria invoke coroutines with?

Dispatchers.Unconfined looks good to me. CoroutineUtil.invokeSuspendingFunction is internal. We can control the execution thread before calling the method if needed.

Which is better as the response of suspending function, Publisher or CompletableFuture?

I prefer CompletableFuture. Because, as you know, suspend function is an asynchronous function not a streaming function.

It may be natural to return Publisher if Armeria supports Flow

If Armeria supports Flow:

The Flow<HttpObject> could be converted to Publisher<HttpObject> by default.
If users want to produce the results as a JSON sequence, @ProducesJsonSequences, then a Flow<Any> can be converted to a Publisher with the default headers such as:
https://github.com/line/armeria/blob/9061e241961c806951dd855be65fd871131a1835/core/src/main/java/com/linecorp/armeria/server/streaming/JsonTextSequences.java#L91-L95

But it needs an additional dependency. 🤔

This is current package structure

I tried separating kotlin dependencies from :core, and create a new module.

How about adding a kotlin version of :examples/annotated-http-service?
What would be the best way to make this even more convenient?

Is there a way to make this work without CoroutineContext{Client,Service} at all? (Unless a user wants to specify an alternative CoroutineContextProvider)

In the current design, unless CoroutineContextService is given, armeria invokes suspending functions with Dispathcers.Unconfined. i.e. functions starts at armeria event loop or blocking pool.
But, after the function is suspended, thread where the function is executed is not context aware...

In the current design, unless CoroutineContextService is given, armeria invokes suspending functions with Dispathcers.Unconfined. i.e. functions starts at armeria event loop or blocking pool.
But, after the function is suspended, a thread where the function is executed is not context aware...

In my opinion, it looks good to execute a suspend function on a ctx.eventLoop().asCoroutineDispatcher() by default.

In my opinion, it looks good to execute a suspend function on a ctx.eventLoop().asCoroutineDispatcher() by default.

I agree

Is it possible to update ThreadFactoryBuilder to build a ThreadFactory that create a new thread that's an event loop and coroutine dispatcher when Kotlin is detected?

Is it possible to update ThreadFactoryBuilder to build a ThreadFactory that create a new thread that's an event loop and coroutine dispatcher when Kotlin is detected?

Does this means that annotated services should dispatch coroutines to a new thread pool which is not an event loop?

Does this means that annotated services should dispatch coroutines to a new thread pool which is not an event loop?

No. I was curious if it's possible to make our event loop threads also coroutine dispatchers, but perhaps it's not the scope of this pull request.

🎉 🎉 🎉

Thanks for reviewing!

Before the release, we should add documentation for this feature..

It'd be awesome if you will work on that. Would you? 😊

Yeah, let me add a section about Kotlin to https://github.com/line/armeria/blob/master/site/src/pages/docs/server-annotated-service.mdx


Not always showed "R:" prefix when lauched any app.

When i start any app from list of all apps and back to launcher, the "R:" prefix not showed on that app.
But if i press "Menu" button and go back to all applications list  "R:" prefix showed fine!

Can you retest on the newest version? I changed the code architecture little bit.

now this problem solved, but issue #6 is still here.


Remove video chat list from LH sidebar?

Stephanie and I wonder whether it might be conceptually and visually simpler to just delete the Video Chat Rooms bit of the left sidebar and let people get to these rooms via the People/Places page...

(a) It will not completely remove this ability -- you just have to open another tab onto People/Places.
(b) The current design is not quite the right thing either:

If there are a lot of rooms or a lot of people in rooms, it will eat into the space for the PaaG
it doesn't belong with the program (semantically, it would make more sense on the right)

(c) I'm still concerned about how busy / complex the overall interface is.

+1 for removing the video chat list from the left side bar for now.
We need to simplify the UI... after ICFP

I will remove it for now

I think I like this, Crista.  IMO, two big things it’s missing are (a) some way of watching multiple channels at once, and (b) a really good story about multiple browser windows.
Best,
 - Benjamin

Funny, I was just showing Benjamin and Harry a prototype that is a similar idea of simplifying to a Slack/Discord style UI. The initial work is in my branch ui-overhaul in my fork. We should discuss this on Sunday when you've got time?

Early work but you can see the basic idea. The sidebar collapses uses the burger button top-left. Various of us were discussing on a video room on ICFP Clowdr ideas for UX/UI - I'll allocate time on Sunday to log them on this ticket.

Yes, let's discuss this! But we need to include @bcpierce00 and @jon-bell. Let's coordinate in Slack.


Bug: Unexpected re-entry with an internal transition in v5

Description
An internal transition specified with reenter: false still caused the entry action to be executed.
const machine = createMachine({
	id: 'root',
	initial: 'Ready',
	states: {
		Ready: {
			entry: () => console.log('enter Ready'),
	    	on: {
	        	TOGGLE: {
					target: "#root.Ready",
					reenter: false, // 🪲 despite this, the Ready state will be re-entered
		        }
			}
		}
	}
})

Expected result
When the machine receives a TOGGLE event, the "Ready" state should not be reentered. There should be a single log "enter Ready".
Actual result
The Ready state is re-entered even when the transition is explicitly marked as internal with reenter: false.
"enter Ready" is logged twice (once on xstate.init, the second time on TOGGLE).
Reproduction
https://codesandbox.io/s/bitter-star-63z86x
Additional context
For comparison, XState v4 did not execute the entry action in this exact scenario. Compare with:
https://codesandbox.io/s/focused-monad-4f3v9d

If we treat reenter as just a renamed internal then the current behavior is correct (according to SCMXL):

The behavior of transitions with 'type' of "internal" is identical, except in the case of a transition whose source state is a compound state and whose target(s) is a descendant of the source. In such a case, an internal transition will not exit and re-enter its source state, while an external one will, as shown in the example below.

Since the target here is not a descendant of the source (it is the source itself), the transition reenters the source.
It is quite confusing though - especially with the name that we have chosen for this transition property (reenter). So I think that it would be good to diverge from SCXML here.

Hmm, your call guys. On hand, sticking to the standard should be quite important. On the other hand, this is indeed confusing. Also, changing this behavior makes migration to v5 more difficult.
It wouldn't be the only diversion by the way. The spec says:

The behavior of a transition with 'type' of "external" (the default) ...

Whereas, xstate v5 defaults to internal transitions (reenter:false).

Well, the spec later says:

Note that this is different from a  whose 'target' is its source state. In the latter case, the state is exited and reentered, triggering execution of its  and  executable content.

It seems that the spec explicitly says the state should be re-entered in this case.

It wouldn't be the only diversion by the way.

I don't think that this one is a big diversion. It's merely a different default but the rest of the semantics related to this are currently the same. If we treat that as a diversion then the v4 behavior of choosing the default internal value based on how the target's descriptor was written was also a diversion.
There are still other subtle differences from SCXML - ones that we can't even fix. For instance, the state composition works differently because our root is already a state whereas in SCXML you could have multiple root states. That's not achievable in XState since a list of XML elements just works slightly differently than a keyed object in this regard.
Overall, I don't think that 100% compliance with SCXML should even be our current goal. It's nice to be inspired by it and it answers some unobvious questions for us but it's a standard that has not been updated for years and one that wasn't designed with strict static types in mind. We need some liberty to improve upon things.

I agree, let's be pragmatic. In your discussion with David you pointed out an important edge case where it indeed feels bad that a transition targeting the source state causes the re-entry and thus the actor would be restarted unexpectedly:
{
  initial: 'a',
  states: {
    a: {
      invoke: {
        src: 'fooActor'
      },
      on: {
        NEXT: {
          target: 'a',
          internal: true
        }
      }
    }
  }
}

I fully agree that it should not re-enter, even though we diverge from the spec a little bit.

And like it was said, the semantics of reenter does not need to be the same as that of internal.


Wont show up at integrations

hi. I just installed it from hacs.
I can see all the files at the folder.
But the app won’t show up at integrations.
Can you help me.
Thanks.

You have to add/set up the integration after it has been installed for it to show up in integrations. Just like for other integrations not installed from HACS. Home Assistant should also be restarted after installing/upgrading the integration from HACS for it to show up in the list of integrations available to add. Have you done that?
Set up:
Select configuration main menu, and then Integrations. Add integration by clicking + down in the corner, and find the integration:

You should then see the integration setup dialog after a few seconds:

hi. I just installed it from hacs.
I can see all the files at the folder.
But the app won’t show up at integrations.

I this still a problem?

Sorry.
Of course I tried to reload hassio. I can see some logs telling me that is
not an official integration. But nothing else. It’s not at the integration
tap. Step 7 of the how to.
I will try a manual install this evening. I will let you know.
Thanks.
On Tue, Nov 3, 2020 at 12:07 PM Tore Amundsen<EMAIL_ADDRESS>wrote:

hi. I just installed it from hacs.
I can see all the files at the folder.
But the app won’t show up at integrations.
I this still a problem?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/toreamun/victorsmartkill-homeassistant/issues/2#issuecomment-721259669,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEOR5JTDCPJVP3NGLC6OT3TSOA2GJANCNFSM4THAE3PQ
.

--
*Julian Forero -<PHONE_NUMBER> *

I went to do a manual install but before I took a look at the integrations.
And now it show up.
Thank you.
On Tue, Nov 3, 2020 at 1:11 PM Julian Forero<EMAIL_ADDRESS>wrote:

Sorry.
Of course I tried to reload hassio. I can see some logs telling me that is
not an official integration. But nothing else. It’s not at the integration
tap. Step 7 of the how to.
I will try a manual install this evening. I will let you know.
Thanks.
On Tue, Nov 3, 2020 at 12:07 PM Tore Amundsen<EMAIL_ADDRESS>wrote:

hi. I just installed it from hacs.
I can see all the files at the folder.
But the app won’t show up at integrations.
I this still a problem?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/toreamun/victorsmartkill-homeassistant/issues/2#issuecomment-721259669,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEOR5JTDCPJVP3NGLC6OT3TSOA2GJANCNFSM4THAE3PQ
.

--
*Julian Forero -<PHONE_NUMBER> *
--
*Julian Forero -<PHONE_NUMBER> *


GoPiGo3 Robot Dave "Sees" Using Your Wrapper

Not an issue - but you don't have a Discussions section so I'm abusing your site - sorry.
Christian, long ago you were the first to put ROS on the GoPiGo3 platform.  My ROS 2 Humble GoPiGo3 robot "GoPi5Go-Dave" is gearing up to use Steve Macenski's new Nav2 docking feature, so I'm trying out your apriltag_ros wrapper.
Dave has the wide FOV Luxonis Oak-D-W97 camera so I was wondering just how far away he would be able to detect a dock tag.  Tonight I managed to get it installed and listening to the camera.  (I've been learning ROS 2 for the last couple years, and Dave is a 24/7 ROSbot getting on and off his dock, but cannot "find his way home" yet so he only gets off 17cm and then back on 17cm.)
This is GoPi5Go-Dave:

And tonight he detected a Standard 36h11 tag (150mm on a side) from about 6 meters.  I ran the apriltag_node and see /detections topic - have to figure out how to get the tag pose if possible.

Hm, do you have a particular issue with ROS node or do you just wanted to share this here? In your second image, the tag is quite far away. I would be surprised if it gets detected, even more if the pose would be correct. You could simplify this, by just taking images and testing out different parameters with the standalone apriltag examples.

Just sharing - thank you.


Rename the project

name is not idea, having .js in package name is a bad practice.

How about version-cheker, check-versions or check-env?

I like "engine-check" or "check-engine". Then, our icon/logo could be a glowing check engine light!  What do you think @mohlsen and @yashdalfthegray?

Killer. 👍👍

Oh yeah, 💯


Update examples.md

This a simple calculator written in react js. I just wrote this for fun.

Following is the guideline attached ...
A simple calculator in react js.docx

Thanks, but we already have one calculator, so it doesn't make a lot of sense to add another one.


Added ODBCConnection::GetInfoSync using SQLGetInfo

Synchronous implementation of SQLGetInfo via getInfoSync. Currently only supports SQL_USER_NAME as an argument. Also added SQL_USER_NAME as a constant within ODBC.

Awesome work; thank you @ondr3j.
Just for future reference, does anyone have a link to the documentation for this ODBC call and more specifically what other values may be obtained from the SQLGetInfo call?
I added a test for this, merged and published<EMAIL_ADDRESS>

Answering my own question:
https://docs.microsoft.com/en-us/sql/odbc/reference/syntax/sqlgetinfo-function#data-source-information


Link with GIS Project

Link this Repo under the GeoSpatial Analysis Project for future tracking and enhancements

Repository now linked with Geo Spatial Analysis Project.

Repository now linked with Geo Spatial Analysis Project.


Changes the Gui function from using a Hashtable to proper Parameters

The gui function currently uses a hashtable to define options, this should be replace for actual parameters.

Closing, as overruled by #295


Multidimensional metrics, multi subscriptions in a single config yml

Hi
As part of an ongoing effort to fetch Azure metrics for multiple providers (CosmosDB, VM scale sets, Web Sites etc), our team (walmart labs) has done a poc for this exporter.
As per the initial analysis and feedback from customers, following are the main concerns:

Multidimensional metrics are missing: For e.g. in case of CosmosDB, most of the available metrics have dimensions (AvailableStorage has e dimensions etc.). It seems there is no provision to fetch multi dimensional metrics as of this moment.

In case we need to fetch metrics from multiple subscriptions, multiple instances of exporter need to be deployed (one for each subscription). Is there any specific reason that we can configure only one subscription in azure.yml.

As per the current workflow all resource groups/resources need to be configured in yml file for which metrics need to be scraped (or tags). Since we have subscriptions which have more than 50 resource groups and multiple resources underneath, the azure yml file would be very tedious to write for all of the subscriptions.

As per the current design, the call to fetch metrics and then publish all metrics to prometheus seems to be serially executed. Would it be better to parallelize the fetch and publishing part, any thoughts on this ?

We are working on an enhancement for multidimensional metrics and making the config file as simple as possible to configure. For e.g. simply specify the list of subscriptions with name and type of providers for which metrics need to be fetched and we’ll dynamically fetch resource groups/resources, fetch the available dimensions for metrics, formulate URLs and fetch all metrics. I will keep on updating this thread as and when we make progress. Please have a look at above mentioned points and share your thoughts.

1: That sounds like a feature to be added.
2: This is similar to what the cloudwatch exporter does, you can only access one account at a time.
3: This sounds like something for configuration management, which I'd presume you already have at a scale of 50 things to manage. The goal is that the config format is comprehensible and writable by hand for someone starting out, not that it is as short as possible in complex use cases.
4: Azure has very low rate limits, and it's impolite to cause traffic spikes when you don't need to. Are you actually running into problems?

@mrajput84 "We are working on an enhancement for multidimensional metrics and making the config file as simple as possible to configure." we are also interested in this feature, did you already start with this? Do you need help?


TODO: add message

Codecov Report

Merging #308 (7d179c8) into main (6197a07) will increase coverage by 0.25%.
The diff coverage is 94.03%.

@@            Coverage Diff             @@
##             main     #308      +/-   ##
==========================================
+ Coverage   76.02%   76.27%   +0.25%
==========================================
  Files          68       68
  Lines        9371     9512     +141
==========================================
+ Hits         7124     7255     +131
- Misses       2247     2257      +10

Impacted Files
Coverage Δ

src/kvstore/src/main.rs
0.44% <0.00%> (+<0.01%)
:arrow_up:

src/many-kvstore/src/module.rs
83.00% <80.48%> (-3.07%)
:arrow_down:

src/many-kvstore/src/storage.rs
95.96% <100.00%> (+0.48%)
:arrow_up:

src/many-kvstore/tests/common/mod.rs
86.01% <100.00%> (+0.14%)
:arrow_up:

src/many-kvstore/tests/kvstore.rs
100.00% <100.00%> (ø)

src/many-ledger/src/module/ledger_commands.rs
100.00% <100.00%> (ø)

src/many-ledger/tests/ledger.rs
100.00% <100.00%> (ø)

src/many-kvstore/src/module/account.rs
87.33% <0.00%> (-0.44%)
:arrow_down:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Negligible change: line spacing

Testing tests.yml after changing to micromamba instead of pip.

Needed to add pytest-cov to requirements-dev.txt for python -m pytest --cov=seagliderOG1 --cov-report term-missing  tests/

Ran after re-adding importlib_resources (previously importlib.resources) since importlib is deprecated (https://pypi.org/project/importlib/), but importlib_resources is available and can install via micromamba (https://pypi.org/project/importlib-resources/).


experimental_backgroundImage works incorrect

Description
Hi!
I'm testing an experimental way to set a linear-gradient and found some issues. As I've got it, it has the similar syntax as css has and so I can guess that it should work the same.

[ ] the gradient angle is not the same as in the web
[ ] the gradient angle depends on element sizes
[ ] repeating-linear-gradient doesn't work at all

Expected behaviours is:

The angle shouldn't have been changed on blocks with different sizes.
The result should be the same as on the web.

Steps to reproduce

install the app
create two Views with different sizes and set up them the same linear-gradient
create the same blocks in the web and compare the result

experimental_backgroundImage: "linear-gradient(45deg, black 9%, red 20%, blue 30%, green 50%, black 90%, transparent)"
React Native Version
0.76.1
Affected Platforms
Runtime - Android, Runtime - iOS
Output of npx react-native info
System:
 OS: macOS 15.1
 CPU: (8) arm64 Apple M1
 Memory: 144.70 MB / 8.00 GB
 Shell:
  version: "5.9"
  path: /bin/zsh
Binaries:
 Node:
  version: 20.11.1
  path: ~/.nvm/versions/node/v20.11.1/bin/node
 Yarn:
  version: 1.22.19
  path: /opt/homebrew/bin/yarn
 npm:
  version: 10.2.4
  path: ~/.nvm/versions/node/v20.11.1/bin/npm
 Watchman: Not Found
Managers:
 CocoaPods:
  version: 1.16.1
  path: /Users/pavelauseitsau/.rbenv/shims/pod
SDKs:
 iOS SDK:
  Platforms:
   - DriverKit 24.1
   - iOS 18.1
   - macOS 15.1
   - tvOS 18.1
   - visionOS 2.1
   - watchOS 11.1
 Android SDK: Not Found
IDEs:
 Android Studio: 2024.1 AI-241.19072.14.2412.12360217
 Xcode:
  version: 16.1/16B40
  path: /usr/bin/xcodebuild
Languages:
 Java:
  version: 21.0.5
  path: /usr/bin/javac
 Ruby:
  version: 3.1.2
  path: /Users/pavelauseitsau/.rbenv/shims/ruby
npmPackages:
 "@react-native-community/cli":
  installed: 15.0.0
  wanted: 15.0.0
 react:
  installed: 18.3.1
  wanted: 18.3.1
 react-native:
  installed: 0.76.1
  wanted: 0.76.1
 react-native-macos: Not Found
npmGlobalPackages:
 "*react-native*": Not Found
Android:
 hermesEnabled: true
 newArchEnabled: true
iOS:
 hermesEnabled: true
 newArchEnabled: true

Stacktrace or Logs
App hasn't been crashing.

Reproducer

Screenshots and Videos

cc @intergalacticspacehighway @jorge-cab
https://github.com/facebook/react-native/pull/47003 Re-kajiggers a lot of rendering specifics here.
Would be a good idea to add these failing cases as RNTeater examples and start adding some (unfortunately not exposed to oss currently) screenshot tests for these.

Thanks for reporting @vasilyeu-pavel. It will be fixed with this PR, the results will be identical to web. The repeating-linear-gradient is still not supported yet, but i am aiming to add more functions, so will be working on it.


controller: Deploy web processes using service events

When deploying the controller under heavy load, the web process can actually take a few seconds before it starts listening for HTTP requests, so we need to use service events so that there is always a functioning web process during the deployment.

LGTM


Updated FluidMixingRecipe to check for inputslot for both fluids.

🚀🚀🚀🚀🚀🚀🚀🚀🚀Thanks m8, works great🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀

If ya'll say it's good, then it's good. Thanks!

...well, that should've been PR'd to development-1.16.5.

Count it as merged and I'll just commit it on my end.


Fixed #72425(Replace the position of Command Prompt and PowerShell of Default Shell selection UI on Windows)

Issue number
#72425
Description
This PR replaces the position of Command Prompt and PowerShell of Default Shell selection UI on Windows.
Screenshot

Sorry I wasn't clear, this issue was about picking up pwsh (PowerShell Core) installations and surfacing it in the list.


ISPN-12150 Improve CLI server report to work with MacOs

https://issues.redhat.com/browse/ISPN-12150

@gustavonalle @karesti could you please test this on OSX ?

Testing...

The report is generated, and it seems correct. Only weird thing I found is the file thread-dump is empty

The report is generated, and it seems correct. Only weird thing I found is the file thread-dump is empty. Not sure if it's a problem on Linux as well.
http://<IP_ADDRESS>:11222/rest/v2/server/threads correctly generates the dump on MacOS btw

IIRC we have this same behaviour with Linux

Merged, thanks @gustavolira


remove-diff-signs is not working

Hello, since yesterday this feature is not working:
Console log:

GitHub diff effect:

As you can see, when it fails it is stripping the first character.
You could check this PR to see the error https://github.com/webpack/webpack.js.org/pull/2399/files

It may be related to the latest GitHub change regarding diff signs.

Yep, looks like GitHub implemented this feature natively. I added remove-diff-signs to my disabled features list and everything works fine.

Duplicate of #1444


Service: Wind direction

This pull request adds a new service definition for JACDAC.

The idea of the offset would be to calibrate the direction based on the orientation of the sensor

From: Michał Moskal<EMAIL_ADDRESS>Sent: Friday, January 22, 2021 1:14:39 AM
To: microsoft/jacdac<EMAIL_ADDRESS>Cc: Peli de Halleux<EMAIL_ADDRESS>State change<EMAIL_ADDRESS>Subject: Re: [microsoft/jacdac] Service: Wind direction (#177)
@mmoskal commented on this pull request.

In services/winddirection.mdhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fjacdac%2Fpull%2F177%23discussion_r562281454&data=04|01|jhalleux%40microsoft.com|03d3b32afa0740af5ae708d8be6ab5f8|72f988bf86f141af91ab2d7cd011db47|1|0|637468712818364046|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=BiXLJaWbXOAE4dGjsnunatUDqirZ18UsHVnuN0hY%2FW4%3D&reserved=0:

@@ -0,0 +1,20 @@

+# Wind direction

+A sensor that measures wind direction.

identifier: 0x186be92b

extends: _sensor

+## Registers

ro wind_direction: u16 ° @ reading

+The direction of the wind.

ro wind_direction_offset?: i16 ° @ 0x80

what is this one? is it somehow detected by the sensor?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fjacdac%2Fpull%2F177%23pullrequestreview-573839195&data=04|01|jhalleux%40microsoft.com|03d3b32afa0740af5ae708d8be6ab5f8|72f988bf86f141af91ab2d7cd011db47|1|0|637468712818374036|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=qMAIMjYY7hk3CPluFtVehc0rYdHcJbxYWtFedsT7RSM%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAA73QKKAE3UDKXXRJBADHZ3S3C7O7ANCNFSM4WMYA2GQ&data=04|01|jhalleux%40microsoft.com|03d3b32afa0740af5ae708d8be6ab5f8|72f988bf86f141af91ab2d7cd011db47|1|0|637468712818374036|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=AnCj%2F9masUoJgQk3XyDND6yzKwl0Dhi4DxI5Sn5EMnQ%3D&reserved=0.

The idea of the offset would be to calibrate the direction based on the orientation of the sensor

From: Michał Moskal<EMAIL_ADDRESS>Sent: Friday, January 22, 2021 1:14:39 AM
To: microsoft/jacdac<EMAIL_ADDRESS>Cc: Peli de Halleux<EMAIL_ADDRESS>State change<EMAIL_ADDRESS>Subject: Re: [microsoft/jacdac] Service: Wind direction (#177)
@mmoskal commented on this pull request.

In services/winddirection.mdhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fjacdac%2Fpull%2F177%23discussion_r562281454&data=04|01|jhalleux%40microsoft.com|03d3b32afa0740af5ae708d8be6ab5f8|72f988bf86f141af91ab2d7cd011db47|1|0|637468712818364046|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=BiXLJaWbXOAE4dGjsnunatUDqirZ18UsHVnuN0hY%2FW4%3D&reserved=0:

@@ -0,0 +1,20 @@

+# Wind direction

+A sensor that measures wind direction.

identifier: 0x186be92b

extends: _sensor

+## Registers

ro wind_direction: u16 ° @ reading

+The direction of the wind.

ro wind_direction_offset?: i16 ° @ 0x80

what is this one? is it somehow detected by the sensor?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fjacdac%2Fpull%2F177%23pullrequestreview-573839195&data=04|01|jhalleux%40microsoft.com|03d3b32afa0740af5ae708d8be6ab5f8|72f988bf86f141af91ab2d7cd011db47|1|0|637468712818374036|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=qMAIMjYY7hk3CPluFtVehc0rYdHcJbxYWtFedsT7RSM%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAA73QKKAE3UDKXXRJBADHZ3S3C7O7ANCNFSM4WMYA2GQ&data=04|01|jhalleux%40microsoft.com|03d3b32afa0740af5ae708d8be6ab5f8|72f988bf86f141af91ab2d7cd011db47|1|0|637468712818374036|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=AnCj%2F9masUoJgQk3XyDND6yzKwl0Dhi4DxI5Sn5EMnQ%3D&reserved=0.


Option to append post installation script to kickstart

Kernel tests require an option to append post installation script to kickstart
Beaker xml example with kickstart post installation script
<ks_append>
<![CDATA[
%post --nochroot
umount --recursive /mnt/sysimage
%end                      							]]>
</ks_append>

Hm, isn't 'artemis' the only provision plugin which installs machine (in some cases)? All other provision plugins start image (so there is no kickstart used at all)

@juk, just to clarify the use case: The above-mentioned example mentions a shell script. Is this something which could possibly be executed after the guest is installed and booted? In other words, could this use case be covered by a prepare --how shell step configuration? Or is something which definitely needs to be included in the kickstart? If the latter, what would be the difference when compared to implementing this using the prepare step?

Is this something which could possibly be executed after the guest is installed and booted? In other words, could this use case be covered by a prepare --how shell step configuration? Or is something which definitely needs to be included in the kickstart?

Hi,
In my scenario this must be executed in anaconda installation session before the guest booted. To explain the use scenario a bit, our team works on driver update disk. That is used during system installation. In order to test if the driver update disk works with the installation media and anaconda installer, we need to run tests in installation phase. So currently we use post install scripts in kickstart to run our tests before the guest boot up.

If the latter, what would be the difference when compared to implementing this using the prepare step?

IIUC the prepare step is executed in the installed system. We won't be able to test the function with anaconda installer and the installation media in such phase.

Thanks much for clarification, @sztsian. So it seems this together with #1281 would need a dedicated config section for peforming tasks during the installation. Would it make sense to introduce a kickstart section under the provision step? It could look like this:
provision:
    how: artemis
    image: fedora-35
    hardware:
        arch: x86_64
        memory: 8 GB
    kickstart:
        preinstall:
            nochroot: true
            script: umount --recursive /mnt/sysimage

Or should we rather try to introduce a generic section for configuring actions during installation? Perhaps something like this?
provision:
    how: artemis
    image: fedora-35
    install:
        before:
            nochroot: true
            script: umount --recursive /mnt/sysimage
        after:
            script: a-custom-post-installation-script.sh

@lukaszachy, @thrix, @happz, any thoughts here?
Also would be good to check whether Resource Hub is planning to support kickstart configuration as well.

Having generic option would be nice however kickstart can do too many things and adding them one-by-one while making it generic enough will be too resource consuming IMO.
I'd vote for "kickstart" section but I'm not sure about its content - Beaker supports many options / ways to configure it.
Does tmt wants to do  the same? Since we don't install at all yet there is nothing as tmt kickstart to modify (and tmt will need it if it supports unattended installation).

I'd take the generic road, but... It's true Kickstart can do a lot of stuff, and I'm mostly worried it'd be used for things that don't necessarily need to be performed by Kickstart, effectively locking the provisioning to just a single possible backend. Maybe I'm just worrying about the wrong thing and kickstart section would be fine.
Maybe something like this? Since it's not a HW requirement per se (even though it does affect the choice of provision plugin, right?), having kickstart outside of hardware makes sense to me, although I'm not sure there's the need for more internal structure:
provision:
    how: artemis
    image: fedora-35
    hardware:
        arch: x86_64
        memory: 8 GB
    kickstart: |
      %post --nochroot
      umount --recursive /mnt/sysimage
      %end

although I'm not sure there's the need for more internal structure:

I'm afraid we will need a way to modify used kickstart as well, it can't be just a simple append. (e.g. custom partitioning leaving unused space when default would be autopartitioning)

And this custom partitioning sounds like something that might be possible with other plugins as well, not just Beaker, maybe with some run-before-boot virsh magic or more detailed AWS EBS setup. This brings me back to the "kickstart would be used for things that other plugins might deliver too, but don't understand kickstart" issue I have with it :/

Right, Good point and bad example. But we can have 'kickstart' attribute right now to store it within plan  and slowly add generic features as the are requested.

And this custom partitioning sounds like something that might be possible with other plugins as well, not just Beaker, maybe with some run-before-boot virsh magic or more detailed AWS EBS setup. This brings me back to the "kickstart would be used for things that other plugins might deliver too, but don't understand kickstart" issue I have with it :/

Right, Good point and bad example. But we can have 'kickstart' attribute right now to store it within plan and slowly add generic features as the are requested.

True. I'm a bit torn here, as evidenced above :) A kickstart with the inner structure for various features sounds like a good option, after all, it would leave the door open to other plugins that might be able to deliver.

Sorry for the late reply.
For my user case I prefer the format Milos proposed. In my usual test, the appended kickstart section looks  like
%post --nochroot
KERNEL_VER=`uname -r`
TIMESTAMP=`date +"%Y%m%d-%H%M%S"`
mkdir /mnt/tmp
mount -t nfs -o nolock nfs-server:/data/dup /mnt/tmp
LOGPATH=/mnt/tmp/automation/logs/$KERNEL_VER/anaconda/`hostname`
mkdir -p $LOGPATH
lsmod | egrep rtw89 > $LOGPATH/${TIMESTAMP}.lsmod
umount /mnt/tmp
%end

The actual script can contains more lines than this according to the actual test I need to do.
HTH.

FYI, I have been using Kickstart in Beaker extensively, so I can provide many examples of what I have been doing and what features I need.

FYI, I have been using Kickstart in Beaker extensively, so I can provide many examples of what I have been doing and what features I need.

Please, do so when you find some spare time! It would be very helpful to better understand the scope and expectations.

Not much spare time right now, but generally speaking, my use was typically to supply ks_meta="ignoredisk=--only-use=sda|vda" to use only the first disk (assuming that it is called sda or vda, which is not always true) and then using ks_append to wipe the content of the remaining disks in %pre, since Anaconda unfortunately ignores the ignored disks entirely and does not wipe their previous content, which leads to remnants of prior RAID or LVM configuration being found on the ignored disks and installation failing. Here's how to do it:
%pre --log=/dev/console
vgchange -a n
mdadm --stop --scan
wipefs -a /dev/[vs]d??
wipefs -a /dev/[vs]d?
%end

This combination of ks_meta and ks_append instructed Anaconda to install the system in an otherwise normal way, but only on one disks, leaving the rest of disks empty for my use.
Note that this use is in fact something that ideally should not be needed and compensates for deficiencies in Anaconda (no simple way to tell it that I want to leave all disks free but the first one), and you will probably want to pass such options to Kickstart anyway as soon as you add support for multiple disks (because otherwise there will be a difference with multiple disks in cloud environment like OpenStack and with Anaconda: OpenStack flavors have the extra disks essentially free for use, while machines installed by Anaconda use all the disks for installing the system). Let me paste a snippet of conversation we had some time ago:
<pcahyna>       also note that multiple disks result into something very different in Beaker and OpenStack.
<mprchlik>      pcahyna: what's the difference?
<pcahyna>       If in OpenStack I request a flavor with an additional disk, I get the extra disk free for use.
<pcahyna>       If I do it in Beaker, the instal LVM will get expanded to all the disks (Anacanoda's default) and I see no free disks.
<pcahyna>       which is less useful, or maybe in some cases more useful, anyway entirely different.
<mprchlik>      hmmm, I see. I'm not sure, if we simply add XML elements to request machines with more disks, is LVM going to grab them? is this happening all the time?
<mprchlik>      pcahyna: so you need to "release" these disks from LVM's rule before your tests?
<mprchlik>      or what's your workflow in this case?
<pcahyna>       yes this is happening all the time
<pcahyna>       releasing the disks is not easily feasible. THe filesystems get expanded to fill the whole VG and you can't shrink XFS filesystems.
<pcahyna>       You could probably remove and recreate /home since it is essentially empty.
<pcahyna>       I am using custom kickstart and kickstart metadata for this.
<pcahyna>       I ignore specific disks.
<pcahyna>       then in %pre I have to wipe them, because anaconda ignores them entirely and there are leftovers of previous LVM/RAID/whatever on them.
<pcahyna>       so that's my workflow, with multiple kludges, but at the end it does what I need.
<mprchlik>      hm, I'll probably ping you, because this is something we probably need to do as well... having disks wrapped with LVM isn't really the outcome I'd expect to get when I ask for 3 extra disks :/
<mprchlik>      pcahyna: thanks for info, extremely helpful
<mprchlik>      mvadkert: so we probably need to remove current support for disk.size in beaker, because it's not going to do what we or tmt expect from disk[].size. and replace it with support for bare "present" XML
<pcahyna>       mprchlik, yes, I suppose having free disks is more likely that what the user needs than having LVM over all of them
<pcahyna>       OTOH it points to another difference between Beaker and OpenStack: in Beaker you get a machine installed with Anaconda, in cloud you get some prepared cloud image.
<pcahyna>       which does not look like what Anaconda does (no LVM, for example).
<pcahyna>       in some cases it is a valid reason for using Beaker.
<mprchlik>      pcahyna: yeah, but that's a difference I was aware of :) this disk nonsense is a complete surprise to me. for most of the users there's probably no difference between those two, e.g. for my binutils tests, I don't care at all, but understood, this is something people might care about, or even request or deny

Sometimes I also added no_autopart to ks_meta and partitioned the first disk manually, which is a more typical use of kickstart metadata I guess. (I could provide some examples, not much common patterns in them I think.)
Third, in some cases I used %pre to let Anaconda see some specifically-configured disk environment. E.g. To let it see SCSI drives managed by multipath, use
%pre
mpathconf --find_multipaths greedy --enable --with_multipathd y
systemctl restart multipathd
%end

in ks_append.
Or, to let it see an IMSM RAID disk:
mdadm --create /dev/md/imsm --name=imsm --metadata=imsm --level container --symlinks yes --raid-disks=3 /dev/sdb /dev/sda /dev/sdc
mdadm --create /dev/md/Volume0 --name=Volume0 --metadata=imsm --level raid5 --raid-disks=3 /dev/md/imsm
udevadm trigger -v -w /dev/md/imsm
mdadm --wait /dev/md/Volume0

Ok, it seems like kickstarts could be modified in 4 ways:

Additional pre-installation scripts
Additional post-installation scripts
Additional scripts to kickstart
Custom kickstart templates (similar to Beaker's kickstart)


Update testcontainers-scala to 0.40.5

Updates com.dimafeng:testcontainers-scala from 0.39.12 to 0.40.5.
GitHub Release Notes - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "com.dimafeng", artifactId = "testcontainers-scala" } ]

labels: test-library-update, early-semver-major, semver-spec-minor, commit-count:1

Superseded by #168.


Does not allow to upate the User Claim Department through users default profile

Suggested Labels
Affected : 5.8.0- alpha2
Severity: Major
Priority: High
Component: UI
Type-Bug
Environment
DB Mysql 5.7
Userstore JDBC
Tomcat v7.0.64
2 node cluster fronted with nginx DB
Steps to Reproduce
Create a user and try to update the user claim value Department from the UI by updating the Users default profile.
Observation
Does not allow to update the Department value

As this field is marked as a read only attribute by default it does not allow to edit the field. Any reasons to make only that field as a read only field by default.

This issue is being closed due to extended inactivity. Please feel free to reopen it if further attention is needed. Thank you for helping us keep the issue list relevant and focused!


[dv] Add clocking blocks to icache UVM code

See discussion on PR #761, in particular these comments.
Sri and Udi have suggested that the code would be better if the interface included clocking blocks. Suggested code:
clocking driver_cb @(posedge clk_i);
  output req;
  output branch;
  output branch_addr;
  output ready;
  output enable;
  output invalidate;
endclocking

clocking monitor_cb @(posedge clk_i);
  input valid;
  input rdata;
  input addr;
  input err;
  input err_plus_2;
  input busy;
endclocking

For example, some code in the driver currently looks like this:
    // Assert ready and then wait until valid
    cfg.vif.ready <= 1'b1;
    while (1'b1) begin
      @(posedge cfg.vif.clk);
      if (cfg.vif.valid)
        break;
    end

This reads from valid (driven by the DUT, so in monitor_cb above) and writes to ready. They share a clock. Is two clocking blocks the right way to structure this? I'd appreciate some guidance!

@udinator, @sriyerg: Could you give me some advice about how this should look?

Reading Cummings's paper more carefully, I think I have an idea of how this would work.
Use a single clocking block, specifying default output negedge to make it more obvious what's going on in dumped waves. The code above would be:
cfg.vif.cb.ready = 1'b1;
while (1'b1) begin
  @(cfg.vif.cb);
  if (cfg.vif.cb.valid)
    break;
end

Suppose that there's a clock with a posedge every 100ns and let's pretend that #1step is 1ns. Then I think a sample execution would look like

Time (ns)
Event

0
cfg.vif.cb.ready = 1'b1 executed

51
ready = 1 actually happens

...
...

700
valid = 1 (set by an @(posedge clk) block in DUT)

799
valid sampled by cb (#1step before time step at 800ns)

800
break

Does that make sense? If so, I propose to use a single clocking block and I'll push up a PR tomorrow. If not, can you let me know what would be better?

Also, should this be one clocking block with inout items, or two clocking blocks, one for the driver and one for the monitor? The latter means you need fewer inouts, but it feels a bit icky because the interface class then gets some monitor-specific and driver-specific code. Or is there another trick possible?

I'll defer to Sri on the usage of default output negedge, I'm not quite sure how necessary this would be here.
After looking at this a bit more, I think that using a single clocking block would be fine as well, I don't think we would need any inout signals here. If you want to enforce different timing requirements on signals in the "monitor" and "driver" set, then it's probably better to use two clocking blocks (moving valid into the driver block since it's part of the driver protocol) to have some separation between the two sets of signals, otherwise I'd be fine with just a single block.
@sriyerg what do you think?

There is any need to add extra skews to the clocking block, unless the DUT is timing sensitive.
Prefer N+1 clocking blocks (at least), where N is the number of flavors of drivers the agent has, and 1 for the monitor. So just 2 in your case.
Refrain from inouts - the purpose is to also make the port list view clear (see TileLink interface example below with 2 flavors of drivers, to mimic host or a device, in addition to the monitor's view, which is input-only).
I wouldn't consider clocking block as being driver code or monitor code specific, since they are just providing a view of the port list.
This is a very common way of writing SV interfaces.
Here's the TileLink interface as an example -
https://github.com/lowRISC/opentitan/blob/master/hw/dv/sv/tl_agent/tl_if.sv
If you go one level up, there are some other agents as well.

The two clocking blocks would look something like this:
 // Used exclusively by the driver to access the port list it is driving and sampling.
 clocking driver_cb @(posedge clk);
   output req;
   output branch;
   output branch_addr;
   output ready;
   input  valid;
   input  rdata;
   input  addr;
   input  err;
   input  err_plus2;
   output enable;
   output invalidate;
   input  busy;
 endclocking

 // Used exclusively by the monitor to access the port list it is sampling.
 clocking monitor_cb @(posedge clk);
   input  req;
   input  branch;
   input  branch_addr;
   input  ready;
   input  valid;
   input  rdata;
   input  addr;
   input  err;
   input  err_plus2;
   input  enable;
   input  invalidate;
   input  busy;
 endclocking

Yes, the full set of signals is replicated in both clocking blocks, because again, its just a view of the port list (what ports are allowed to be driven and what ports are allowed to be sampled from that clocking block). By limiting the driver and monitor to only refer to signals from clocking blocks, you also get that implicit check (for example, if driver drives an input signal accidentally, it will throw an error at compile-time).

Right, understood. I'll write something for the core agent today and push it up.

Oops, this got done with #786.


checkpoint of Swin-Large trained on ImageNet-1K only

Hi,
Could you share the checkpoint of Swin-Large trained on ImageNet-1K only?
ImageNet-22k is too difficult to get.
Thanks a lot.

We did not train Swin-Large on ImageNet-1K. Welcome to train it yourself and share it back to us. We will acknowledge on that.

Hi, Could you share the checkpoint of Swin-Large trained on ImageNet-1K only? ImageNet-22k is too difficult to get.
Thanks a lot.

hi, did you train the Swin-L on ImageNet-1K? What's the final results?

@syorami please find https://github.com/microsoft/SimMIM for ImageNet-1K pre-trained model. But it must be combined with self-supervised pre-training to work well.

@syorami SimMIM paper has numbers: 83.5 (w.o. self-sup) vs 85.4 (with self-sup)

@syorami SimMIM paper (https://arxiv.org/pdf/2111.09886.pdf) has the numbers: 83.5 (w.o. self-sup) vs 85.4 (with self-sup)

Thanks for the information!


cleanup redundant tests

:clipboard: Add associated issues, tickets, docs URL here.
Overview
Describe what your Pull Request is about in a few sentences.
Changes
Describe your changes and implementation choices. More details make PRs easier to review.

Change 1
Change 2
...

Testing
Describe how to test your new feature/bug fix and if possible, a step by step guide on how to demo this.

Codecov Report

Merging #233 (452df85) into develop (6e034ed) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop     #233   +/-   ##
========================================
  Coverage    47.22%   47.22%
========================================
  Files           99       99
  Lines         3867     3867
  Branches       762      762
========================================
  Hits          1826     1826
  Misses        2041     2041

Flag
Coverage Δ

boba-contracts
20.39% <ø> (ø)

contracts
77.71% <ø> (ø)

core-utils
86.80% <ø> (ø)

data-transport-layer
31.17% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Continue to review full report at Codecov.

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


Short solution needed: "Get moving average on array" (python-numpy)

Please help us write most modern and shortest code solution for this issue:
Get moving average on array (technology: python-numpy)
Fast way
Just write the code solution in the comments.
Prefered way

Create pull request with a new code file inside inbox folder.
Don't forget to use comments to make solution explained.
Link to this issue in comments of pull request.

Get moving average for Numpy array


Suggestion on jhipster lite design

Hi experts, how are you?
First, I wanted to thank you for that wonderful initiative (and the demo), that will bring new breath and way more compared to the current platform.
Here are some few architectural recommendations to avoid some traps and ensure the perenity of that new stack. please consider them, they come from years of development experience.
Use third party dependencies as much as you can
Try to avoid generating stuff as much as you can and try to componentize
Backend
Try to follow the spring boot principles for configuration classes

Create a configuration annotated with @Conditionalwhenever you want it to be contextual (i.e. jhipster-spring-boot-undertow)
Create a starter module referencing a bunch of related dependencies (i.e. the undertow starter

So that the generator will mostly tweak the gradle build file or pom in order to add or remove features for everything that is not related to business code.
Contract vs impl
Split APIs (method signature), SPI (service on which you can contribute) and implementation: the absence of decoupling the contracts and the impls are really painful (it will avoid the current issue we have with the 'generator-base.js' file which is quite annoying.
Frontend
Same principle applies to frontend with npm dependencies.
For example, I guess that the admin console (or each part of it) could be implemented as a webcomponent (one library for all) or an implementation by language (last resort).
Side advantage of this approach: libraries will be reusable in the original platform and the lite one :-).
Modules
Independent modules.
The DDD/Hexagonal approach is pretty good and smart, but implementing it as a package is limiting. Prefer hosting each bounded context in its dedicated maven module: it will bring contributivity for free and help newcomers bootstrap.
You can also rely on maven archetype to ease new module creation. I don't need to tell that you'll also be able to release plugin independently and so on...
Note that it won't make the release process more cumbersome: you can use the maven release plugin on the parent to release everything at once.
Use state machine and events to improve the developer experience.
A good combination of HATEOAS, events (spring events I guess) and state machine could help to create the developer path to creating a cohesive application, be sure to to save the current state somewhere (in a .yo-rc.json file ^^).
Modeling
The API approach is awesome, still, Jhipster is in fine a dsl and should also rely on state of the art modeling techniques
Best practices
Usually, modeling approach is split into some layers:

The reasonable default, which help the users to get some options that are the most commonly used (just offer a 'choose for me' option to go to the current state.
A Metamodel (a spec to persist the model) which is today the contract to persist the entity.json and the .yo-rc contract)
A model: on the current jh version you have the generated entity.json and the .yo-rc file: I you could keep it like this, you'll have everything on top for free (options, jdl)
One or more Visual specific modeler (textual dsl, UML-like class diagrams, forms, cli, studio ...) to let the user fill his model, the Jdl and the api are the target I guess: sticking to the current metamodel will bring it for free, at least until we have both platforms GA.

Thank you for your reading, I hope that you'll keep some of this advice in mind while implementing the future of the community. On our side, we'll continue to maintain the current generator until this framework will bring the same critical features (entities :-p). Eager to switch to a generator made with Java!
Cheers

A little update on that, first here we are (on main):

Most modules have been migrated (only svelte remains  but no blocking point on that), we now have 84 modules on JHLite;
The landscape (a map / graph) of modules made it to the frontpage allowing easier applications of the "good" modules.

There is a still a lot of work to do, of course (ex: https://github.com/jhipster/jhipster-lite/issues/3045) BUT we probably have reach an important millstone.
For the "generate code" VS "depend on lib", in fact that depends a lots on modules! Some modules depends a lot on lib, others only generate code and I think that's totally OK that way as the goal of JHLite is to allow experts in a given field to contribute modules.
Ex: the application-service-hexagonal-architecture-documentation generate a documentation on how to make one flavor of hexagonal architecture. This can't really be in a dependency / published page since the goal is to bootstrap something and allow people to adapt that to there needs.
For the API contract splitting for now we don't really have contract to the external world, that will probably happen when we'll build something to allow organization to have their own module deployed (and that will probably come in multiple forms, we'll see).
For the "split project as maven modules" in fact I don't like it and only had bad experiences with that since it make any refactoring more complicated. BUT this may be just me, I have no strong position on that.
For the "save the state", we are generating a file in the project that track the applied modules and the properties used. This is also used to load the application applied modules and used properties when selecting a path in the app. BUT this is not implemented with a state machine (that may be a mistake).
If you can take some time to start the project from main and tell us if that make any sense that would be great.

Closing this one as no answer from @Tcharl and I agree with all points from @DamnClin
Feel free to comment and discuss if needed

Thank you for your consideration and your answer.
Fully satisfied, keep up the great job experts!


Elementalized directive

Make directive element only. This is to enforce directive modularization by decoupling it from the input element. It can theoretically be used anywhere provided it is supplied the basic data model and query callback. It also helps us modularize its styles as it is treated as a standalone component.

Rex, in this form how do you handle keypresses? Do you do that by managing focus?

We have a strict policy on not accepting PR comments from Norway.  Go be on
vacation.
--

Myplanet has recently changed domain names to myplanet.com
http://myplanet.com.  Please ensure you update your contacts.  We
respect your privacy. You can find our company privacy policy here
http://myplanet.com/privacy.

@paracycle yes it still handles keypresses like it did before, as long as it has focus. I discussed with @atesgoral and the best way we could think of is to broadcast a autocompleteFocus event which will be captured by autocomplete.

:+1:


[FLOC-2738] API endpoint for renewing leases

Builds on #1906 so review that first.

Nice. Thanks. No comments. Please merge it passes the tests.
Also, you might want to cancel some of the pending builds from past pushes in order to get the latest build further up in the queue.


Export doesn't accept special characters

When you use the export module of this widget the special characters like ú aren't accepted, and show up as ÃƒÂº. The csv is UTF-8 encoded but we would like to have it in ANSI for windows display. On import in excel you are able to adjust it, but would be better if it could be updated directly so also these characters are accepted.

The data is retrieved in the backend and then exported. That is all UTF-8, which should handle special characters just fine, also on Windows machines. The export is provided as an example only on how to handle the export request sent by the widget. Feel free to adjust to your needs.


Duplicate responses fail compilation (http4s framework)

Hi,
I'm working on a project with http4s and guardrail. When I generate both server and client code, I end up with duplicate response models in the same package, which of course fails compilation ("GetUserResponse is already defined as class GetUserResponse", "GetUserResponse is already defined as object GetUserResponse").
Here's an example of yaml:
openapi: '3.0.2'
info:
  title: User example
  version: 1.0.0-SNAPSHOT

paths:
  /user:
    get:
      x-scala-package: users
      operationId: getUser
      responses:
        200:
          description: 'OK'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetUserResponse'

components:
  schemas:
    GetUserResponse:
      type: object
      properties:
        user:
          $ref: '#/components/schemas/User'
    User:
      type: object
      required:
        - name
      properties:
        name:
          type: string

Here's an excerpt of my build.sbt:
Compile / guardrailTasks := List(
  ScalaServer((Compile / resourceDirectory).value / "api.yaml", pkg = "api.routes", framework = "http4s"),
  ScalaClient((Compile / resourceDirectory).value / "api.yaml", pkg = "api.routes", framework = "http4s")
)

I could define different values of pkg for server and client and prevent the compilation error, but this would result in duplicate code being generated for the same API...
Is this a correct and known behavior?
Thank you in advance

Generating the response models into a different file in the same folder/package would prevent their duplication: what do you think, @blast-hardcheese? I think it would be a backwards-compatible change..

So, I would have to check, but this issue in akka-http is related to the overlap in namespaces between the definitions and the sever implementation. Likely true for http4s as well.
Could you try just changing the definition GetUserResponse to _GetUserResponse? This isn't ideal, but it's just to confirm exactly where the problem is.

I just tried and I got the same error because both Routes and UserClient have sealed abstract class GetUserResponse and object GetUserResponse defined at the bottom of each file.
The response definition is generated in another package, so it doesn't affect compilation.

Understood, thank you for clarifying.
I think this would benefit from generating Models, then suppressing model generation in the clients and servers. That would solve the long standing issue of trying to generate test-only interfaces, the packages conflict and duplicate code gets generated.
You'd still have different packages, but no duplicate code
What do you think?

That's exactly what I was thinking, thank you very much!

I'm regrettably not able to take this on right now due to other time constraints, but if you've got time I'm available for answering questions. Are you familiar with the codebase, or should I come up with some starting places to look for the modifications? I'm expecting this will be fewer than 50 lines of changes required.

I'm not familiar with the codebase, unfortunately.. If you could point me to some starting places I'll try to do my best. :)

So, to start, we need to register --modelsPkg in the cli parser, adding a new Option[Term] to Args.
Tracing through what to do from there should be straightforward. Once the compilation errors stop, there are two more modifications to make:

prepareDefinitions takes the List[String] of package components, this should now be informed by our new Args property. (That may need to be plumbed through Context, can't remember where the handoff is at this moment)
Suppressing the actual file write for the proto stuff, key off the link in the previous point for starters.

One sorta sketchy thing we are doing here is not verifying that the generated models and what we are discarding are the same structure. It should be possible to do this by persisting a hash, but the insight of exactly where that would live eludes me at this time. I hesitate to pollute the JAR with more stuff, and local file artifacts are not guaranteed to just work. Maybe passing in a hash via CLI, which could automatically be routed via SBT and other build tools? Problem for another day, surely, but something to think about.
Hope this helps, feel free to follow up.

I browsed through the code and its quite overwhelming for me..
Anyway I think I found something odd in SwaggerSpecRunner: dtoPackage value is not provided when preparing Server definitions so client and server response models end up on different packages.
Maybe this is a starting point to create a dedicated test scenario.
My idea was to let Http4sHelper.generateResponseDefinitions output be put in a different file (so that it won't be duplicated), but currently such method is called in multiple places so probably there is more to refactor...

So, that List.empty is only supplied in the spec runner -- the test infrastructure is fairly complex as well, it may help to explain it here. The goal of the reason guardrail is written the way it is is to maintain confidence in the generated code, through:

An attempt at maintaining consistency of representation of underlying code by using type-maintained ASTs (represented by LanguageAbstraction).
Tests of the main guardrail codebase, some tests for 'core' code
Running guardrail via the testSuite against regression specification files
Attempting to compile those clients and servers with different sets of dependencies (grouped by framework)
Running tests on the generated projects (so-called "round trip" tests)

So, to clarify, modules/codegen is the primary driving codebase, the other modules being modules/microsite (powering https://guardrail.dev/) and the modules/sample* modules, which serve to supply the scaffolding for testSuite to function.

Rereading your comment, maybe you already gleaned some or all of what I just attempted to convey. I missed that you had already discovered that the List.empty was part of the SwaggerSpecRunner.
I was thinking that you'd be aiming at writing tests in modules/sample-http4s, instead of trying to parse the AST in the unit tests. I think this makes an easier and more stable test overall, as it would be relying on scalac failing the test, instead of you attempting to encode scalac's heuristics into a test given only access to the scalameta AST.
Should you still want to proceed with the SwaggerSpecRunner approach, it should be sufficient to pass through the package (as you indicated) and check to see whether the string representation of the generated source contains the expected number of occurrences of a unique package name. Maybe thinking about it a bit more with this context can help you find a better test, but know that just writing an integration test in the modules/sample-http4s directory is also totally acceptable.
Thanks again for your effort, and please pardon the delay in my response


Cc/release/march migration docs

I have started some documentation tidying. Here is the first installment.

ack. please squash into a single commit and merge.

can you rebase and squash this so that we can get this merged?

@mfussenegger I started this a long time ago and can't seem to squash any more. I will take this and the other pull request and reissue now in one combined PR that's all tidy :)


Wrong clipping with several treemaps on a page

if more than one treemap is on a page and the clipping regions differ, the first ones on the page are taken by the url ref <text clip-path="url(#clip-24)">. This yields to wrongly clipped text and strange behavior.
These ids need to become somehow unique on a page.
https://github.com/jquintozamora/react-d3-treemap/blob/e712bfa3590c1ecdaee725b645bd14e823f4738f/src/components/Node/Node.tsx#L55

Hi @jdehaan ,
Thanks for your feedback,
I´ve just created a new prop called treemapId, then you can change it for every single TreeMap added into a page.
You can see the changes in version 1.0.14.
Hope that helps!


fuzzy searches, get_references for messy ASR

Machine Generated ASR programs like open-Ai's Whisper are on the rise and tend to output messy formatting of scripture, with difficulties in consistent int/ordinals/words for book/chapter/verse numbers, spans, and have varying capitalizations problems, etc.
Here are a handful of examples lines from webvtt/srt outputs from a batch I've run recently:

Second Timothy chapter two verses three and four says endure hardship
If you read Ephesians four 17 through 32 all the ammunition
remember that powerful message of Paul in first Corinthians nine
in Jesus's first sermonic presentation on planet earth in Matthew five through seven,
Jesus said over in Matthew chapter six, verse number 12,
Genesis four, 25.
and forth between Haggai two and Ezra three.
and go and report to John one-fifteen and thirty.
I want to focus on here is Colossians chapter three, 22 through verses through chapter four, verse one.
In 1 Corinthians 9.22, you see Paul saying
says in Mark 16 10 that the disciples were
through that fire, 1 Kings 18.24-38, 1 Chronicles 21.26, 2 Chronicles 7.1-3.
open their Bibles to first Corinthians 14, 34, 35 and say, look
Genesis 1, 26, 2, 7, and 21, 22.
look in Revelations 21, 1 through 7, you can start reading all about
Psalms 103.12 says
for one another Galatians 6 1 & 2 clearly gives us

It will take a post-processing step to clean this sort of data up for nearly anyone using these tools seriously and while feeding the inputs into an LLM or NLP tookit may make sense, it would be swell if a library like this one could do some of the heavy lifting to normalize scripture referenced in a string. Tall order/deep rabbit hole, I understand, but worth a shot.
Suggest a reformat_fuzzy_references that returns (attempts) a reformatted input_string with even a subset of the most common speech patterns into a normalized form. Bonus points if the user can have some configuration control on output styles, e.g. omit "chapter" or use "v./vv."
Assumed gotchas:

Strings may contain other semi-formatted numbers that a simple regex search may false flag upon:

I was just in class at 8.30 with my friend Wilson
We're going to talk at 3.30 this afternoon about the discipline of grace and there is
So in Acts chapter 2, 3,000 were saved.

Thanks for pointing out this opportunity to improve the functionality of the pythonbible library. I honestly had not considered this use case (most of my personal use cases are for searching through published texts, sometimes hundreds of years old), but this is certainly a valid use case, and there would be genuine value in being able to clean up that sort of data.
This enhancement will take some serious thought and probably discussion, so I am converting this issue into a discussion where I, and whoever else is interested in helping out, can post potential solution ideas. The solution may need to be implemented in phases as well.
Thanks again!


feat: visionOS support

Description
Adds preview support for visionOS.
Important Note: As with macOS, visionOS appears to require apps add the Keychain Sharing entitlement and a keychain group for keychain access.
Changes

Adds #if os(xrOS) checks to:

DeviceInfo returns .zero for screenBounds because UIScreen isn't available
DevMenu. Also UIScreen related. I'd imagine we can get this working because it's only used in a single spot. Disabling it on visionOS for now.

Background URLSessions are not available when running pure visionOS. Storage session of os(xrOS) is now foreground.
useragent version is visionos-preview

Known Issues

Some CoreML APIs have different behavior on visionOS. This only affects you if you're using the CoreMLPredictionsPlugin standalone or explicitly setting .offline only for requests through the AWSPredictionsPlugin.

UI tests appear to work on visionOS with some limitations. This affects our PushNotifications integration tests because they're set up as UI test cases. Problematic test cases were manually tested to verify expected behavior.

There is no UI for simulating Apple Vision Pro’s immersion crown. (109429267)
Workaround: Use XCTest’s XCUIDevice. rotateDigitalCrown(delta:) method. [source]

UI testing isn’t available to apps you build using the visionOS SDK. You can still use it to test compatible iPad and iPhone apps that you build using the iOS SDK but run in visionOS. [source]

CI/CD

Unit tests are set up to run for visionOS (in addition with the other platforms).
Integration tests are currently run locally until we set up access for Xcode 15 beta 2 with GitHub Actions.

Integration Test Results
Analytics

API

Auth

DataStore

Geo

Predictions

PushNotifications

Storage

General Checklist

[ ] ~Added new tests to cover change, if needed~
[x] Build succeeds with all target using Swift Package Manager
[x] All unit tests pass
[x] All integration tests pass
[x] Security oriented best practices and standards are followed (e.g. using input sanitization, principle of least privilege, etc)
[x] Documentation update for the change if required
[x] PR title conforms to conventional commit style
[ ] ~New or updated tests include Given When Then inline code documentation and are named accordingly testThing_condition_expectation()~
[ ] ~If breaking change, documentation/changelog update with migration instructions~

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

The watchOS test failing in CI passes locally - investigating.
[AWSPinpointAnalyticsPluginUnitTests.AWSPinpointAnalyticsPluginClientBehaviorTests testIdentifyUser]' passed (0.012 seconds).
Test Suite 'AWSPinpointAnalyticsPluginClientBehaviorTests' passed at 2023-06-29 12:09:30.711.
     Executed 1000 tests, with 0 failures (0 unexpected) in 6.806 (6.993) seconds