High-level view of the procedure for multi-ID synthesis

Hi! This is an amazing work and I would like to understand more. I am new to ComfyUI and I am not very familiar with the source inference code released by InstantID, but I did read their paper.
So I was trying to look at your InstantID.py and here's what I can understand from it:
Let's say we have input ID image A and B and a pose image P, to generate a multi-ID image, we do the following:

Mask the right half of P, put A and P through the pipeline of instantID, and get output latent feature A'
Mask the left half of P, put B and the flipped P through the pipeline of instantID, and get output latent feature B'
We then combine A' and B' as if they are one complete latent feature, and we send this to the next denoising step.

Is this understanding correct?
My question is:

Where do you inject the text prompt for each image (the instantID pipeline inject it in the IP adaptor), in the definition of ApplyInstantID in InstantID.py, it seems that the positive and negative text prompt is injected via the control-Net, which is called identityNet in instantID's paper, but in identity-Net the text prompt is replaced by the face embedding in the original instantID pipeline, so I am confused here.
Even with attention masking, the background is still smooth, does this just come natural from the diffusion process or is there any optimization done?

Really appreciate any help because I want to modify the workflow to suit my own use case, but I need to understand it fully first. Thank you!

visual embeds are added to the text prompt not replaced.
sorry I don't understand the second question

visual embeds are added to the text prompt not replaced.
sorry I don't understand the second question

Regarding the first question, the below is quoted from the InstantID paper:

Where they mentioned that they use face embedding instead of text embedding in the control-net, so that's why I am confused. So can I confirm that the workflow is different from the original InstantID paper where the text prompt is also used in the controlnet, and an individual controlnet is used for each input image, right?

For the second question I am actually asking why we won't see any boundary (or some unnatural transition) in the middle of the background in the generated image even if attention masking is used?

And can I confirm that my understanding for the overall workflow is correct?

Sorry I have many questions and thank you so much for your time for asking them

Hi may I also ask for multi-ID synthesis why did you choose to inject the text prompt via the controlNet instead of via the cross attention in the IP adapter?


Drop commons-codec dependency

See #21. commons-codec is currently only needed because JRE 7 doesn't have java.util.Base64; this dependency can be dropped after JRE 7 reaches end of life in July 2019.

Seems like JRE 7 actually passed end of free public updates as early as 2015, so I guess we can actually do this whenever.

@emlun I think this is just continuing down the rabbit hole of dependency hell. Wouldn't it be easier to just add a reimplementation of base64 with the project? I can't imagine it would be more than a few lines of code, Base64 is extremely simplistic, and it's not liable to change.

I know, I've implemented Base64 before, but I see no reason not to use java.util.Base64 when the JRE so graciously provides it.

I think then the project should be reversioned. One for legacy Java, and one for modern JRE 8+. That way we could maintain support for legacy Java, at least minimally if a vulnerability is discovered, but also move all current development towards modern Java.

I understand your concern, but we have decided to not support Java versions that have been abandoned upstream. You are of course welcome to fork the repository and support outdated Java yourself, if you like.


Access Control

Through the use of multiple networks with different access privileges, it is often possible to view PVs but not provide input to them.
We need to explicitly allow for this setup.
It would also bee nice if we could implement a different mouse pointer of some kind to display to users that they cannot write to a PV (and to prevent them being able to use the PV) - similar to CS-Studio.

See the cs cursor property. The not-allowed value might be appropriate.

The other question is: how do we know that we don't have write permission?
We should investigate how Phoebus does the same thing.

See also #53.

ReadOnly was implemented although can't find the exact PR
@willrogers, I think you added this?

Yep this is done.

ReadOnly was implemented although can't find the exact PR

