strictNullChecks: Object property of class is wrongfully claimed to be possibly undefined

TypeScript Version:  2.8.0-dev.20180210
Search Terms: TS2532
Code
ts2532-test.ts:
type SomeMap<T> = {
  [P in keyof T]: PropertyMap<T, T[P]>
}

type SomeMapper<T> = (map: SomeMap<T>) => void

export default class PropertyMap<T, P> {
  asObject(map: SomeMapper<P>): void {
    map({ street: "street" } as any)
  }
  asString(): void { }
}

class Mapper<T extends object> {
  constructor(map?: SomeMapper<T>) {}
}

class SomePerson {
  name?: string
  address?: { street?: string }
}

class SomePersonMapper extends Mapper<SomePerson> {
  constructor() {
    super(map => {
      map.name.asString()
      map.address.asObject(propMap => {
        propMap.street.asString() // propMap: Error:(28, 9) TS2532: Object is possibly 'undefined'.
      })
    })
  }
}

const mapper = new SomePersonMapper()

tsc --strictNullChecks ts2532-test.ts
Expected behavior:
"propMap" is never undefined.
Actual behavior:
ts2532-test.ts(28,9): error TS2532: Object is possibly 'undefined'.
Playground Link: https://www.typescriptlang.org/play/#src=type SomeMap<T> %3D {
  [P in keyof T]%3A PropertyMap<T%2C T[P]>
  }

type SomeMapper<T> %3D (map%3A SomeMap<T>) %3D> void

export default class PropertyMap<T%2C P> {
  asObject(map%3A SomeMapper<P>)%3A void {
    map({ street%3A "street" } as any)
  }
  asString()%3A void { }
}

class Mapper<T extends object> {
  constructor(map%3F%3A SomeMapper<T>) {}
}

class SomePerson {
  name%3F%3A string
  address%3F%3A { street%3F%3A string }
}

