error TS1046: Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier

I'm trying to include this module into an Ionic app and get the following on ionic serve:
[ng] ERROR in node_modules/yoga-layout-wasm/index.d.ts:26:1 - error TS1046: Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier.
[ng] 26 const mod: YogaWasm

I have:
"yoga-layout": "^1.9.3",
"yoga-layout-wasm": "^1.9.3-alpha.7",
"@types/yoga-layout": "^1.9.2",
NOTE: also there is another error, but that one can be at least solved by setting:
"compilerOptions": {
    "allowSyntheticDefaultImports": true,

[ng] ERROR in node_modules/yoga-layout-wasm/index.d.ts:1:8 - error TS1259: Module '"/priv/src/Startup/Embedded/hello1/node_modules/@types/yoga-layout/index"' can only be default-imported using the 'allowSyntheticDefaultImports' flag
[ng] 1 import Yoga from "yoga-layout";
[ng]          ~~~~
[ng]   node_modules/@types/yoga-layout/index.d.ts:413:1
[ng]     413 export = Yoga;
[ng]         ~~~~~~~~~~~~~~
[ng]     This module is declared with using 'export =', and can only be used with a default import when using the 'allowSyntheticDefaultImports' flag.

This is because CommonJS modules are being created, instead of ESM. Change in your rollup.config.js format from cjs to esm, then execute npm run build


Enhancement/paralel tasks

Adds the possibility to excecute tasks in parralel. An agent has one task layer for each animation layer in its corresponding animator (could be e.g. arm layer, heamd layer, leg layer etc.). In these layers, tasks are excecuted after each other which prevents conflicts between tasks utelising the same body parts. tasks in different layers are treated completly independently when normal parrlel scheduling is used.
In order to synchronise or time tasks between different layers, task bundels can be used. A taskbundel comprises tasks from different layers. The tasks are started at the same time (i.e. a layer that should start a task that belongs to a bundel waits until all other layers are also ready) and the tasks are also only completly finished when all tasks from the bundle are finished.
This new functionality is demonstrated in two sample scenes, Independent Tasks Sample and Task Bundle Sample.

I completly reworked the taskbundel concept. Taskbundels as object that can be scheduled no longer exist. Instead, every task can now delay its start and/or its end through its ReadyToStart/ReadyToEnd functions. With this, the functionality of the previous taskbundles can be inserted into tasks by giving them ready to start/end functions that delay until all tasks that are part of the bundel are ready to start/end. ReadyToStart/ReadyToEnd functions that implement this exact behaviour are provided in the ScheduleHelper.
Implementing it this way instead of the previous way with explicite task bundel objects has the advantage that the taskmanger can deal with all tasks the exact same way. Before, there were special methods for scheduling taskbundels and the taskmanger had to check if it was scheduling a taskbundel and treat it differently. Now, the taskmanger has absolutly no idea if a task it schedules is part of bundel or something like that, it only is informed if the task is ready yet or not. This greatly reduces duplicate code and is much more flexible for future extensions (e.g. delaying the start could be used for more complex dependency behavoiour or even game state dependent trigger like "delay greeting task until the user is close to the agent")


collect triggered warnings, delay printing their message until the end

This would make it much more useful as a library. As prints are not very useful outside CLI usage.


Making Spans similar

Getting closer with similar public surface. Making sure that scenarios covered by the others tests are working (Span tests work with ByteSpan and reverse)

looks good.


Add keyboard and mouse events extension

This PR adds a browser-only extension that enables support for keyboard and mouse events.
There are two more PRs for this, one in pxt-arcade and one in pxt-arcade-sim.
The API for keyboard keys treats each key as an individual controller button. There is no "get last character typed" block because this API is not meant for typing text, just letting the player have extra button options (typing in our sim would be super cumbersome anyhow given that we have keys that map to special functions like taking a screenshot).
Also, as an added safety feature all keyboard and mouse events are disabled in mutliplayer (the code doing the disabling is in pxt-arcade-sim).

I see cpp additions. How does this affect the v1 hex file size? Can we regression test hex files that were at the limit before?

I see cpp additions. How does this affect the v1 hex file size? Can we regression test hex files that were at the limit before?

Oh I guess this isn't for microbit. nevermind!

Can you add a block to show/hide the mouse pointer?


cmdline "help" gives nonsense suggestions.

Make sure you have done the following

[X] I have updated to the latest version of blink.cmp
[X] I have read the README

Bug Description
When using cmdline the suggesetions show env vars and other useless nonsense.
https://github.com/user-attachments/assets/7eda5d30-1984-4236-a48a-4cf662e1ca88
Relevant configuration
sources = {
        cmdline = function()
          local type = vim.fn.getcmdtype()
          -- Search forward and backward
          if type == "/" or type == "?" then
            return { "buffer" }
          end
          -- Commands
          if type == ":" then
            return { "cmdline" }
          end
          return {}
        end,
      }

neovim version
v0.10.3
blink.cmp version: branch, tag, or commit
v0.8.2

It'll now filter the items correctly when you use a .. The "nonsense" items are real help tags, but I agree that they should be preferred. Any ideas on how we should be sorting? Some specific help menus that are more relevant typically?

Ohh.. nice... will update as soon as it's available. sorry for my phrasing... I meant, when using a dot, they shouldn't be shown.. So, initially showing them is fine, but not when there's already some input provided like "vim."
To not "flood" the list, could they perhaps be hidden initially, and show a "$" (or any other special character) single entry instead?
I'd imagine something like this, let's assume blink is configured to show automatically

open cmdline
if the helptag doesn't start with an alphanumeric character, show only one entry with the first special character .. like "$"
if user starts typing a "$", only then expand the completions to filter by the users prefix. "$H" -> "$HOME, etc.."


'PRC' outputs 'Ethylene Gas' to input side for 'Hydrogen'

Version: 1.7.10-<IP_ADDRESS>5
YouTube link at bottom of post.
Imagine this setup:
BPT = Basic Pressurized Tube
PRC = Pressurized Reaction Chamber
'Electrolytic Seperator' splits H2O into 'Hydrogen' and 'Oxygen'.
'Oxygen' gets 'Excess Dumped' into a 'Gas Tank'.
'Hydrogen' goes into a 'Basic Pressurized Tube (=BPT)' which goes into a 'PRC' (pipeline length: 1).
'PRC' uses 'Biofuel' and 'Hydrogen' to create 'Ethylene'.
Sometimes Ethylene gets output to the same side the hydrogen comes in which results in a blocked 'BPT' which has to be manually replaced.
Side configs of 'PRC': Back is 'red' (input), right side is 'blue (gas output)'.
I tried everything plus google but there seems to be no way to filter or restrict a 'BPT' to a certain gas.
Imho this is a bug since the output config of the 'PRC' gets completly ignored.
P.s.: I'm relativly new to Mekanism. If I derped hard please go easy on me.
Naming: Mekanism items/blocks/options are surrounded by ' '.
As you can see in the following screenshots the 'BPT' contains 'Ethylene' not 'Hydrogen'.
'PRC's' front is pointing away from me in those screenshots.
Those 'Gas Tanks' on the left are empty.

Youtube link for those visual guys: https://www.youtube.com/watch?v=Gl9T3wpjFGo
Edit: Fixed typos, added screenshots, improved formatting.

Placing the 'Eloctrolyric Seperator' next to 'PRC' fixes blocking behaviour.

I used the same setup you described and was unable to reproduce the issue.  Make sure that you didn't just accidentally connect a tube with the wrong gas.
I kept the setup running for about 5 minutes, the first time with a constant flow of oxygen from the Electrolytic Separator:

I then cut off the Electrolytic Separator and still no Ethylene was output to the wrong area:
[] (http://puu.sh/oyakL/02bd5bc173.png)
I had the exact same configuration as you, auto-ejecting to the gas tank, and wasn't experiencing any issues.  There's a good chance that I fixed this in v9.

Indeed you might have :)
Thanks for your time checking it though!

hey this mekanism ui is absolutely atrocious.  Make sure you turn auto eject on and make sure its the gas tab.


Specify JSON Schema draft

What this PR does / why we need it
Towards https://github.com/giantswarm/roadmap/issues/2127
This PR changes the JSON Schema draft in values.schema.json from unspecified to the latest (2020-12).
Checklist

[ ] Update changelog in CHANGELOG.md.

Trigger e2e tests
/test create
/test upgrade

/test create
/test upgrade

@fiunchinho How can I find out what went wrong in the tests?

@fiunchinho How can I find out what went wrong in the tests?

Let me take a look. I don't think it's related to your change at all, so if this is blocking you, you can go ahead and merge it with admin permissions while I take a look at the tests.

/test create

/test upgrade


snapshot() function

the Netbox API has the 'snapshot()' function
This will take a snapshot of the object, and when saved, the difference will be logged.
I don't see this implemented in pynetbox. Can this be added ?
ty!
Pieter

Can you tell more about this snapshot feature, like a documentation link or API path?

snapshot() is an internal method on the Python model. It's called automatically as necessary to effect change logging (aside from the case documented in bug #6389). It's not something that can be exposed remotely, not should it need to be. What are you trying to accomplish?

When using the custom scripts, i have to call the snapshot function before checking an object. Otherwise the save() does not store the diff.
But I found in the meantime that through pynetbox, the diff is there after an update.
So all good, nothing required to be changed!
Peter


Use frictionless framework v5

Update the extension to use Frictionless Framework version 5. Change the validate function from Goodtables to the Frictionless equivalent.
TODO:

Update the Report component to display the validation results using the new React component.
Add more documentation in how to pass the option parameters to the validate function. With goodtables you could pass skip_rows and headers options that are not supported by the current validate.
Add tests for the new validate options

@aivuk this PR should be against dev-v2 right?

@aivuk this PR should be against dev-v2 right?

yes, sorry about that. I already changed it to dev-v2 now

@aivuk The Aborted (core dumped) errors were not a Docker issue, but a max recursion error introduced by a change in CKAN core, tests are good now!

@roll  In the past we could pass to to the goodtables validation function an options json object where it was possible to define which tests to skip and pass parameters about the layout of the data, as number of rows, headers, etc https://github.com/frictionlessdata/ckanext-validation/#formats-to-validate
In this PR I'm using directly the Frictionless validate function at https://github.com/frictionlessdata/ckanext-validation/blob/ae2087656712b3198fca66c45e2f45fc2a3c1cac/ckanext/validation/jobs.py#L154 and passing a "options" json object stored in the database by the user, but I couldn't find a way to pass the parameters to customize the validations checks as https://framework.frictionlessdata.io/docs/checks/table.html. What would you suggest?
@amercader

Hi @aivuk,
In v5 the ad-hoc validation function got standardized:
schema = Schema() # create schema according to Table Schmea spec
checklist = Checklist() # create checklist according to https://framework.frictionlessdata.io/docs/framework/checklist.html (see API reference)
resource = Resource(..., schema=schema, checklist=checklist) # create resource according to Data Resource spec

You can consider storing the whole validation information as a resource descriptor in ckan database:
resource
  path
  scheme
  format
  ...
  schema
  checklist

and then just use Resource(descritor).validate()

So in the Framework now the whole information of data + schema + validation rules might be stored/shared as a resource descriptor. As one chunk of metadata. I think it's quite similar to greatexpections approach =)

UPD.
I missed Tabular Dialect in the first place. Now it's added as it's needed to manage heaer rows etc

Also, as a part of Frictionless Application (components@2) I'm finishing visual components to create customizable editors for these metadata as:

Resource Editor
Dialect Editor
Schema Editor
Checklist Editor
So this metadata boundaries now is reflected on UI level too

So when you need to UI part you just need to create a bootstrap modal with:

which will edit the resource descriptor.

Also, as a part of Frictionless Application (components@2) I'm finishing visual components to create customizable editors for this metadata as:
* Resource Editor

* Dialect Editor

* Schema Editor

* Checklist Editor

So these metadata boundaries now is reflected on UI level too

That will be great because the next steps will be to improve the UI to customize the validation steps in CKAN Resource page. I asked myself with it would be possible to use just some of the components from the Frictionless Application, like we are doing with the Report component. Thanks!

Yea that's the plan -- fully-reusable component for all metadata Frictionless has a package/resource/schema/etc that can be mixed in different configurations. We will maintain them as a part of the application codebase but release them as a separate NPM package.

@roll Is there an example of a Resource descriptor that includes the schema, checklist and dialect? Currently in ckanext-validation we have two fields saved in the database, the schema and the options, that I think that one it will not be necessary anymore. What you suggest is to just have a field where the user store all the resource descriptor information? What is the best way to create a descriptor, create the checklist separately, the layout, then the resource and save its descriptor? I want to create some descriptors with different parameters for the tests

Note that v5 has a clear boundary between descriptors and object model so the most explicit way of working with metadata will be:
resource = Resource.from_descriptor()
...
descriptor = resource.to_descriptor()

@roll @aivuk Note that the current version of ckanext-validation stores two separate fields:

schema: a Table Schema descriptor
validation_options: what is says on the tin, were passed directly to goodtables

I think that in terms of interoperability it is important to keep the schema (which is based on a standard) separate from the validation options (which are specific to frictionless framework). The idea is that schema can be used by other integrations like the DataStore etc. so I'm keen on keeping it separate. We can definitely store the whole validation descriptor (schema + validation rules) in the validation_options and keep in sync the schema  subset, or we can keep them separate and combine them when we need to call the validation, which might be probably easier in terms of keeping the current fields, validators etc (for the CKAN metadata, not for the data)
Another question, is there a way of translating goodtables validation optins to framework validation descriptors? I'm thinking in terms of migrating existing installations of ckanext-validation that are using the old options (I'm assuming there are no changes at the schema level as it's based on Table Schema)

We can definitely store the whole validation descriptor (schema + validation rules) in the validation_options and keep in sync the schema subset, or we can keep them separate and combine them when we need to call the validation, which might be probably easier in terms of keeping the current fields, validators etc (for the CKAN metadata, not for the data)

I was thinking a bit about it and arrived at the same conclusion, I think the schema must be separate from the validation options, but I still haven't explored too much in how this split can be done and merged easily before running the validation. I will try generate some different descriptors using the framework and do some tests in how this can be done, but I think it will be straightforward.

Another question, is there a way of translating goodtables validation optins to framework validation descriptors? I'm thinking in terms of migrating existing installations of ckanext-validation that are using the old options (I'm assuming there are no changes at the schema level as it's based on Table Schema)

I think we would need to write new code to do that. The problem is that I couldn't find a good documentation in the goodtables format, only these pages:

https://github.com/frictionlessdata/goodtables.io/wiki/.goodtables.yml-reference
https://github.com/frictionlessdata/goodtables.io/wiki/Configuring

@amercader
What I suggest is to store a resource desciptor according to Data Resource Standard. It has standard properties including resource.dialect (CSV/Table Dialect standard) and resource.schema (Table Schema standard). The only framework specific (custom) property will be resource.checklist (aka validation options)
Of course, if you think it's better to separate schema it will also work as it's also an interchangeable standard

@aivuk
https://github.com/frictionlessdata/framework/tree/v2

Thanks both for the input.
I still think keeping just the Table Schema separate makes more sense to keep the whole implementation as is. So @aivuk let's keep the separate schema and validation_options field so everything keeps working as now and piece together the resource descriptor needed by framework just before validation.
IIUC the new validation options format can be something like {"dialect": {}, "checklist": {}"}, which will be combined with the schema to create the resource descriptor needed

I agree it's of course the quickest way. In the end, it doesn't matter how an exact implementation stores Frictionless concepts internally.
In the future, I think it still will be good to rebase on more standards / framework@5 compatible terminology (e.g. dialect is a resource/file's property, not a validation option, and also you might need to store encoding/format/compression/etc making validation_options basically a resource descriptor de-factor).
@amercader
I have a more high-level question. Have you ever thought about adopting (Tabular) Data Resource Standard to be an internal part of CKAN for resource/file metadata description? We started a similar discussion with Dan Feder from DCAN and, currently, they are working on supporting something like this. In Frictionless Application, any resource is also described by Data Resource descriptor.

@roll see https://github.com/frictionlessdata/ckanext-validation/discussions/72

@amercader @roll I did update in my last commit the plugin to parse the validation options as:
{"dialect": { ...}, "checks": {...}}

I used "checks" instead of "checkslist" to follow the frictionless framework nomenclature. Options as "skip_errors" or "pick_errors" can also be passed. @roll do we have a documentation for how the Dialect descriptor must be written? I'm generating it using the framework as:
dialect = Dialect(header=True, header_rows=[1], comment_char='#')
dialect.add_control(formats.CsvControl(delimiter=';'))
dialect.to_descriptor()

Do we have the documentation for how to pass the checks parameters descriptors? I could find only an example here https://framework.frictionlessdata.io/docs/checks/table.html#using-declaratively. I think it would be a good idea to create a list in the framework documentation with all the possible checks and their parameters, and this can be generated automatically.
Currently in the CKAN Resource Validation Options form we don't give much information to the user in how to write the options:

We just point to the github repository of ckanext-validation. I think it would be better to add a short text, maybe a button that would open a small dialog window with some help text and point the user to a better page, probably a link to the Frictionless framework documentation. Same thing for the Data Schema field.

Hi @aivuk!
Can you please elaborate on the first question (how to pass)?
Regarding the checks docs it's for example here - https://framework.frictionlessdata.io/docs/checks/table.html#table-dimensions - and others in the menu under "Validation Checks". All of them have a "API Reference" section. Also, @shashigharti is currently working on adding more docs to checks/steps instead of "NOTE: add docs"

TBH I don't fully understand a new approach. If there is still a field for CKAN end-users called "validation_options" - how they will be filling it if framework@5 doesn't even have this concept of validation options? I thought it was for internal representation, not user-facing.

TBH I don't fully understand a new approach. If there is still a field for CKAN end-users called "validation_options" - how they will be filling it if framework@5 doesn't even have this concept of validation options? I thought it was for internal representation, not user-facing.

The ckanext-validation is running the function validate  from frictionless framework. If an user wants to pass parameters to the validate as skip_errors or pick_errors, or customize the dialect, or pass parameters to the validation checks, s/he is going to do it passing a json in the "validation options" field.

Can you please elaborate on the first question (how to pass)?

I mean a simple list with all the checks options names as 'table-dimensions' and their parameters. The only list that I could find was for the baseline checks but there is no documentation for what each one does https://framework.frictionlessdata.io/docs/checks/baseline.html

@roll Just an example, currently the user can put in the validation options field the json:
{
  "checks: [
    {"type": "table-dimensions", "minRows": 3},
    {"type": 'ascii-value'}
  ],
  "dialect": {
     "header": true,
     "headerRows": [1],
     "commentChar": "#",
     "csv": {
       "delimiter": ";"
     }
}

@roll

TBH I don't fully understand a new approach. If there is still a field for CKAN end-users called "validation_options" - how they will be filling it if framework@5 doesn't even have this concept of validation options? I thought it was for internal representation, not user-facing.

We just need a way for users for inputing parameters for the validate() call. Right now we have this existing field which accepts a JSON object so it's easy to dump everything there rather than create separate checks, dialect, skip_errors etc fields in the form. The end goal should be to have a proper UI for tweaking all these settings, which I assume would be another frictionless component. When that's ready we'll refactor the form to use this and internally we'll settle on a way to pass the parameters to frictionless' validate() function

@amercader
That totally sounds good as an intermediate step. Just wanted to ensure that we're on the same page regarding the final vision (a UI component field instead of the validation_options field)

Great work @aivuk ! :rocket:


Find the Unique Element in array

📚 Documentation
You have been given an integer array/list(ARR) of size N. Where N is equal to [2M + 1].
Now, in the given array/list, 'M' numbers are present twice and one number is present only once.
You need to find and return that number which is unique in the array/list.
Have you read the Contributing Guidelines on Pull Requests?
Yes

Please /assign this to me

/assign


There is a mistake in the code running

When I ran the atrank/train.py code, there was a TypeError: Object of type 'Flag' is not JSON serializable. Is it an environmental problem?

This could be caused by the version of tf.FLAGS. You can try to uncomment the code in the 121-122's lines of train.py, which becomes:
for k, v in config.items():
  config[k] = v.value

If the above doesn't work, you can just comment out the code in the 54's lines of train.py, which becomes:
# print(json.dumps(config, indent=4), flush=True)

This will cancel the printed information, but it will not affect the rest of the program.

The problem has been solved. Thank you for your advice.


Add reference to WebAssembly book

This book has a chapter on creating an app with Yew (I haven't reviewed it personally): https://pragprog.com/book/khrust/programming-webassembly-with-rust

This book was included once, I used this page: https://www.oreilly.com/library/view/programming-webassembly-with/9781680506846/
but I removed it in this commit: https://github.com/jetli/awesome-yew/commit/55b68bf2280452e70d4a0bdee869999bc742b9f8, because I cannot review it personally too, and I prefer online books.
I can add it back if you think it's useful.

Done, added it back: https://github.com/jetli/awesome-yew/commit/cc3df0f6257a08eba19d30e8cc6f061ec9b1aba8

Yeah I think it's useful, thanks!


HTTPHeaders.isKeepAlive(...) does only match the first value.

HTTPHeader.isKeepAlive(...) must check all header values,  not only the first one:
https://github.com/apple/swift-nio/blob/master/Sources/NIOHTTP1/HTTPTypes.swift#L302

This is just an initial solution, built on the hypothesis that using String api may be somewhat slow, so made the comma separator and the extractor low-level. Unit tests included for those buffer utilities.
If this was an approved approach, we should cache the keep-alive and close conversion to bytes

You could check the pull request again, there is a new commit
#414
@weissi


Unable to install Flask-2.2.5-py3-none-any.whl

Collecting Flask==2.2.5
Using cached Flask-2.2.5-py3-none-any.whl (101 kB)
ERROR: Could not find a version that satisfies the requirement Flask-RESTx==0.5.2 (from versions: 0.0.1.dev0, 0.1.0, 0.1.1, 0.2.0, 0.3.0, 0.4.0, 0.5.0, 0.5.1, 1.0.0, 1.0.1, 1.0.3, 1.0.5, 1.0.6, 1.1.0)

I've just rollbacked requirements.txt to the last good version.

Done!! Thanks


Add the --exclude flag

see: https://github.com/docker/compose/issues/4133
see: https://github.com/docker/compose/pull/8102

@HansAschenloher Thanks for the PR. It looks like the upstream PRs are still open. We'll add any documentation updates when the fix is part of an official Docker Compose release.

Hello @usha-mandya. This PR can be closed due to this

Thanks @ulyssessouza.


Trying to implement a take(x) operator

Hi - I'm trying to implement a take(x) operator, but I'm running into some problems creating my Stream.
extension StreamType{
	public func take(count:Int) -> Stream<Self.Event> {
	    return Stream { observer in
	        let simpleDisposable = SimpleDisposable()

	        var remainder = count
	        self.observe(on: nil, observer: { (event) -> () in
	            if remainder > 0{
	                observer(event)
	                remainder--

	                if remainder == 0{
	                    simpleDisposable.dispose()
	                }
	            }
	            else{
	                print("WAS NOT DISPOSED")
	            }
	        })
	        return simpleDisposable
	    }
	}
}

This was my attempt - however the WAS NOT DISPOSED is being logged, showing that I've not torn down the observe(). I'll keep looking into it (and will post followup), just wondering if anyone has any suggestions for what I missed.
Cheers - Ian

Cool I've got it (I think). I was using SimpleDisposable incorrectly - I now use an "outer" disposable which the observer's disposable is added to - and which can be .dispose()'d from inside the observe closure.
extension StreamType{
    public func take(count:Int) -> Stream<Self.Event> {

        return create { observer in

            let outerDisposable = CompositeDisposable()
            var remainder = count
            let disposable = self.observe(on: nil, observer: { event in
                if remainder > 0{
                    observer(event)
                    remainder--

                    if remainder == 0{
                        outerDisposable.dispose()
                    }
                }
                else{
                    print("NOT DISPOSED")
                }
            })

            outerDisposable.addDisposable(disposable)
            return outerDisposable
        }
    }
}

the "NOT DISPOSED" line is never reached now. 🎉


fsync parent also after rename

After reading more I found it's recommended to fsync parent also to be sure data is persisted ok.
You can see here more https://www.quora.com/Linux/When-should-you-fsync-the-containing-directory-in-addition-to-the-file-itself
Also I see other implementations are doing it https://github.com/untitaker/rust-atomicwrites/blob/master/src/lib.rs#L200
It's not a bit deal, I can fsync parent after commit but would be nice to have this included

sure thing, great job 👍
On Wed, May 15, 2024, 04:40 Andrea Corbellini @.***>
wrote:

Hi, yes, this change has already been made and will be part of the next
release:
https://github.com/andreacorbellini/rust-atomic-write-file/commit/7da14cbe37c011f3f9968a78015288ea60cd04e1
For context: when I first made this crate, I thought that it would be the
caller responsibility to sync the directory if they wanted to (there are
some cases where they might not want to; for example when writing multiple
files, in which case it makes sense to sync the directory only once at the
end). And so I omitted that call to save a syscall. However, I later
realized that callers might not be aware or want to deal with such low
level details, and so I added the call.
Thanks for reporting this. I'll close the issue once the release is made.
On Tue, May 14, 2024, 17:10 Radu Marias @.***> wrote:

After reading more I found it's recommended to fsync parent also to be
sure data is persisted ok.
You can see here more

https://www.quora.com/Linux/When-should-you-fsync-the-containing-directory-in-addition-to-the-file-itself

Also I see other implementations are doing it

https://github.com/untitaker/rust-atomicwrites/blob/master/src/lib.rs#L200

It's not a bit deal, I can fsync parent after commit but would be nice
to
have this included
—
Reply to this email directly, view it on GitHub
https://github.com/andreacorbellini/rust-atomic-write-file/issues/8,
or
unsubscribe
<
https://github.com/notifications/unsubscribe-auth/AACOKLXNKN4Q4B4OARDLP53ZCKRVZAVCNFSM6AAAAABHXDVGE2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGI4TMNRRGA3TQMA>

.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

—
Reply to this email directly, view it on GitHub
https://github.com/andreacorbellini/rust-atomic-write-file/issues/8#issuecomment-2111426912,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AB5TC4CWAAZZQ7VLEMOJXA3ZCK4IXAVCNFSM6AAAAABHXDVGE2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJRGQZDMOJRGI
.
You are receiving this because you authored the thread.Message ID:
@.***>


ARM support

We need to add ARM build so that we can support major embedded hardware like Raspberry Pi.
I'm not very familliar with cross-compiling but I assume the steps to achieve arm support would probably be like this:

Duplicate .github/workflows/main.yml so that the new file will target arm.
Install arm build tools (i.e. binutils, gcc for arm, etc.) in build steps
Use CC=... for setting compiler
Tests are even more tricky because GitHub runners are amd64. Maybe this technique would help but in the worst case we could just skip the test step and trust user feedback i.e. the good old "tested on X, Y, Z" section in readme.

Alternative solution: https://github.com/docker/setup-qemu-action


Add replication entry to pg_hba.conf file

This will allow streaming replication between appliances
https://trello.com/c/bRx6yN0C
@gtanzillo @jrafanie

:+1:

@kbrock @jrafanie Do I also need the same sort of trick with the ERB for using ssl?
http://www.postgresql.org/docs/9.4/static/auth-pg-hba-conf.html seems to say that hostssl is used if we only want to match ssl connections. So not having it shouldn't break anything right?

@carbonin yes. You can not specify ssl only with replication. So this is good.
Also of note, this line is standard postgres configuration.


Can't use implicit datetime fields as sort key (Gen 2)

Describe the feature you'd like to request
Right now if I want to create something like an access log with the sort key as the create date, I have to do this:
AccessLogs: a
    .model({
      my_pk: a.string().required(),
      dateTime: a.datetime().required(),
      superImportantLogData: a.string().required(),
    }).identifier(['my_pk', 'dateTime'])

Describe the solution you'd like
It would be nice if we could just use the implicitly created createdAt field as the sort key like this:
AccessLogs: a
    .model({
      my_pk: a.string().required(),
      superImportantLogData: a.string().required(),
    }).identifier(['my_pk', 'createdAt'])

Describe alternatives you've considered
The workaround of adding a second dateTime field is not horrible for many use cases, but it has the following issues:

If a record is created from the user's browser, the dateTime field could be wrong if the user's system clock is wrong (either unintentionally or maliciously).  The malicious case might be used to move their data to the top of a sort that all users see.
Extra code to initialize the dateTime field
Duplicate data in the database causing increased size usage

Additional context
No response
Is this something that you'd be interested in working on?

[ ] 👋 I may be able to implement this feature request

Would this feature include a breaking change?

[ ] ⚠ This feature might incur a breaking change

Hey @jpangburn, Thanks for raising this. We are marking this as a feature request for the team to evaluate further.


Install error

Problem
Just tried to install the extension with a workspace open to some rust code. Debian buster, I think I had nightly set as default for the current project? I normally default to stable.
Logs

OS: linux (5.10.0-0.bpo.8-amd64)
VSCode: 1.60.1
Error message
error: failed to install component: 'cargo-x86_64-unknown-linux-gnu', detected conflict: 'etc/bash_completion.d/cargo'

Full log: https://paste.rs/o22

Thanks for the bug report @rpavlik. It seems like there's a problem with your system configuration and rustup. Can you try running this command and let me know what happens?
rustup toolchain install nightly-2021-09-23 -c rust-src,rustc-dev,llvm-tools-preview

info: syncing channel updates for 'nightly-2021-09-23-x86_64-unknown-linux-gnu'
info: latest update on 2021-09-23, rust version 1.57.0-nightly (308dffd25 2021-09-22)
info: component 'llvm-tools-preview' for target 'x86_64-unknown-linux-gnu' is up to date
info: component 'rust-src' is up to date
info: component 'rustc-dev' for target 'x86_64-unknown-linux-gnu' is up to date

  nightly-2021-09-23-x86_64-unknown-linux-gnu unchanged - rustc 1.57.0-nightly (308dffd25 2021-09-22)

info: checking for self-updates

Ok, well that seems to work. Try this one last command. If this works you should be good to go.
cargo +nightly-2021-09-23 install flowistry --force

Going to close this for now unless the issue arises again.


Sync original

Keep everything up to date with master manually, since it'll be annoying to do cherry picks one by one.
The only actual change is in the nav bar (please make sure I translated it correctly)
https://github.com/reactjs/zh-hans.reactjs.org/pull/78/files#diff-47dbe773f9d34ba345d46400eabc6448L107

There is no problem with your translation.


Clarify Linux Desktop setup

Add introduction for context
Clean up markup
add -new-window flag
replace "application" with "runtime" to avoid confusion between the browser app and the web app the user might be creating an desktop entry for.

Closes #2

Runtime word can create a confusion like application word. Browser would be better for this situation.
Also thanks for the PR.


Add description and website_url columns to oauth_apps

Take into account oauth_apps are synced with central so we might want this new columns in both places.
We should include the columns to the list of public data (for granted_oauth_apps)
description is meant to have three or four lines explaining what the OAuth app is about.
website_url will be used whenever we need to redirect a user to the oauth app to log in or to get any kind of information about it.

Also include icon_url as public data.


braided

We need an implementation of braided categories, see here.

Addressed in https://github.com/discopy/discopy/pull/129


Typo + Clarification

https://github.com/BeginWallet/begin-core/blob/d20b4f7b88c4978f9f076be7cc363010d2ba8922/src/core/transaction.ts#L19
type here: Should be TRANSACTION and also why are these being defined as constants rather than taken from the currently selected and active network parameters? This seems difficult to maintain, particularly for native apps, if the wallet requires another pass through the "App Stores" before an update from the network can be applied.

Also a similar (but different) typo here:
https://github.com/BeginWallet/begin-core/blob/d20b4f7b88c4978f9f076be7cc363010d2ba8922/src/core/transaction.ts#L25


created 404 page, fixes #715

I rebased my branch against the master don't rebase.

Merged.
Thanks for your contribution !


Bug: Wrong transformation of use function keywords

Detailed description
Imposter wrongly prefixes use function (and possibly use const)  keywords.
For instance:
use function Stringy\create as s;

becomes:
use My\App\Vendor\function Stringy\create as s;

instead of:
use function My\App\Vendor\Stringy\create as s;

Possible implementation
This should probably be refactored to take into account use function and use const?:
https://github.com/TypistTech/imposter/blob/4cf8b1c6cdc74c05b651d6fbc4c67ac6f1b44277/src/Transformer.php#L127
Try:
First, prefix use function and use const statements. Then, do a negative lookahead for both in a separate prefixing?
Something along these lines:
    // Prefix 'use function'
    $pattern = sprintf(
        '/%1$s\\s+(?!(%2$s)|(\\\\(?!.*\\\\.*))|(Composer(\\\\|;)|(?!.*\\\\.*)))/',
        'use\\s+function',
        $this->namespacePrefix
    );
    $replacement = sprintf('%1$s %2$s', 'use function', $this->namespacePrefix);
    $this->replace($pattern, $replacement, $targetFile);

    // Prefix for 'use const'
    // Similar to above

    // Finally
    $pattern = sprintf(
        '/(?<!function.+)%1$s\\s+(?!(function|const)\\s+|(%2$s)|(\\\\(?!.*\\\\.*))|(Composer(\\\\|;)|(?!.*\\\\.*)))/',
        'use',
        $this->namespacePrefix
    );
    $replacement = sprintf('%1$s %2$s', 'use', $this->namespacePrefix);
    $this->replace($pattern, $replacement, $targetFile);

Your environment

Imposter plugin version: 0.3.0
PHP version: 7.0.30
Operating system: Ubuntu 16.04
WordPress version: 4.9.8

Thanks for reporting!
I will patch the regex in the weekend.
For long term solution, we need something better than regex.

Fixed in #69


CocoaPods cleanup, Carthage compatibility

Removed the Example pods from source control.
Also the Example schemes has been un-shared, since it created issues in Carthage.
The git ignore file has been extended with CocoaPods, Carthage and Xcode 7 exclusions.

I appreciate the assistance with Carthage, I'm not super familiar.
Can you tell me the particular need to remove Pods from source control - it's not immediately apparent

Since the pods can be recreated using the podfile at anytime, we shouldn't add the Pods directory, only the podfile. It's just good practice to keep your repository cleaner.

Removing all schemes from the GlossExample project leaves it and its test suite unable to be run. Would it mess with Carthage to reintroduce one un-shared scheme on that project ?

@bojan can you weigh in on this before i merge ^

@hkellaway I've manually added the GlossExampleTests target and the test seem to work just fine. Few of them fail, but the target compiles.

Also, before I push the new commits, I've noticed that the deployment target of the library is iOS 9.0. No iOS 8 support or is this a mistake?

I've updated the readme for a better Carthage integration. Everything should work now.

Awesome, thanks. Yep, deployment should be 8.0

@hkellaway Great :+1: When's 0.5.3 coming?

latest, Sunday


We can't get a list of the existing parsers (only the default_parsers)

I need a list of the existing parsers for this: https://github.com/scrapinghub/dateparser/pull/797

It could be probably fixed by this: https://github.com/scrapinghub/dateparser/pull/790/files


HTTP/2: to many stream window size updates after connection window size update

Situation:

A client opens a single connection and add lots of streams. Cowboys initial window size is set to 64k for the connection and also 64k for each stream. The client send a smallish request on each stream, about 1k each. The server does not process the requests (simple slow processing).

Each request will consume 1k of the connection window size and 1k of its own stream window size. After 64k request the connection window size will be exhausted.

(not sure if it matters), due to the varying requests sizes (the requests are only about 1k), the DATA frame of the request that consumes the last piece of the connection window, will be split into 2 DATA frames.

Flow control does not apply to HEADER frames, the client can therefore continue to open new streams, but it can not send DATA frames on them since the connection window is exhausted. All those streams and requests are now stalled.

At this point some request processing finishes and a few response are sent. The

After the response, cowboy send a connection WINDOW_UPDATE with a very large window.

This is then followed up by a WINDOW_UPDATE for every single stream that had send HEADER, but no DATA frames, yet.

That last step (7.), depending on the number of pending requests, cause are rather large and IMHO unnecessary storm of stream window updates. In all the pending streams, the stream windows had enough space left so that no change was needed and the connection window update should have been enough to allow them to continue.

Do you have the WINDOW_UPDATE sizes that were sent, both for the connection and each individual streams?

Yes that's perfect, thank you.
Considering the increment, I think it's just Cowboy handlers that have called read_body which defaults to 8MB read body size. Because 8MB is more than the current stream's window, Cowboy increases it preemptively to let the client upload without being blocked. Because many streams try to read bodies at the same time, Cowboy simply has to send many WINDOW_UPDATE frames.
Note that this only happens after the handlers have started calling read_body as Cowboy will not increase the window before to avoid being overloaded, as well as to avoid using resources if the body ends up discarded. This is why you end up with a split DATA frame in 3.
Cowboy does not loop over all streams sending a WINDOW_UPDATE, but each stream may independently send it. It appears weird because of the nature of the test.
In practice you may reduce the size read by read_body to avoid this. If you expect the body to be below, say, 10K, then set that as the length option and WINDOW_UPDATE frames will not be sent.


Erroring on gifs

Command that caused the error
any of the image editing commands
Image that caused the error
any gif
Steps to reproduce

Get a gif from tennor
run any editing command like caption, flip, etc
hope it works
error in chat
tenor

Self-hosted instance?
Yes
Error file
Message: Magick: no decode delegate for this image format `' @ error/blob.c/BlobToImage/458

Stack Trace: undefined

Additional context
it works on nomral images but gifs from tennor error

You'll need to get an API key from Tenor over here and put it in .env as the TENOR variable.


Cannot resolve UserManager in the Identities repository for the Admin API

Readiness checklist

[ ] I added/updated unit tests.
[ ] I added/updated integration tests.
[x] I ensured that the PR title is good enough for the changelog.
[x] I labeled the PR.

@JLSRKonk Did you read my comment in Rocket Chat? If so, can you please change the title of the PR accordingly?


Typo "@mention"→"@mention"

bold with escape characters
https://docs.microsoft.com/en-us/microsoftteams/platform/get-started/obsolete-get-started-dotnet

Docs Build status updates of commit 3ad614a:
:warning: Validation status: warnings

File
Status
Preview URL
Details

msteams-platform/get-started/obsolete-get-started-dotnet.md
:warning:Warning

Details

msteams-platform/get-started/obsolete-get-started-dotnet.md

Line 10: [Warning] Invalid file link:(~/get-started/get-started-dotnet).
Line 11: [Warning] Invalid file link:(~/get-started/get-started-nodejs).
Line 15: [Warning] Invalid file link:(~/concepts/apps/apps-overview).
Line 22: [Warning] Invalid file link:(~/get-started/get-started-tenant).
Line 43: [Warning] Invalid file link:(~/get-started/get-started-tenant).
Line 44: [Warning] Invalid file link:(~/get-started/get-started-configure-teams).
Line 126: [Warning] Invalid file link:(~/get-started/get-started-dotnet-in-azure).
Line 138: [Warning] Invalid file link:(~/concepts/apps/apps-overview).
Line 146: [Warning] Invalid file link:(~/concepts/bots/bots-create).
Line 172: [Warning] Invalid file link:(~/concepts/apps/apps-upload).

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Blank screen - File Menu > New Wallet

Seem to be stuck on this page, how do I get in and set up a software wallet.

Use the File menu at the top of the screen.


Example project fixes and readme additions

Changes:

Fixed the type from Unet to Upscalers in the example appsettings.json folder
Fixed example 2 in the console app
Added readme instructions for 'how to get started' with the example app
Added an experimental script to auto-download the required models for the example project to an onnx-models/ directory

Also added this folder onnx-models/ to git ignore

Added short FAQ section with some common configuration errors

Thanks for the PR :)


Adding FSI autocomplete API

This is probably not directly relevant to Ionide (we're far from having FSI autocomplete), but it could be nice to support this for other editors. Jason did lots of work on this for XS, so this is just to track some basic info about what we need to add.

F# Interactive service in XS is here: https://github.com/fsharp/xamarin-monodevelop-fsharp-addin/blob/master/MonoDevelop.FSharpi.Service/Program.fs
It calls some functions from https://github.com/fsharp/xamarin-monodevelop-fsharp-addin/blob/cb7ea0814ce61af6771d0b5ebb57ec4dabb748b0/MonoDevelop.FSharp.Shared/Completions.fs (and generally the shared folder)

How it works:

input let x = 1 - The input command evals input
tooltip List.map - Get tooltip (for fully qualified complete name - also variables defined before)
completion 3 Lis - get completion at column 3 for prefix List (can have more text afterwards too)
parameter-hints 0 head - (bit weird :)) you have to run completion first - this then searches for head in the completions and returns - some sort of hint :) TBD

/cc @nosami @enricosada

I started looking into this...
@nosami - one question - what do you think is the best long term plan for sharing the code? I just copied the files for now, but they look like a basic set of things that would be nice to share in some way. Should we have one home for them & use Paket file dependencies? Or some reusable component? Or just copy & edit as needed?

Would make sense for the code to be centralised somewhere. Think I'd like to use it as a binary dependency but happy to go along with whatever you guys think is best.
Seem to remember you saying that you'd like to add a Suave wrapper. So long as that is separate from the rest, then anything else is fine.

Most of the code was copied from monodevelop and then all the monodevelop stuff was stripped out. There are some oddities in the code as a result of this...e.g these blocks used to contain syntax highlighting code

Sounds good. I have (quite astonishingly) done some Git magic and imported your shared folder into this project (!) with history (!!): https://github.com/ionide/FsInteractiveService/compare/master...tpetricek:master2

@nosami Do you have user id on nuget.org, so that I can add you as a co-owner of the package?

@tpetricek Yes. It's jasonimison. Thanks!

@nosami Added you as owner for the http packge and the shared package, so that you can release both when you make changes. You should now also have admin rights for this repo.
The shared package is pretty much exactly what you had in the Shared project in Xamarin. The only change I did is that I removed the mutation that was remembering state after calling completion (so that it is available when calling tooltip). The getCompletions function now returns symbols that you need to pass to getCompletionTooltips.
I have not ported the standard I/O based interface to this project yet, but it would be awesome to add that for the Emacs fans here. I have some other more high-priority things, but would be happy to help if needed.
@enricosada If you want to replace F# Interactive in VS with something awesome, you should now have all you need :-) check out the new docs:

Running snippets via HTTP API
Getting IntelliSense via HTTP API

nice work!


Fidget not 100% right-aligned

It's already visible in the demo gif that the fidget itself is not fully aligned with the right border the same way the tasks are. There are two spaces separating rust_analyzer from the border.

I think this is caused by string.format not understanding the displayed length of a non-ASCII icon.
When I changed the spinner text to:
  text = {
    spinner = {"a", "b", "c"},
    done = "ok",
}

I no longer see the alignment issue.

I'll look into fixes though I'm aware non-ASCII lengths tend to be headscratchers.
This is also probably related to #3

Yay, thanks! :partying_face:


Cron Job Management Script for Linux 🕒🐧

Objective:
Develop a Python script that allows users to perform CRUD (Create, Read, Update, Delete) operations for cron jobs on a Linux system. This script will provide an intuitive interface to manage scheduled tasks.
Features:

Add New Cron Job:

Implement functionality to add a new cron job with a specified schedule and command.

List Existing Cron Jobs:

Allow users to view a list of currently scheduled cron jobs.

Edit Existing Cron Job:

Provide the ability to modify the schedule or command of an existing cron job.

Remove Cron Job:

Enable users to delete a specific cron job based on its ID or schedule.

Example Usage:
# Example usage of the cron job management script
import cron_manager

# Add a new cron job
cron_manager.add_job("* * * * *", "/path/to/script.py")

# List existing cron jobs
cron_manager.list_jobs()

# Edit an existing cron job
cron_manager.edit_job(1, new_schedule="0 0 * * *", new_command="/path/to/updated_script.py")

# Remove a specific cron job
cron_manager.remove_job(2)

Difficulty: Intermediate/Advanced
Tags: Python, Linux, Cron Job, Task Scheduling, CRUD Operations
Additional Information:

Familiarity with Linux and cron job scheduling is recommended for contributors interested in this task.
Consider using libraries like python-crontab for interacting with the crontab in Python./ Or you can just use the subprocess/edit config file through read/write i/o operations.

@bhargavnova can i work on this please?

Sure!!
Thanks for picking this up @Siddharth9890 : ),
The updated guidelines can be found here.


Google Keep integration... start timer on checkboxes

Hi... another feature request... generally a google keep card contains checkboxes with several different points/tasks. Right now, you can start the timer for the whole card, but it would be very useful if you can start the timer for each of the checkboxes representing the different tasks. On way to do it would be just allowing the card timer to offer a dropdown defaulting to the card title but also offering the possibility to select any of the checkboxes... thoughts?

With other tools we have solved it by adding start timer link behind every item. I think we would do the same with google Keep.
See wunderlist integration for example.

That would be a nice, I agree... it is the other UI I was thinking about... so if you want to follow that path... that would be amazing!

Is there any update on this feature request? Thanks!

Thanks!!


Next 13 and App Folder?

Any plans to upgrade this checkout to use Next13 and the new app folder, now that App is stable? This seems to be the future of Next and React. I think it also simplifies alot of code. Thoughts?

we are planning to remove nextjs #280


Fixed IntelPyTorch_Extensions_Inference_Optimization "no such file or directory" error

fixed this issue.

@Ankur-singh @e-zorina Labeled PR with ci-ready to see if the CI will run this sample.

Is the introduction of a submodule intended with this PR? The module seems to be pointing to nowhere and is therefore breaking our tests @jimmytwei @Ankur-singh


Question: Insert statement with multiple value rows.

Hello,
Is it possible to generate an insert func that can insert multiple rows at once?
Ex:
INSERT INTO user
    (username, password, created_at)
VALUES
    ('a', '123', NOW()),
    ('b', 'abc', NOW()),
    ('c', '456', NOW()),
    ('d', 'def', NOW());

I understand that there's a batch API available but that still executes N queries on the DB vs just one with multiple value rows. At that point, would you know if there's a difference on the DB side performance wise?
Thanks!

would you know if there's a difference on the DB side performance wise?

It's almost certainly faster to insert multiple rows in a single insert since you avoid all the transaction overhead but I have no idea how much faster.
Using a variable number of VALUES expressions requires dynamic SQL which something I want but haven't figured how to go about it. However, there few options that work detailed below:
Schema
CREATE TABLE users (
  username   text,
  password   text,
  created_at timestamptz
);

Option 1: Insert many rows using unnest with arrays of columns
This is the approach I've been using. Seems like the most straight-forward way to me.
query.sql
-- name: InsertMany :many
WITH
  input AS (
    SELECT username, password, created_at
    FROM unnest(
      pggen.arg('usernames')::bigint[],
      pggen.arg('passwords')::text[],
      pggen.arg('created_ats')::timestamptz[]
      ) t(username, password, created_at)
  )
INSERT INTO users (username, password, created_at)
SELECT username, password, created_at
FROM input
RETURNING *;

This generates:
type InsertManyParams struct {
	Usernames  []int
	Passwords  []string
	CreatedAts pgtype.TimestamptzArray
}

type InsertManyRow struct {
	Username  string    `json:"username"`
	Password  string    `json:"password"`
	CreatedAt time.Time `json:"created_at"`
}

// InsertMany implements Querier.InsertMany.
func (q *DBQuerier) InsertMany(ctx context.Context, params InsertManyParams) ([]InsertManyRow, error) {}

Option 2: Insert many rows using the table composite type
If you're inserting all the columns of a table you can take advantage of the fact that each table is also a composite type. So for your user table, there's also a user composite type. I've renamed to users since user is a reserved keyword and IntelliJ doesn't like it.
NOTE: this approach fail if you have any generated columns.
query.sql
-- name: InsertManyValues :many
INSERT INTO users
SELECT *
FROM unnest(pggen.arg('all_users')::users[])
RETURNING *;

Which generates:
// Users represents the Postgres composite type "users".
type Users struct {
	Username  string    `json:"username"`
	Password  string    `json:"password"`
	CreatedAt time.Time `json:"created_at"`
}

type InsertManyValuesRow struct {
	Username  string    `json:"username"`
	Password  string    `json:"password"`
	CreatedAt time.Time `json:"created_at"`
}

// InsertManyValues implements Querier.InsertManyValues.
func (q *DBQuerier) InsertManyValues(ctx context.Context, allUsers []Users) ([]InsertManyValuesRow, error) {}

Option 3: Insert many rows but only a subset of columns
Let's say created_at has a default value that we're happy with but we want to use a composite type instead of an array for each column. Our schema changes to:
CREATE TABLE users (
  username   text,
  password   text,
  created_at timestamptz DEFAULT now()
);

First, we need a composite type of the row we want to insert:
CREATE TYPE partial_user AS (
  username text,
  password text
);

query.sql
-- name: InsertPartial :many
INSERT INTO users (username, password)
SELECT *
FROM unnest(pggen.arg('partial_users')::partial_user[])
RETURNING *;

Which generates:
// PartialUser represents the Postgres composite type "partial_user".
type PartialUser struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type InsertPartialRow struct {
	Username  string    `json:"username"`
	Password  string    `json:"password"`
	CreatedAt time.Time `json:"created_at"`
}

// InsertPartial implements Querier.InsertPartial.
func (q *DBQuerier) InsertPartial(ctx context.Context, partialUsers []PartialUser) ([]InsertPartialRow, error) {}

Out of curiosity, what are you using pggen for? It's fun to see what other folks use it for.
If you run into any problems let me know. I know option 1 will work but I haven't personally tried option 2 or 3 and I'm not sure if test coverage extends to passing in arrays of composite types as input.

Thanks for the detailed response. I think the options you laid out would work for my use case. I didn't even know about the table composite types so that's pretty cool.

It's almost certainly faster to insert multiple rows in a single insert since you avoid all the transaction overhead but I have no idea how much faster.

After I wrote the question, I remembered that the batch automatically starts a transaction so yes, there would definitely be overhead there. Still nice that the batch avoids all the network round trips after the first though. I could theoretically use a batch here since my query is in a transaction anyways, but this is good to know for cases where I don't need a transaction.

Out of curiosity, what are you using pggen for? It's fun to see what other folks use it for.

We've actually switched to using pggen to generate the boilerplate for our DAL in our code base. We used to write everything manually by hand but we found that your tool works very well. We don't like using ORMs so we appreciate that we can still write our queries and have all the tedious (and error prone) type scanning and query execution be handled by the generated code.
As for the dynamically generated SQL, I've written some functions in the past that have solved this specific use case when it comes to inserting multiple values at once. If you like, I can try to open a PR with a POC. Off the top of my head, here is how it could work:
For syntax maybe something like this:
-- name: InsertMany
INSERT INTO users ('username', 'password', 'created_at')
VALUES [](pggen.arg('username'), pggen.arg('password'), pggen.arg('created_at'));
-- or
VALUES pggen.array(pggen.arg('username'), pggen.arg('password'), pggen.arg('created_at'));
-- or
VALUES ...(pggen.arg('username'), pggen.arg('password'), pggen.arg('created_at'));

This would generate the following:
const numInsertManyParamFields = 3
const insertManySQL = `INSERT INTO users ('username', 'password', 'created_at') VALUES %s;`

type InsertManyParams struct {
	Username  string
	Password  string
	CreatedAt pgtype.Timestamptz
}

func (p InsertManyParams) flattenValues() []interface{} {
	values := make([]interface{}, 0, numInsertManyParamFields)
	return append(values, p.Username, p.Password, p.CreatedAt)
}

func (q *DBQuerier) InsertMany(ctx context.Context, params []InsertManyParams) (cmdTag, error) {
	// generate values SQL
	valueSQL := make([]string, 0, len(params))
	for row := 0; row < len(params); row++ {
		value := strings.Builder{}
		value.WriteString("(")
		for col := row*numInsertManyParamFields + 1; col <= (row+1)*numInsertManyParamFields; col++ {
			value.WriteString(fmt.Sprintf("$%d", col))
			if col != (row+1)*numInsertManyParamFields {
				value.WriteString(",")
			}
		}
		value.WriteString(")")
		valueSQL = append(valueSQL, value.String())
	}
	SQL := fmt.Sprintf(insertManySQL, strings.Join(valueSQL, ","))

	// generate values []interface{}
	values := make([]interface{}, 0, numInsertManyParamFields*len(params))
	for _, param := range params {
		values = append(values, param.flattenValues()...)
	}

	ctx = context.WithValue(ctx, "pggen_query_name", "InsertMany")
	cmdTag, err := q.conn.Exec(ctx, SQL, values...)
	if err != nil {
		return cmdTag, fmt.Errorf("exec query InsertMany: %w", err)
	}
	return cmdTag, err
}

Here is the implementation in a go playground so you can see how it works. The exec func just prints out the generated SQL. The pgtypes have all been replaced with base types for simplicity: https://play.golang.org/p/CcezMTKZQmh
Please keep in mind the generate valuesSQL part is a bit messy, but I'm sure it can be cleaned up. The second loop to generate the interface values could also be combined with the first but this is more readable for demonstration purposes. This is just an example to show how it could potentially work.
One thing of note with this approach is that postgres has a max amount of parameters that can be bound to using a prepared statement. I believe the max is 65355 because the protocol uses an Int16 to pass the number of parameters (see Bind: https://www.postgresql.org/docs/current/protocol-message-formats.html)

I think the options you laid out would work for my use case. I didn't even know about the table composite types so that's pretty cool.

One of the fringe benefits of writing a Go-Postgres mapping is you learn the Postgres type system in gory detail.

We've actually switched to using pggen to generate the boilerplate for our DAL in our code base. We used to write everything manually by hand but we found that your tool works very well

Glad to hear it! That's pretty much why I built it. I like SQL but didn't like doing the mapping to Go.

As for the dynamically generated SQL, I've written some functions in the past that have solved this specific use case when it comes to inserting multiple values at once. If you like, I can try to open a PR with a POC. Off the top of my head, here is how it could work:

One thing I've tried to avoid is extending Postgres syntax for pggen. In our codebase, we declare pggen.arg as a function that returns anyelement so it means it highlights correctly in IntelliJ (and presumably other editors).
-- This schema file exists solely so IntelliJ doesn't underline every
-- pggen.arg() expression in squiggly red.
CREATE SCHEMA pggen;

-- pggen.arg defines a named parameter that's eventually compiled into a
-- placeholder for a prepared query: $1, $2, etc.
CREATE FUNCTION pggen.arg(param text) RETURNS any AS '';

In general, I'm okay with requiring clients to use more cumbersome hacks like the options above for things that can be done in Postgres instead of pggen.   Most of the reason is to keep the number of codepaths low and keep pggen relatively easy to hack on.
For dynamic queries that you can't do in Postgres, I'm interested in adding support to pggen. I'll probably add something like pggen.predicate first and maybe pggen.ident for dynamic and columns and group-bys (that's a can of worms though since changing the group by can make the query invalid).

I started a tracking bug for dynamic predicates: https://github.com/jschaf/pggen/issues/41

I'll close this since there's a reasonable workaround that doesn't require any extra syntax and focus on the dynamic predicates.


Feature/refactoring

Refactored to separate operation classes

Codecov Report

Merging #48 into develop will increase coverage by 1.31%.
The diff coverage is 95.57%.

@@              Coverage Diff              @@
##             develop      #48      +/-   ##
=============================================
+ Coverage       86.3%   87.61%   +1.31%
- Complexity       182      217      +35
=============================================
  Files             15       23       +8
  Lines            701      751      +50
  Branches          65       65
=============================================
+ Hits             605      658      +53
+ Misses            65       61       -4
- Partials          31       32       +1

Impacted Files
Coverage Δ
Complexity Δ

...aph/aerospike/operations/AerospikeKeyIterator.java
65.45% <ø> (ø)
12 <0> (?)

.../playtika/janusgraph/aerospike/util/AsyncUtil.java
72.22% <0%> (-0.2%)
6 <0> (-3)

...rospike/transaction/WriteAheadLogManagerBasic.java
96.15% <100%> (ø)
16 <2> (?)

...ph/aerospike/operations/BasicMutateOperations.java
100% <100%> (ø)
15 <15> (?)

...sgraph/aerospike/AerospikeKeyColumnValueStore.java
85.71% <100%> (-3.29%)
13 <7> (-14)

.../aerospike/transaction/WriteAheadLogCompleter.java
83.11% <100%> (ø)
13 <1> (?)

...ph/aerospike/transaction/WriteAheadLogManager.java
100% <100%> (ø)
0 <0> (?)

...anusgraph/aerospike/operations/LockOperations.java
100% <100%> (ø)
0 <0> (?)

...ika/janusgraph/aerospike/AerospikeTransaction.java
100% <100%> (ø)
12 <7> (+7)
:arrow_up:

...anusgraph/aerospike/operations/ScanOperations.java
100% <100%> (ø)
4 <4> (?)

... and 17 more

Continue to review full report at Codecov.

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


Remember "Eat" option

Every time you join the server, you will prompt "Eat" and need to choose manually.
Can you remember "Eat" and change it on the server editing page?

This is the first time I've been notified of something with a repository other than BadOptimizations.

Anyway, yeah, when I get home I'll try.

Not sure if I should keep the Save Eat Pack thing as it might get confusing and you can just go into this menu.

A little late...?


JMC out of date

The jmc package seems rather out of date—as of this writing, 8.1.1 from Zulu and 8.0.0 from Adoptium. 8.3.0 was GA in 2022-11, and these versions date from 2021-11 and even 2021-02. Compare https://www.azul.com/products/components/azul-mission-control/ which advertises 8.3.1 and https://adoptium.net/jmc/ which advertises 8.3.0. If neither of these vendors is currently pushing updates to  SDKMAN! then it would be better to pull the package to avoid confusion.

Hi @jglick, I totally agree that we should probably remove JMC alltogether. For one, it's not an SDK so we rely on a lot of hacks to install it on SDKMAN. Secondly, Azul have not been publishing their latest versions via the vendor API.
I'll follow up with Azul about their intent, but perhaps it might be time to pull the plug on JMC.


Whats is the point of having ENET_PACKET_FLAG_UNRELIABLE_FRAGMENT ?

I took a quick look in the C code and my impression is that you don't get to choose whether or not your packet will be fragmented if its length is over the MTU (to avoid fragmentation at the IP level) as suggested in #15. It's always going to be. What you get is the choice between sending the fragments as reliable or unreliable sub-packets. So why not infer it from ENET_PACKET_FLAG_RELIABLE? Because if a user is trying to send a reliable packet, all its fragments must be reliable as well. And for an unreliable packet it makes no sense to have reliable fragments at all as this would only turn the original packet into a reliable one.

You misunderstood. The default behavior is: when the packet is larger than MTU, despite the fact that reliable the packet or not, it will be sent as reliable fragmented. PacketFlags.UnreliableFragment allows you to prevent sending fragmented packet as reliable.

So if you know that the packet will be larger than MTU, you use this flag to prevent forced reliability. As you said, is not about a choice between letting the ENet fragment the packet or fragment them at the IP level (which should be avoided).

I'm going to edit my comment on that issue to make it more clear.


Option to specify node pool worker certificate path

I'm currently looking into the possibility to use kube-aws to deploy our cluster. However, my current setup is multi-tenant, and needs different worker keys/certificates for the different node pools. It would be awesome to have an option worker.nodePools[].certPath or similar to avoid using the "manageCertificates: false" option.

Hi @johsim! Thanks for the feedback.
How about adding kubeletClientCertificatePath and kubeletClientKeyPath under worker.nodePools[] to be consistent with configuration keys for kubelet in kubeconfig?
apiVersion: v1
        kind: Config
        clusters:
        - name: local
          cluster:
            certificate-authority: /etc/kubernetes/ssl/ca.pem
        users:
        - name: kubelet
          user:
            client-certificate: /etc/kubernetes/ssl/worker.pem
            client-key: /etc/kubernetes/ssl/worker-key.pem
        contexts:
        - context:
            cluster: local
            user: kubelet
          name: kubelet-context
        current-context: kubelet-context

@mumoshu Yeah, that sounds like a good idea 😃

@johsim Sorry I couldn't make time to work on this since then.
For the time being, can you use the recently added "TLS bootstrapping" feature which AFAIK automatically bootstrap a different cert & key pair for each worker node?
If it doesn't work for your use-case, please let me know. Thanks!

@mumoshu The TLS bootstrapping is a neat feature, but it would be easier to group if you could specify one cert/key pair for each node pool. Then we could do dedicated node pools with workers having permission to only do stuff in one namespace by enforcing it through RBAC. Does that seem feasible to you?

@johsim Thanks for the feedback!
Sounds very reasonable 👍
Would you mind confirming my understanding?
So, more concretely, "a cert/key pair per node pool" allows you to customize k8s user and group associated to a k8s node as you like, so that the user and/or the group can be used in RoleBinding, whereas with TLS bootstraping, you can't customize the group associated to a node, right?

@mumoshu Right, that's right :)

@mumoshu Any updates on this? 😃


Update rbac.md

/easycla

Hey @GentleSong,
Since you didn't sign the CLA agreement, we cannot review this PR and move forward.
I'm closing this PR now, but feel free to /reopen once you are ready to sign CLA. (tutorial here)
/close


Create project-matterhorn-studio-robust-gps

@jakobzeitler, in the description, could you provide a bit more background info on what robust optimization is (and what is meant by Robust GPs) and why they matter in the context of chemistry and materials?

@jakobzeitler, usually, when I think of Robust BO, I think of input uncertainty (see e.g., https://en.wikipedia.org/wiki/Robust_optimization). See for example https://botorch.org/tutorials/robust_multi_objective_bo. In the description, it seems to be more focused on robustness against outliers. However, it also looks like there are usages of the term "robust" that deal specifically with outliers. I added a clarification in the text, but feel free to adjust how you see fit.

Thanks for the addition!
On 21 Mar 2024, at 16:40, Sterling G. Baird @.***> wrote:
⚠ Caution: External sender
@jakobzeitlerhttps://github.com/jakobzeitler, usually, when I think of Robust BO, I think of input uncertainty (see e.g., https://en.wikipedia.org/wiki/Robust_optimization). See for example https://botorch.org/tutorials/robust_multi_objective_bo. In the description, it seems to be more focused on robustness against outliers. However, it also looks like there are usages of the term "robust"https://ml.informatik.uni-freiburg.de/wp-content/uploads/papers/17-BayesOpt-Outlier.pdf that deal specifically with outliers. I added a clarification in the text, but feel free to adjust how you see fit.
—
Reply to this email directly, view it on GitHubhttps://github.com/AC-BO-Hackathon/ac-bo-hackathon.github.io/pull/17#issuecomment-2012940473, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACFJ7MMQP7YB2TNLHW65L7TYZMEO5AVCNFSM6AAAAABE7G5F6GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJSHE2DANBXGM.
You are receiving this because you were mentioned.Message ID: @.***>


SNOW-1401878: Throw KeyError on missing columns in getitem

Which Jira issue is this PR addressing? Make sure that there is an accompanying issue to your PR.

Fixes SNOW-1401878

Fill out the following pre-review checklist:

[ ] I am adding a new automated test(s) to verify correctness of my new code
[ ] I am adding new logging messages
[ ] I am adding a new telemetry message
[ ] I am adding new credentials
[ ] I am adding a new dependency

Please describe how your code solves the related issue.
Throw KeyError when user passes in missing column labels to __getitem__ and loc

@sfc-gh-azhan Here is the passing Jenkins build: https://ci-dev-142.int.snowflakecomputing.com/job/SnowparkPythonSnowPandasDailyRegressRunner/428/

@sfc-gh-dpetersohn this looks like the wrong issue: SNOW-1401878

@sfc-gh-mvashishtha good catch https://snowflakecomputing.atlassian.net/browse/SNOW-1041878


brain secondary axon tracts

Add secondary axon tracts characterised in FBrf0223329 (and FBrf0223298) for neuroblasts of the brain

another paper here:
FBrf0231132 (Lovick et al., 2016)


Test pr

Issue #, if available:
Description of changes:
How Has This Been Tested:
[x] My testing has passed

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

We identified new issues on unchanged lines of code. Navigate to the Amazon CodeGuru Reviewer console to view the recommendations to fix them.


No annotation processors set if task configuration evaluated early

I checked this new plugin with latest Gradle 6. It is almost working :) I like how simple it is now, but there is one issue: no annotation processor is set if task configuration is evaluated (too) early.
You can test that using your QuerydslPluginTest class, just add:
project.tasks.getByName("compileQuerydsl")

before
extension.jpa = true
extension.jdo = true

in setup(). Then check content of project.tasks.getByName("compileQuerydsl").options.compilerArgs

Can you please provide some more information. Is this causing issues within your builds or is it just a specific issue with the unit tests. Can you provide a simple example project that showcases the problem?

It was causing issues in my build. I can't provide simple example, my project is big and complex. I was able to pinpoint the root cause, it can be simulated in the unit test.
Task should read parameters as late a possible. Now it is configured fully when plugin is applied. Just put break point somewhere in:
https://github.com/ewerk/querydsl-plugin/blob/d5b53e8ab02c90d56d4f7ed0c4e103c9680ef63c/src/main/groovy/com/ewerk/gradle/plugins/querydsl/QuerydslPlugin.groovy#L84-L114
You will notice that it is run earlier in the lifecycle if you add something like project.tasks.getByName("compileQuerydsl") in the build script.
Unfortunately I can't test help you, I'm not using your plugin anymore. With latest Gradle annotationProcessor "com.querydsl:querydsl-apt:${querydslVersion}:jpa" is enough for me. Thank you for great work, this plugin server me well for years! :)

@kmaterka As you have narrowed down the issue so close, would it be possible the provide an PR with the fix?

As I wrote, I no longer use this plugin as it is an overkill for me, I need only one annotation processor and Gradle 6 serves me well.
The issue is that you can't assume that plugin configuration is fully setup during evaluation phase. You need to post-pone configuration as late as possible, for example in QuerydslPlugin::configureTasks use:
task.doFirst {
  task.options.compilerArgs += [
    "-proc:only",
    "-processor", querydslPlugin.processors()
  ]
  if (querydslPlugin.aptOptions.size() > 0) {
    for (aptOption in querydslPlugin.aptOptions) {
      task.options.compilerArgs << "-A" + aptOption
    }
  }
}

It should help, but I'm not 100% - unfortunately I have no time to write proper test, QuerydslCompileTest looks unfinished.
Alternatively create setters for each parameter in QuerydslPluginExtension and update task configuration on each update.
Alternatively override doFirst in QuerydslCompile:
class QuerydslCompile extends JavaCompile {
  @Override
  Task doFirst(Action<? super Task> action) {
    def querydslPlugin = getProject().extensions.findByType(QuerydslPluginExtension)

    options.compilerArgs += [
      "-proc:only",
      "-processor", querydslPlugin.processors()
    ]
    if (querydslPlugin.aptOptions.size() > 0) {
      for (aptOption in querydslPlugin.aptOptions) {
        options.compilerArgs << "-A" + aptOption
      }
    }

    return super.doFirst(action)
  }
}

You can also override configure, which seems a better place for task configuration than QuerydslPlugin (or not, iterating source sets is probably better in the plugin).
BTW, you can add distributionType to build.gradle.kts, it will help you with code completion:
  wrapper {
    gradleVersion = "5.0"
    distributionType = Wrapper.DistributionType.ALL
  }

Hi,
I am interested in using the new version. Is there anything I can do to close this? Seems like this is the only issue blocking a v2 release.

Closing issue as repository is going to archived mode.


button not working on Crank+Btn in v0.9

doesn't work in 0.8.1-20210123-0117
works in 0.8.0-20210111-1443

per design, michal removed streaming from button. jacdac-ts needs to respond to events.


KAFKA-18061 AddRaftVoter responds with error message "NONE" instead of null

…f null
More detailed description of your change,
if necessary. The PR title and PR message become
the squashed commit message, so use a separate
comment to ping reviewers.
Summary of testing strategy (including rationale)
for the feature or bug fix. Unit and/or integration
tests are expected for any behaviour change and
system tests should be considered for larger changes.
Committer Checklist (excluded from commit message)

[ ] Verify design and implementation
[ ] Verify test coverage and CI build status
[ ] Verify documentation (including upgrade notes)

This failed test has been fixed in KAFKA-18078

@aiven-anton ok


Fix turret behavior if parented

How does gmod's own turret address parenting issues?

gmod's own turret is dead

Tested and working


Add second() command for selecting the second element

It would be great to have readable second() command for selecting the second element. Some additional evidences:

http://stackoverflow.com/questions/33279813/locating-second-third-fourth-eigth-element-in-protractor-using-css-locator
http://stackoverflow.com/questions/37529654/how-to-select-second-objects-second-element-with-same-classname-in-protractor

This not a breaking change. It will extend the existing functionality and make elements interactions more readable.

As I mentioned in the PR, I think this adds complexity, and get(1) is simpler and more generic. Thanks for looking into this!

As I replied in https://github.com/angular/protractor/pull/3839 - it looks like 90% most often used cases are: first(), get(1) and get(2). So adding second() and third() shortcuts looked like a reasonable addition that will give more readability for most of the cases. Anyway, it is up to you to decide if this should become a part of protractor syntax or not. Thanks for reviewing!

Update: created a separate package - https://github.com/Marketionist/protractor-numerator - that can be used with protractor to select second, third, etc. elements. Would be great to hear what you think about it @juliemr


Adding in .gitattributes file

The solidity contracts in the scrypt-interactive repo currently don't have syntax highlighting. Github recently added support for solidity syntax highlighting, but due to name conflicts, requires each repo which wants such highlighting to add in a special .gitattributes file. This PR adds this file to the scrypt-interactive repo.
Contracts look very nice with highlighting turned on (for example, see https://github.com/datamined/contracts/blob/master/contracts/DataCoin.sol), so I think it will make the contracts here more readable.

Travis CI looks to be failing:
  1)  "before all" hook:
     SequelizeConnectionError: database "dogethereum_test" does not exist
      at connection.connect.err (node_modules/sequelize/lib/dialects/postgres/connection-manager.js:108:24)
      at Client.<anonymous> (node_modules/pg/lib/client.js:203:5)
      at Socket.<anonymous> (node_modules/pg/lib/connection.js:133:12)
      at addChunk (_stream_readable.js:269:12)
      at readableAddChunk (_stream_readable.js:256:11)
      at Socket.Readable.push (_stream_readable.js:213:10)
      at TCP.onread (net.js:599:20)

I don't think this is related to my change though.


[core] bug on Mac M1: decompile the version after WeChat 8.0.31, the ui stuck

在 mac m1 上 反编译微信8.0.31以上的版本  在左边类导航栏 一滑动上下或者点开类的下级 就会导致ui卡死 jadx-gui无响应 要好久才能活过来...已经加大了xmx的内存.我的环境是mac m1 max 64g  给到jadx-gui的xmx是16g
Google translation:
Decompile WeChat version 8.0.31 or above on mac m1. Swipe up and down on the left category navigation bar or click on the lower level of the category, which will cause the ui to freeze and jadx-gui to be unresponsive. It will take a long time to come back to life...it has been enlarged xmx memory. My environment is mac m1 max 64g, the xmx given to jadx-gui is 16g

Still has same problem when decompling bilili.
bilibili: 7.59.0
system: m1 pro macOS
jadx-gui: 1.4.7 openjdk17.0.9 -Xmx20g


Clear current offsets on join group

As is mentioned in a comment in Consumer#join_group, we need to make sure
that a consumer clears its stored offsets once it is no longer subscribed to a partition.
This is managed in the offset manager, however the consumer also keeps the offset
in @current_offsets, which is used for seeking when joining a group.
This may lead to a consumer seeking to an offset that is actually already processed once re-subscribing to a partition that it was subscribed to previously.
This attempt at a solution clears @current_offsets exactly as is done in the offset manager.
Note: I had a hard time testing the behaviour. My unit test (not included) was quite complex as I did not know how to succinctly tease joining and rejoining a group out of the consumer.
I opted to create a functional spec, however I'd be interested in whether it is possible to not reach into the instances @group to check whether it is subscribed to a partition. Also the functional test includes a lot of logging, which is meant to illustrate the behavior and will be removed if this gets accepted.
As we have noticed the issue #611 in our production environment, I'd be interested in whether our analysis of the issue is correct.

@dasch I removed the functional spec and added a cleaner version of my previous unit test. The issue of reaching into the instance variable to check for the state of @current_offsets is still present, however I feel it is less problematic there as it was also done before. Triggering join_group itself is also a bit contrived as you'll notice.
I can remove the spec as well, just felt like I should offer an alternative to the functional spec.

Thanks!


Renderer should non isotope resolution

Currently renderer assumes voxel is a uniform cube with same resolution in all dimension, but several data sources has voxel with different resolution in different spatial dimension.
A solution to accomodate this non uniform voxel resolution need to be done ;)

There's solution by changing the z-scale or number of slices.


GitHub Actions Tests Status (on master branch)

See CI.md for more information about GitHub Actions CI.

R: @rohdesamuel

retest this please


[WiP] Run in a Docker testnet

The new revad docker image from scratch is hard to debug, you basically can't ssh into it.
I'll develop using the older version from 56c89e07cf0c68d for now, and then I can update to latest when everything is working.

Coming back to this now. It seems https://github.com/cs3org/ocm-test-suite/blob/8cb0fbf95fc0802f01ed19661c6faf9734c1b536/build.sh#L22 is cd'ing to a directory that does not exist. Investigating.

I'll run it on the dockerhost server (not just the images but also the scripts).
Just a pity we can't watch along with the Puppeteer is seeing.

Have been waiting for 3 minutes now, but still no output from
docker logs -t ocm-test-suite_tester_1.
Maybe I should run the steps from https://github.com/cs3org/ocm-test-suite/blame/wip-docker/README.md#L19-L26 before it starts working?
But at least, I would expect some sort of output from the tester at some point. Will wait a little bit longer.

Ah yes, it took 6m32s to run.
Lots of errors like:
2021-08-02T11:32:12.184225416Z     net::ERR_NAME_NOT_RESOLVED at https://ocm-test-suite_oc1.docker_1/login

I guess the docker-compose.yml is missing the creation of a testnet.
Maybe it's easier to stick to doing this layer in bash instead of in compose.

I got puppeteer+vnc working. But if the puppeteer and the SOTs live in a testnet, that still doesn't help.
Ah, unless I port-forward on the host to the tester's local Docker IP using iptables..
OK, that works, only caveat that ones you activate it, you can't git pull or do any other remote network acces on the host until you reboot the dockerhost again... There must be a better way to set it up but for now it at least allows me to see what Puppeteer sees without having to insert endless screenshot commands.
First observation: https://nc1/login is a 404. That's probably because I forgot to run the init script for it.
I'm also changing the tester image from node to ubuntu, so the UI there is a bit nicer.

Still struggling creating an Ubuntu+Node+Puppeteer+VNC image. Will try now to start with Ubuntu+Node and run puppeteer --no-sandbox.

OK, this is way more difficult than it seemed, I got Ubuntu+nvm working now but I can't get gnome-terminal to show up over vnc, and also there still is the networking problem. I'll probably stick with the one with the node base image (65fcd12), at least that gives some remote access to puppeteer.

Current state parked as https://github.com/cs3org/ocm-test-suite/issues/28

Follow-up issue about iptables: #29

The instructions are getting pretty close now.
Next problems:

https://github.com/cs3org/ocm-test-suite/issues/31
https://github.com/cs3org/ocm-test-suite/issues/30

I'll fix those two and then I think we can merge this PR.

Now still seeing #33 and #34 but they are unrelated enough to the Docker setup that I'm happy to merge this work so far, and continue in follow-up branches.


Look into possible segfaults when writing to a log file

When CrashOveride tried logging to a file using Rasky's PI DMA Test Suite ROM, he got a seg fault. Investigate!

Probably fixed in the new rewrite. I'll reopen if it's not actually fixed.


Figure out an Integration Test

I would like each PR to the clusternator to test a basic init flow to make sure it isn't broken.

Off the top of my head:

make a crappy test repo that's just a simple HTTP responder
clone it
run clusternator init
see if you can hit crappy-test-repo.rangleapp.io
tear everything down.

We might even be able to wire up a dummy merge and see if we can hit the master


feat: versioning of action conversion

Issue being fixed or feature implemented
For a while I had noticed that action conversion to drive operations was not versioned, this annoyed me greatly, and I had it at the back of my head for a long time as a todo.
What was done?
Versioning of drive operations
How Has This Been Tested?

Breaking Changes

Checklist:

[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 added or updated relevant unit/integration/functional/e2e tests
[X] I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
[X] I have made corresponding changes to the documentation if needed

For repository code-owners and collaborators only

[ ] I have assigned this pull request to a milestone

Just FYI, no logic has been changed other than versioning.


Bump enet library version

Also changed the link from github to project website and installing with make install now.

What's the motivation to change from GitHub to his official website?
In this case, since the official repo is still on GitHub (check issues and PRs), I think it is safer and actually better to keep using GitHub (we can't assure the website to be available as much as Github)

What's the motivation to change from GitHub to his official website? In this case, since the official repo is still on GitHub (check issues and PRs), I think it is safer and actually better to keep using GitHub (we can't assure the website to be available as much as Github)

Yes, I just started thinking about it too, because HTTPS... Should probably change it back.

I guess changing it back to use github is a bit better. Otherwise this is good now.

Thanks! Looks good now.


FIPS compliant libraries

We currently have two non FIPS compliant modules in use:
./pkg/pki/ssh/sign.go:	"golang.org/x/crypto/ssh"
./pkg/pki/ssh/ssh.go:	"golang.org/x/crypto/ssh"
./pkg/pki/ssh/verify.go:	"golang.org/x/crypto/ssh"
./pkg/pki/pgp/pgp.go:	"golang.org/x/crypto/openpgp/armor"
./pkg/pki/pgp/pgp.go:	"golang.org/x/crypto/openpgp/packet"
./pkg/pki/pgp/pgp.go:	"golang.org/x/crypto/openpgp"

We should port to FIPS compliant modules, as being non FIPS will make it a challenge for operators to deploy rekor into government / military / FSI etc

note that https://github.com/sigstore/rekor/issues/286 found that we can't swap for the proton mail openpgp port due to lack of support for RPM signatures (which require pgp v3 packets)

is it viable / extensive to get that work upstream (note to self, is proton mail openpgp even FIPs)?

Can we close this? Golang's crypto library isn't FIPS compliant without being recompiled and using boringssl instead, and that seems like a risky change to take on

how risky?  it would open up much more use across gov and healthcare. having built and validagted FIPS hardware and software happy to help

I would be interested as well. What are the current blockers?


Introduce and generate libsodium bindings using rust-bindgen

The transition to rust-bindgen actually went really smooth, besides some "issues" like the hardcoded crypto_pwhash_scryptsalsa208sha256_STRPREFIX constant, everything else seems trivial.
Most of the changes were:

Use as_ptr() and as_mut_ptr() instead of relying on rust-ized fitting types on the bindings part
bindgen generates constants with u32 as type, hence all the type casts to usize
While at it, rustfmt the tests in libsodium-sys
Moved libsodium-sys tests into their own modules
Introduced new env variable: SODIUM_INC_DIR

Alright, we are using upstream bindgen now and the feature-branch should be rebased.

Rebased again. I think squashing the commits will be the last step until the review is complete.

You don't have to rebase manually. There is an "update branch" button at the end of the PR which will do it for you

@Dylan-DPC Tbh, I've never used that feature :) How does it deal with merge conflicts or is it even possible to skip commits? (git rebase --skip)

Is there anything left todo?

Tbh, I've never used that feature :) How does it deal with merge conflicts or is it even possible to skip commits?

@cynecx if there are conflicts it shows you which files are conflicting and you can resolve it in the Github UI editor or do it normally through code. Not sure it can skip commits.
If you are done with the PR you can remove the [WIP] from the title. Once we get approval from @kinggoesgaming or @dnaq or anyone else we can merge this

@dnaq I am actually thinking that we should address this in another PR since this one is already "packed" with code changes. It would make review process much easier imo.

@cynecx Agreed
bors r+