`$git log --merges --grep readonly -n 1
commit b0ec1e116545b6ea8a7e6a7f300914e57b2f7fbd
Merge: 4c0a2a1 8d6f573
Author: Will Rogers<EMAIL_ADDRESS>Date:   Mon Oct 21 10:50:06 2019 +0100
Merge branch 'readonly' into talwrii--issue-35--simulator-refactor


incorrect manual

**File: engine/installation/linux/docker-ce/ubuntu.md, CC @mistyhacks
root@docker-mobile:~# docker run hello-world
Unable to find image 'hello-world:latest' locally
docker: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers).
See 'docker run --help'.
root@docker-mobile:~# curl https://registry-1.docker.io/v2/
{"errors":[{"code":"UNAUTHORIZED","message":"authentication required","detail":null}]}**

Hi @zappbrannigan34, if this is an installation without access to hub.docker.com, you need to specify what registry to pull from and that registry needs to have a copy of the hello image, for this to work. This is an edge case, because the vast majority of users do have access to hub.docker.com. To specify your registry, use the docker login command, which takes the registry URL as a parameter. To see all the options, run docker login --help or see https://docs.docker.com/engine/reference/commandline/login/.


Tools vanishing when repairing

I'm not entirely sure what to say about this, but it seems that only certain configurations will repair the tool, while the others will just return you the repair kit and void the tool. I've played in survival with the mod for quite a bit and it seems to be quite a persistent issue...

I suppose I should mention that this was the latest version of Fabric 1.20.1, so maybe this is an 'old' version and the bug was fixed, but I thought I should mention it either way.

Tried to reproduce so I repaired 64 broken pickaxes, no luck seems this is a conflict or fixed.


Add additional fields to the report?

Is there any way to insert additional fields into each test's JSON object?
Specifically, I am capturing my own logs during each test and would like to make the path to each of these log files available in the report.

That's not currently possible but definitely a useful addition! Should be quick to implement, I'll let you know when it's done.

There is now a  json_metadata fixture to add metadata to the current test item, e.g.:
def test_something(json_metadata):
    json_metadata['foo'] = {"some": "thing"}

The readme also lists some other ways to customize the report if you want to add more than just per-test metadata. Let me know if that works for you.

I think pytest_json_modifyreport will do what I need. Thanks!

This is working great!
My only complaint is that this large metadata block now appears in my test setup:

Did this plugin add that?

Did this plugin add that?

No, that block is added by pytest-metadata, right here. If you want an option to disable it, you might want to file an issue over there. :)

FYI, clearing the metadata is as simple as:
def pytest_configure(config):
    config._metadata.clear()

Yep, thanks, although I took your question more being about disabling the output in the terminal report, not removing metadata entirely. (I also had submitted a patch over there so that now metadata is only displayed in the terminal report if you use --verbose.)


PB-508: Unlist new babs icon sets so that new image can be made for mapviewer…

… on int and prod

This PR would unlist the new babs icon-sets and relist the original babs icon set so that https://github.com/geoadmin/web-mapviewer/pull/1064 can be merged into master since it requires an endpoint from service-icons which is not available on the current image of service-icons running on prod


[WIP] Compute deltas and feed to gvar

Builds on #230, #239.

cargo run -p fontc -- --source resources/testdata/mov_xy.designspace produces a VF the browser renders but setting movy does not move the glyph. Baby steps.


Create an OWASP mailing list

Many people still like it, so we should offer it alongside Slack etc.

Dropped an email to<EMAIL_ADDRESS>


[V3] muted attribute is not working

Expected behaviour
<video muted autoplay> should play the video with muted audio.
Actual behaviour
plyr.js does not respect the muted and does not mute the video.
Environment

Browser: Firefox 58
Operating System: Ubuntu Linux
Plyr: 3.0.3

Seems like even this does not work:
new Plyr(element, {
    muted: true,
});

Sorry this must be a regression somewhere. Should be a quick fix.

On version 3.0.3 does this work for you?
var api = new Plyr(element, {
    muted: true
});
api.pause();

The video does not pause for me.

Try this:
var api = new Plyr(element, {
    muted: true
});
api.on('ready', () => {
    api.pause();
});

I also can't get either the muted: true setup option to work, or  player.muted = true - this is with a Vimeo embed.

This should be fixed in the latest version 👍

Not working in the latest version.
Adding
const player = new Plyr('#player', {muted:true, controls: ['play', 'progress', 'current-time', 'mute', 'volume', 'fullscreen']}); or muted in the video, none of them mute the sound.

They won't if you've previously set the muted state and have it in local storage. Obviously the users settings overwrite the defaults. Try clearing your plyr local storage key.

Ups! Thank you.

Did that work? :)

I've also tested now in Firefox and it's ignoring everything.
Even with $("#video_loop").prop('muted', true); it makes nothing in firefox. Strange.

Still not working as expected.
But I got it working with the workaround on the 'ready' event.

From what I see, the problem is that Plyr keep informations in the localStorage. To reproduce the behavior.
On a webpage, init a plyr player with muted & autoplay
Load the page for the first time (sound is muted)
Activate the sound
Reload the page (sound isn't muted)
Is it the wanted behavior?

Plyr is storing it in browser storage and its taking precedent over the muted attribute. Kind of a bad design because videos won't autoplay unless they're muted. Hard to say what the solution is, I'm just sick of being told 'oh you didn't interact with the DOM we can't start this video', weird.

hey I have resolved this issue with little simple steps
const player = new Plyr('#player'); player.muted=true; player.play();


2457 - Add case actions

Motivation and Context

We want allow the support tool perform a refusal, invalid address, and print fulfilment request on a case. To do this, the support UI makes API calls to the backend, marshalls the request into a message, and then sends these messages to caseprocessor.
What has changed

Allow the support tool to create a case action of: refusal, invalid address and print fulfilment
Add new user privileges for each of these case actions
Create separate model.dto packages for UI and messaging

How to test?

Manually at the moment
Links

https://trello.com/c/F1yYnixP/2457-ops-tool-case-actions-8
Screenshots (if appropriate):

 Ops tool - case actions (8)


Bump obs-api image version to master-2020-06-16-v0.1.1-86-g25a3e86

This is required to include the live + ready probes issue fix, handled in PR-66.

@metalmatze

can we close https://github.com/observatorium/observatorium/issues/60 now?


Put Welsh language selector behind feature flag

In order to ensure that we don't accidentally expose the Welsh language
version before it is ready, this commit puts the Welsh language selector
behind a feature flag. This flag is currently tied to the dev
environment.

Going to merge this now, as I'd like to make a test deployment. Happy to receive feedback later


amqp.ConnConnectTimeout not respected when target host unavailable

It does not seem that the option amqp.ConnConnectTimeout works properly, or perhaps I'm just misunderstanding it. I connect to an ActiveMQ server via ssh tunnel. When the ssh tunnel is closed, and the server cannot be reached, I'd expect amqp to give up after 30 seconds with ConnConnectTimeout set to 30 seconds. However, it hangs for about 2 minutes before giving up and gives the following error message: connect: connection timed out
My code is as follows:
client, err = amqp.Dial("amqp://"+broker+"?transport.transformer=jms",
    amqp.ConnConnectTimeout(time.Second*30),
    amqp.ConnIdleTimeout(0),
    amqp.ConnSASLAnonymous(),
)

Sorry if there's already been an issue on this!

Thanks for pointing this out. The connect timeout is currently applied only after the TCP session is established. It should also be applied to the session setup.
Would you mind testing https://github.com/vcabbage/amqp/tree/issue169?

That works nicely! Now it drops the attempt after the specified time and gives "i/o timeout".
Thanks for the quick response and fix :)

Great! Tagged as v0.12.2.


No English support of MMDetection3D documentation?

Your documentation site(https://mmdetection3d.readthedocs.io/en/latest/) of the latest version does not support English from a few days ago.
Is this mistake?

PR #1121 has been merged to fix this problem. Sorry for the inconvenience.


Can you add a version for pihole unbound docker that work with raspberry pi?

Right now when i look at your dockerfile for unbound, you are pulling the docker image of mvance/unbound:latest but it for the amd66 x86 version. It not arm base version like raspberry pi. I try to reconfigure to pull image mvance/unbound-rpi:1.17.0 in your unbound dockerfile but the log of unbound show .conf file not found.
If it possible please make a git repo for raspberry pi or arm base devices.
Thank you in advance.

Sorry, I do not have a raspberry pi and currently have no intention to create a port for it.


old state question

Right now when the manager process is  started it checks if an old test already exist and then process initialisation by reinitialising monitors and maybe open the database.
The thing I am not sure to follow are:

if the state already exists it'ss because a previous process that was containing it died, isn't it? In this case how could the leveldb database still exists? Shouldn't it garbage collected when the process died?
In which case the state could exists there since it should have been deleted in the terminate function?

nm, the resource is not owned by the process. sorry for the noise :)


Fix bug in TMemoryBuffer

line 452 should be  maxBufferSize_ = (std::numeric_limits<uint32_t>::max)();
there are compilation problems on visual studio if not
there is an example of this pattern in line 335
I'm new to hunter so i do not know the necessary changes on hunter side.
May be someone could enplane which modifications are needed to bring this tiny patch online

there are compilation problems on visual studio if not

Which Visual Studio version you're using?

I'm using the 2015 x64 tool chain.
never the less this modification was also done in thrift version 0.12

never the less this modification was also done in thrift version 0.12

Then the version should be updated instead.
I've created branch hunter-0.12.0:

https://github.com/hunter-packages/thrift/commits/hunter-0.12.0

Please send hunterization patches to hunter-0.12.0 from branch hunter-0.11.0 of the previous version:

https://github.com/hunter-packages/thrift/commits/hunter-0.11.0

See documentation:

https://docs.hunter.sh/en/latest/creating-new/patch.html


Fzf stuffs

https://vi.stackexchange.com/questions/27751/opening-multiple-files-in-vim-with-fzf-vims-rg-command

The trick is to use the Tab key to select things first before pressing enter.


Connection strings and docs

-Re-did connection string to be more idiomatic and rustic. Will also help later when we add cloud info
-Wrote docs + examples (which are free tests in rust) for everything

Hi @AsafMah sorry for being MIA for so long, I think these changes look great and we can merge them :).


2019-08-26-kubernetes-with-microk8s.md added

cc @carmine
/assign @kbarnard10
Signed-off-by: Ihor Dvoretskyi<EMAIL_ADDRESS>

This looks good, no blockers from me, however the last three paragraphs of the introduction feel too vendor pitchy for me "Wait, there's more!".
Content-wise, I think you'd be better off cutting out some of the contrasts between microk8s and minikube and VMs/containers and then add a paragraph on firing up the dashboard or adding prometheus or any one of the extensions that people are interested in because that's something unique. People have been reading about VMs vs. containers for a while now, show me GPU enablement or something.

/LGTM

@idvoretskyi Let us know when you've had to time to review/incorporate feedback!

@kbarnard10 we've decided to update the article will the fresh data covering Kubernetes 1.16.
I'll do it (once microk8s 1.16 is released), and will update the PR, thanks!
/hold

/uncc

@kbarnard10 @vonguard @kbhawkey @cody-clark @mrbobbytables PTAL, changes addressed.

@kbhawkey done, thanks!

All feedbacks addressed.
/lgtm
/approve

@idvoretskyi Want to update the date and then remove the hold so we can get this out the door?

/hold cancel

/lgtm


EdiSegmentGroup not serialised.

First at all I have to say sorry for the bunch of tickets I'm opening lately.
The problem this time is when you have two EdiSegmentGroup in the Message Level, it only parses one:
I have EdiSegmentGroup for RFF and another EdiSegmentGroup for NAD. The problem seems to be in the TryCreateContainer, when the reader reach the NAD point, the stack contains 3 EdiStructure, the EdiSegmentGroup for the RFF, the message and the interchange. The first conditional is true but when reaches the loop for //Nested hierarchy the conditional if (!level.IsGroup) is false on the Message level (where the other EdiSegmentGroup for NAD is) and simply goes out without finding the property.
I don't know if this can help you to know the problem, but testing, and playing around while debugging I jump to the "else" directly from the first conditional and it works, parsing both EdiSegmentGroups.
Thanks once again.
//FIRST CONDITIONAL
if (newContainer == EdiStructureType.SegmentGroup &&
    (stack.Peek().Container >= EdiStructureType.SegmentGroup)) {
    // strict hierarchy
    while (stack.Peek().Container > newContainer) {
        var previous = stack.Pop(); // close this level
    }
    // nested hierarchy
    foreach (var level in stack) {
        if (!level.IsGroup)
            continue; //THIS IS FALSE FOR @MESSAGE
        var groupStart = level.Descriptor.SegmentGroupInfo.StartInternal;
        var sequenceEnd = level.Descriptor.SegmentGroupInfo.SequenceEndInternal;
        if (reader.Value.Equals(groupStart.Segment)) {
            level.Close(); // Close this level
            index = level.Index + 1;
            break;
        } else if (reader.Value.Equals(sequenceEnd.Segment)) {
            level.Close(); // Close this level
            break;
        }
    }
    if (stack.Any(s => s.IsClosed)) {
        var previous = stack.Peek();
        do
            previous = stack.Pop();
        while (!previous.IsClosed);
    }
} else {
     //IF I JUMP DIRECTLY HERE ON THE NAD IT PARSED CORRECTLY
    // strict hierarchy
    while (stack.Peek().Container >= newContainer) {
        var previous = stack.Pop(); // close this level
        if (previous.Container == newContainer)
            index = previous.Index + 1; // seed collection index
    }
}

Hi @Nekeniehl, and don't worry about the tickets. I always try to respond as my time permits me todo.
How do you escape your segment groups. Are you using the SequenceEnd member on the attribute correctly? SequenceEnd is meant to be used (when needed) as the segment that breaks the sequence; it is the first segment not taking part in the sequence.
Can you point me to the EDI fragment and classes at your pull request.
Thanks

Hi, thanks, that was the problem, decorated the RFF as follows has solve it:
[EdiSegmentGroup("RFF", SequenceEnd = "AJT")]
[EdiSegment]
[EdiPath("RFF")]
public class RFF

I will close the ticket and cancel the pull request, if I don't find any more troubles today I will pull the completely POCO for ORDRSP in a while.


Remove manual x12 setup

Thanks to @ecc1 we can now pull looping data (sensitivities, basals, targets, and settings) from x12 model pumps, and remove the workarounds & manual configurations.

Tested it locally a couple times & walked someone through it remotely. Maybe one more tester?

As a 712 user, thanks...
What will happen to existing setups? will it silently ignore the locale settings and take the information from the pump?

Yeah, it'll overwrite the manually-configured files in favor of what is configured on the pump.  Tested with another x12 user this evening!


🚀 Feature: Make all requests use a custom User-Agent

🔖 Feature description
Some developers in our company have suggested us to include the User-Agent as part of all the requests that backstage does, whether are internal things or to external services we own.
It would be really nice to support this and allow people to set the header easily. Maybe even set the header to "backstage" per default, which might be super helpful in general for tracing.
🎤 Context
Unfortunately, we haven't found any easy way to do such thing. After some research and trials, I came up with a solution which requires adding a middleware in the backend and in the frontend which simply sets the header to the request. This seems to be working for most scenarios (in the frontend it works if you use the fetchApi, and in the backend it works always).
The only thing that we found out that is not working is related to the swagger-ui-react packagee, which uses its own User-Agent header and is not overridden by own custom one.
✌ Possible Implementation
The solution I found locally was the following:
In the backend (new backend system), you need to override the defaultConfigure for the rootHttpRouter, and add at the beggining a new middleware which injects the header:
function userAgent(): RequestHandler {
  return (req: Request, _res: Response, next: () => void) => {
    req.headers['user-agent'] = 'backstage';
    next();
  };
}

export function defaultConfigure(context: RootHttpRouterConfigureContext) {
  const { app, routes, middleware, logger } = context;

  app.use(userAgent());
  // the rest of middlewares, routes, etc.)

For the frontend, the solution was kind of similar. In this case, I needed to override the fetchApi definition and add it to our ApiFactory list inside the apis.ts file:
class UserAgentInjector implements FetchMiddleware {
  apply(next: typeof fetch): typeof fetch {
    return async (input, init) => {
      const request = new Request(input as any, init);
      request.headers.set('User-Agent', 'backstage');
      return next(request, init);
    };
  }
}

export const apis: AnyApiFactory[] = [
  // FIXME: Overrides the default fetchApi implementation from https://github.com/backstage/backstage/blob/master/packages/app-defaults/src/defaults/apis.ts
  // Make sure it's always up-to-date
  createApiFactory({
    api: fetchApiRef,
    deps: {
      configApi: configApiRef,
      identityApi: identityApiRef,
      discoveryApi: discoveryApiRef,
    },
    factory: ({ configApi, identityApi, discoveryApi }) => {
      return createFetchApi({
        middleware: [
          FetchMiddlewares.resolvePluginProtocol({
            discoveryApi,
          }),
          FetchMiddlewares.injectIdentityAuth({
            identityApi,
            config: configApi,
          }),
          new UserAgentInjector(),
        ],
      });
    },
  }),

  // ...other APIs
];

👀 Have you spent some time to check if this feature request has been raised before?

[X] I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

[X] I have read the Code of Conduct

Are you willing to submit PR?
No, but I'm happy to collaborate on a PR with someone else

Am I misremembering or do some browsers still refuse to change that header in outgoing requests?
Hm are you suggesting that maybe this should be something that's supported out of the box instead of adding it yourself? Haven't heard the request for that before, but happy to leave this up fielding for feedback

Am I misremembering or do some browsers still refuse to change that header in outgoing requests?

I wasn't aware of such thing, but could be? So far it seems Firefox works fine with the setup I posted above. Not sure about other browsers

Hm are you suggesting that maybe this should be something that's supported out of the box instead of adding it yourself? Haven't heard the request for that before, but happy to leave this up fielding for feedback

Yes, if that's something that more people might be interesting about, it might be a nice idea to have it integrated without needing developers to use a solution like the one we found instead. At least in our case the User-Agent helps us internally in certain scenarios, that's why some people asked us about making backstage use something more specific instead of the default one.

More generally on the issue: we have the FetchApi in the frontend for exactly this kind of customization to be possible. It could be that we want to provide some utility to make it a bit easier, but that's the facility that we want to be working with. For backend it's a bit trickier to add a FetchApi but it's still something that we intend to do at some point, or at least attempt. Right now it's not the highest prio though.

That sounds like a good plan to me. Having some kind of utility which simplifies setting custom headers (not only the user-agent, maybe others as well) sounds like a big improvement already! :sparkles:

Just bringing this up again. Is there any advance in such topics for the frontend and/or backend? It would be really nice to use that. The solution we have is not working at 100% for all cases. Some can be fixed by our internal plugins, but others need changes in public plugins, which I think it's not really a good idea.


docs: clarify autofill guide for Android

closes https://github.com/ionic-team/capacitor-docs/issues/73

I made sure the Set Capacitor Server Hostname section also included androidScheme of https and changed the warning to a note saying why it was required (for secure web context apis on Android).
I clarified the part about your domain needing https and a good cert. This is needed otherwise they may not set this up on their server.


ah-resque-ui "ah is not defined"

I was setting up ah-resque-ui and followed the instructions from step 1-3, instructions , but when I run action hero throws the next error 'ah is not defined'
my files:
config/plugins.js
exports['default'] = {
  plugins: (api) => {
    return {
       'ah-resque-ui': { path: __dirname + '/../node_modules/ah-resque-ui' }
    }
  }
}

config/ah-resque-ui.js
ah
thanks in advance :)

Sorry about that!  We lost a chunk of the readme. https://github.com/actionhero/ah-resque-ui/commit/da293f70c2ac666018006f71ce953ad61656442c

thank you very much evan :)


Build rpms on RHEL 8.8 and 9.2

It seems it's currently impossible to get Fedora-35 machine on aws. It's the only instance that has just one instance type defined, I'm trying if adding more types helps solve this or it's a different issue.

Should be better now.


Preview of Markdown not working, getting 403

Gitea Version
1.15.6+27-gd29a0fc3b
Git Version
2.33.1
Operating System
Fedora 35 x64
How are you running Gitea?
Self-made RPM package, see https://gitlab.com/fhuberts/rpmsUpstream/-/tree/master/fedora/gitea
Database
PostgreSQL
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Description
Nov 28 14:57:07 git.somewhere gitea[3372]: 2021/11/28 14:57:07 Started POST /api/v1/repos/servers/server-installs/markdown for <IP_ADDRESS>:0
Nov 28 14:57:07 git.somewhere gitea[3372]: 2021/11/28 14:57:07 Completed POST /api/v1/repos/servers/server-installs/markdown 403 Forbidden in 821.289µs
Screenshots
No response

The same 403 is present in the apache webserver log.
I run gitea behind apache, on a unix domain socket.
[28/Nov/2021:15:18:04 +0100] "POST /git/api/v1/repos/servers/server-installs/markdown HTTP/1.1" 403 59 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0"

I just remembered another similar issue:

https://github.com/go-gitea/gitea/issues/17408

This was also present on 1.14.
Just upgraded my server to 1.15 in the hopes that it would work now...

I've tried changing the ROOT_URL as mentioned in the referenced issue, but that doesn't fix the problem.

Setting the *_VISIBILITY variables to public also doesn't work.
Don't know what else to check now.

Can you check (inspect) the requests sent by your browser? What's the difference between a correct request and an incorrect request?

From the Firefox console.
Headers:
{
	"POST": {
		"scheme": "https",
		"host": "git.internal.hupie.com",
		"filename": "/git/api/v1/repos/servers/server-installs/markdown",
		"remote": {
			"Address": "<IP_ADDRESS>:443"
		}
	}
}

Request:
_csrf=<token>&mode=gfm&context=%2Fgit%2Fservers%2Fserver-installs&text=something&wiki=true

Must note that a different token appears to be sent than is stored in my cookies.
Also, Firefox reports 'CORS Missing Allow Origin' in the transferred column
for the request.

Must note that a different token appears to be sent than is stored in my cookies.
Also, Firefox reports 'CORS Missing Allow Origin' in the transferred column for the request.

Maybe that's the problem. On my side, the CSRF token in POST and in COOKIE are the same.
Can you check the source code of the page to see which CSRF token is correct? which is incorrect? The corect CSRF token should also exists in the page source code.

The csrf is changed by the 403 response.
I checked after the response so that is why the token was different

What are your cookie settings in app.ini? It might just be helpful to paste that up entirely - skipping the secrets and the confidential stuff but explaining what the values are. (For example if your root URL is something like https://foo.example.com/bar put this in instead.)
Could you check if the problem still occurs in an incognito window?
Have you tried deleting all of your Gitea cookies?

I have changed nothing in app.ini wrt cookies, everything is at defaults.
I've not set ROOT_URL.
Problem is present is private window as well.
Removing all cookies doesn't help.

Even disabling selinux doesn't help, so it appears to be somewhere inside the application code

This can easily be reproduced by setting up a Fedora 35 machine/VM and installing the RPM I created (see https://gitlab.com/fhuberts/rpmsUpstream/-/tree/master/fedora/gitea). I'll attach a built RPM package in a minute.
This should make it a lot easier to debug.

Github refuses to attach the rpms/gz/zip. bummer

RPMs

Ha, easy workaround. Put them on gitlab: https://gitlab.com/fhuberts/gitea-rpms

Ok, so I'm only having this problem on wiki pages. Preview works fine on issues.

Ah that helps!

Didn't know that before, hit that by accident.

OK on both 1.15.7 and 1.16-dev I'm getting the right thing on the wiki.
What permissions does the user you're trying to write with have in that repository?

the logged in user is the owner of the repo.

and the filesystem owner of the wiki repo is the user under which gitea runs (e.g. user 'git')

I still cannot reproduce this.
I think it would be useful to see your app.ini.

I put the RPM packages on gitlab (https://github.com/go-gitea/gitea/issues/17843#issuecomment-984934746), so you can completely reproduce my setup by installing a Fedora VM with those RPMs.
If you want more up-to-date RPMs then please let me know, the issue is still present in gitea v1.15.9 (and today both wiki and issues don't show a preview).

And now it works again for a very small example in an issue.
Might it be that there is a timeout somewhere that is a bit tight?

Thanks for the rpms, but it's a bit much to expect us to install vagrant, download a fedora cloud-base, create a virtual machine install 288 packages into that virtual machine, then install your homemade packages into that virtual machine. (Which ones?! All of them?) Even after doing all that we would then still have to guess what the eventual configuration would be.
So instead:

What is your app.ini?

In particular what session provider are you using?

I see from your rpms that you're using apache as a reverse proxy. What is that configuration?
In your local browser inspector it would be useful to check and compare what the session id cookies are being sent to the api as compared to your non api endroutes.

It may be that 1.15.10 will solve this issue as it might be that you were using a memory provider and this an issue to do with the multiple sessioners in 1.15.0-1.15.9.

Thanks for the rpms, but it's a bit much to expect us to install vagrant, download a fedora cloud-base, create a virtual machine install 288 packages into that virtual machine, then install your homemade packages into that virtual machine. (Which ones?! All of them?) Even after doing all that we would then still have to guess what the eventual configuration would be.
So instead:

What is your app.ini?

In particular what session provider are you using?

I see from your rpms that you're using apache as a reverse proxy. What is that configuration?
In your local browser inspector it would be useful to check and compare what the session id cookies are being sent to the api as compared to your non api endroutes.

It may be that 1.15.10 will solve this issue as it might be that you were using a memory provider and this an issue to do with the multiple sessioners in 1.15.0-1.15.9.

As I've tried to explain, the RPMs exactly reproduce my setup. There is no need for vagrant, just a plain Fedora 35 server with those RPMs installed. Installing the RPMs will drag in all dependencies and configure the server, exactly reproducing my setup.
I will update those RPMs, but most importantly I will upload the configuration files you've asked for in that repo as well.
What do you mean with session provider? It's a daemon, there is no session. Or do you mean gitea user session? --> local login.
I'm running 1.15.9 and it still has the issue.
I'll add a comment after uploading all the files in that repo.

As I've tried to explain, the RPMs exactly reproduce my setup. There is no need for vagrant, just a plain Fedora 35 server with those RPMs installed. Installing the RPMs will drag in all dependencies and configure the server, exactly reproducing my setup.
I will update those RPMs, but most importantly I will upload the configuration files you've asked for in that repo as well.
What do you mean with session provider? It's a daemon, there is no session. Or do you mean gitea user session? --> local login.
I'm running 1.15.9 and it still has the issue.
I'll add a comment after uploading all the files in that repo.

I've updated the RPMs and added all config files.

I've updated the RPMs and added all config files.

Are you sure that the ProxyPassReverse is correct?
https://docs.gitea.io/en-us/reverse-proxies/#apache-httpd Does not recommend a ProxyPassReverse

Removed the ProxyPassReverse:

makes no difference, same problem as before: preview works on issues, but not on wiki pages

While playing around I did see something very strange:

when editing a wiki page and saving it unchanged the backing file is changed and suddenly has cr/lf line endings (which is very unexpected and unwanted !)
the preview also doesn't work on that wiki page with cr/lf

ProxyPass /git unix:/run/gitea/gitea.sock|http://localhost:3000 nocanon , the http://localhost:3000 seems incorrect either. Please make sure all your hosts and ports are correct. It's highly recommended that you use a non-unix-socket to test everything and make sure things work first, then try to migrate it to a unix-socket setup, then you can find where the problem occurs.

the CRLF: it is the browser's behavior, Gitea now justs saves content as it is (well, you can call it  a flaw, or a feature , whatever)

There are 3 RPMs, 3 apache config files, we have no idea how to test or reproduce your problem. As (1), it's recommended to make a simple setup first, and you could only upload the  gitea binary with it's config and apache config in a tar.gz.

I'm sorry but I have to react to point 3 here.
I've done exactly as you asked and uploaded all configurtion files. I've uploaded all RPMs I use, and that will exactly reproduce my setup. Still you persist in claiming that you can't reproduce my setup on that I haven't uploaded the configuration files.
Which is all very disappointing to me. I've tried very hard to give you all the info you need, and to follow all your suggestions...
I will investigate point 1 you mention but I'm not holding out hope that that will solve the problem.
Would it be so bad to consider that there might actually be a bug in gitea? You seem to be only pushing back on me instead of trying to understand the problem and investigating the gitea side.
Thanks for the clarification on point 2.
I'll report back when I've tried your point 1.

And here are the configuration files, so that you don't have to go out to the git repo I put together for this issue.
configuration.zip

So I've tried without the unix domain socket, without SSL, just HTTP proxy: exact same problem.
I really does appear the the proxy setup doesn't function correctly.
The issue previews work fine, the wiki previews do not.

In your browser console have you watched the network to check how your browser is communicating with gitea when you click the preview page?
Are you certain that the request is going to the correct place?

I saw that problem by another user using my gitea instance. First i wondered, why it doesn't render the wiki edit preview, because on my machine (using chrome) everything works fine. Maybe its due to the browser, because the other user was using edge.

OK so I've finally managed to start a fedora docker with systemd using https://hub.docker.com/r/jrei/systemd-fedora/
docker pull jrei/systemd-fedora
docker run -d --name systemd-fedora --tmpfs /tmp --tmpfs /run --tmpfs /run/lock -v /sys/fs/cgroup:/sys/fs/cgroup:ro jrei/systemd-fedora
docker exec -it systemd-fedora bash

Then in that container:
yum install https://gitlab.com/fhuberts/gitea-rpms/-/raw/master/gitea-1.15.9-1.fc35.x86_64.rpm

Now for whatever reason that postgres didn't come up for me straight away, but I think the db is irrelevant so I switched to sqlite by editing the app.ini and restarted gitea:
vi /etc/gitea/app.ini # to edit the app.ini as above
systemctl restart gitea

Then on the host I navigate to:
https://<IP_ADDRESS>/git/

created a user and then a test repository.
Then gone to wiki markdown and yes I can reproduce the issue, but looking in the network console I see:
POST https://8eba9d421607/git/api/v1/repos/administrator/simple-test/markdown

Now I remember I've not set a ROOT_URL in app.ini ... (Gitea requires that you set the ROOT_URL to match the site.)

So now I go back to command line and change the app.ini using vi /etc/gitea/app.ini:
DOMAIN=<IP_ADDRESS>
ROOT_URL=https://<IP_ADDRESS>/git

then I run
systemctl restart gitea

And refresh my edit page.
et voila ça marche.

I saw that problem by another user using my gitea instance. First i wondered, why it doesn't render the wiki edit preview, because on my machine (using chrome) everything works fine. Maybe its due to the browser, because the other user was using edge.

I tried both Firefox and Chrome. Both show the same result.

@zeripath
If you use the RPM then the ROOT_URL will have been setup already, on my server it shows like:
DOMAIN = hostname.domain.name
ROOT_URL = https://%(DOMAIN)s/git/
Thanks for looking into this, it helped me narrow down the problem...
I made it work on my server, and the problem is that I need to access the server with its FQDN to make it work!
This seems very weird and actually a bug.
More so because for the preview of an issue comment there is no such requirement, that works fine for both the FQDN and its simple hostname.
Literally the only thing different is using the 'hostname.domain.name' or 'hostname'.
And the POST goes out to the same (apart from the FQDN) URL.
The POST are the same.

Setting domain to 'hostname' has the following effect:

when the server is accessed with 'hostname' both issue comment and wiki page previews work.
when the server is accessed with its FQDN neither issue comment nor wiki page previews work.

Same/reverse holds when setting domain to 'hostname.domain.name'.
(I did see it work for issue comment previews a few times but can't reproduce that now)
Seems like a hostname check is too strict.

For now I've implemented a workaround for this bug (see https://gitlab.com/fhuberts/rpmsUpstream/-/commit/d403b45ede235a1852e57be9546b169b44fdcbe3?w=1).

It would be useful if you could check the cookies that are set. You'll probably find that the cookies are being set as per the FQDN or hostname as appropriate.
https://stackoverflow.com/questions/1062963/how-do-browser-cookie-domains-work

After getting rid of the cookies, issue comment previews work again without the httpd workaround. wiki previews still do not work without the workaround.
Without the workaround cookies are stored under 'hostname', with the workaround cookies are stored under 'domain.name'.

I also just discovered why issue comment previews sometimes seem to work: in a list with issues, the links to the issues (on the issue titles) are to the FQDN of the issue, even though the page with the list is opened on the 'hostname'!

Summary:
Previews only work when the server is accessed through it full hostname (FQDN).

Currently, Gitea uses an absolute full URL {{$.i18n.Tr "preview"}} to do preview. The absolute full URL is generated by ROOT_URL, it must match the FQDN you are visiting.
That's why we asked many times to check whether the CSRF token and COOKIE are correct.


HDF5 format compatibility when re-opening files

Closes #951.
Supplements the change in PR #1931.
This PR selects the best HDF5 format compatibility options when re-opening an existing netCDF-4 file for writing, such as appending, or adding new groups or variables.
The general objective is to make netCDF-4 files that can be read and written by all previous library  versions.  Optimal HDF5 v1.8 compatibility is selected whenever possible.  Otherwise this falls back to the adequate v1.6 compatibility.
Format compatibility is a transient property of the HDF5 library, rather than baked in at file creation time.  Therefore, compatibility options must be re-selected every time a netCDF-4 file is re-opened for writing.
This builds on the previous update for initial file creation, PR #1931, by @brtnfld, released in netcdf-c version 4.8.1.
In particular, this PR moves compatibility controls into a single central location, a new common function that is shared by both create and open functions.
For more details, see issue #951, also documentation at the top of libhdf5/hdf5set_format_compatibility.c.
This PR also makes several corrections and cleanups to previous comments about the use of related property lists in file creation and file opening.

Looks good, I'll finish reading over this and start trying to get things merged shortly. Thanks!


CLI Export from External FHIR Server

tonylee@Tony-MBP test % cat .env
MEDPLUM_BASE_URL=https://sandbox.bcda.cms.gov
MEDPLUM_FHIR_URL_PATH=api/v2/
MEDPLUM_CLIENT_ACCESS_TOKEN={ACCESS_TOKEN}

tonylee@Tony-MBP test % npx medplum bulk export -e Patient
Patient.ndjson is created
Coverage.ndjson is created
ExplanationOfBenefit.ndjson is created
tonylee@Tony-MBP test % ls -al
total 87944
drwxr-xr-x@  7 tonylee  staff       224 May 25 12:19 .
drwxr-xr-x  27 tonylee  staff       864 May 24 13:40 ..
-rw-r--r--@  1 tonylee  staff      6148 May 24 17:11 .DS_Store
-rw-r--r--@  1 tonylee  staff       797 May 25 12:17 .env
-rw-r--r--@  1 tonylee  staff   1911450 May 25 12:18 Coverage.ndjson
-rw-r--r--@  1 tonylee  staff  42920134 May 25 12:19 ExplanationOfBenefit.ndjson
-rw-r--r--@  1 tonylee  staff    176458 May 25 12:18 Patient.ndjson

Coverage: 94.277% (-0.05%) from 94.326% when pulling b9bf70323f52d8d87dcb918848c271aece29700a on tony-cli-export-external into 460df1fb82d4fe7c21d7e3588a6593635b80ce10 on main.

SonarCloud Quality Gate failed.
  0 Bugs   0 Vulnerabilities   0 Security Hotspots   0 Code Smells
 47.6% Coverage  0.0% Duplication

Test coverage failure coming from packages/cli/src/index.ts

SonarCloud Quality Gate failed.
  0 Bugs   0 Vulnerabilities   0 Security Hotspots   0 Code Smells
 52.4% Coverage  0.0% Duplication

Test coverage failure coming from packages/cli/src/index.ts


add ember-cli-babel to avoid deprecation warning

Get rid of deprecation warning

@samdemaeyer thanks, I bet this addon needs an ember/ember-cli upgrade most of all. Feel free if you're inclined :)

@bgentry, this should be it => https://github.com/bgentry/ember-currency/pull/3


HTTP status code 300 will not be treated correctly by stubs

We have noticed that HTTP status code 300 is not handled correctly.
300 represents "multiple choices" and involves user interaction, so according to the specification it should be treated similar to a 2xx response to give the user the chance to respond.
NSURLConnection behaves correctly by responding with  -connection:didReceiveResponse: while the stubs will treat it like a redirect which 300 is not.

Good catch, thanks!
Could you maybe make a PR with the fix? (I'll be quite busy the next few days and won't work on OHHTTPStubs for a while)
That's probably simply a < to change to <=, but the PR should also add a unit test that ensures it won't happen again ;)
Thx!


"arrow-revert-change" in other direction in diff view

If you diff two files, you have the option to "revert" the change in the second file using the little arrow in the middle:

I would like a way to do the reverse, to "accept" the change into the left file.
There would be two ways to add that:

Just add a second arrow.
People would quickly see how it works, but it takes either too much space or reduces the size of the current arrow.
Use some key like Shift or Alt to flip the action.
This would make it harder to find out about it, but it was the first thing I tried when I searched for the feature.
I think in that case it would also help to flip the arrow if you hold Shift/Alt/whatever while hovering over it.

/duplicate

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for similar existing issues. See also our issue reporting guidelines.
Happy Coding!

What is the duplicate of this issue?


Fix table rendering

There was some extra spacing in front of one of the table tags that broke table rendering

@cokert : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@cokert : Thanks for your contribution! The author(s) have been notified to review your proposed change.


Second order errors during get_configuration in COMPLIANCE_RULESET_LATEST_INSTALLED

Part 1:
get_configuration(resource_type, resource_id, configuration_capture_time) fails when resource_type == "AWS::KMS::Key" or resource_type == "AWS::::Account".
The reason for this is GetResourceConfigHistory does not support these two resource types.
Part 2:
get_configuration(resource_type, resource_id, configuration_capture_time) also fails when resource_type == "AWS::ApiGateway::RestApi" since resource_id recorded by AWS Config service for ApiGateway::RestApi is of "arn:aws:apigateway:"+compliance_account_region+"::/restapis/"+resource_id format compared to all other resource types vs resource ids where you can pass resource_id as is.

For the second part, I am using API_GW_NOT_EDGE_OPTIMISED which is probably the culprit.


BLEClient.ino ESP_GATT_INSUF_AUTHENTICATION

Hi Folks,
I could do with a bit of help.
I am using an ESP32 as a BLE Client, using the BLE Client.ino code from Neil Kolban and it successfully connects to a BLE Server, however, writing and reading the Remote Characteristic doesn't work currently and I don't know why.
I have the debug option turned on and a selected section of output in the serial monitor is here:
[D][BLERemoteCharacteristic.cpp:433] readValue(): >> readValue(): uuid: fdce2345-1013-4120-b919-1dbb32a2d132, handle: 27 0x1b
[D][BLEDevice.cpp:105] gattClientEventHandler(): gattClientEventHandler [esp_gatt_if: 3] ... ESP_GATTC_READ_CHAR_EVT
[D][BLEUtils.cpp:1344] dumpGattClientEvent(): GATT Event: ESP_GATTC_READ_CHAR_EVT
[D][BLEUtils.cpp:1493] dumpGattClientEvent(): [status: ESP_GATT_INSUF_AUTHENTICATION, conn_id: 0, handle: 27 0x1b, value_len: 0]
[D][BLERemoteCharacteristic.cpp:455] readValue(): << readValue(): length: 0

Does anyone know anything about ESP_GATT_INSUF_AUTHENTICATION? I presume this is the problem.
Thanks,

Howdy,
There is little in the way of security code added to the current BLE C++ classes because of a simple and stupid problem (on my part) ... namely I haven't found any BLE components that apparently need/use security.  What that means is that I haven't had anything to test again.  What I'd like to do is work with you to get this going ... it may take a little bit ... but it seems that you may actually have a BLE server device that requires security ... and that's something Ive been looking for.
My first question ... what kind of device is the target?  Please share as much of its details as possible.

Hello Neil,
it is a Hosiden HRM1062 chip.

Hello,
was is the difference between connecting to a BLE server and being paired with the BLE server?

My loose understanding is that "pairing" occurs when one or both parties in the connection originally "distrust" the other.  For example, imagine your cell phone and a bluetooth headset.  We don't want ANY bluetooth headset to listen into your phone ... so when a device wishes to connect, it will explicitly require a positive confirmation from one or both ends.  It is common that a device, once trusted the first time, will want to be trusted from then on.  To achieve that, pairing occurs.  My loose understanding is that the devices exchange some private information that identifies each other and that should they wish to connect again in the future, they will examine their history and "remember" the pairing that occurred in the past and allow the connection to proceed without question.


RAII 4 translator + const/noexcept correct SE_Exception

Use RAII idiom for structured exception translator setter.
Make SE_Exception const and noexcept correct.
Remove unused <assert.h> header.

Didn't converted printf to std::cerr.
IMHO stream formatters a bit harder to reason about than printf ones.

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

@dimhotepus : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@corob-msft : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@corob-msft Never mind thank you for review and fixes.


Submitting this code to open zeppelin

Hi @storyicon
We would like to use this library in production.
As part of this effort we plan to audit the code.
but we are thinking we could also try to add it to open zeppelin repositories.
are you Ok with this ?
can we publish it on your behalf?
with minor fixes?
thanks

I apologize for the late reply. As long as you include the author<EMAIL_ADDRESS>in the code comments, you are welcome to do so. I'm happy to be able to contribute to the open source community.


cudaPackages: 11.5 -> 11.6 and gcc11

Description of changes
Cuda has strict requirements for the compiler and libc versions, in particular 11.5 is incompatible with glibc 2.4, but 11.6 introduces a fix for that.
This PR updates the default cudaPackages of nixpkgs from 11.5 to 11.6, resets preferred gcc versions for cuda 11.4 and  11.5 back to gcc10, and keeps gcc11 for cuda 11.6.
At first glance, this seems to fix the cuda-related breakages introduced in https://github.com/NixOS/nixpkgs/pull/165732.
Hopefully this would allow us to revert the cudaPackages_11_3 fallbacks introduced in https://github.com/NixOS/nixpkgs/pull/169279 as a fix
Waiting for the builds to finish: https://hercules-ci.com/github/SomeoneSerge/nixpkgs-unfree/jobs/449 (also a baseline)
Things done

Built on platform(s)

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

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

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

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

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

[ ] Fits CONTRIBUTING.md.

Ok I think if the builds check out then this is good to go!

Ok, so this at least unbreaks blender and librealsense, and I've built pytorch and cupy before the nccl update - this should be safe, I guess

Result of nixpkgs-review pr 169484 run on x86_64-linux 1

2 packages marked as broken and skipped:

cudaPackages.nvidia_driver
truecrack-cuda

2 packages failed to build:

colmapWithCuda
python39Packages.tensorflowWithCuda

62 packages built:

cudaPackages.cuda-samples
cudaPackages.cuda_cccl
cudaPackages.cuda_cudart
cudaPackages.cuda_cuobjdump
cudaPackages.cuda_cupti
cudaPackages.cuda_cuxxfilt
cudaPackages.cuda_demo_suite
cudaPackages.cuda_documentation
cudaPackages.cuda_gdb
cudaPackages.cuda_memcheck
cudaPackages.cuda_nsight
cudaPackages.cuda_nvcc
cudaPackages.cuda_nvdisasm
cudaPackages.cuda_nvml_dev
cudaPackages.cuda_nvprof
cudaPackages.cuda_nvprune
cudaPackages.cuda_nvrtc
cudaPackages.cuda_nvtx
cudaPackages.cuda_nvvp
cudaPackages.cuda_sanitizer_api
cudatoolkit (cudaPackages.cudatoolkit ,cudatoolkit_11)
cudaPackages.cudnn (cudaPackages.cudnn_8_3_2)
cudaPackages.cutensor
cudaPackages.fabricmanager
cudaPackages.libcublas
cudaPackages.libcufft
cudaPackages.libcufile
cudaPackages.libcurand
cudaPackages.libcusolver
cudaPackages.libcusparse
cudaPackages.libnpp
cudaPackages.libnvidia_nscq
cudaPackages.libnvjpeg
cudaPackages.nccl
cudaPackages.nsight_compute
cudaPackages.nsight_systems
cudaPackages.nvidia_fs
ethminer (ethminer-cuda)
forge
gpu-burn
gromacsCudaMpi
gwe
katagoWithCuda
librealsenseWithCuda
magma
nvtop
python310Packages.TheanoWithCuda
python310Packages.cupy
python310Packages.jaxlibWithCuda
python310Packages.pycuda
python310Packages.pynvml
python310Packages.pyrealsense2WithCuda
python310Packages.pytorchWithCuda
python39Packages.TheanoWithCuda
python39Packages.cupy
python39Packages.jaxlibWithCuda
python39Packages.numbaWithCuda
python39Packages.pycuda
python39Packages.pynvml
python39Packages.pyrealsense2WithCuda
python39Packages.pytorchWithCuda
xpraWithNvenc

Colmap has been failing since gcc10 -> gcc11.
Tensorflow has been failing with this<EMAIL_ADDRESS>too

Just finished running and found the same... merging now!

I ran into this today when trying to build magma! Just wanted to say thanks.


Add Azure Pipelines YAML

Fixes #2134
Changelog Entry

Fix #2134. Added azure-pipelines.yml for embed package, by @compulim in PR #2135

Description
Add a new Azure Pipelines YAML to build and drop artifacts related to embed for easier consumption.
Specific Changes

Added packages/embed/azure-pipelines.yml, tested on a private build

~[ ] Testing Added~

Tests not added because it is deployment script

FYI build is breaking -- coveralls


fixed Issue 196

Fixed 'Using type() instead of isinstance() for a typecheck.' issue in tests\backends\hardware\test_env.py

Unfortunately there was a misconfiguration in CircleCI, which has now been fixed. However, it has been unable to detect your branch and I have been unable to trigger it manually.
Possible fixes:

You might be able to trigger the build manually using the CircleCI API. See here
Another commit can be pushed to this branch.
You can amend your current commit to change the commit hash, and then force push that new commit to your branch.

Any questions / help let us know :)

2. Another commit can be pushed to this branch

I'd recommend creating an empty commit, like so: https://coderwall.com/p/vkdekq/git-commit-allow-empty

I did create an empty commit, https://github.com/Shivam60/j5/commit/1977a4ee3331107ff1daac04736f91941ab81258
but now I am lost as to what to do.

Hi,
CircleCI has run the tests against your code and it has failed linting.
The error message is: tests/backends/hardware/test_env.py:9:42: E231 missing whitespace after ','
You can view the error yourself by clicking on the little red cross next to the commit.

I cant create a pull request from that commit.

No need. GitHub is clever.


in az group deployment list, the --top parameter is ignored

Describe the bug
In az group deployment list, all results are returned no matter the value of the --top parameter.
To Reproduce
Create a resource group test with more than one deployment. Run az group deployment list -g test --top 1.
Expected behavior
Exactly one deployment should be returned.
Environment summary
Azure CLI version 2.0.61, Bash on Windows.
Additional context
The top parameter is checked for errors (must be positive).
A workaround is to pass the returned JSON through jq '.[0:<limit>]', but that has a performance penalty, in that all results are still returned, even if most are discarded.

The correct values are being sent to the service. It simply does not correctly use them. Given that, there is nothing we can do in the CLI that's any better than your jq query. We will escalate this issue to the appropriate service team.

@midgleyc - I looked into this just now since the behavior still exists. The issue is not the result of the ARM API itself, which correctly respects the top parameter (I checked this on all of the stable API releases in 2019 and 2020 via Postman). We (ARM) are on it and will work with the SDK teams to get this addressed.
It was annoying me why this was happening, so I investigated:
tl;dr: A list deployments call returns a nextLink property, which the Python SDK consumes to make further consecutive calls. This behavior is intentional for situations when the response can be long. In the case of a top parameter being supplied, the nextLink property usually won't need to be consumed (explained further below).
Same explanation as above (but with links to code): When you run az group deployment list, the following azure-cli code is run. That code calls the following Azure Python SDK code for Deployment Operations which correctly passes in the top parameter BUT it consumes the nextLink property via ItemPaged to make additional requests (regardless of what the value of top is).
@tjprescott - The solution I propose is to make the following change in the Azure Python SDK:
On the first request to list deployments, If the size of the response is equal to top, we're done (this covers most scenarios). Otherwise, we should continue to make requests to nextLink (as the current code does) until the total accumulated response size is equal to top.

@snaheth any updates on a sdk fix here?

@snaheth any updates on a sdk fix here?

@apclouds -- See my comment above for what's needed to fix this issue. Looks like we just need someone willing to take this on.
@leni-msft & @raych1 -- Can either of you or someone from your team help with making the requested change in the CLI code?

@apclouds -- See my comment above for what's needed to fix this issue. Looks like we just need someone willing to take this on.
@leni-msft & @raych1 -- Can either of you or someone from your team help with making the requested change in the CLI code?

@apclouds -- See my comment above for what's needed to fix this issue. Looks like we just need someone willing to take this on.
@leni-msft & @raych1 -- Can either of you or someone from your team help with making the requested change in the CLI code?

@zhoxing-ms, please have a look at this CLI issue, thanks.

@apclouds -- See my comment above for what's needed to fix this issue. Looks like we just need someone willing to take this on.
@leni-msft & @raych1 -- Can either of you or someone from your team help with making the requested change in the CLI code?

@zhoxing-ms, please have a look at this CLI issue, thanks.

@zhoxing-ms @raych1 Do you have any updates on this ?

We will work with the SDK teams to get this addressed.
The solution I propose is to make the following change in the Azure Python SDK:
On the first request to list deployments, If the size of the response is equal to top, we're done (this covers most scenarios). Otherwise, we should continue to make requests to nextLink (as the current code does) until the total accumulated response size is equal to top.

Thanks to the investigation from @snaheth. This seems to be a Python SDK related issue. @snaheth May I ask how is the current progress in solving this issue?


Optimize Window Aggregate Flux Queries

Flux queries involving aggregateWindow are generally slower than their equivalent InfluxQL queries. This issue is to optimize the Flux queries to be on par with the InfluxQL queries.

Duplicated with  #22471 due to github network weirdness, closing!


Resolves issue during SMA predicate instanciation.

Running the TPCH queries revealed some bugs in SMA.
This resolves the issue where predicates which are not of the form 'Attribute comparison literal' (Ex. lo_orderkey > 100000) cause a GLOG(FATAL) when really, they can just be ignored by the SMA.
Note:
There is another issue with SMA and TPCH which I am working to resolve. It has to do with conversion of TypedValues. For example on a simplified version of TPCH query 6:
SELECT sum(l_extendedprice * l_discount) AS revenue
FROM lineitem
WHERE l_quantity < 24;

The literal value 24 is integer type compared to the double type which l_quantity is stored as.

Instead of aborting the process we now return a Selectivity::kUnknown. Was the code under test? Are we seeing a missing test for the new behavior now?

@d The previous code was not under test in as far as the unit test does not cover the method SMAIndexSubBlock::getSelectivityForPredicate() though the helper methods inside of it were tested.
This PR will include a test for getSelectivityForPredicate once finished, as the type-coercion commit will need a unit test to cover it and in that same unit test I'll add tests for the kUnknown case.

ah thx for the clarification marc

@cramja I was wondering if we could upcast int to double when doing such comparisons. I believe we support so in TypedValue comparisons.

LGTM. Thanks @marc! Merging.


turn json objects into smaller serialized structure (keys into queries params)

Blocked by https://github.com/kernelci/dashboard/issues/658


Can't publish assets on windows.

Current bug in asset publish module https://github.com/websight-io/starter/issues/163
Description
When publishing assets the path to asset original image has a colon in it jcr:content/renditions/original.jpg. This is invalid on Windows.
As far as sling is concerned jcr:content and _jcr_content are interchangeable.
Steps to reproduce

Add a new asset
Publish it
Check logs for errors

Expected behavior
When publishing an asset published path should have jcr:content replaced with _jcr_content.
WebSight CMS version
1.12.0
Desktop (please complete the following information):

OS: windows

done.


opera: 50.0.2762.45 -> 53.0.2907.99

Motivation for this change

Updates opera to the latest version available (fixes #40780)
Use gnome3 package set for gconf (see #39976)
Needs at-spi2-atk now

Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[x] Fits CONTRIBUTING.md.

No attempt on aarch64-linux (full log)
The following builds were skipped because they don't evaluate on aarch64-linux: opera
Partial log (click to expand)

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.

No attempt on x86_64-linux (full log)
The following builds were skipped because they don't evaluate on x86_64-linux: opera
Partial log (click to expand)

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.


Module: Numbers

The package I want to suggest the idea to: AngouriMath.FSharp
Conversions
asComplex, asReal, asRational, asInteger (What to do when casting is impossible?).
Functions
re, im for real and imaginary part of a complex number. It takes an Entity and inside applies asComplex.
num, den for numerator and denominator of a rational number. It takes an Entity and inside applies asRational.

Bruh, now we have Honk#'s Downcast<>, so it becomes even more useless


Fix unintended data modification when redacted environment variables

When I did the change to redact environment variable values in policy engine error messages, I create a "false positive error message" bug.
If any policy check were to be denied that involved environment variables in the check, then environment variables would be listed as a cause even if they weren't. This was because the previous redacting code was changing the data object used to determine the errors.
The updated data object had the redacted environment variables which would never match so all error messages would include that the envs were invalid.
This commit fixes that issue but creating a new object when redacting, the original object is still used to data checking and if redaction has been done, the new data object is used for generating the error message.
The current test system makes this somewhat hard to test for. I will be adding tests to cover "false positive error messages" in the not so distant future. In the meantime, this commit addresses the bug before it makes to production.
Signed-off-by: Sean T. Allen<EMAIL_ADDRESS>

I also made the same mistake when writing the scrubbing portions...

I felt very "DUR" when I found this.


[4.0] [Constraint solver] Fix Swift 3 compatibility issue with overloaded o…

…perators.
Recent changes to the stdlib resulted in some expressions involving
literals and operators that have both generic and non-generic overloads
to become ambiguous. The ambiguity is due to an old performance hack in
the solver which unfortunately needs to remain in place at the moment to
avoid regressing expression type checker performance.
This commit changes the performance hack a bit in that instead of
stopping visiting the options in a disjunction as soon as we have a
solution involving non-generic operators and come across a constraint
involving generic operators, we instead continue visiting the elements
in the disjunction, but just skip over the generic operators.
Fixes rdar://problem/31695865 and rdar://problem/31698831.
(cherry picked from commit 44882d2d2abda8508b92a7ff713d67a85137c6b6)

@swift-ci Please smoke test

@swift-ci Please test

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - 4a04c7b554f32a2d6f9cef61a778d01063f9466f
Test requested by - @rudkx

@swift-ci Please test Linux platform

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - 4a04c7b554f32a2d6f9cef61a778d01063f9466f
Test requested by - @rudkx

@eeckstein Erik, the failure in my Linux PR testing for the swift-4.0-branch looks like it's related to mangling.
Have you seen this before? Is there a change that needs to be pulled into the branch? This commit was fine on master.

@rudkx I have not seen this problem. Maybe it needs a clean build. There are some missing dependencies from  the swift compiler to foundation.

@swift-ci Please clean test Linux platform

@eeckstein Ah, thanks for the tip. I'll try that.

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - 4a04c7b554f32a2d6f9cef61a778d01063f9466f
Test requested by - @rudkx

@swift-ci Please test Linux platform

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - 4a04c7b554f32a2d6f9cef61a778d01063f9466f
Test requested by - @rudkx

@swift-ci Please test Linux platform

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - 4a04c7b554f32a2d6f9cef61a778d01063f9466f
Test requested by - @rudkx

@swift-ci Please clean test Linux platform


[FormRecognizer] Added debugger proxy to DocumentField

Please read #29013 for more context.
Before adding the debugger proxy, users needed to navigate to the correct private member (in the example below, ValueArray) to access the value of a DocumentField:

This experience is not ideal and requires knowledge about the internal implementation of the Form Recognizer SDK library.
They could also call the appropriate parsing method (in the example below, AsList) to parse the field in the debugger, and then navigate into its value:

This, however, requires users to inspect the ValueType for each field they want to debug, and then call the appropriate method in the debugger. This can be very cumbersome for nested fields, which makes the debugging experience annoying.
For this reason, we're adding a DebuggerTypeProxy attribute to the DocumentField class. It allows us to customize what properties are displayed in the debugger.

We're now hiding all the private members and displaying a property called InternalValue to make clear to users this property is hidden, but allowing them to navigate with ease. This approach has its own drawbacks, but this is just a workaround to improve customer experience for the upcoming preview. It's not a final design.

API change check
APIView has identified API level changes in this PR and created following API reviews.
Azure.AI.FormRecognizer


feat: add Dataset ACL support

Fixes b/211633697

Blocked by cl/421673680. Will update the generated client version once the CL is released.


Can't download from HACS

I've just got myself a Pulse 2 hub, and am trying to connect it to HA. This automation would be perfect, but the HACS download hangs. I can update other repositories and update HACS itself, it's just this one that hangs.

That's weird... Everything comes from GitHub in HACS, so not something I have any control over. I would suggest starting HA and see if that helps, maybe even restart the host.
GitHub does have some ratelimits, so maybe leaving it for 24 hours will be enough to get it going.
Good luck!


DigitalOcean speed test domains no longer available

The DigitalOcean domains:
speedtest-$DC.digitalocean.com
are no longer resolving.
Does anyone have an alternative that doesn't involve starting your own droplets for a simple ping test?

I would be very interested in knowing a way to speed test DigitalOcean's datacenters as well 👀


php: update build config and php package

Motivation for this change
With enable apxs2Support php automatic buildinfg with --enable-maintainer-zts
Enable build phpPackages with re2c.
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.

Remove options valgrindPcreSupport. This options not used with external PCRE
configure: WARNING: PHP is going to be linked with an external PCRE, --with-pcre-valgrind has no effect

Update buyild config. Packages autoconf, bison, flex, libtool, pkgconfig, re2c need only build php - https://www.php.net/manual/en/install.unix.php
When building directly from Git sources or after custom modifications you might also need:

autoconf: 2.13+ (for PHP < 5.4.0), 2.59+ (for PHP >= 5.4.0), 2.64+ (for PHP >= 7.2.0)
automake: 1.4+
libtool: 1.4.x+ (except 1.4.2)
re2c: Version 0.13.4 or newer
flex: Version 2.5.4 (for PHP <= 5.2)
bison:
PHP 5.4: 1.28, 1.35, 1.75, 1.875, 2.0, 2.1, 2.2, 2.3, 2.4, 2.4.1, 2.4.2, 2.4.3, 2.5, 2.5.1, 2.6, 2.6.1, 2.6.2, 2.6.4
PHP 5.5: 2.4, 2.4.1, 2.4.2, 2.4.3, 2.5, 2.5.1, 2.6, 2.6.1, 2.6.2, 2.6.3, 2.6.4, 2.6.5, 2.7
PHP 5.6: >= 2.4, < 3.0
PHP 7.0 - 7.3: 2.4 or later (including Bison 3.x)
PHP 7.4: > 3.0

Update phpPackage event to 2.5.2
cc @etu
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Assured whether relevant documentation is up to date
[ ] Fits CONTRIBUTING.md.

@Izorkin Please add details for Determined the impact on package closure size (by running nix path-info -S before and after). What does adding re2c specifically do?

@aanderse PHP generates its lexer using re2c from the zend_language_scanner.l definition file - https://phpinternals.net/categories/lexer
running nix path-info -S error:
error: Please be informed that this pseudo-package is not the only part of
Nixpkgs that fails to evaluate. You should not evaluate entire Nixpkgs
without some special measures to handle failing packages, like those taken
by Hydra.

du -h --max=0 -c $(nix-store -qR /run/current-system) | sort -h | tail
31M     /nix/store/8nrqdc8p3pigwkzski77h8xdbpn4nxip-icu4c-59.1
34M     /nix/store/2dfjlvp38xzkyylwpavnh61azi0d168b-binutils-2.31.1
49M     /nix/store/dq7zwi5phgbdlr19l2iy3bbffhvgnilj-python-2.7.16
57M     /nix/store/fqbrwq2gvv97lb0albmfb2x212azzp46-python3-3.7.3
58M     /nix/store/vzwvfyslchj8j3xk9b1dqs8mrr1hfzd5-perl-5.28.2
78M     /nix/store/gs2w3h2bh8ijf64w76i28fdm1b9hll41-linux-4.19.48
89M     /nix/store/b4bq1q3gq4dgyhdccbfmvm6a9jzk0rzg-php-7.2.19
123M    /nix/store/wzrv1xk177p4zazzv26288c936375c23-glibc-locales-2.27
131M    /nix/store/apcaggi0q3vrb4ha1b07cjxiim2li5ly-gcc-7.4.0
1,3G    итого

after update
31M     /nix/store/8nrqdc8p3pigwkzski77h8xdbpn4nxip-icu4c-59.1
34M     /nix/store/2dfjlvp38xzkyylwpavnh61azi0d168b-binutils-2.31.1
49M     /nix/store/dq7zwi5phgbdlr19l2iy3bbffhvgnilj-python-2.7.16
57M     /nix/store/fqbrwq2gvv97lb0albmfb2x212azzp46-python3-3.7.3
58M     /nix/store/vzwvfyslchj8j3xk9b1dqs8mrr1hfzd5-perl-5.28.2
78M     /nix/store/gs2w3h2bh8ijf64w76i28fdm1b9hll41-linux-4.19.48
89M     /nix/store/i5my5kp5mvq31qa1gf4c9j9ji7c068wf-php-7.2.19
123M    /nix/store/wzrv1xk177p4zazzv26288c936375c23-glibc-locales-2.27
131M    /nix/store/apcaggi0q3vrb4ha1b07cjxiim2li5ly-gcc-7.4.0
1,3G    итого

@Izorkin Why are you looking to generate the parsers with re2c? What functionality is missing that gets added? I've noticed several times when compiling libraries the warning that re2c is unavailable but I don't know what adding it does.

@aanderse PHP generates its lexer using re2c from the zend_language_scanner.l definition file - https://phpinternals.net/categories/lexer

@Izorkin I understand what a lexer is. I'm familiar with re2c. It is a great piece of software.
I'm asking what features are missing from php without having re2c available?

@aanderse i do not know. I just removed the message varning.

It would be nice to know what value having re2c available at build time provides before this gets merged in my opinion.

Is there an option how to check?

Maybe the documentation explains.
I'll mention that I've seen this same warning not just in NixOS but Debian as well. Possibly RedHat, though I'm not certain on that.

If we don't see any benefit of including this, like feature, performance or security wise I don't see any point in including it.
And warnings during compilations of software is not uncommon, it happens on every distro everywhere because of different versions of libs, compilers, kernels, headers, etc. It happens everywhere. So just to silence warnings is not a good enough reasons to me.

re2c is already in use when building
https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/interpreters/php/default.nix#L62
I removed the re2cSupport option and transferred re2c to nativeBuildInputs

Found information - https://grokbase.com/t/php/php-internals/0832kd02zs/rfc-replace-the-flex-based-scanner-with-an-re2c-1-based-lexer
Packages re2c replace flex lexer.

@GrahamcOfBorg build php71 php71Packages.composer php71Packages.event php72 php72Packages.composer php72Packages.event php73 php73Packages.composer php73Packages.event

Found information - https://grokbase.com/t/php/php-internals/0832kd02zs/rfc-replace-the-flex-based-scanner-with-an-re2c-1-based-lexer
Packages re2c replace flex lexer.

Now that's a good reason and good resource, thanks. I just want to see that it all builds on all platforms first :)

Thanks!


Allow custom categories

It would be nice to allow having any category.
Each category can have a keyword (bug/misc/doc/removal) which should not contain spaces or dots.. etc
Each category should have a human readable text
Each category should have an order ... but the order part can be implemented in a separate ticket

This'll be part of the next release...


ISS #23

英文真的好差，不会写。
Not promise to not Compile Error because I don't have configure it(so diifficult).
The one hundred percent correct code is here(in WCH-fate.cpp),soorrry forr it.
https://github.com/Daijianghao/Web-Class-Helper-fate

Because of the latent wide characters output problem, this pull request will close until about WCH version 2.1.0 (Wide character support).


EthStorage Devs Meeting #56 Agenda

Meeting Info

Nov 14, 2023, 10:00 UTC+8
Duration: 60 minutes
Meeting link
Anyone can comment on the agenda where they would like this to be discussed.

Agenda

Protocol/App/Research progress

Devnet-1 testing started
Celestia research - in progress
Code review

EthStorage -- sync

Fix issues (https://github.com/ethstorage/es-node/pull/67, https://github.com/ethstorage/es-node/pull/77)
Performance

performance analysis: (https://github.com/ethstorage/es-node/issues/73)
benchmark: https://github.com/ethstorage/es-node/pull/2 update code.
run on multiple machines with mock l1 (https://github.com/ethstorage/es-node/pull/21)

Dashboard (next): https://github.com/ethstorage/es-node/issues/43 (debug and test it), add a new dashboard server to provide metrics data add contract report.

productize zkwasm segmentation https://github.com/ethstorage/zkWasm/commit/dae13e5300fcc6977f9cdfd8ecd3695e27038f41
share zkGo in Whale Dao community


Infinite startup loop for npm project in VS Code Dev Containers

VSCode Version:

Local OS Version:

Reproduces in: <Codespaces | Remote - Containers | Both> Just remote containers - haven't tried CodeSpaces yet.

Name of Dev Container Definition with Issue:
mcr.microsoft.com/vscode/devcontainers/typescript-node:0-14-buster

Steps to Reproduce:

git clone https://github.com/Azure-Samples/js-e2e-static-web-app-with-cli
cd js-e2e-static-web-app-with-cli
npm install
npm run start-app

In local VS Code, this correctly starts for dev runtimes for React and Functions. In the container, if falls into an infinite loop just continuing to spin up more dev runtimes - or at least that is what it looks like it is doing.
start.log

Moving to correct repository since this is not related to the image. //cc: @chrmarti


upgrade knip

Basically just to try out the codeowners ... seems to work! And the report format changed slightly

aaalright i pushed a commit that takes it to v5, and it didn't affect the reports at all


[WIP] Single Key Accounts.

This is a preliminary PR for https://github.com/lbryio/lbry/issues/1179

          1 Error

:no_entry_sign:
Please include a CHANGELOG entry.

          1 Message

:book:
See http://keepachangelog.com/en/0.3.0/ for details on good changelog guidelines

  Generated by :no_entry_sign: Danger

@muattiyah I'd encourage you to add this to torba instead since there is nothing LBRY specific about single address accounts, any bitcoin based currency could use it. The issue you are referencing was before torba was split off into a separate repo.

@eukreign Cool, will do.

Closed in favor of https://github.com/lbryio/torba/pull/2


triage_agent with groq

I try to use the triage_agent example with groq:
from microagent.core import Microagent
from microagent.types import Agent
from microagent.repl import run_demo_loop

# Check if GROQ_API_KEY is set in the environment
if "GROQ_API_KEY" not in os.environ:
    raise ValueError("GROQ_API_KEY environment variable is not set. Please set it before running this script.")

# Initialize Microagent with Groq as the LLM provider
client = Microagent(llm_type='groq')

# Start of new agent section
def process_refund(item_id, reason="NOT SPECIFIED"):
    """Refund an item. Refund an item. Make sure you have the item_id of the form item_... Ask for user confirmation before processing the refund."""
    print(f"[mock] Refunding item {item_id} because {reason}...")
    return "Success!"

def apply_discount():
    """Apply a discount to the user's cart."""
    print("[mock] Applying discount...")
    return "Applied discount of 11%"

triage_agent = Agent(
    model="llama-3.1-70b-versatile",
    tool_choice="auto",
    name="Triage Agent",
    instructions="Determine which agent is best suited to handle the user's request, and transfer the conversation to that agent.",
)
sales_agent = Agent(
    model="llama-3.1-70b-versatile",
    tool_choice="auto",
    name="Sales Agent",
    instructions="Be super enthusiastic about selling bees.",
)
refunds_agent = Agent(
    model="llama-3.1-70b-versatile",
    tool_choice="auto",
    name="Refunds Agent",
    instructions="Help the user with a refund. If the reason is that it was too expensive, offer the user a refund code. If they insist, then process the refund.",
    functions=[process_refund, apply_discount],
)

def transfer_back_to_triage():
    """Call this function if a user is asking about a topic that is not handled by the current agent."""
    return triage_agent

def transfer_to_sales():
    return sales_agent

def transfer_to_refunds():
    return refunds_agent

triage_agent.functions = [transfer_to_sales, transfer_to_refunds]
sales_agent.functions.append(transfer_back_to_triage)
refunds_agent.functions.append(transfer_back_to_triage)

run_demo_loop(triage_agent, llm_type='groq', debug=True)

That seems to work more or less with the llama-3.1-70b-versatile model.
May I ask you to add a working groq example of the swarm "triage_agent" to your examples folder?

Sure, let me see if I can port over their example.

Added

Added


Formatter: TypeAlias

See PEP 695 for details on this python 3.12 feature. Not to be confused with typing.TypeAlias of python 3.10. The goal is to format statements in the form:
# TypeAlias
type ListOrSet[T] = list[T] | set[T]

Technically probably best to implement formatting for type parameters on functions and classes first as the implementation for that will need to be reused here.

Technically probably best to implement formatting for type parameters on functions and classes first as the implementation for that will need to be reused here.

I changed the issue to cover both.

i meanwhile had made a new issue: https://github.com/astral-sh/ruff/issues/5931

i meanwhile had made a new issue: https://github.com/astral-sh/ruff/issues/5931

Oh I'm sorry. I defer the decision on whether to revert my changes or close this issue to you.

i've reverted, i think they'll require two separate PRs


himalaya flags panics

Running the flags command, himalaya panics no matter what other arguments I pass.
Version 0.4.0 downloaded from GitHub Releases
❯ RUST_BACKTRACE=1 himalaya flags add 1 Seen
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/msg/cli.rs:186:54
stack backtrace:
   0: rust_begin_unwind
             at /rustc/9bc8c42bb2f19e745a63f3445f1ac248fb015e53/library/std/src/panicking.rs:493:5
   1: core::panicking::panic_fmt
             at /rustc/9bc8c42bb2f19e745a63f3445f1ac248fb015e53/library/core/src/panicking.rs:92:14
   2: core::panicking::panic
             at /rustc/9bc8c42bb2f19e745a63f3445f1ac248fb015e53/library/core/src/panicking.rs:50:5
   3: himalaya::msg::cli::msg_matches_list
   4: himalaya::msg::cli::msg_matches
   5: himalaya::main

❯ cat /etc/os-release
NAME="void"
ID="void"
DISTRIB_ID="void"
PRETTY_NAME="void"

❯ uname -r
5.11.22_1

The flags command seems to be badly interpretted (the error points to the list command). I will investigate and let you know!

This issue should be fixed by the incomming refactor. I let you know!

Fixed in the v0.5.0 :tada:


Small typo in the README.md file

There is a minor typo that is easy to fix. Just under Monitor Docker heading, the second sentence.
It says:  It can connected to the Docker...
I believe that it should be:  It can connect to the Docker...

Thanks for reporting it, I will fix in my next pull request of the README.


Programatically access Configuration Cache Report

Expected Behavior
I would like to programatically access the configuration cache report (projectDir/build/reports/configuration-cache/<hash1>/<hash2>/configuration-cache-report.html). By "access", I mean at a minimum that during a build I know what the file path is or will be for the report. This requires either an API for getting this file path, or an API for getting the value of the two hashes used in the report's file path.
Current Behavior (optional)
I cannot find any API or discussion or documentation related to this. I may need to scan the reports directory at different times and see when new files are added. I don't know if this will work.
Context
Rather than printing to the console the location of the configuration cache report, I need to copy it to a different location.

This feature request is in the backlog of the relevant team and is prioritized by them.