class SomePersonMapper extends Mapper<SomePerson> {
  constructor() {
    super(map %3D> {
      map.name.asString()
      map.address.asObject(propMap %3D> {
        propMap.street.asString() %2F%2F propMap%3A Error%3A(67%2C 9) TS2532%3A Object is possibly 'undefined'.
      })%0D%0A%20%20%20%20%7D)%0D%0A%20%20%7D%0D%0A%7D%0D%0A%0D%0Aconst%20mapper%20%3D%20new%20SomePersonMapper()
Related Issues:

This error is correct. The type of propMap is taken from the type of SomePerson.address, which is indeed allowed to be undefined because it's optional.

@RyanCavanaugh
I believe you, but I'm trying to understand it. Why is "address" in "map.address" not detected as "TS2532: Object is possibly 'undefined'."

@jacobmadsen There's a long thread on the topic of removing optionality in #15012. The Required<T> at the bottom of the thread does the job but still isn't quite right since it doesn't consider Required<T> to be assignable to T. We're looking at ways to address this.
Meanwhile, in alternative strategy for your problem would be to start with types containing properties that are not optional and then add optionality as appropriate (since it is easy to do so).

@ahejlsberg Thank you. I believe its enough to make a workable solution to my problem.

Counter-argument: "foo" in bar doesn't mean the same thing as foo.bar !== undefined - I checked #15012 and didn't see an argument about why this is TS's behavior in the first place, and didn't see any discussion about this logic in the design notes here (though optional properties pre-date undefined type).
For example, with the new in guard, the following should work:
declare const x: { y?: number };

if ("y" in x) {
    const y: number = x.y;
}

but currently fails with undefined is not assignable to number. Of course, that means that x.y = undefined must not be legal, so perhaps the compat cost is too high.
Of course, the type of (rvalue) x.y should (absent type guards) still be number | undefined, but that's a property access expression type, not a property type,

Is it the same issue? Why is car1 fine but car2 gives an error?
// strictNullChecks: true

interface Car {
  wheels?: number[];
}

const car1: Car = {}
car1.wheels = []; // set property outside of object literal

const numWheels1 = car1.wheels.length; // no error

const car2: Car = {
  wheels: [],
}

const numWheels2 = car2.wheels.length; // Error: object is possibly undefined.


Skip RecalibrateBam step in more situations; make skippreprocessing work

Only a defined list of tools triggers the recalibrated BAM to be created.
Previously, we would check only whether HaplotypeCaller is the only tool
being run, but that is too restrictive. Now, the RecalibrateBam step is
also omitted with --tools=HaplotypeCaller,MultiQC, for example.

Interesting.
I like this idea

One change in behavior, see also what the tests do: If you do not specify any --tools that actually require a recalibrated BAM, then no recalibrated BAM is generated, for example with --step=recalibrate --tools=MultiQC

Is it OK to merge?

Yes! ... if you are aware of my previous comment that --step=recalibrate without anything else will no longer generate a recalibrated BAM.

ok, so maybe think about that in #356 and rename recalibrate also ?

I think the name is still fine: If --tools= is used with any of FreeBayes, MuTect1, MuTect2, etc., then the recalibrated BAM is still generated. And even with --tools=HaplotypeCaller, the recalibration is still done, it’s just that the BAM is not generated.


feat: added refresh token

📋 Description
Adding a JWT refresh token, In the current situation there is no refresh token for the users, they have to continuously authenticate them selves after 20min of expiration of the token
🔨 Changes Made

✅ Checklist
Before submitting the PR, please make sure you have completed the following:

[X] I have followed all the guidelines mentioned in CONTRIBUTING.md.
[X] My code follows the style guidelines of this project.
[X] I have performed a self-review of my own code.
[X] I have commented my code, particularly in hard-to-understand areas.
[X] I have made corresponding changes to the documentation (if applicable).
[X] I have tested it locally and it works fine.
[X] Any dependent changes have been merged and published in downstream modules.

🏷 Types of Changes
What type of changes does your code introduce? (Check all that apply)

[X] Bug fix (non-breaking change which fixes an issue) 🐛

[X] New feature (non-breaking change which adds functionality) ✨

[ ] UI enhancement (non-breaking change which enhances UI) 🎨

[ ] Documentation update 📚

Fixes #105

📸 Screenshots (if applicable)

Thank you for contributing to Research Nexus! We look forward to reviewing your PR and getting it merged!

Will review Your PR shortly


Minor cosmetic issue...

I've noticed that VM's preview image always don't fit and creates black bar on the sides.
I mean... it's really minor cosmetic issue and you guys are probably busy solving REAL technical bugs.
I know It shouldn’t irritate me, it shouldn’t... but it doesn't feel right.

another option would be to fill the entire preview thing with the image of the VM without stretching.
that way, the dock on the macOS VM wouldn't really be shown, or actually, some part of the screen is missing.


Invisible button labels on macOS dark mode

On macOS, when system-wide dark mode is enabled, all button labels have invisible text as seen here:

When buttons are clicked, the text is visible in white:

With dark mode disabled, the buttons appear normal.

Unfixable.  This is a bug with tk on mac.

https://stackoverflow.com/questions/52529403/button-text-of-tkinter-does-not-work-in-mojave

This appears to be fixed on Catalina. We should still leave this issue open, because Mojave is not unsupported.


DoubleChecker, type metas, temporarily disabled constructor telescope checks and prop checks, LittleTyper now only synthesizes, ty no longer returns the sort, etc.

What's done is basically in the title. Leftovers (planned in future PRs):

Reimplement Prop checks, including non-Prop metas and impredicativity.
Implement isType judgments in Synthesizer. Currently we're not checking it.
Cleanup TODO[isType].

bors r+


🐛 BUG: R2ObjectBody body ReadableStream not valid for put parameter

Which Cloudflare product(s) does this pertain to?
R2
What version(s) of the tool(s) are you using?
3.20240725.0
What version of Node are you using?
20.13.1
What operating system and version are you using?
Mac Sonoma 14.6
Describe the Bug
Observed behavior
    const current = await env.BUCKET.get('source.html');
    const update = await env.BUCKET.put('dest.html', current.body);

Raises error: TypeError: Provided readable stream must have a known length (request/response body or readable half of FixedLengthStream)
Expected behavior
No error should be raised. Documentation indicates that body of R2ObjectBody is of type ReadableStream. Also that the put operation accepts a ReadableStream for the value.
Steps to reproduce
Please provide the following:
See Gist
Please provide a link to a minimal reproduction
https://gist.github.com/bstopp/f1f9fcdeefee94d9f1f451fa374f9273
Please provide any relevant error logs
No response

Hi bstopp,
Can you please try this
async function readStream(stream) {
  const reader = stream.getReader();
  const decoder = new TextDecoder();
  let result = '';

  try {
    while (true) {
      const { done, value } = await reader.read();
      if (done) {
        break;
      }
      result += decoder.decode(value, { stream: true });
    }
  } catch (error) {
    console.error('Error reading stream', error);
  } finally {
    reader.releaseLock();
  }

  return result;
}

const current = await env.BUCKET.get('source.html');
if (!current.body) {
  console.log('No body found in source.html');
  return
}

const body = await readStream(current.body);
console.log('Body:', body);
const update = await env.BUCKET.put('dest.html', body);

@rameardo  - I'm not sure what benefit that solution has over what I've already implemented:
    const current = await env.BUCKET.get(key);
    const text = await current.text()
    const update = await env.BUCKET.put('other.html', text);

That it is possible to read the content into memory then, use that string as the parameter isn't the intent of this issue.
The API specifies a ReadableStream is a valid input. The body attribute of an R2ObjectBody is a ReadableStream, therefore I should be able to have the put operation perform the streaming from source to destination.

It should be noted that i tried to pass the size of the ReadableStream via the HTTP Meatadata options:
    const key = 'index.html';
    await env.BUCKET.put(key, 'Original Content');
    const current = await env.BUCKET.get(key);
    const { size } = current;
    assert.strictEqual(size, 16);
    const update = await env.BUCKET.put('other.html', current.body, { httpMetadata: { contentLength: size } });

This also did not work.


Option to make maqam scales

I would like to experiment with maqamat, and Scale Workshop seems like a good tool for that. But I need to set every scale manually. I would like to be able to generate maqam scales easily like how I can generate f. e. MOS scales.
AFAIK, maqam scales are composed from genera (jins), so I would like to be able to select some genera and get a scale from them.
I would like also to select a temperament for the maqam (like an EDO or a specific just intonation), but I do not know how exactly maqamat manifest in different temperaments. So I would like that someone knowledgeable of maqamat would let me know what makes sense in this case.

Marking as "help wanted" as I'm not an expert in maqam construction.
Meanwhile you may find New scale -> Stack steps of Scale Workshop 3 useful. Make a collection of jins in a notepad application using relative steps and combine them using copy & paste in SW3.


Uploading a document

I'm currently using this library to integrate my Odoo based ERP system with shopware.  So far, it is working great.
However, I'm now trying to figure out how I can upload the PDF invoices as shopware 'documents', and it seems it is not possible via this library:

I don't see a way to override the Contet-Type that is sent in POST requests.  the _get_header() method always returns application/json.
I don't see how I could post non-JSON data as the use of json.dumps(payload) is hard-coded in the _request() method

The REST API reference for this can be found at https://shopware.stoplight.io/docs/admin-api/b3A6MTMzMTcwNzM-upload-a-file-for-a-document
Do you have any thoughts how you'd want to support this feature? I would assume that a base API module should ideally be flexible/generic enough to do anything the shopware6 API offers.

IC. Should be easy to implement, let me look into it in the next few days ...
thanks for the report !
yours sincerely
Robert

Thank you.

I found a third problem: To use this upload feature, you also need to pass along query parameters for the mandatory extension parameter (e.g. 'pdf').
There's currently no way (unless I missed it) how a higher-layer function/method can pass query parameters (requests.post params argument).

diggah, check v2.0.8, should be done.
yours sincerely
Robert

uh - ah - missed the parameters - sow it too late ...

ok, check https://github.com/bitranox/lib_shopware6_api_base/releases/tag/v2.0.9
should be complete now.
let me know
yours sincerely
Robert


Create automatic publish to PyPi via GitHub actions

If you're busy, you may want to consider this method of publishing to PyPi just to get patches out of the way. Just create a PyPi token on the site for this package, put it in your GitHub secrets with the name PYPI_PASSWORD, and your all set.
That way, you can just create a release via the GitHub website in a couple clicks and be on your way. Makes publishing easier i.e. #236

Closing; created in 5f86c4f428fabfa31d72b188e7dfc1d4ba57f151


The assets folder is missing in flutter module project's aar file when I upgraded to version 0.11.3

Steps to Reproduce
In the flutter module project

run git checkout v0.11.3 upgrade the flutter to version 0.11.3
run flutter doctor
run ./gradlew flutter:assembleDebug  in the .android directory
the flutter-debug.aar archive file in .android/Flutter/build/outputs/aar/. missed the assets folder

flutter doctor -v
[✓] Flutter (Channel unknown, v0.11.3, on Mac OS X 10.13.6 17G2208, locale zh-Hans-CN)
    • Flutter version 0.11.3 at /Users/kk/flutter
    • Framework revision 72bf075e8d (4 days ago), 2018-11-09 20:36:17 -0800
    • Engine revision 5646e86a6f
    • Dart version 2.1.0 (build 2.1.0-dev.9.3 9c07fb64c4)

@Hixie

@Hixie
Can you reproduce it?

Use './gradlew assemDebug' instead of './gradlew flutter:assembleDebug' in the .android directory.

It works


Add stale .github workflow

Issue Addressed
Discussed in #84
The bot is added but the implementation is missing
Description:
More about stale bot https://github.com/probot/stale
Testing:
N/A
Checklist

[x] I have commented the newly added code
[ ] I update the Readme.md file to include the new changes to the project
[ ] All the previously included Unit Tests passed in all the cases

@Ma7eer I don't have a permission. so please when you have a time review this PR

@w7shdev once you fix the typo mentioned I will do one more review


Refactor of createOrder function

The objective of this PR is to refactor the function createOrder in
meaningful portions of code.
Some things to consider about this function are:

Heavy use of flags.
Duplicated parameters.
Duplicated code.

Changes:

All the logic to build the description field was moved to its own function.
Parameters buyer and seller removed in favor of user parameter.

Flags on ternary operators removed due to this change.

New paymentAction variable to increase shared code in description build for
buy and sell orders.
Repeated code to set description in buy and sell orders was joined and
only the disjoint fields were left in the conditional logic.

Things to consider:

priceFromAPI carries redundant information already present in the amount
parameter, but its readability was preferred over the number of parameters and
data duplication.
Although buildDescription is a new and different function, its utility is
totally related to createOrder. The objective of these changes is to
separate and derive sub tasks in code. It was not created to reuse in other
parts of the code. Hence its private character.

Great job! thanks
tACK


Hulu streaming service

Details

Service Name: Hulu
Service URL: https://www.hulu.com
Is it region-locked? If yes, to what region? Yes, US
Does it have a free version / trial? Yes

Additional Information

+1 to this!

I did some poking around and cannot see an obvious "watched history" screen / API for Hulu.  They kind of hide that type of data

Is this still not doable? I use Hulu more than any other service

They don't have an API, but it's possible to get a PDF with a watch history through their profile page.
It should be possible to do an offline scrobble with that I think.


Update item

Need to be tested. Create from the Create item endpoint.

Thank you!!!

Thanks!
I just make a mistake in folder name (missing -)
De : Chris Matthieu<EMAIL_ADDRESS>Envoyé : 4 mars 2017 20:35
À : octoblu/endo-podio
Cc : jicihome; Author
Objet : Re: [octoblu/endo-podio] Update item (#1)
Thank you!!!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/octoblu/endo-podio/pull/1#issuecomment-284198181, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AY93m8ZUwgYJ9IUwqC5e-g64dWvImjWgks5rihE5gaJpZM4MS_eW.


Add new foods

Give the user the ability to add foods or meals that aren't listed in our database

These foods will be specific to the account that created them (someone who eats an exotic fruit or veggie every morning, for instance)

We decided against implementing this


feat(iroh)!: Blob batch PR, attempt 3

Description
This is the third attempt to add a batch API for adding blobs. Previous one was https://github.com/n0-computer/iroh/pull/2339
The basic idea is the following: all changes to the store happen in the context of a batch. All write operations within a batch produce temp tags. These temp tags are scoped to the batch and keep the data alive as long as the batch exists.
At some point, the API user has to upgrade one or more temp tags to permanent tags.
All non-batch operations would long term be implemented in terms of batch operations.
In a second step, the following rpc calls would be replaced by their batch equivalent.

AddStream
AddPath
CreateCollection

The third one is very nice, since it means that the notion of a collection (as in a special kind of hashseq) no longer has to even exist in the node code.
Breaking Changes

iroh::client::blobs::BlobStatus has a new case NotFound
iroh::client::blobs::BlobStatus::Partial: size is now a BaoBlobSize instead of a u64

All other public changes are adding of new APIs.
Notes & open questions
Note: in the previous version I had an optimisation to avoid storing TempTags in the case where there are multiple TempTags with the same hash. I removed this to keep things simple. We can add it back later.
Change checklist

[ ] Self-review.
[ ] Documentation updates following the style guide, if relevant.
[ ] Tests if relevant.
[ ] All breaking changes documented.

I would be curious what you think of the API.

I admit, after looking at it a little more, I'm somewhat surprised by the TempTag API combined with the Batch. I guess I had a more limited API that's more tailored to creating Collections or HashSeqes in mind, something like this:
pub struct Batch;

pub async fn iroh::client::blobs::Client::batch() -> Result<Batch>;

pub async fn iroh::client::blobs::Batch::push_bytes(&self, name: String, bytes: impl Into<Bytes>) -> Result<()>;
pub async fn iroh::client::blobs::Batch::push_file(&self, name: String, path: PathBuf) -> Result<u64>
pub async fn iroh::client::blobs::Batch::push_dir(&self, name: String, root: PathBuf) -> Result<()>
// [...]
pub async fn iroh::client::blobs::push_dir_with_opts(
    &self,
    root: PathBuf,
    opts: AddDirOpts,
) -> Result<()>;
// [...]
pub async fn iroh::client::blobs::Batch::commit(&self) -> Result<Tag>; // maybe even taking an owned `self`?
pub async fn iroh::client::blobs::Batch::commit_to(&self, tag: &Tag) -> Result<()>;

So this would commit the batch to be a Collection, and you wouldn't surface the concept of TempTags to the user at all.
But it's also more limited, so a classic complexity vs. expressiveness issue.
Thoughts?
Perhaps it makes sense to investigate some use-cases to see if the added expressiveness is worth it. "Importing the linux kernel" is definitely one.

I would be curious what you think of the API.

I admit, after looking at it a little more, I'm somewhat surprised by the TempTag API combined with the Batch. I guess I had a more limited API that's more tailored to creating Collections or HashSeqes in mind, something like this:
impl iroh::client::blobs::Client {
  pub async fn batch() -> Result<Batch>;
}

impl iroh::client::blobs::Batch {
  pub async fn push_bytes(&self, name: String, bytes: impl Into<Bytes>) -> Result<()>;
  pub async fn push_file(&self, name: String, path: PathBuf) -> Result<u64>;
  pub async fn push_dir(&self, name: String, root: PathBuf) -> Result<()>;
  // [...]
  pub async fn push_dir_with_opts(
    &self,
    root: PathBuf,
    opts: AddDirOpts,
  ) -> Result<()>;
  // [...]
  pub async fn commit(&self) -> Result<Tag>; // maybe even taking an owned `self`?
  pub async fn commit_to(&self, tag: &Tag) -> Result<()>;
}

So this would commit the batch to be a Collection, and you wouldn't surface the concept of TempTags to the user at all.
But it's also more limited, so a classic complexity vs. expressiveness issue. Thoughts?
Perhaps it makes sense to investigate some use-cases to see if the added expressiveness is worth it. "Importing the linux kernel" is definitely one.

(I would prefer the concept of a collection to be just a tiny sliver in the client)
The above proposal assumes that you always want to create exactly 1 collection or HashSeq, but e.g. it is possible that you want to create multiple individually tagged blobs or hashseqs in a batch.
The long term idea is that even interactions with the network that modify the local store will happen in the context of a batch, so you will be able to use temp tags.
Imagine traversing a dag. You get a blob, parse it for links, get another blob, parse it for links, finally find what you have been looking for, then assign a permanent tag. This would be easily expressible using the API using temp tags.

Okay. I'm convinced the additional expressiveness is worth it.
One thing I'd really like to change is the naming of Batch::upgrade, though. Can we switch it to something like make_permanent or commit? Or something else if there are other suggestions.
Upgrade only makes sense once I've read the docs for Tag and TempTag, looked at the Batch::upgrade signature and compared the two items in my head.
And if I'm looking for ways to make my temporary changes permanent, I end up skipping a function name like upgrade in my mind.

Okay. I'm convinced the additional expressiveness is worth it.

Glad I convinced you.

One thing I'd really like to change is the naming of Batch::upgrade, though. Can we switch it to something like make_permanent or commit? Or something else if there are other suggestions.

Agree that upgrade is not great. Maybe persist? I mean, a temp tag is purely in memory while a named tag is persistent in the database.

Yes to persist in favor of upgrade

Ok, renamed. So here is the batch API: https://n0-computer.github.io/iroh/pr/2545/docs/iroh/client/blobs/struct.Batch.html


Add cpu_model and cpu_fallback.

This allows for specific CPU selection and enforcement when cpu_mode =
custom, which is important when emulating CPUs of different architecture
than the host.

Yeah, I'm running into a lot of issues to get ARM support ready. Let's not merge this yet, I will add this to another series of commits.


Question: How to force load cells?

Currently, using loadCells() will discard some columns if the first cell in the column is empty. Example below:

doing await sheet.loadCells('A1:C4'); would only load the first 2 columns. How do I force load all cells that I have specified to load?
Code:
await sheet.loadCells('A1:C4');
const sheetData = await sheet.getRows();
for (const row of sheetData) {
  console.log(row._rawData)
}

Output:
[ "ID", "NAME" ]
[ "1", "Name 1" ] // Missing "Other cells"
[ "1", "Name 1" ]
[ "1", "Name 1" ]

interesting, I'll have to check this out... thanks for reporting it!


Update Intro Video

To the latest Mark Sandusky creation:
https://www.youtube.com/watch?v=ZIGUC9JAAw8

I don't know who wrote the script, but they shouldn't call Ethereum addresses "public keys". "Address" makes more denotative sense for new users also, so you don't gain anything with this misnomer.


Bump grunt-contrib-uglify version

Please bump grunt-contrib-uglify to avoid this issue:
https://github.com/gruntjs/grunt-contrib-uglify/issues/298
<EMAIL_ADDRESS>seems to be working fine with node 4.0

It's also possible to fix this by changing Gruntfile.js
From:
thirdparty :{
                options: {
                    compress: true

To:
thirdparty :{
                options: {
                    compress: false

Hi @drasko and @edent
Thank you both for your comments.  This should be fixed with 96c8da8eb6aa923c966b9c9b62949cc47e9d5048
Please verify.

Looks good :smile:


feat: add additional variables and outputs for spa-s3-cloudfront

what

add origin_bucket variable
add s3_origins variable
add cloudfront_distribution_identity_arn output

why

Add variables and outputs present in the cloudposse/terraform-aws-cloudfront-s3-cdn module but missing in this component

references
N/A

Please note, this doesn't allow custom_origin_config... As long as you're confident that only s3 needs to be supported, I'd say go right ahead.

So actually, we already have var.custom_origins handling that
https://github.com/cloudposse/terraform-aws-components/blob/671f4db5512133515e71f4fc739291a763142f4c/modules/spa-s3-cloudfront/main.tf#L131


Long Context

I am trying to adapt Llama3 for long context, is 128k. I am training on a v5-256, and are trying to follow the procedure explained in https://arxiv.org/pdf/2407.14482. Basically this states:
 We set the batch size to 32 to fit 4 million tokens in a batch and use a learning rate of
3e-5 to train 2000 steps (8B tokens in total).

I have prepared a dataset with 128k context, using the HF dataset. (Thanks @aireenmei).
My challenge is however that setting per_device_batch_size=1 gives me a global batch size of 256. This is way too high, and I get OOM errors. I want to split batches across devices. I attempted setting num_pipeline_microbatches=8but this does not seem to work.
Are there other ways of accomplishing this? I understand gradient accumulation is not implemented (and I am not sure if it will work here).

Have you tried setting per_device_batch_size<1 ?
See this example in our unit test: https://github.com/google/maxtext/blob/main/.github/workflows/UnitTests.yml#L102-L103

Thanks. I did not notice this. I will test.

@aireenmei. Took a while for me to be able to test this, since my tpus was busy with other stuff. Yes, it works! I struggled a to be able to get the mesh correct, but these are the settings that I think will allow me to train llama3 on a v5-256 with a bs=32 as described in the article above.
max_target_length=131072
ici_fsdp_transpose_parallelism=1
ici_fsdp_parallelism=32
ici_tensor_parallelism=8
per_device_batch_size=0.25

In addition I set rope_max_timescale=150000000 in the config-file. There might be easier ways of doing this, but this was the only way I got it to work.
Thanks a lot for the help.

@aireenmei Took a while for me to be able to test this, since my tpu's were busy with other stuff. Yes, it works! I struggled a bit to be able to get the mesh correct, but these are the settings that I think will allow me to train llama3 on a v5-256 with a global batch size of 32 as described in the article above. This is as close as I got:
max_target_length=65536
ici_fsdp_transpose_parallelism=1
ici_fsdp_parallelism=32
ici_tensor_parallelism=8
per_device_batch_size=0.125
allow_split_physical_axes=true

I had to reduce the target length slightly. I also needed to set the allow_split_physical_axes=true. In addition I set rope_max_timescale=150000000 in the config-file.
There might be better ways of doing this, and even increasing the target_length, but this was what I was able to get working. Maybe it can help someone else.
Thanks a lot for the help.

Thank you for conforming and share your approach!


Components test

instaling and configure react native test library, optimizing tests, renderizing a component in test, debug with render, teste Id, add get and quuery,

complete


Investigate the possibility to use Automatic Differentiation in the Framework

Related issues: https://github.com/stack-of-tasks/pinocchio/pull/813 https://github.com/stack-of-tasks/pinocchio/issues/437 https://github.com/stack-of-tasks/pinocchio/issues/809
cc @traversaro @S-Dafarra

Today I tried to do test the CppAD in a simple toy problem with Eigen.
# include <cppad/cppad.hpp>
# include <cppad/example/cppad_eigen.hpp> // <--------- Required for Numtraits
# include <Eigen/Dense>

template<typename scalar>
using Vector = Eigen::Matrix<scalar, Eigen::Dynamic, 1>;

template<typename scalar>
using Matrix = Eigen::Matrix<scalar, Eigen::Dynamic, Eigen::Dynamic>;

using ADdouble = CppAD::AD<double>;

template <typename scalarVector, typename scalarMatrix>
class Foo
{
    Vector<scalarVector> x;
    Matrix<scalarMatrix> A;

public:

    void setA(const Matrix<scalarMatrix> A)
    {
        this->A = A;
    }

    void setX(const Eigen::Ref<const Vector<scalarVector>>& x)
    {
        this->x = x;
    }

    Vector<scalarVector> getMultiplication()
    {
        return A  * x;
    }
};

int main()
{

    constexpr int cols = 5;
    constexpr int rows = 5;

    Vector<ADdouble> x = Vector<ADdouble>::Ones(cols);
    CppAD::Independent(x);

    Matrix<double> A =  Eigen::Matrix<double, rows, cols>::Random();;

    Foo<ADdouble, ADdouble> foo;
    foo.setA(A.cast<ADdouble>());
    foo.setX(x);

    Vector<ADdouble> y = foo.getMultiplication();
    CppAD::ADFun<double> f(x, y);

    Vector<double> xNum = Vector<double>::Random(cols);
    Vector<double> jac = f.Jacobian(xNum);

    std::cout << "Expected Jacobian: " << std::endl << A << std::endl << std::endl;
    Eigen::Map<Eigen::Matrix<double, rows, cols, Eigen::RowMajor>> Jac(jac.data());
    std::cout << "CppAD Jacobian: " << std::endl << Jac << std::endl << std::endl;

    return 0;
}

The following code compiles and produces the expected output.
Expected Jacobian:
  0.680375  -0.604897 -0.0452059    0.83239  -0.967399
 -0.211234  -0.329554   0.257742   0.271423  -0.514226
  0.566198   0.536459  -0.270431   0.434594  -0.725537
   0.59688  -0.444451  0.0268018  -0.716795   0.608354
  0.823295    0.10794   0.904459   0.213938  -0.686642

CppAD Jacobian:
  0.680375  -0.604897 -0.0452059    0.83239  -0.967399
 -0.211234  -0.329554   0.257742   0.271423  -0.514226
  0.566198   0.536459  -0.270431   0.434594  -0.725537
   0.59688  -0.444451  0.0268018  -0.716795   0.608354
  0.823295    0.10794   0.904459   0.213938  -0.686642

Given the simplicity of the code, I was thinking that with some effort we can start supporting CppAD in our framework. This is also possible thanks to #63.
What do you think @traversaro @S-Dafarra?
It might be interesting also for @Giulero and @diegoferigo

was thinking that with some effort we can start supporting CppAD in our framework.
This should be read as: Moving to template metaprogramming

Actually checking https://github.com/stack-of-tasks/pinocchio/pull/813 I'm also really tempted to support casADi (we are already using casADi in #61).

Given the simplicity of the code, I was thinking that with some effort we can start supporting CppAD in our framework. This is also possible thanks to #63.

This is really cool @GiulioRomualdi, well done.

This should be read as: Moving to template metaprogramming

We are already moving to Eigen. If you are able to do these changes together, it is fine, otherwise, let's not mix changes too much. What would be your plan?

We are already moving to Eigen. If you are able to do these changes together, it is fine, otherwise, let's not mix changes too much. What would be your plan?

The first step to use Eigen with cppAD and CasADi we should define the [NumTraits`](https://eigen.tuxfamily.org/dox/structEigen_1_1NumTraits.html) for the scalars. Once this is done we can start to templatize the classes where we are interested in AD.
The first part is independent and it can be actually done in a few hours. The second part is more tricky. (I was thinking to open an Epic for this task and changing the title of this issue)
The task of converting the library to eigen is almost done. I should update the issue #63

The support of cppAD has been added  #78. While regarding casadi we already started to use it in the #61.
For the time being, we can close this issue.


P1 - make 'add subject' form functional

In current state, this is what the add subject form looks like

functionality almost complete still need to fix the following:

validate date field
when subject has been added successfully return to subject list page.

Making 'validate date field specific error' out of scope. Currently, in production, if the date is not in the correct format the error states, "Date of birth field is required" not "invalid date format". I will create a separate ticket to handle this and put it in a 'nice to have' list for this project. below is an image of what this currently looks like in prod.

New issue was created to track updating the react notification system. #236


How do we test if output_runner is reading the output correctly

output_runner was introduced few months ago, which is a good feature. We recently rebased iBazel from master but output_runner is broken because of https://github.com/bazelbuild/bazel-watcher/commit/add8041bfb843d5566e18b6711d88e4e10c5b699. The test for output_runner is not sufficient since we are not testing if output_runner can correctly read the log from Bazel.
My question is what is the best way to run a Bazel command in Bazel test to simulate there is a dependency issue and buildozer command is generated? And we should run the buildozer command in Bazel test to see if output_runner can fix the BUILD.bazel correctly, if possible.

@borkaehw, thanks for fixing the issue earlier today. I've added a light e2e test that validates the current functionality. If you want to expand on the tests that I have in #198 it would be greatly appreciated. I'm happy to help in any way necessary, feel free to ask.
PS: Sorry about breaking you! These e2e tests are really good at preventing breakages, but they have to exist first. Hopefully this won't happen again.

Thanks for tackling this issue so fast. The PR looks great at the first glance, I will take a deeper look later today. If it catches the issue and CI passes, that's all we want and feel free to merge it.


Add box dimensions feature

Very useful app!! It would be nice if you could add a box dimensions feature when you can see the number of pixels on each axis (the one that is saved in the xml file). Also it would be very nice if the user ccan modify the box acording to these dimensions. A dimenetion checker would also be very useful (eg. if one axis has less than N number of pixels it will pop a notification).
Machine learning with Tensorflow requires both x and y to be more than 32-33px. So this tool would save a lot of traing on crap data time!

This would be very useful! Already a great app - thank you!


probably just a file was wrong

./201012/201012A0/06122010210.jpg -> /media/HDD/FOTOS_elodie_test/2010-12-Dec/Unknown Location/2010-12-06_12-05-06-06122010210.jpg
Traceback (most recent call last):
File "/home/osmc/elodie/elodie.py", line 378, in
main()
File "/home/osmc/.local/lib/python2.7/site-packages/click/core.py", line 716, in call
return self.main(*args, **kwargs)
File "/home/osmc/.local/lib/python2.7/site-packages/click/core.py", line 696, in main
rv = self.invoke(ctx)
File "/home/osmc/.local/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/osmc/.local/lib/python2.7/site-packages/click/core.py", line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/osmc/.local/lib/python2.7/site-packages/click/core.py", line 534, in invoke
return callback(*args, **kwargs)
File "/home/osmc/elodie/elodie.py", line 141, in _import
trash, allow_duplicates)
File "/home/osmc/elodie/elodie.py", line 41, in import_file
_file = _decode(_file)
File "/home/osmc/elodie/elodie/compatability.py", line 23, in _decode
return string.decode(encoding)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc4 in position 12: ordinal not in range(128)

Duplicate of #267 and #253.
Per this comment, you might not see the problem if you're using python 3.

Duplicate of #267 and #253.
Per this comment, you might not see the problem if you're using python 3.


Add UnnecessaryRun rule

This rule takes inspiration from UnnecessaryApply rule
Fixes https://github.com/detekt/detekt/issues/6112

Messages

:book:
Thanks for adding a new rule to detekt :heart:

:white_check_mark:
We detekted that you added tests, to your rule, that's awesome!

:white_check_mark:

We detekted that you updated the default-detekt-config.yml file, that's awesome!

  Generated by :no_entry_sign: dangerJS against 593fb9fa91d10b9754cecfad430d37d0a1decd10

@cortinico @BraisGabin should we merge this PR?

Hi, @BraisGabin / @cortinico should we merge this PR? It's approved and open for very long time

Can we get a review from another @detekt/maintainers ?

Hi, @cortinico should we merge this PR since it follows the existing rule. If there is any issue we can improve around the same.(Keeping this open requires constant rebase from the main 😅)


migrateVMWithVolume: Handle migrate vm with volume where data disk is not based off a template

Description
This PR fixes the failure noticed during live migration of an instance with a data volume not based off a template. The issue is noticed on centos 8 which causes the TestKVMLiveMigration::test_test_02_migrate_VM_with_two_data_disks to fail
nosetests --with-xunit --xunit-file=results.xml --with-marvin --marvin-config=/marvin/ref-trl-320-k-M8-pearl-dsilva-advanced-cfg -s -a tags=xx --hypervisor=KVM /marvin/tests/smoke/test_vm_life_cycle.py

==== Marvin Init Started ====

=== Marvin Parse Config Successful ===

=== Marvin Setting TestData Successful===

==== Log Folder Path: /marvin/MarvinLogs/Apr_05_2021_15_27_52_4FERLF. All logs will be available here ====

=== Marvin Init Logging Successful===

==== Marvin Init Successful ====
=== TestName: test_02_migrate_VM_with_two_data_disks | Status : EXCEPTION ===

===final results are now copied to: /marvin//MarvinLogs/test_vm_life_cycle_MW3N4E===

Corresponding exception observed on MS:
2021-04-05 21:20:46,925 DEBUG [o.a.c.s.v.VolumeServiceImpl] (Work-Job-Executor-1:ctx-2907ea33 job-3946/job-3947 ctx-fa575848) (logid:a7e59bcb) Failed to copy volume
com.cloud.utils.exception.CloudRuntimeException: Copy operation failed in 'StorageSystemDataMotionStrategy.copyAsync': null
	at org.apache.cloudstack.storage.motion.StorageSystemDataMotionStrategy.copyAsync(StorageSystemDataMotionStrategy.java:1901)
	at org.apache.cloudstack.storage.motion.DataMotionServiceImpl.copyAsync(DataMotionServiceImpl.java:119)
	at org.apache.cloudstack.storage.volume.VolumeServiceImpl.migrateVolumes(VolumeServiceImpl.java:1645)
	at org.apache.cloudstack.engine.orchestration.VolumeOrchestrator.migrateVolumes(VolumeOrchestrator.java:1181)
	at com.cloud.vm.VirtualMachineManagerImpl.orchestrateMigrateWithStorage(VirtualMachineManagerImpl.java:3000)
	at com.cloud.vm.VirtualMachineManagerImpl.orchestrateMigrateWithStorage(VirtualMachineManagerImpl.java:5524)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at com.cloud.vm.VmWorkJobHandlerProxy.handleVmWorkJob(VmWorkJobHandlerProxy.java:107)
	at com.cloud.vm.VirtualMachineManagerImpl.handleVmWorkJob(VirtualMachineManagerImpl.java:5631)
	at com.cloud.vm.VmWorkJobDispatcher.runJob(VmWorkJobDispatcher.java:102)
	at org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.runInContext(AsyncJobManagerImpl.java:620)
	at org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:48)
	at org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:55)
	at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:102)
	at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:52)
	at org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:45)
	at org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.run(AsyncJobManagerImpl.java:568)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.NullPointerException
	at org.apache.cloudstack.storage.motion.KvmNonManagedStorageDataMotionStrategy.copyTemplateToTargetFilesystemStorageIfNeeded(KvmNonManagedStorageDataMotionStrategy.java:198)
	at org.apache.cloudstack.storage.motion.StorageSystemDataMotionStrategy.copyAsync(StorageSystemDataMotionStrategy.java:1793)
	at org.apache.cloudstack.storage.motion.DataMotionServiceImpl.copyAsync(DataMotionServiceImpl.java:119)
	... 23 more

Types of changes

[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] New feature (non-breaking change which adds functionality)
[X] Bug fix (non-breaking change which fixes an issue)
[ ] Enhancement (improves an existing feature and functionality)
[ ] Cleanup (Code refactoring and cleanup, that may add test cases)

Feature/Enhancement Scale or Bug Severity
Bug Severity

[ ] BLOCKER
[ ] Critical
[X] Major
[ ] Minor
[ ] Trivial

How Has This Been Tested?
Run the test for live-migrating a VM with its volumes comprising of root volume + 2 data disks
nosetests --with-xunit --xunit-file=results.xml --with-marvin --marvin-config=/marvin/ref-trl-320-k-M8-pearl-dsilva-advanced-cfg -s -a tags=xx --hypervisor=KVM /marvin/tests/smoke/test_vm_life_cycle.py

==== Marvin Init Started ====

=== Marvin Parse Config Successful ===

=== Marvin Setting TestData Successful===

==== Log Folder Path: /marvin/MarvinLogs/Apr_05_2021_15_57_59_1THXV7. All logs will be available here ====

=== Marvin Init Logging Successful===

==== Marvin Init Successful ====
=== TestName: test_02_migrate_VM_with_two_data_disks | Status : SUCCESS ===

===final results are now copied to: /marvin//MarvinLogs/test_vm_life_cycle_YMHKU5===

@blueorangutan package

@Pearl1594 a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2885

I would ask you to take a look at the PR https://github.com/apache/cloudstack/pull/4698. As it was proposed before this PR, I think it would be interesting to consider it first for this problem.

@GutoVeronezi I see that code is changed in different places than the code in this PR. Are you saying that PR makes this obsolete or do they merit merging each in their own right?

Thanks for opening this PR @Pearl1594.
This PR seems to address the same issue as PR #4698 but in a different way. I think that it is important to evaluate which one suits better before moving on with this or the other PR.
It is important to raise also that it seems that @GutoVeronezi will only work to the master, so we can have also a PR specifically for 4.15, or cherry-pick hist commit (if we decide that his option is the better).

@DaanHoogland @GutoVeronezi you were quicker than me, I pressed enter to send the message and then your comments appear.
Taking a deeper look, I think that both handle different situations. Very similar, but still complementary situations.

@DaanHoogland @GutoVeronezi you were quicker than me, I pressed enter to send the message and then your comments appear.
Taking a deeper look, I think that both handle different situations. Very similar, but still complementary situations.
This one prevents also issue due to eventually null srcVolumeInfo.

@GabrielBrascher The problem is that findByPoolTemplate receives a long (primitive type) to template and getTemplateId returns a Long (object type). Java will do an autounboxing, but as getTemplateId returns null for non-template volume (data disks), it will generate a NPE when trying to autounbox this value.

@GutoVeronezi I see that code is changed in different places than the code in this PR. Are you saying that PR makes this obsolete or do they merit merging each in their own right?

Both PRs address the same problem, which is to handle the template id in case it is null (for data disks); the main difference is that, that this PR made validations out of the scope of the method, where it seems more interesting, as it verifies if we are handling a volume created from a template before calling the copy template method. Further, we added some logging to facilitate the life of operators if they ever need to troubleshoot this process.

@GutoVeronezi I know how Long and long work.
That is why I already mentioned about srcVolumeInfo validations that this PR does: srcVolumeInfo != null and  srcVolumeInfo.getTemplateId() != null.

Anyway, I see one check that this PR does and #4698 does not. Which is checking if srcVolumeInfo is not null.
However looking at the code, I don't see any way that it can be null. If srcVolumeInfo is null then we will see NPE previously on the caller, precisely at StorageSystemDataMotionStrategy.java#L1806.
With that said, I am +1 on @GutoVeronezi solution; he adds quite interesting log messages.

Thanks @GutoVeronezi and @GabrielBrascher. I hadn't noticed that the issue was already addressed. And as mentioned it does add useful logs. Ill close this PR. Thanks!

Reviewed @GutoVeronezi and prefer that one as well

Trillian test result (tid-3673)
Environment: kvm-centos8 (x2), Advanced Networking with Mgmt server 8
Total time taken: 31236 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4771-t3673-kvm-centos8.zip
Intermittent failure detected: /marvin/tests/smoke/test_internal_lb.py
Intermittent failure detected: /marvin/tests/smoke/test_outofbandmanagement.py
Intermittent failure detected: /marvin/tests/smoke/test_hostha_kvm.py
Smoke tests completed. 84 look OK, 2 have error(s)
Only failed tests results shown below:

Test
Result
Time (s)
Test File

test_oobm_background_powerstate_sync
Failure
21.52
test_outofbandmanagement.py

test_oobm_enabledisable_across_clusterzones
Error
36.58
test_outofbandmanagement.py

test_oobm_issue_power_cycle
Error
19.58
test_outofbandmanagement.py

test_oobm_issue_power_off
Error
19.59
test_outofbandmanagement.py

test_oobm_issue_power_on
Error
18.55
test_outofbandmanagement.py

test_oobm_issue_power_reset
Error
19.57
test_outofbandmanagement.py

test_oobm_issue_power_soft
Error
19.59
test_outofbandmanagement.py

test_oobm_issue_power_status
Error
19.56
test_outofbandmanagement.py

test_oobm_multiple_mgmt_server_ownership
Failure
27.63
test_outofbandmanagement.py

test_oobm_zchange_password
Error
6.27
test_outofbandmanagement.py

test_hostha_kvm_host_degraded
Error
9.55
test_hostha_kvm.py

test_hostha_kvm_host_fencing
Error
9.65
test_hostha_kvm.py

test_hostha_kvm_host_recovering
Error
8.59
test_hostha_kvm.py


左边菜单栏展开与合并的问题?

例如:
点击"用户中心------>用户"  访问地址: http://<IP_ADDRESS>:8000/user/,
然后如果点击"用户中心------>用户" 页面中的另外一个链接:http://<IP_ADDRESS>:8000/user/create
菜单栏就合并了,并不是展开并指向用户

English please ?

Such as:
Click on the "user center" -- -- -- -- -- - > user access address: http://<IP_ADDRESS>:8000/user/,
Then if you click on "user center -- -- -- -- -- - > user" another link in the page: http://<IP_ADDRESS>:8000/user/create
The menu bar is merged, not to expand and point to the user

Please provide a screenshot, your server si a local one, it doesn't work for us.

Ok ok, I'm not quite sure how could we help you here :)

@AndreiCN I think he's talking about, you know the dynamic links on the adress bar, related to #492

Well I get it now, thank you @William-H-M.
@jqlinux you already have the solution, we will close this ticket for now, good luck !


DataManagementApi: Create API for Asset and DataAddress

This issue only deals with the API, i.e. a stub for the *Controller class. An implementation is explicitly NOT to be done.
API Endpoints

POST /api/v1/assets: creates a new Asset, AssetEntryDto must be passed in body.  Returns void.

DTOs
public class AssetEntryDto {
  private AssetDto asset;
  private DataAddressDto dataAddress;
  //getters, setters, etc.
}

public class AssetDto {
  private Map<String, Object> properties;
  //getters, setters, etc.
}

public class DataAddress {
  private Map<String, Object> properties;
  //getters, setters, etc.
}

Controllers and extensions should be located in the module extensions/api/data-management/asset

I'll work on it


Automate + document release

Can reuse the github workflow from here. Ensure the full process to make a new release is documented.

Woops, forgot to document it 🫠


[Feature Request] Allow setting custom startup/shutdown events in brew procs

Feature Request
Essentially what I'd love to be able to do would be to have parameters in the brew proc that would allow me to set my own procs to fire when the application starts up (and maybe also when it shuts down).
My explicit usecase would be that I'm currently working on my appster package as you have seen, which sets up a second thread as a "server". I'd love to be able to add a global timeout proc on startup of the application that listens for messages from said server.
Essentially I want to run this piece of code:
proc addServerListener*[OwlkettleApp: Viewable, SMsg, CMsg](app: OwlkettleApp, data: ServerData[SMsg, CMsg], sleepMs: int = 5) =
  ## Adds a callback function to the GTK app that checks every 5 ms whether the
  ## server sent a new message. Triggers a UI update if that is the case.
  proc listener(): bool =
    let msg = data.hub.readServerMsg()
    if msg.isSome():
      app.msg = msg.get()
      discard app.redraw()

    const KEEP_LISTENER_ACTIVE = true
    return KEEP_LISTENER_ACTIVE

  discard addGlobalTimeout(sleepMs, listener)

Right now I'm forced to tell the user "Well you have to know that you must run this in the beforeBuild hook of the App-Widget.
It would be far neater (in my opinion) if I could forego that and just tell them "Add this event to your owlkettle-Startup-Events in the brew proc".
These could also be used for various other things along the lines of setting up resources (e.g. loggers) and destroying them on program shutdown.
Implementation
Implementation would be pretty trivial. Just add the types:
type StartUpEvent = proc(app: GApplication, data: ptr AppConfig)
type ShutDownEvent = StartUpEvent

And then add fields with seq[StartUpEvent] and seq[ShutDownEvent] in the AppConfig datatype.
Finally add parameters for those fields (default value @[]) to all the brew proc and then (depending on the brew proc) execute the events in an appropriate place depending on the brew proc.

I agree, this would be a good feature to have. Do the callbacks really need the GApplication parameter? Generally owlkettle does not expose GTK directly to the user. When exactly are the callbacks executed? Maybe at the end of setupApp? Then you could also pass in the toplevel app state as a WidgetState. I would pass AppConfig as a value type, not a ptr.

Regarding ShutDownEvent: When exactly is it executed? Does it also executed when the application throws a Defect? What about a Segfault?

Feel free to open a PR for this btw.

Happy to do so!
GApplication is not necessary, I was just starting out of a perspective of making all data possible available. Can be cut without issues, as the important bit is access to the Viewable Widget instance that is the entire application representation by owlkettle for access to "redraw" and its state (as startup/shutdown events may want to access it).
As for when to run these, honestly my first trail of though was to implicitly register these with the "startup" and "shutdown" GTK signals. We can of course also do this more directly without jumping through hoops, in terms of "correctness" that just seems to be the state (or an equivalent of it) to go for.

I see now though that we don't consistently have access to GApplication so trying to go for an approach that consistently uses it is not that great of an idea. I'm... somewhat torn on when to execute these now. I think I can consistently get access to WidgetState and AppConfig, but only in a way that means adding "runStartupEvents".

The reason why the brew procs look so different, is that there are always two versions of each brew procedure: There is one that uses Gtk.Application and one that does not. When using Gtk.Application, you need an application ID which is passed as the first parameter to brew. Gtk.Application manages the mainloop for you, that is why owlkettle does not call runMainloop in this case. For the brew procs that do not use Gtk.Application, the mainloop has to managed manually by calling runMainloop. Internally runMainloop just handles incoming events as long as a window is open.
For the shutdown events, it might be fine to call them in the shutdown signal for apps that use Gtk.Application and immediately after "runMainloop" for applications that don't.
I would prefer adding a new closure object AppContext instead of adding a state field to AppConfig. E.g.
proc brew*(id: string,
           widget: Widget,
           icons: openArray[string] = [],
           darkTheme: bool = false,
           stylesheets: openArray[Stylesheet] = []) =
  type AppContext = object
    config: AppConfig
    state: WidgetState
  ...

  var context = AppContext(...)
  ...

  discard g_signal_connect(app, "activate", activateCallback, context.addr)
  ...

Hmm we have 2 ways to do what seems to me the same thing.
I understand the specific reason for the version using GApplication, it allows sending notifications more generally.
Why would I as a user want to use the non-GApplication approach?

I guess the main reason is not wanting to decide on an application id :smile:

To be honest I am not exactly sure what else using Gtk.Application affects. We would have to do some research to ensure that using a default ID does not break anything. E.g. if we provide a default id, and a user runs two owlkettle apps with this default id at the same time, does that confuse any other parts of the OS?
Re: Notification example, you need to add a .desktop file.

Re: Notification example, you need to add a .desktop file.
 I did just test it out, you can basically replicate an issue immediately: Withdrawing a notification from App A will also withdraw a notification that was sent by App B.
Interacting with notifications in general (sending from A and withdrawing from B) while 4 apps listen to the same ID even appears to lead to crashes, at least on my system (made a desktop file for the notification example, pinned it to the taskbar and launched a new window from there 4 times).
For launching in general I couldn't replicate any issues.

In that regard we could also contemplate just setting a random string there. If the user wants to send notifications, they have to properly set the id anyhow.
Should be easy enough to generate something very unique with urandom over... i dunno, 120 bytes.


HDFS-16272. Fix int overflow in computing safe length during EC block recovery

Fix the int overflow problem.

:broken_heart: -1 overall

Vote
Subsystem
Runtime
Logfile
Comment

+0 :ok:
reexec
1m  1s

Docker mode activated.

_ Prechecks _

+1 :green_heart:
dupname
0m  0s

No case conflicting files found.

+0 :ok:
codespell
0m  0s

codespell was not available.

+1 :green_heart:
@author
0m  0s

The patch does not contain any @author tags.

+1 :green_heart:
test4tests
0m  0s

The patch appears to include 1 new or modified test files.

_ trunk Compile Tests _

+0 :ok:
mvndep
12m 55s

Maven dependency ordering for branch

+1 :green_heart:
mvninstall
27m 22s

trunk passed

+1 :green_heart:
compile
6m 30s

trunk passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04

+1 :green_heart:
compile
5m 58s

trunk passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10

+1 :green_heart:
checkstyle
1m 21s

trunk passed

+1 :green_heart:
mvnsite
2m 38s

trunk passed

+1 :green_heart:
javadoc
1m 52s

trunk passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04

+1 :green_heart:
javadoc
2m 13s

trunk passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10

+1 :green_heart:
spotbugs
6m 22s

trunk passed

+1 :green_heart:
shadedclient
27m 41s

branch has no errors when building and testing our client artifacts.

_ Patch Compile Tests _

+0 :ok:
mvndep
0m 28s

Maven dependency ordering for patch

+1 :green_heart:
mvninstall
2m 26s

the patch passed

+1 :green_heart:
compile
6m 21s

the patch passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04

+1 :green_heart:
javac
6m 21s

the patch passed

+1 :green_heart:
compile
5m 53s

the patch passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10

+1 :green_heart:
javac
5m 53s

the patch passed

+1 :green_heart:
blanks
0m  0s

The patch has no blanks issues.

-0 :warning:
checkstyle
1m 17s
/results-checkstyle-hadoop-hdfs-project.txt
hadoop-hdfs-project: The patch generated 8 new + 23 unchanged - 0 fixed = 31 total (was 23)

+1 :green_heart:
mvnsite
2m 28s

the patch passed

+1 :green_heart:
javadoc
1m 35s

the patch passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04

+1 :green_heart:
javadoc
2m  3s

the patch passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10

+1 :green_heart:
spotbugs
6m 33s

the patch passed

+1 :green_heart:
shadedclient
27m 48s

patch has no errors when building and testing our client artifacts.

_ Other Tests _

+1 :green_heart:
unit
2m 23s

hadoop-hdfs-client in the patch passed.

-1 :x:
unit
441m 51s
/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
hadoop-hdfs in the patch passed.

+1 :green_heart:
asflicense
2m 15s

The patch does not generate ASF License warnings.

597m  6s

Reason
Tests

Failed junit tests
hadoop.hdfs.web.TestWebHdfsFileSystemContract

hadoop.hdfs.TestViewDistributedFileSystemContract

hadoop.fs.viewfs.TestViewFSOverloadSchemeWithMountTableConfigInHDFS

hadoop.fs.viewfs.TestViewFileSystemOverloadSchemeHdfsFileSystemContract

Subsystem
Report/Notes

Docker
ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3548/1/artifact/out/Dockerfile

GITHUB PR
https://github.com/apache/hadoop/pull/3548

Optional Tests
dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell

uname
Linux 16fff83ad99d 4.15.0-147-generic #151-Ubuntu SMP Fri Jun 18 19:21:19 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
dev-support/bin/hadoop.sh

git revision
trunk / c54500e41daf88684154dc4addd54da8500e2d75

Default Java
Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10

Multi-JDK versions
/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10

Test Results
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3548/1/testReport/

Max. process+thread count
2035 (vs. ulimit of 5500)

modules
C: hadoop-hdfs-project/hadoop-hdfs-client hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project

Console output
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3548/1/console

versions
git=2.25.1 maven=3.6.3 spotbugs=4.2.2

Powered by
Apache Yetus 0.14.0-SNAPSHOT https://yetus.apache.org

This message was automatically generated.

:confetti_ball: +1 overall

Vote
Subsystem
Runtime
Logfile
Comment

+0 :ok:
reexec
0m 56s

Docker mode activated.

_ Prechecks _

+1 :green_heart:
dupname
0m  0s

No case conflicting files found.

+0 :ok:
codespell
0m  0s

codespell was not available.

+1 :green_heart:
@author
0m  0s

The patch does not contain any @author tags.

+1 :green_heart:
test4tests
0m  0s

The patch appears to include 1 new or modified test files.

_ trunk Compile Tests _

+0 :ok:
mvndep
12m 25s

Maven dependency ordering for branch

+1 :green_heart:
mvninstall
23m 48s

trunk passed

+1 :green_heart:
compile
5m 35s

trunk passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04

+1 :green_heart:
compile
6m  7s

trunk passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10

+1 :green_heart:
checkstyle
1m 22s

trunk passed

+1 :green_heart:
mvnsite
2m 34s

trunk passed

+1 :green_heart:
javadoc
1m 42s

trunk passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04

+1 :green_heart:
javadoc
2m 10s

trunk passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10

+1 :green_heart:
spotbugs
5m 56s

trunk passed

+1 :green_heart:
shadedclient
25m 34s

branch has no errors when building and testing our client artifacts.

_ Patch Compile Tests _

+0 :ok:
mvndep
0m 25s

Maven dependency ordering for patch

+1 :green_heart:
mvninstall
2m 13s

the patch passed

+1 :green_heart:
compile
6m 13s

the patch passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04

+1 :green_heart:
javac
6m 13s

the patch passed

+1 :green_heart:
compile
5m 25s

the patch passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10

+1 :green_heart:
javac
5m 25s

the patch passed

+1 :green_heart:
blanks
0m  1s

The patch has no blanks issues.

+1 :green_heart:
checkstyle
1m  7s

the patch passed

+1 :green_heart:
mvnsite
2m  7s

the patch passed

+1 :green_heart:
javadoc
1m 24s

the patch passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04

+1 :green_heart:
javadoc
1m 51s

the patch passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10

+1 :green_heart:
spotbugs
6m 13s

the patch passed

+1 :green_heart:
shadedclient
25m 29s

patch has no errors when building and testing our client artifacts.

_ Other Tests _

+1 :green_heart:
unit
2m 26s

hadoop-hdfs-client in the patch passed.

+1 :green_heart:
unit
396m  4s

hadoop-hdfs in the patch passed.

+1 :green_heart:
asflicense
0m 47s

The patch does not generate ASF License warnings.

537m 35s

Subsystem
Report/Notes

Docker
ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3548/2/artifact/out/Dockerfile

GITHUB PR
https://github.com/apache/hadoop/pull/3548

Optional Tests
dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell

uname
Linux 31234bd6d394 4.15.0-147-generic #151-Ubuntu SMP Fri Jun 18 19:21:19 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
dev-support/bin/hadoop.sh

git revision
trunk / 06ac7c0be9a12bf48d3c3a80068b0dd085fa2b3a

Default Java
Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10

Multi-JDK versions
/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10

Test Results
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3548/2/testReport/

Max. process+thread count
1886 (vs. ulimit of 5500)

modules
C: hadoop-hdfs-project/hadoop-hdfs-client hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project

Console output
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3548/2/console

versions
git=2.25.1 maven=3.6.3 spotbugs=4.2.2

Powered by
Apache Yetus 0.14.0-SNAPSHOT https://yetus.apache.org

This message was automatically generated.


Replace hasMany relationship

@dgeb I've got a rough sketch of the firebase source working now so I'm now looking at ordered arrays again. It doesn't look like ember-orbit supports replacing hasMany relationships yet. Do I take it this needs to be added to record-array-manager? I'm looking at adding a _linkWasReplaced to go with _linkWasAdded and _linkWasRemoved.

Has-many relationships can now be replaced using the replaceHasMany operation.


Fix two small issues encountered when implementing in a real repo

Alaska Airlines Pull Request
Before Submitting this pull request:

Link all tickets in this repository related to this PR in the Development section
note: all pull requests require at least one linked ticket
If this PR is Ready For Review, all ticket's linked under Development must have their status changed to Ready For Review as well

By submitting this Pull Request, I confirm that my contribution is made under the terms of the Apache 2.0 license and I have performed a self-review of my own update.
Fast follow on #59
Closes #59
Summary by Sourcery
Fix an issue with README.md processing by setting the overwrite flag to false and enhance the script with a warning log message to alert users about the overwrite setting.
Bug Fixes:

Fix issue with README.md processing by ensuring the overwrite flag is set to false, preventing unintended overwrites.

Enhancements:

Add a warning log message to notify users when the overwrite flag for README.md is set to false, prompting updates when template changes are merged.

@DukeFerdinand Just to be super clear since I am new. This script is generating a readme for you. But at some point the readme gets updated separately from script? So then the generated data is no longer valid and overrides existing content?

@rmenner yep! the README is totally de-coupled from the repository and is retrieved from external sources. This is intended to keep all of our base README files the same across every auro repository (sans any external code that gets injected via the same build script).
TL;DR: remote README template gets pulled, cached in a directory, and filled with template + variable data when you run build:docs

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Added support for embedding in UITabBarController

Fixes: #120
Before the input bar would go behind the transparent UITTabBar. By respecting the bottom layout guide the chat view controller supports this and anything else that might add transparent UI to the bottom of the window.
I have modified one of the demos to embed inside a UITabBarController to make this easier to test and ensure it keeps working.
Here is a gif!

Hi @crayment, thank you for the PR. Looks good to me. We're gonna do some internal QA within our apps. I'll come back to you.

QA passed without issues :) Could you please rebase into latest dev, taking into account the changes from https://github.com/badoo/Chatto/pull/134? Also please note that we use "self." for properties and method calls. Thank you!

[Current coverage][cc-pull] is 64.89%

Merging [#132][cc-pull] into [dev][cc-base-branch] will decrease coverage by 0.09%

2 files (not in diff) in ...attoAdditions/Source were modified. more

Hits -19

2 files in ...ource/ChatController were modified. more

Misses +5
Hits -10

File ...ler+Presenters.swift (not in diff) was modified. more

Misses -9
Partials 0
Hits 0

@@                dev       #132   diff @@
==========================================
  Files            60         60
  Lines          3177       3147    -30
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
- Hits           2065       2042    -23
+ Misses         1112       1105     -7
  Partials          0          0

Powered by Codecov. Last updated by [d6a7d18...98eded1][cc-compare]
[cc-base-branch]: https://codecov.io/gh/badoo/Chatto/branch/dev?src=pr
[cc-compare]: https://codecov.io/gh/badoo/Chatto/compare/d6a7d185c806032d72031e672f6c05afe7d90ecb...98eded1c709884e8bd429ccba17c75e9627569b2
[cc-pull]: https://codecov.io/gh/badoo/Chatto/pull/132?src=pr

Thanks!


SfAccordionFeature/sf accordion

Related issue
https://github.com/DivanteLtd/storefront-ui/issues/168
Scope of work
SfAccordion enables user to toggle visibility of parts of the content.
User has few options how to use the component:

Pass items array to populate accordion with predefined styles.
Pass multiple SfAccrodionItem into #items slot.
2.1. To use custom styling for header populate #header slot inside SfAccordionItem tag and set showChevron to false in SfAccordion tag.
To use custom styling for opened and closed header states use classes:
sf-accordion-item__header-slot--close
sf-accordion-item__header-slot--open
2.2. To use custom styling for content items populate #content slot inside SfAccordionItem tag.

Please have a look on updated stories to see the visual changes and actual usage.
Screenshots of visual changes

Checklist

[ ] I followed composition rules for my component
[ ] I tested the component in most common device sizes (can be tested in Storybook from viewport addon in top menu)

@michasik also the gray version shouldn't be a default one (i believe you took inspiration from footer). Could you please add it as css modifier and do background white with previous styling by default?
Backstory: initially this component was used here:

@filrak @leomp12
Hi guys, please have a look and review the changes. Cheers!

Also resolve the conflicts ;)


Unite with vim-speeddating

Any way to combine with tpope/vim-speeddating to reuse <C-a>/<C-x> ?
Likewise to execute original mapping if no definition match current word ?

Well, in order to use <c-a>/<c-x> for going back and forward between the different switches, you can set this:
let g:switch_mapping = '<c-a>'
let g:switch_reverse_mapping = '<c-x>'

Unfortunately, this will only work for list-style mappings, and there aren't that many of them in the built-ins. You can define your own, of course. If this is your major use-case, you could also consider a similar plugin, vim-cycle: https://github.com/zef/vim-cycle. That one already uses these mappings by default.
As for executing the original mapping, this does seem like a reasonable idea. I'll see what I can do about implementing it.

Main idea was in smart reusing of <C-a>/<C-x> and not simple remapping.
So I could execute mappings from another plugin when conditions for switch.vimweren't met.
Mentioned vim-cycle don't work with speeddating either, therefore it's no better alternative.
I'm looking forward for your implementation.
It seems like you already did that for splitjoin.vim (quote frome its help).

However, if no splitting/joining is possible at this point, the plugin will fall back to the default mapping.

Also, please clarify this

Unfortunately, this will only work for list-style mappings, and there aren't that many of them in the built-ins. You can define your own, of course.

I quite don't understand what you mean by list-style mappings, built-ins and you can define your own.
Do you speak about switch_custom_definitions emphasizing lists over dicts? Or about native vim mappings ?
I feel like you have tryied to discouraged me using <C-a/x> but I can't grasp the idea why and what I lose in that case.

Also, please clarify this

There are two types of switch definitions. In list form:
['one', 'two', 'three']

And in dictionary form:
{
    ':\(\k\+\)\s*=>\s*': '\1: ',
    '\<\(\k\+\): ':      ':\1 => ',
}

The first one switches "one" into "two", "two" into "three", and "three" into "one". The second one switches :some_key => into some_key:, which is something specific to ruby. This one can't be written as a list, because its keys are regexes and the values are their substitutions. In the list form, every item is both a pattern and a substitution.
The list form is actually compiled to:
{
    '\<one\>': 'two',
    '\<two\>': 'three',
    '\<three\>': 'one',
}

So, if you have the pattern \<two\> under the cursor, it is replaced with the next word in the list, three.
Now, if you execute the :SwitchReverse command, the list is actually compiled to:
{
    '\<one\>': 'three',
    '\<three\>': 'two',
    '\<two\>': 'one',
}

Which means that, if you have the pattern \<two\> under the cursor, it replaces it with the previous word in the list, one.
So you see, there's no way to "reverse" a dictionary switch definition, because there is no ordering to it. This is why there's just one main command, :Switch, and the reverse command was added later and only works for list mappings.
With vim-cycle, you only get list mappings, which means you can only replace one word with another. Switch gives you more flexibility, because you can use any pattern to decide what to replace it with. But it does mean that it's not very useful to think of "next" and "previous" replacements. There's only one direction: "If it matches this pattern, replace it with this substitution".
Did I explain that well enough?

As for the other question,

Main idea was in smart reusing of / and not simple remapping.
So I could execute mappings from another plugin when conditions for switch.vimweren't met.
Mentioned vim-cycle don't work with speeddating either, therefore it's no better alternative.

This is tricky. The reason that cycle doesn't support speeddating is likely that it's impossible to support it, short of directly hardcoding the logic specifically for speeddating.
Imagine what the logic would be for what I suggested: "If a switch succeeded, do nothing, but if no switches succeeded, call the built-in mapping". This is easy to do, the built-in can just be called with normal!. But how do I call a mapping that might have been set by another plugin?
If a plugin sets a mapping for <c-a> before I do, then the only thing I can do is take the mapping's right-hand-side with maparg(), store it for later, and define my own mapping. Okay, that's doable (although a bit complicated). But what if my plugin is loaded before that other plugin? There's nothing I can do, the plugin has to take care of it as well.
If all plugins that defined a particular mapping tried to do this, then maybe this could work (although even then, it's not clear if it's a desired property. I just discovered https://github.com/AndrewRadev/switch.vim/pull/41, which I'd forgotten about, and I explain there that it might not be a good idea to do this without an option at least). But most plugins don't, because it's pretty complicated and not always a good idea.
Speeddating comes with <Plug> maps you could call directly: https://github.com/tpope/vim-speeddating/blob/master/plugin/speeddating.vim#L43-L48. Executing normal <Plug>SpeedDatingUp should increment a date. You could even use the autoloaded function, speeddating#increment. I could provide you with a public function you could use to check if the switch worked or not, and then you call the appropriate speeddating mapping. Does that seem reasonable to you?

Thanks, you explanation is much more detailed than I could expect :).
Lets call current situation unidirectional switching.
It's not that bad, as I can live with it and bear limitations in mind.
I suppose, reverse switching will be possible by providing symmetrical regexes in other direction, but maintanance cost of doubled rules quantity is too much. Therefore, discarded.
However, could be implemented as rarely used extension. For geeks with perfection syndrom.

Next one. For lazy-loading dein.vim has on_source and depends hooks.
Therefore I can secure the relative order of plugins loading despite which was triggered first.
And maparg() variant will work just fine. For me. Yes, for me -- so, as you justify, not good.
Your variant with public api to query applicability is nice, I rather like it.
User can construct his own chain for multi-plugin application and create mapping for it, just as planned.
I would only suggest to split api for query and for actual action -- therefore anyone could insert smth in-between those two actions, if he feels like it. Likewise:
if switch#can() | do_user() | switch#apply() |else| speeddating#increment() |en

Yes, totally nice. I'm looking forward.

Separating the query and the action feels inefficient to me -- it means that the plugin will run through all the matches to see if they work, then run through them again to "apply" one. One way would be to return the match object and have a separate function to apply it, but it seems like it would be a bit clumsy to me.
Right now, I've tweaked the API a bit and changed the switch#Switch() function to not take the definitions as an argument. It already returns 1 for success and 0 for failure (if you have a recent enough Vim version, you could use v:true and v:false, they are aliases to 1 and 0). So, your mapping would look like this:
if !switch#Switch() | speeddating#increment() | endif
if !switch#Switch({'reverse': 1}) | speeddating#decrement() | endif

This is consistent with internal Vim functions as well, like search(): when you call it, it either returns a positive number (the matched line) and moves the cursor to it, or it returns 0 and doesn't move the cursor.
If you have a reason to separate the actions, I can try to separate the searching from the replacement by returning a "match" object, but it might be a bit tricky. The change itself wouldn't be huge (the relevant code is here), but I can't really think of a use case in which it would be interesting, other than debugging (and if you need to debug, you can easily put echomsg calls in the actual plugin).

Alright, can't provide useful meaning for separate check/apply beside my intuition based on general experience.
Maybe, I will stumble on some example throughout the future usage.
Currently, I have created two mapping:
nnoremap <silent> <Plug>(switch+date) :<C-U>if !switch#Switch()<Bar> call speeddating#increment(v:count1) <Bar>en<CR>
nnoremap <silent> <Plug>(switch-date) :<C-U>if !switch#Switch({'reverse': 1})<Bar> call speeddating#increment(-v:count1) <Bar>en<CR>

And supplemented convetional keys:
nmap <silent><unique> <C-a> <Plug>(switch+date)
nmap <silent><unique> <C-x> <Plug>(switch-date)
xmap <silent><unique> <C-a> <Plug>SpeedDatingUp
xmap <silent><unique> <C-x> <Plug>SpeedDatingDown

Maybe, one day I will be feeling irritation when trying switch and increasing date/number somewhere instead, or the other way round applying substitution contradictory to my will. But only throughtout usage these corner cases can be revealed :)


Add new user_admin role

Fixes #2574

New user_admin role can use the kontena master user commands that were previously limited to master_admin:

kontena master user invite -> POST /oauth2/authorize -> Users::Invite -> user.can_create?(User)
kontena master user list -> GET /v1/users -> user.can_read?(User)
kontena master user remove -> DELETE /v1/users/:email -> Users::Remove -> user.can_delete?(User)

The user_admin role can also use the kontena grid user commands if they have been added to the grid, and have access to the /v1/grids/:name/... APIs:

kontena grid user add -> POST /v1/grids/:name/users -> Grids::AssignUser -> user.can_assign?(self.user, {to: self.grid})
kontena grid user remove -> DELETE /v1/grids/:name/users/:email -> Grids::UnassignUser -> ??? (XXX: #2578)

TODO

Should the user_admin also be able to use the kontena master user role add/remove commands to grant the grid_admin and user_admin roles (but not master_admin)? Should there also be a role_admin role?

Tested this to work, with a user_admin user able to invite a different user, and add to grid.


ci: Tagging AMI image to all regions fails

Logs
Waiting for import-snapshot task to finalize. 80s
Waiting for import-snapshot task to finalize. 90s
Tagging Snapshot
Register AMI from snapshot
Tagging AMI
Making AMI public
AMI Created: ami-04a3865a917c8c92b
Copying AMI ami-04a3865a917c8c92b to all regions
Tagging Copied AMI ami-09dbfb65a74fee1a5
Making AMI ami-09dbfb65a74fee1a5 public

An error occurred (InvalidAMIID.NotFound) when calling the ModifyImageAttribute operation: The image id '[ami-09dbfb65a74fee1a5]' does not exist
make: *** [make/Makefile.images:72: aws_vanilla_ami] Error 254

Additional context
https://github.com/rancher-sandbox/cOS-toolkit/runs/3153878978?check_suite_focus=true
https://github.com/rancher-sandbox/cOS-toolkit/blob/master/images/aws_upload.sh#L69

ok, seems publishing the image is missing --region


Browserify.prototype._json adds a module.exports without testing if it's dedupe code or not

encountered this while trying to rebuild crypto-browserify with watchify. one of its dependencies (elliptic) requires a package.json somewhere.
hotfix here: https://github.com/tetsuo/node-browserify/commit/9978df3a1c6fe0abbcdac9b1f2729fbbb3687b04

I can confirm this as well, using Browserify @ 8.1.3 and Watchify @ 2.3.0. @tetsuo's hotfix worked for me as well.

:+1:

Published the hotfix in 9.0.3. Thanks for the fix!


Signed-off-by: Jingkui Wang<EMAIL_ADDRESS>

This pull request didn't trigger Jenkins as its author isn't in the whitelist.
An organization member must perform one of the following:

To have this branch tested by Jenkins, use the "ok to test" command.
To have a one time test done, use the "test this please" command.

Those commands are simple Github comments of the format: "jenkins: COMMAND"

This indeed sounds pretty useful as a way to just pass all USB devices, though I think we should do it the same way we do for GPUs.
That is, making vendorid optional and simply passing everything if both vendorid and productid are empty.
@Catramen can you update your branch to do that instead?
Thanks!

@Catramen, unless it is company policy, could you please sign-off your commits with the same mail address for consistency. :)

Done, I squashed the changes.

@Catramen, lovely! Thank you! :)

jenkins: test this please

I'll be adding an API extension for this so clients can detect whether the LXD server has had this change in behavior. This won't prevent backporting to 3.0 though as it's not really a new feature.


Cannot build MasterDetail sample project

I just downloaded the master branch.
I get 1 error when I open the solution with Visual Studio 2017:

Template10.ArchValidation\ArchValidation.modelproj: The application which this project type is based on was not found.

I get 2 errors when I fail to build the MasterDetail sample project:

Type universe cannot resolve assembly: Template10.Shared, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=null.
Cannot resolve Assembly or Windows Metadata file 'Template10.Shared.dll'

Doesn't it seem like one big SLN is part of the problem. I think a Samples.sln would be a nice addition to the code base, huh? What you are referring to is a result of this needless complexity.

I think the other problem is that I forgot to branch before I made a million changes, more of a confession than a brag in this case, and I need to get everything functional again - so, you aren't the only one.

As a temporary work around I would suggest that you create a new SLN and load the individual csproj of the sample you want to work with. That should make it work okay for you.


failed to invoke ReqShiftfsMark via grpc

I'm update my sysbox to latest code with compiling from the source and got the this error when the Docker API wanna create a container then the status does not become Running
[
    {
        "Id": "cc8998ec188253a7587135794d65631c104a6c5048d89de498c257be71b4337f",
        "Created": "2021-01-26T13:51:27.23280101Z",
        "Path": "docker-entrypoint.sh",
        "Args": [
            "bin/bash"
        ],
        "State": {
            "Status": "created",
            "Running": false,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 0,
            "ExitCode": 128,
            "Error": "OCI runtime create failed: failed to request shiftfs marking to sysbox-mgr: failed to invoke ReqShiftfsMark via grpc: rpc error: code = Unknown desc = error while checking for existing shiftfs mount on /var/lib/docker/containers/cc8998ec188253a7587135794d65631c104a6c5048d89de498c257be71b4337f: open /proc/self/mountinfo: too many open files: unknown",
            "StartedAt": "0001-01-01T00:00:00Z",
            "FinishedAt": "0001-01-01T00:00:00Z"
        },
...

This case sometimes happen and i need to restart sysbox-mgr to resolved the issue, is there any way to fix this one?
Thanks

@myugan, at first glance it looks like sysbox-mgr is not able to allocate enough file-descriptors (fds) in your machine. Now, that's interesting because i'm not expecting sysbox-mgr to be a heavy consumer of fds. Next time you reproduce the problem, please get the following info to help us understand how many fds is sysbox-mgr (and sysbox-fs) consuming:
$ sudo lsof -p $(pgrep sysbox-mgr) | wc -l
14

$ sudo lsof -p $(pgrep sysbox-fs) | wc -l
16

Also, please get your current fds limits by doing:
$ sudo cat /proc/self/limits | egrep open
Max open files            1024                 1048576              files

$ sudo cat /proc/sys/fs/file-max
9223372036854775807

@myugan, at first glance it looks like sysbox-mgr is not able to allocate enough file-descriptors (fds) in your machine. Now, that's interesting because i'm not expecting sysbox-mgr to be a heavy consumer of fds. Next time you reproduce the problem, please get the following info to help us understand how many fds is sysbox-mgr (and sysbox-fs) consuming:
$ sudo lsof -p $(pgrep sysbox-mgr) | wc -l
14

$ sudo lsof -p $(pgrep sysbox-fs) | wc -l
16

Also, please get your current fds limits by doing:
$ sudo cat /proc/self/limits | egrep open
Max open files            1024                 1048576              files

$ sudo cat /proc/sys/fs/file-max
9223372036854775807

Another user (on the Slack channel) recently reported a similar problem. He was able to get around it by increasing the system limits on number of open files:
"DefaultLimitNOFILE=524288:524288" >> /etc/systemd/system.conf; systemctl daemon-reload; service sysbox restart

I've not tried this yet but you can use it as a temporary workaround while we root cause it.
As Rodny mentioned, we don't expect sysbox-mgr to open too many files, except possibly when starting a Sysbox container that has lots of inner Docker images in it. In that case it needs to copy some data around, and that can result in many files opened.
But I'll definitely take look to ensure we don't have a file leak somewhere in there.
How many sysbox containers did you have running at the time this occurred?
Thanks as always for bringing this up to our attention.

Another user (on the Slack channel) recently reported a similar problem. He was able to get around it by increasing the system limits on number of open files:
"DefaultLimitNOFILE=524288:524288" >> /etc/systemd/system.conf; systemctl daemon-reload; service sysbox restart

I've not tried this yet but you can use it as a temporary workaround while we root cause it.
As Rodny mentioned, we don't expect sysbox-mgr to open too many files, except possibly when starting a Sysbox container that has lots of inner Docker images in it. In that case it needs to copy some data around, and that can result in many files opened.
But I'll definitely take look to ensure we don't have a file leak somewhere in there.
How many sysbox containers did you have running at the time this occurred?
Thanks as always for bringing this up to our attention.

Can we also add LimitNOFILE=infinity to sysbox-mgr systemd files?
I got sugesstion from this https://github.com/systemd/systemd/issues/4997

Can we also add LimitNOFILE=infinity to sysbox-mgr systemd files?
I got sugesstion from this https://github.com/systemd/systemd/issues/4997

Can we also add LimitNOFILE=infinity to sysbox-mgr systemd files?

I've not tried, but that should be fine as a temporary work-around. I certainly need to root cause it so that I can place the appropriate limit in the sysbox-mgr systemd unit file.

Can we also add LimitNOFILE=infinity to sysbox-mgr systemd files?

I've not tried, but that should be fine as a temporary work-around. I certainly need to root cause it so that I can place the appropriate limit in the sysbox-mgr systemd unit file.

@myugan, when possible please collect the info I previously requested. It would also help if you could share details such as the number of sysbox containers running in parallel, and let us know if you are launching docker images that contain inner images.
This should help us understand if we have a file-descriptor leak and, if so, narrow down the area where it may be.

@myugan, when possible please collect the info I previously requested. It would also help if you could share details such as the number of sysbox containers running in parallel, and let us know if you are launching docker images that contain inner images.
This should help us understand if we have a file-descriptor leak and, if so, narrow down the area where it may be.

@rodnymolina
$ sudo lsof -p $(pgrep sysbox-mgr) | wc -l
809
$ sudo lsof -p $(pgrep sysbox-fs) | wc -l
30
$ cat /proc/self/limits | egrep open
Max open files            1024                 4096                 files
$ cat /proc/sys/fs/file-max
500000

@rodnymolina
$ sudo lsof -p $(pgrep sysbox-mgr) | wc -l
809
$ sudo lsof -p $(pgrep sysbox-fs) | wc -l
30
$ cat /proc/self/limits | egrep open
Max open files            1024                 4096                 files
$ cat /proc/sys/fs/file-max
500000

@myugan, thanks. If you obtained those numbers during steady-state (i.e. you were not launching/stopping a sys container right when you got them), it looks like we may have a fd-leak in sysbox-mgr. We will look into this.

@myugan, thanks. If you obtained those numbers during steady-state (i.e. you were not launching/stopping a sys container right when you got them), it looks like we may have a fd-leak in sysbox-mgr. We will look into this.

I looked at this problem last week, and could not reproduce it: with the latest sysbox-mgr (i.e., top-of-tree on the sysbox repo), I don't see any file descriptor leak. In fact, after deploying dozens of system containers on my host, lsof shows < 30 opened file descriptor for the sysbox-mgr (as expected). I also reviewed the code and do not see any file descriptor leak.
@myugan: do you happen to know what's the git commit for the sysbox-mgr on which you saw the problem? Thanks!

Hi @myugan , I was finally able to reproduce the problem you reported. Looks like we need to correct the sysbox file limit for both sysbox-mgr and sysbox-fs. They can open a large amount of files at certain times, in particular when many containers are running or during container start/stop.
We will be fixing this in the upcoming release. In the meantime, you can get around it by adding the following to the systemd unit files for both sysbox-mgr (/lib/systemd/system/sysbox-mgr.service) and sysbox-fs (/lib/systemd/system/sysbox-fs.service).
[Service]
...
LimitNOFILE=infinity
LimitNPROC=infinity

This is fixed in top-of-tree, and will be present in the upcoming Sysbox release.


[org-node] Announce update to network peers after updating references

Implements #56
Builds off of #53

@cloudhead Think we're ready for review. the announce is only happening in the track_peer_handler, want to confirm that this is the only place we need it.
You had mentioned a startup process for updating the refs, which I think may still need to be added, but want to consult with you where it should be implemented.

@cloudhead Think we're ready for review. the announce is only happening in the track_peer_handler, want to confirm that this is the only place we need it.

Not sure I get the intent here. What exactly are we announcing to the network? We need to announce after a push has happened.

@cloudhead Think we're ready for review. the announce is only happening in the track_peer_handler, want to confirm that this is the only place we need it.

Not sure I get the intent here. What exactly are we announcing to the network? We need to announce after a push has happened.

Good point, I think I had a second announce on the Gossip applied update match arm, must have deleted it when handling the merge conflict by accident...

@cloudhead Think we're ready for review. the announce is only happening in the track_peer_handler, want to confirm that this is the only place we need it.

Not sure I get the intent here. What exactly are we announcing to the network? We need to announce after a push has happened.

The thinking with track_peer_handler is that it calls set_head, which I think we would want to announce to the network... unless I am mistaken 🤔

Merged in 7a996be


Add  component for easier mutations

Add easier  component for easier mutations. Still needs docs, but everything should be working.
Before submitting the PR, please make sure you do the following:

[ ] Read the Contributing Guidelines
[ ] Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123)
[ ] Update docs in this repository according to your change
[ ] Run yarn changeset add if this PR cause a version bump based on Keep a Changelog and adheres to Semantic Versioning

Great job, I think it looks good overall. Left some comments below. However, I can't run it locally. When clicking sign in in the example, I get:
Error: Connection closed.
    at close (http://localhost:3000/@fs/.../node_modules/@shopify/hydrogen/vendor/react-server-dom-vite/esm/react-server-dom-vite.js?v=0952a143:419:31)

The response streams only this before the error:
S1:"react.suspense"
M2:{"id":"ShopifyProvider-LTIw

@frandiox this should be resolved

@rennyG The documentation is updated. I also added an experimental note at the top of each file. I copied the verbiage from other areas we mention experimental features.

@rennyG The documentation is updated. I also added an experimental note at the top of each file. I copied the verbiage from other areas we mention experimental features.


Fix storage directory

The certs get put in the following directory structure
/etc/letsencrypt.sh/certs/{some.domain}
/etc/letsencrypt.sh/certs/{other.domain}
I have a requirement to keep them in one directory which is not dictated by the domain names. This is handy in circumstances when the server with letsencrypt may not actually use the certificates itself.
The fix is quite easy - I can do a pull request but wanted you to check the following and see if it would be accepted:
in config.sh add variable if required:
LOCDIR="storage"
In letsencrypt.sh add the following line - defaults to domain name if LOCDIR not set:
Create certificate for domain(s)
sign_domain() {
domain="${1}"

locdir="${LOCDIR:-$domain}"

Replace all instances of
/certs/${domain}
with
/certs/${LOCDIR}

You can use hooks to move certificates to other directories or even upload them to other servers, whatever you need.

Would it be possible to include an example in hook.sh.example of how to move these automatically to /etc/ssl/private?  It'd greatly help us noobs.  Thanks!

@the-solipsist there are some examples in the wiki, i may add more, but in the repository i want to keep the hook example as clean as possible


Refactoring Code

This refactor mainly deals with moving the Model and Parts data structure returned during a search to just the Fetcher - Before it was duplicated and passed into ThangsAPI into a duplicate structure to complete the import. All the search results have just one instance in memory aside from the UI which needs to use the blender EnumProperty.
Aside from that the repetitive assignments to the 1-8 models were removed and there was a lot of general clean up.
For more improvements:
Re-add back in the folder structure for downloading.
Remove the tuple in the import function and replace with a class and/or the already made Model/Part Struct.
Clean up get_stl_search function for the real time mesh searching on thangs to use the new Model/Parts Struct.

I think it's pretty safe from our testing. Holding off the merge until the release is out too is totally fine.

If @ewalker-physna has already gone through testing for development and approved that I say we hold off.


New version: Speakeasy.speakeasy 1.451.6

Checklist for Pull Requests

[x] Have you signed the Contributor License Agreement?
[x] Resolve #196381

Manifests

[x] Have you checked that there aren't other open pull requests for the same manifest update/change?
[x] This PR only modifies one (1) manifest
[x] Have you validated your manifest locally with winget validate --manifest <path>?

[x] Does your manifest conform to the 1.9 schema?

Note: <path> is the directory's name containing the manifest you're submitting.

Automated with GoReleaser
Microsoft Reviewers: Open in CodeFlow

https://github.com/microsoft/winget-pkgs/issues/196381

This seems to work locally and just looks like a timeout in the action, anyway to kick it off again?

Manual Validation ended with:

2024-12-05 10:33:08.060 [FAIL] Installer failed security check. Url: https://github.com/speakeasy-api/speakeasy/releases/download/v1.451.6/speakeasy_windows_amd64.zip Result: 0x80004005

(Automated response - build 900.)

@stephengillie is there any more information on the windows defender error? I have scanned it locally on Windows 11 and no issues were picked up.
And I can't see anything in the github checks that were run.
Happy to submit a false positive to the Defender team but not sure what to submit as I don't have the details

@stephengillie I did submit to the Defender team and it can back with no malware detected

Verify:

@stephengillie is there any more information on the windows defender error? I have scanned it locally on Windows 11 and no issues were picked up.
And I can't see anything in the github checks that were run.
Happy to submit a false positive to the Defender team but not sure what to submit as I don't have the details

Sorry for the delay. Please find the log file attached. Here are some relevant bits:

10:33:08 AM: Detected 1 WinGet errors:
10:33:08 AM: 2024-12-05 10:33:08.060 [FAIL] Installer failed security check. Url: https://github.com/speakeasy-api/speakeasy/releases/download/v1.451.6/speakeasy_windows_amd64.zip Result: 0x80004005
10:33:08 AM: Detected 1 Manual Dependency:
10:33:08 AM:
10:33:08 AM: Detected 0 PowerShell errors:
10:33:08 AM: Detected 0 Application Log errors:
10:33:08 AM:
10:33:08 AM: Detected 1 Defender (with signature version ) errors:
10:33:08 AM: Trojan:Script/Wacatac.B!ml
10:33:08 AM:  = = = = Failing Manual Validation pipeline build 900 on VM 899 for Speakeasy.speakeasy Win10 version 1.451.6 x86  in 49.2742451 seconds. = = = =

Unfortunately, it seems that the signature version wasn't recorded. I'll have to check if something has changed there.


Minor typo

Fix minor typo
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Thanks!