build issue vim81, Xpm related

objects/gui_motif.o: In function check_xpm': gui_motif.c:(.text+0x1af6): undefined reference to XpmReadFileToPixmap'
gui_motif.c:(.text+0x1b00): undefined reference to XpmFreeAttributes' objects/gui_motif.o: In function gui_mch_dialog':
gui_motif.c:(.text+0x5a96): undefined reference to XpmCreatePixmapFromData' objects/gui_x11.o: In function gui_mch_register_sign':
gui_x11.c:(.text+0x3ab): undefined reference to XpmReadFileToImage' objects/gui_x11.o: In function gui_mch_init':
gui_x11.c:(.text+0x35a4): undefined reference to XpmCreatePixmapFromData' gui_x11.c:(.text+0x35ac): undefined reference to XpmFreeAttributes'
collect2: ld returned 1 exit status
link.sh: Linking failed
make[1]: *** [vim] Error 1
make[1]: Leaving directory `/home/qhuo/tools/gvim/vim81/src'
make: *** [first] Error 2

platform:
Red Hat Enterprise Linux Workstation release 6.5 (Santiago)

I suppose, if you build with gtk it works? BTW: please give your configure parameters.

Those errors are most likely to take place when the compiler command line at link stage misses -L/directory/where/your libXpm resides/ -lXpm for some reason, or when the dependency libraries such as Xm, Xt, X11, Xpm and so on are not ordered  correctly on that command line for some reason, thus the linker failing to resolve symbols even if your system actually have all the libraries to resolve them.  So, showing the compiler command line at link stage could help.
Knowing whether or not a gtk build works would help you probe whether or not your system has a working libXpm.

@nuko8 you mean this command line?
link.sh: $LINK_AS_NEEDED set to 'yes': invoking linker directly.
gcc   -L/usr/local/lib -Wl,--as-needed        -o vim objects/arabic.o objects/beval.o objects/buffer.o objects/blowfish.o objects/crypt.o objects/crypt_zip.o objects/dict.o objects/diff.o objects/digraph.o objects/edit.o objects/eval.o objects/evalfunc.o objects/ex_cmds.o objects/ex_cmds2.o objects/ex_docmd.o objects/ex_eval.o objects/ex_getln.o objects/farsi.o objects/fileio.o objects/fold.o objects/getchar.o objects/hardcopy.o objects/hashtab.o  objects/if_cscope.o objects/if_xcmdsrv.o objects/list.o objects/mark.o objects/memline.o objects/menu.o objects/misc1.o objects/misc2.o objects/move.o objects/mbyte.o objects/normal.o objects/ops.o objects/option.o objects/os_unix.o objects/pathdef.o objects/popupmnu.o objects/pty.o objects/quickfix.o objects/regexp.o objects/screen.o objects/search.o objects/sha256.o objects/spell.o objects/spellfile.o objects/syntax.o objects/tag.o objects/term.o objects/terminal.o objects/ui.o objects/undo.o objects/userfunc.o objects/version.o objects/window.o objects/gui.o objects/gui_motif.o objects/gui_x11.o objects/gui_beval.o objects/gui_xmdlg.o objects/gui_xmebw.o objects/term_encoding.o objects/term_keyboard.o objects/term_mouse.o objects/term_parser.o objects/term_pen.o objects/term_screen.o objects/term_state.o objects/term_unicode.o objects/term_vterm.o          objects/netbeans.o objects/channel.o  objects/charset.o objects/json.o objects/main.o objects/memfile.o objects/message.o  -lXmu -lXext -lXm -lXt -lSM -lICE -lXt -lX11 -lSM -lICE -ldl  -lm -ltinfo -lnsl  -lselinux -ldl

@chrisbra I just simply did 'make'
How to do the gtk build? Where I can get the configure parameters you need?

When I build Motif GVim, the command line gives
-lXp -lXmu -lXext -lXm -lXt -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE

On the other hand, that of your case gave
      -lXmu -lXext -lXm -lXt -lSM -lICE       -lXt -lX11        -lSM -lICE

Obviously, some libraries are missing from the command line, namely, Xp, Xdmcp, and, especially, Xpm.  Now the reason of the failure is clear.
When you run the configure script, it is to show the line
checking for XpmCreatePixmapFromData in -lXpm...

If the check above passes affirmatively, the script adds -lXpm to the command line; otherwise, that linker option won't appear on the command line.   What did the script say when you ran it to configure Motif GVim?

@bournejason : see http://users.skynet.be/antoine.mechelynck/vim/compunix.htm

Looks like an environmental issue. No new information, so closing.


refactor: use T.TempDir() and B.TempDir to create temporary directory

We can write less code by using the TempDir() function from the testing package to create temporary directory. The directory created by T.TempDir() and B.TempDir() is automatically removed when the test and all its subtests complete.
Reference: https://pkg.go.dev/testing#T.TempDir
Reference: https://pkg.go.dev/testing#B.TempDir

Thanks!


CharacterTextSplitter constanly generate chunks longer than given chunk_size

Feature request
CharacterTextSplitter split a size of 1GB code base with warnings exceed the log buffer, like
Created a chunk of size 2140, which is longer than the specified 900
Created a chunk of size 1269, which is longer than the specified 900
Created a chunk of size 1955, which is longer than the specified 900
Created a chunk of size 3410, which is longer than the specified 900
Created a chunk of size 1192, which is longer than the specified 900
Created a chunk of size 1392, which is longer than the specified 900
Created a chunk of size 1540, which is longer than the specified 900
- very very long...

Walking through the relvent code
def _merge_splits(self, splits: Iterable[str], separator: str) -> List[str]:
        # We now want to combine these smaller pieces into medium size
        # chunks to send to the LLM.
        separator_len = self._length_function(separator)

        docs = []
        current_doc: List[str] = []
        total = 0
        for d in splits:
            _len = self._length_function(d)
            if (
                total + _len + (separator_len if len(current_doc) > 0 else 0)
                > self._chunk_size
            ):
                if total > self._chunk_size:
                    logger.warning(
                        f"Created a chunk of size {total}, "
                        f"which is longer than the specified {self._chunk_size}"
                    )
                if len(current_doc) > 0:
                    doc = self._join_docs(current_doc, separator)
                    if doc is not None:
                        docs.append(doc)
                    # Keep on popping if:
                    # - we have a larger chunk than in the chunk overlap
                    # - or if we still have any chunks and the length is long
                    while total > self._chunk_overlap or (
                        total + _len + (separator_len if len(current_doc) > 0 else 0)
                        > self._chunk_size
                        and total > 0
                    ):
                        total -= self._length_function(current_doc[0]) + (
                            separator_len if len(current_doc) > 1 else 0
                        )
                        current_doc = current_doc[1:]
            current_doc.append(d)
            total += _len + (separator_len if len(current_doc) > 1 else 0)
        doc = self._join_docs(current_doc, separator)
        if doc is not None:
            docs.append(doc)
        return docs

I know langchain try to keep semantic integrity of code language with language specific separtor.
Motivation
Can we just pop the last split once the total > self._chunk_size in def _merge_splits(self, splits: Iterable[str], separator: str) -> List[str]:
Your contribution
Maybe later I'll propose a PR

Facing the same issue

Use RecursiveCharacterTextSplitter


Add Skeletal Support for API V2 Implementation

Add Skeletal Support for API V2 Implementation
Layered skeletal support for API V2 implementation and acceptance
testing.  Generic use-case-specific endpoint and batch endpoint
controller implementation.  Common cross-service ping, batch,
metrics, and test controller implementation (and related acceptance
tests). Common ping, metrics (with domain service), version, and
test use-case implementation. Validation support. Middleware
support.
Added command line --debug flag and related middleware
implementation to log all requests and responses.
Acceptance tests require addition of REPO_ROOT environment
variable whose value is set to the absolute path to the root
of the edgex-go repository source; required to find default
configuration.toml files when starting services for acceptance
testing.
Dependent on https://github.com/edgexfoundry/edgex-go/pull/2322, https://github.com/edgexfoundry/edgex-go/pull/2324.
Fixes: https://github.com/edgexfoundry/edgex-go/issues/2277
Signed-off-by: Michael Estrin<EMAIL_ADDRESS>

Rebased

Rebased and squashed.

Per special security/core WG meeting to talk about this Bryon Nevis raised a good question that we need to incorporate into the requirements and then design/implementation:
Memory exhaustion - very very large batch requests.  Should we not cap number of requests in a batch (what is a reasonable limit?) or limit request payload size (what is a reasonable limit?)?
On the call, it was suggested that we should build in caps and/or limits via configuration that can be changed (since the actual numbers may not be really know) and put that into the transport implementation layer (e.g. HTTP, MQTT, etc.) as it will or may differ per transport.

Thank you everyone for making progress on this item. Really appreciate Bryon seeding the discussion with solution ideas.
Jim, With respect to resource exhaustion, I raised at last week’s security WG call and Michael Estrin mentioned we may be able to use his pre and post filter hooks to provide user role specific quotas. definitely need to make this Configurable, including client specific variants because they may have radically different resource constraints(mobile versus server).
Further Jim you had suggested exploring OASIS to see if there were industry patterns to handle this. Need to dig more.
Along the way noticed https://www.f5.com/labs/articles/threat-intelligence/denial-of-service-vulnerabilities-discovered-in-http-2.
cheers
Malini

Sent from Workspace ONE Boxerhttps://whatisworkspaceone.com/boxer
On February 4, 2020 at 2:30:44 PM EST, Jim White<EMAIL_ADDRESS>wrote:
Per special security/core WG meeting to talk about this Bryon Nevis raised a good question that we need to incorporate into the requirements and then design/implementation:
Memory exhaustion - very very large batch requests. Should we not cap number of requests in a batch (what is a reasonable limit?) or limit request payload size (what is a reasonable limit?)?
On the call, it was suggested that we should build in caps and/or limits via configuration that can be changed (since the actual numbers may not be really know) and put that into the transport implementation layer (e.g. HTTP, MQTT, etc.) as it will or may differ per transport.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fedgexfoundry%2Fedgex-go%2Fpull%2F2285%3Femail_source%3Dnotifications%26email_token%3DAAUTXVNWJ5SSVYKXLYVTUDTRBG66BA5CNFSM4KHR2LV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKY4OXQ%23issuecomment-582076254&data=02|01|mbhandaru%40vmware.com|4d2bc7a65c5a4116d96608d7a9a8b8cc|b39138ca3cee4b4aa4d6cd83d9dd62f0|0|0|637164414433174507&sdata=xmQfuWfoEN1aAqbF%2FnKW7PQoVndAOr3XAwd5ka4Xsxw%3D&reserved=0, or unsubscribehttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAUTXVKXGVGSUTPGYBAFNLDRBG66BANCNFSM4KHR2LVQ&data=02|01|mbhandaru%40vmware.com|4d2bc7a65c5a4116d96608d7a9a8b8cc|b39138ca3cee4b4aa4d6cd83d9dd62f0|0|0|637164414433184500&sdata=H%2BTthWfYGvZQv3VTEsk7TkYFCuz%2BxUo%2Fo2DtMm0LtUQ%3D&reserved=0.

Rebased.

Rebased.

Rebased and addressed conflicts resulting from #2343 merge.

Rebased.
Added to documentation.
Addressed test breakage resulting from https://github.com/edgexfoundry/edgex-go/issues/2340.

Rebased.  Addressed conficts resulting from merge of https://github.com/edgexfoundry/edgex-go/pull/2317

Rebased

Rebased and addressed conflicts created by https://github.com/edgexfoundry/edgex-go/pull/2351

Rebased and squashed.

Rebased.

That said, this PR is huge, and frankly a bit overwhelming to review. 146 files (at last count), and thousands of lines of diff... I'm not advocating that this PR be broken up, but I'd really like us to consider how we can avoid these sorts of giant PRs every release cycle. I'd like to see us discuss this topic in our architects meeting.

FWIW, this is orthogonal infrastructure code that implements a completely new architecture.  Roughly 2/3 of the PR is test-related.  I'm in general agreement that smaller PRs are better, I'm not sure how I could have done this differently (and had the community be able to understand it) given the nature of the work.  Open to suggestions.

Rebased and squashed.

Rebased.  Squashed.  Addressed most of @tonyespy's review comments.

Rebased.

Rebased.  Incorporated common changes required by follow-on https://github.com/edgexfoundry/edgex-go/issues/2312.  Moved validation into use-case New() factory function.


code c#

[Enter feedback here]

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

ID: f1138d70-1d83-a7e5-8549-72bf80dc5834
Version Independent ID: 0811beda-ff7e-353a-aeb2-6bebe8947bcf
Content: Branches and loops - Introduction to C# tutorial
Content Source: docs/csharp/tour-of-csharp/tutorials/branches-and-loops-local.md
Product: dotnet-csharp
Technology: csharp-get-started
GitHub Login: @BillWagner
Microsoft Alias: wiwagn

Hi @thaiduonghe88
Did you have a question on this article?


Improve tests

add windows platform tests Appveyor using appveyor.yml and remove WX requirement in setup.py

rename engines/csv.py → engines/csvengine.py

improve regression

remove server dependency by dumping csv files using the excel dialect(function  to_csv)
sort files when getting md5sums for files in directory
add xml and json tests

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

Merging [#27][cc-pull] into [master][cc-base-branch] will increase coverage by 15.17%

3 files in lib were modified. more

Misses -49
Hits +49

6 files in engines were modified. more

Misses -96
Hits +96

4 files (not in diff) in lib were created. more
File __init__.py (not in diff) was modified. more

Misses -15
Partials 0
Hits +12

File compile.py (not in diff) was deleted. more

@@             master        #27   diff @@
==========================================
  Files            17         21     +4
  Lines          1511       1785   +274
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
+ Hits            751       1158   +407
+ Misses          760        627   -133
  Partials          0          0

Powered by Codecov. Last updated by [85d9e01...161a6b7][cc-compare]
[cc-base-branch]: https://codecov.io/gh/henrykironde/deletedret/branch/master?src=pr
[cc-compare]: https://codecov.io/gh/henrykironde/deletedret/compare/85d9e01d10bdc9a6de494d41d58d8ffc12c4c401...161a6b794f592072cbd180a586ebf2f5a1b647e7
[cc-pull]: https://codecov.io/gh/henrykironde/deletedret/pull/27?src=pr


fixed 500 when results:null

I feel like we're misusing pydantic.  I think it's generating us a bunch of nulls on output from tool to tool and then we're not using it to deal with those nulls on input.


Fix descriptor types for STUBs

A simple fix for the descriptor type in STUB
dockstore/dockstore#2657

Actually, it's unclear to me. What happens when the workflow is in a stub and doesn't have a language yet or do we always have a default to CWL in the DB?

Actually, it's unclear to me. What happens when the workflow is in a stub and doesn't have a language yet or do we always have a default to CWL in the DB?

We always have CWL in the DB it appears


List of elements of InterfaceB in a definition of InterfaceA  for "elementSchema" of a schema with "@type": "Array" not supported

According to the dtdl v2 specification

a complex schema can be used e.g. for elementSchema of a schema with "@type":"Array" but
an existing Interface cannot be used as complex schema.

This restriction leads to not beeing able to create a list of items which are of a defined Interface. Interfaces can be combined and reused using "@type": "Component", however it's not possible to create a list.
It's designed in that manner to force the usage of Relationship in that case?
Is there any best-practice for the necessity to include a list of 0-n items of an Interface in another Interface?
Are there any plans to support it?
Tested it with:

digital-twin-explorer and
DTDL-Vaidator

In order to reproduce the following model can be used:
[
  {
    "@context": "dtmi:dtdl:context;2",
    "@id": "dtmi:com:example:TestRoot;1",
    "@type": "Interface",
    "displayName": "TestRoot",
    "contents": [
      {
        "@type": "Property",
        "name": "Prop1",
        "schema": "string"
      },
      {
        "@type": "Telemetry",
        "name": "TelementryArray",
        "schema": {
          "@type": "Array",
          "elementSchema": "dtmi:com:example:TestElement;1"
        },
        {
        "@type": "Relationship",
        "name": "TestElements",
        "minMultiplicity": 0,
        "maxMultiplicity": 1,
        "target": "dtmi:com:example:TestElement;1"
        },
      }
    ]
  },
  {
    "@context": "dtmi:dtdl:context;2",
    "@id": "dtmi:com:example:TestElement;1",
    "@type": "Interface",
    "displayName": "TestElement",
    "contents": [
      {
        "@type": "Property",
        "name": "Base64String",
        "schema": "string",
        "displayName": "Value",
        "description": "Base64 encoded value"
      }
    ]
  }
]

The following error occurs:
Upload error: RestError: None of the models in this request could be created due to a problem with one or more models: dtmi:com:example:TestRoot;1 has 'contents' value with name 'TelementryArray' which has 'schema' value whose property 'elementSchema' has value dtmi:com:example:TestElement;1 that does not have @type of Array, Enum, Map, or Object, nor is it a standard value for this property.
Provide a value for property 'elementSchema' with @type in the set of allowable types, or choose one of the following values for property 'elementSchema': boolean, string, double, float, long, integer, date, dateTime, duration, time..
See model documentation(http://aka.ms/ADTv2Models) for supported format.

Yes, in DTDL the way to create a 1:many relationship (list of referenced items, or the equivalent of List<> in C#) is to use a relationship.
Adt-explorer (and the underlying ADT instance) just follows the DTDL spec in this.
As this is by design, I will close this item. Please get back to us if you would like to discuss this further.

Yes, in DTDL the way to create a 1:many relationship (list of referenced items, or the equivalent of List<> in C#) is to use a relationship.
Adt-explorer (and the underlying ADT instance) just follows the DTDL spec in this.
As this is by design, I will close this item. Please get back to us if you would like to discuss this further.


Use single PaaS manifest file

It is possible to use a single manifest file to deploy multiple apps

Discovered it required in the Manifest for each app -   path: build/distributions/stub-trustframework-rp.zip
This and the broker PR can be closed.


ExLlama Version Compatibility

After yesterday's updates to https://github.com/oobabooga/text-generation-webui, running the base image no longer allowed for running GPTQ images using ExLlama. See the thread below for the issue and resolution. It appears that the version of ExLlama being installed will need to be updated.
https://github.com/oobabooga/text-generation-webui/issues/3004#issue-1788117410

I fixed this about 30 mins ago - destroy your pods and re-make them and it should work fine now.


Generate documentation

Today my boss asked me if she could have documentation of the datamarts.
She can't use Visual Studio or SSMS or the Tabular Editor.
Can you make an option like Generate Documentation ?
It would be nice if the output format could be a HTLM, Markdown,  PDF or perhaps Word.
What should be in it :

List of Tables. It should also state if the table has multiple partitions.
List of Columns per Table. Fields should be Column name, Source Column name, data type, calculated column formula, visibility.
List of calculated fields (measures). Fields should be measure name, visibility and formula.
Table of relations (just like in Visual Studio) From table, from field, to table to field, direction/filtering/active

Other things like connections, perspectives and security.
Or perhaps measure group calculations.
What do you think ?

You can join my session Saturday about automating your documentation on you semantic model.
“ Everyone know how difficult it is to keep your documentation up to date and available for the business and super users. There is a solution for that and it utilises automated build, Tabular Editor, Jekyll and a website.
As part of this session you will learn how to use Power Shell and information in a SQL Database to automate documentation and insights for your Analysis Services and Power BI Models. This will ensure that business can access business context, security setup and details information on how the solution is build.”
The session will be recorded and you can see more details here in the schedule around 12.45.
[data weekender] (https://www.dataweekender.com/) The conference
Automate documentation the Session
/Bent

This is one of those things where it's incredibly difficult to come up with a "one-size-fits-all" solution. Tabular Editor has a very capable scripting interface, which is perfect for these kinds of scenarios. If someone already has a good script for generating documentation, I encourage you to share it in the new Tabular Editor Scripts repository.
From the abstract of Bent's presentation, it sounds like this is exactly what you need.
A simpler solution might be to simple use the ExportProperties method, which will output a TSV string of various properties. You can combine multiple types of objects in a call to ExportProperties and it will just output whatever properties are available.
Example.
Closing this issue, but feel free to open new issues if you have specific questions on how to use any of the existing functionality.

Hi Bent,
Any luck you could share the recorded session? I'm very much looking
forward to watching your session, but I find myself unable to find the
recordings at the dataweekender website.
Thanks a lot!
Martin
On Tue, Apr 28, 2020 at 6:53 PM Bent Nissen Froning <
<EMAIL_ADDRESS>wrote:

You can join my session Saturday about automating your documentation on
you semantic model.
“ Everyone know how difficult it is to keep your documentation up to date
and available for the business and super users. There is a solution for
that and it utilises automated build, Tabular Editor, Jekyll and a website.
As part of this session you will learn how to use Power Shell and
information in a SQL Database to automate documentation and insights for
your Analysis Services and Power BI Models. This will ensure that business
can access business context, security setup and details information on how
the solution is build.”
The session will be recorded and you can see more details here in the
schedule around 12.45.
[data weekender] (https://www.dataweekender.com/) The conference
Automate documentation
https://www-dataweekender-com.filesusr.com/html/78f878_e5764ccb94bc435d2d6a97c32f991f13.html
the Session
/Bent
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/otykier/TabularEditor/issues/451#issuecomment-620729172,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AGTQLM3CMXPRNO5ZXRAG3E3RO4CXDANCNFSM4MS43ZOA
.


Tx Pool Requirements

The transaction pool is responsible for maintaining a set of transactions. Transactions are received either from the parentchain (indirect) or RPC (direct). The main task of the pool is to prepare an ordered list of transactions for the executor, handling the transaction.
Stakeholders

Developer who needs to queue transactions similarly to substrate.
Developer wants to queue transactions issued by a client, such that they can be executed in a batched manner.

Story

The parentchain block subscriber detects an extrinsic type that contains an indirect trusted call. First, the authenticator authenticates (&decrypts) the trusted call. Upon successful authentication, the transaction pool validates the transaction (correct nonce, valid call, ..) and includes it in the transaction pool. The calls are ordered such that indirect calls are prioritized over direct calls.
When the rpc server of the validateer receives a call or a getter of a client, it passes it for authentication to the authenticator. Upon sucess, the  authenticator passes the call/getter to the tx pool, which first validates it and only then includes it in the pool, in an ordered manner.
The call executor calls the pool, which returns the calls in the order, that the highest priority calls are placed first. If a call fails during execution, the executor will immediately call the pool to remove the invalid call from the pool.
Only after successful execution, block production and positive import, the block importer will call the pool with the hash of the successfully imported trusted call to trigger the final removal of the call from the pool.
The tx pool tracks the status of submitted calls. Upon a status change, the pool will trigger the rpc server to send a status update to the watching client.

Generic Requirements

Tx pool can be injected into any enclave component which needs a transaction queue.
Transactions are ordered according to a priority.  How the priority is set, is configurable.
Every transaction can be removed from the queue at any time.
Transactions are pre-validated with a validation function before being queued
Transactions can be stored persistently and in memory to allow fast access.
Transaction Status is tracked by the Tx pool. In case of a status update, it will trigger a configurable action.
Tx pool transactions can be pruned according to a configurable setting. Previously valid transactions may be invalid after a state update. Such transactions need to be removed from the pool during pruning.
The transaction type of the tx pool is generic and can be implemented by the developer.

Product Specific Requirements

There need to be atleast two types of transaction pools: One for getters and one for calls
Indirect calls need to prioritized over direct calls

TBD:

Security aspect: Connect Tx pool storage and light client storage, to prevent rollback of tx pool without rolling back the light client storage. That should prevent the loss of indirect calls.
Fork handling (copy pasted from substrate):

In case of a fork, some blocks are retracted from the canonical chain, and some other blocks get enacted on top of some common ancestor. The transactions from retracted blocks could simply be discarded, but it's desirable to make sure they are still considered for inclusion in case they are deemed valid by the runtime state at best, recently enacted block (fork the chain re-organized to).

Transaction pruning: Upon finalized pc block only? Or every sidechain block as well (in case of sidechain enabled)? Might affect generic design (see below)
Does sidechain tx pool differ from tx pool without sidechain (bridge example: indirect invocation calls only, no need for sidechain blocks)? Important because substrate pool interface depends on "block": https://github.com/paritytech/substrate/blob/master/client/transaction-pool/src/graph/pool.rs#L237-L243. If sidechain only uses pc blocks as trigger for top pool, generic implementation is possible. If not, then more investigation is needed.

(  See substrate for more information: https://github.com/paritytech/substrate/tree/master/client/transaction-pool)

Related issues:

[ ] https://github.com/integritee-network/worker/issues/565
[ ] https://github.com/integritee-network/worker/issues/481
[ ] https://github.com/integritee-network/worker/issues/489
[ ] https://github.com/integritee-network/worker/issues/418
[ ] https://github.com/integritee-network/worker/issues/229
[ ] https://github.com/integritee-network/worker/issues/211
[ ] https://github.com/integritee-network/worker/issues/198
[ ] https://github.com/integritee-network/worker/issues/186

Pkease rewrite story strictly without using passive speech: Who does what [to achieve what]

TX gossiping: MuRa necessary? TLS? Encrypted tx, but open ws?

Yes, yes, no
Please introduce tx gossiper. Heavy reuse of substrate likely

Does sidechain tx pool differ from tx pool without sidechain (bridge example: indirect invocation calls only, no need for sidechain blocks)? Important because substrate pool interface depends on "block":

If not SCV, then we are some kind of OCW. Why not fake an offchain-block which is 1:1 in sync with its  parentchain block?

Security aspect: Connect Tx pool storage and light client storage, to prevent rollback of tx pool without rolling back the light client storage. That should prevent the loss of indirect calls.

What do we want to prevent? Loss of indirect calls is covered by other validators as they parse parentchain blocks too and will execute missing calls, right?

According to https://github.com/integritee-network/worker/issues/616#issuecomment-1022090746 only the block producing validateer should import the new parentchain chain block, such that only one validateer needs to validate the pc transactions. But you are correct - before updating the light client state, the transaction should have been broadcasted.
My thought on that were: What if the gossiping is (partially) prevented, what are the possible attack vectors? What if the indirect calls can not be fully executed before the rolled back validateer is producing a block again, but does not have the indirect calls, is the delay of executing them okay? Is it acceptable for a validateer to produce a valid sidechain block, pointing to an up-to-date parentchain block (the light client says it has been imported), but does not include the (still) not executed corresponding indirect calls?
There are several mitigations for these questions, but preventing the unnoticed, separate, rollback of the light client state might be a very easy solution. So I documented it here, since I couldn't think of a more appropriate place, but I don't think it should (yet) be a requirement. We need to investigate security problems anyway.

Requirements Bridge:

get all (or up to X) indirect invocation calls for the bridge
calls that where handled can be deleted


use_natural_foreign_keys in ModelResource.Meta not working in V4

Describe the bug
ModelResource  with use_natural_foreign_keys=True  generates ForeignKeyWidget with key_is_id=True and use_natural_foreign_keys=True. User expect using natural keys like it represented in documentation  , but key_is_id has more priority then use_natural_foreign_keys
To Reproduce
Steps to reproduce the behavior:

Create ModelResource with Meta.use_natural_foreign_keys = True
Run export with this resource
In exported data will be ids of objects

Test to reproduce problem

class BookUsingNaturalKeys(resources.ModelResource):
    class Meta:
        model = Book
        fields = ["name", "author"]
        use_natural_foreign_keys = True

class BookUsingAuthorNaturalKey(resources.ModelResource):
    class Meta:
        model = Book
        fields = ["name", "author"]

    author = fields.Field(
        attribute="author",
        column_name="author",
        widget=widgets.ForeignKeyWidget(
            Author,
            use_natural_foreign_keys=True,
        )
    )

class TestNaturalKeys(TestCase):
    def setUp(self) -> None:
        author = Author.objects.create(name="J. R. R. Tolkien")
        book = Book.objects.create(author=author, name="The Hobbit")
        self.expected_dataset = tablib.Dataset(headers=["name", 'author'])
        row = ["The Hobbit", '["J. R. R. Tolkien"]']
        self.expected_dataset.append(row)

    def test_resource_use_natural_keys(self):
        """
        test with ModelResource.Meta.use_natural_foreign_keys=True
        Reproduces this problem
        """
        resource = BookUsingNaturalKeys()
        exported_dataset = resource.export(Book.objects.all())
        self.assertDatasetEqual(self.expected_dataset, exported_dataset)

    def test_field_use_natural_keys(self):
        """
        test with ModelResource.field.widget.use_natural_foreign_keys=True
        Example of correct behaviour
        """
        resource = BookUsingAuthorNaturalKey()
        exported_dataset = resource.export(Book.objects.all())
        self.assertDatasetEqual(self.expected_dataset, exported_dataset)

    def assertDatasetEqual(self, expected_dataset, actual_dataset, message=None):
        """
        Util for comparing datasets
        """
        self.assertEqual(len(expected_dataset), len(actual_dataset), message)
        for expected_row, actual_row in zip(expected_dataset, actual_dataset, strict=True):
            self.assertEqual(expected_row, actual_row, message)

Versions (please complete the following information):

Django Import Export:  4.0
Python 3.12
Django 5.0

Expected behavior
Natural keys in exported data for autogenerated fields
Additional context
I think use_natural_foreign_keys and key_is_id contradict each other and ForeignKeyWidget(use_natural_foreign_keys=True, key_is_id=True) should raise Exception

@mishka251 hopefully this is a simple fix (thanks for supplying the test).  Please take a look at #1824 and see if you think this will solve the issue.

Yes, #1824 is working for me. Thanks for fix.


File menu wrong shortcut titles for some menu items

VSCode Version: 1.11.2
OS Version: Win 7 Professional, 6.1.7601 SP 1, build 7601, x64

Steps to Reproduce:

My locale.json contains option "locale":"en-US"
Operating system use Russian localization
Open File menu and there are strange shortcut's hints (see below, strange items are selected by red)

ms i selected by red)

This is "as designed": we show certain keybindings as part of the label that cannot be displayed by the Electron menu.


Update default timeout values for learner table entries

This PR updates the default timeout values for add_entry extern for add_on_miss tables. This would allow the user to avoid the runtime configuration in case of tcp connection tracking usecase.

Closing as up-streamed.


Make UI consMake built-in variables read-only or warn on changes

Because the UI scripting CI some has a few helpful objects automatically created, if the user writes a script that happens to use those variable names the results will be unexpected. bv being a good example.
We should either make the variable not writable so an exception is triggered, or detect modifications and log_error to the user.

I believe some variables, including bv, is indeed write-protected. Attempting to write to bv gives me:
Setting variable "bv" will have no affect as it is automatically controlled by the ScriptingProvider.

Ahh, yeah, I just saw that myself. I think the issue is it's a log_warn which is less noticeable when it should be a log_error.


Update NavballUpDefault for 1.0.5

Merging  with my thanks

This should be a range (ksp_ver_min and ksp_ver_max) since there's no new release and 1.0.4 compatibility is not broken.

Done in 7b59bb4bb7bffb4fdd9abf920361c186e4da185b


Updated readme and explained how to link server certs for the UI

Nah they must be separate certificates unfortunately.
WebTransport requires a certificate valid for <2 weeks. If you link to the moq-rs certs, then you're going to get TLS errors after 2 weeks. I guess it's not the worst thing because it pretty clearly announces that you need to regenerate the TLS certificates, but it's not great either.
I think moq-rs should instead generate a certificate on startup. It doesn't need to use mkcert since it doesn't benefit from using a system root. I've just been lazy and haven't figured out the exact Rust options to use.


Further typing fixes

~Not quite done yet, investigating why x.input is not getting prop autocomplete for some reason...~ seems to be a local prop conflict issue with typings

@gregberge this is ready to be looked at

@gregberge fixed, thanks for the review!


Add AWS CLI option to set tags

Codecov Report

Merging #1267 into master will decrease coverage by 17.23%.
The diff coverage is 0%.

@@             Coverage Diff             @@
##           master    #1267       +/-   ##
===========================================
- Coverage   33.37%   16.14%   -17.24%
===========================================
  Files          33       33
  Lines        2472     2472
  Branches      102      102
===========================================
- Hits          825      399      -426
- Misses       1625     2072      +447
+ Partials       22        1       -21

Impacted Files
Coverage Δ

tests/test_cli/test_dcos_aws/test_cli.py
0% <ø> (ø)
:arrow_up:

src/dcos_e2e/backends/_aws/__init__.py
37.3% <0%> (-52.39%)
:arrow_down:

...s/test_dcos_e2e/backends/aws/test_distributions.py
0% <0%> (-100%)
:arrow_down:

src/dcos_e2e/backends/_docker/_containers.py
25% <0%> (-70%)
:arrow_down:

src/dcos_e2e/backends/_docker/_docker_build.py
36% <0%> (-64%)
:arrow_down:

...est_dcos_e2e/backends/docker/test_distributions.py
0% <0%> (-61.82%)
:arrow_down:

src/dcos_e2e/backends/_docker/__init__.py
27.68% <0%> (-50.29%)
:arrow_down:

src/dcos_e2e/cluster.py
33.63% <0%> (-41.82%)
:arrow_down:

src/dcos_e2e/_common.py
38.46% <0%> (-38.47%)
:arrow_down:

... and 5 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 62f9b6b...f9893bc. Read the comment docs.


Remove semicolon before 0. Does it mean something?

Docs Build status updates of commit af052da:
:clock10: Pending: waiting for processors (14 builds ahead of you)
:warning: Docs Build is busy, currently there are 14 builds ahead of this one, for more information you can view the Build queue graph on the Docs Portal.

Docs Build status updates of commit af052da:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

Language/Reference/User-Interface-Help/tristate-constants.md
:bulb:Suggestion
View
Details

Language/Reference/User-Interface-Help/tristate-constants.md

Line 2, Column 1: [Suggestion-description-missing] Missing required attribute: 'description'.

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel

thanks!


Tag k8s.io/cluster-autoscaler/enabled does not propagate

I have issues
Getting the autoscaler to detect the ec2 instances and consider them for scale down.
I'm submitting a...

[ ] bug report
[x] feature request
[ ] support request
[ ] kudos, thank you, warm fuzzy

What is the current behavior?
This tag is not set to propagate at launch:
https://github.com/terraform-aws-modules/terraform-aws-eks/blob/d5803697792ef36dd8964f67a1ae5184ddbfeb22/workers.tf#L17
The autoscaler's default settings, at least as per the recomended Helm chart installation, looks for the cluster tag and the enabled tag on ec2 instances. It does not appear to check the instances if both tags are not present(the ASG is picked up, but instances without both tags do not appear in the log output for unneeded checks).
What's the expected behavior?
The tag would be set to propagate at launch.

Are you sure that's why your ASG is not being scaled down?
I have this config for the autoscaler helm chart:
autoDiscovery:
  clusterName: my-cluster
  enabled: true

extraArgs:
  v: 1
  logtostderr: "true"
  expander: "least-waste"
  skip-nodes-with-system-pods: "false"

In EKS workgroup:
  worker_groups = [
    {
      instance_type       = "m4.xlarge"
      key_name            = "rps-default"
      asg_max_size        = 40
      autoscaling_enabled = true

And scale down works fine.

Try increasing the log level of the autoscaler to get more info. I'm interested to know what the issue is 🙂

I will close this for now. Feel free to reopen if it's still an issue.


Updating readmes, package.json and adding url as input

updating maintainers.md to be a little more useful i.e. it gives a sense of the underlying model/design without having to sink time into reading the papers and looking at the code.
adding input/output examples to package.json
removing websites from `package.json'
adding link to maintainers.md/contribution section to readme.md making it a bit more obvious that the apps are opensource/can be contributed to.
adding url as input (not just base64 encoded img)

@bvallelunga per your comment, I updated the PR so that the input key is now 2 separate input keys i.e. image is now image_base64 and image_url. Take a look when you have a chance and let me know what you think.


fix: Update WSL2 proto assets, #143

To fix WSL2 build with the current protobuf.

@Nickrader please double check just in case.

Windows executable files are built.  No errors reported.

Thank you! Seems that we finally fixed it :)


App crashes with "ERROR: Interceptors are not working" when addressSanitizer enabled

Xcode : 10.1
Swift : 4.2.1
Steps:
Create a dummy Single View App
build using :
xcodebuild -project BluepillCrashTest.xcodeproj -scheme BluepillCrashTest -sdk iphonesimulator -destination 'platform=iOS Simulator,id=<simulator_id>, OS=12.1' build-for-testing -enableAddressSanitizer YES
run bluepill using :
bluepill --xctestrun-path <path_to_xctestrun> -n 1 -d 'iPhone Xs' -v on
App crashes with error below:
[  INFO  ] (BP-1) Running Tests. Attempt Number 1.
{54439} 20190515.125828 [  INFO  ] (BP-1) [Attempt 1] Create Simulator
{54439} 20190515.125828 [  INFO  ] (BP-1) Booting a simulator without launching Simulator app
{54419} 20190515.125828 [  INFO  ] (BLUEPILL) 1 BP still running. [1]
{54419} 20190515.125828 [  INFO  ] (BLUEPILL) Using 404 of 2128 processes.
{54439} 20190515.125829 [  INFO  ] (BP-1) Simulator 615CF8EC-E221-4261-B170-9C013FAD30FB achieved the BOOTED state Booted
{54439} 20190515.125829 [  INFO  ] (BP-1) Completed: [Attempt 1] Create Simulator 615CF8EC-E221-4261-B170-9C013FAD30FB
{54439} 20190515.125829 [  INFO  ] (BP-1) [Attempt 1] Install Application
{54439} 20190515.125829 [ DEBUG  ] (BP-1) installApplication: host bundleId: com.apple.test.BluepillCrashTestUITests-Runner, host BundlePath: /Users/kaansariveli/Library/Developer/Xcode/DerivedData/BluepillCrashTest-cpmdcidbqwkeugelllpjhovjdhdg/Build/Products/Debug-iphonesimulator/BluepillCrashTestUITests-Runner.app, testRunnerAppPath: /Users/kaansariveli/Library/Developer/Xcode/DerivedData/BluepillCrashTest-cpmdcidbqwkeugelllpjhovjdhdg/Build/Products/Debug-iphonesimulator/BluepillCrashTestUITests-Runner.app
{54439} 20190515.125838 [  INFO  ] (BP-1) Completed: [Attempt 1] Install Application
{54439} 20190515.125838 [  INFO  ] (BP-1) [Attempt 1] Launch Application
{54439} 20190515.125844 [  INFO  ] (BP-1) Launch succeeded
{54439} 20190515.125844 [  INFO  ] (BP-1) No error
{54439} 20190515.125844 [  INFO  ] (BP-1) Completion block for launch
{54439} 20190515.125844 [  INFO  ] (BP-1) Calling completion block with: (null) - 54571
{54439} 20190515.125844 [  INFO  ] (BP-1) Completed: [Attempt 1] Launch Application
**{54439} 20190515.125844 [ DEBUG  ] (BP-1) [OUTPUT] ==54571==ERROR: Interceptors are not working. This may be because AddressSanitizer is loaded too late (e.g. via dlopen). Please launch the executable with:
{54439} 20190515.125844 [ DEBUG  ] (BP-1) [OUTPUT] DYLD_INSERT_LIBRARIES=/Users/kaansariveli/Library/Developer/Xcode/DerivedData/BluepillCrashTest-cpmdcidbqwkeugelllpjhovjdhdg/Build/Products/Debug-iphonesimulator/BluepillCrashTestUITests-Runner.app/PlugIns/BluepillCrashTestUITests.xctest/Frameworks/libclang_rt.asan_iossim_dynamic.dylib
{54439} 20190515.125844 [ DEBUG  ] (BP-1) [OUTPUT] "interceptors not installed" && 0
{54439} 20190515.125844 [ DEBUG  ] (BP-1) [OUTPUT] BP_APP_PROC_ENDED
{54439} 20190515.125844 [ CRASH  ] (BP-1) App crashed before tests started.**
{54439} 20190515.125844 [ DEBUG  ] (BP-1) Attempting to add empty test name or class to the executed list

It works well without addressSanitizer

I managed to reproduce this locally in the test suite by enabling the Address Sanitizer for the BPSampleApp and running the UI test for bp. I think the bug is that we're not honoring the DYLD_INSERT_LIBRARIES flag in the xctestrun file. I'll poke a bit more and come up with a fix. Thanks for reporting.

Any update on this? This error is causing problem in my application too. It would be great if you can fix it as early as possible.


Title still shows up

I'm getting weirdness where the tooltip shows up, but so does the title tooltip.

If you are using a computed property for the tooltip I would suggest using the content property on the component instead of title. Check the example below it should work.
{{#tool-tipster content=someProperty}}
    // map icon
{{/tool-tipster}}

Did not realize that was an option, thanks!


Allow mentors to modify their experience section on settings page

Description

Allow mentors to update their experiences.
Make a new tab on the settings page for it just like we have for time slots.
Try to reuse EditableField Component

Domain
Full Stack
Code of Conduct

[X] I follow Contributing Guidelines of this project.

@Lalit3716 I would love take it under JWOC, after my current PR get merged so kindly review my PR


add a network error situation

New Pull Request Checklist

[ ] I have read and understood the CONTRIBUTING guide

[ ] I have read the Documentation

[ ] I have searched for a similar pull request in the project and found none

[ ] I have updated this branch with the latest master to avoid conflicts (via merge from master or rebase)

[ ] I have added the required tests to prove the fix/feature I am adding

[ ] I have updated the documentation (if necesarry)

[ ] I have run the tests and they pass

[ ] I have run the lint and it passes (pod lib lint)

This merge request fixes / reffers to the following issues: ...
Pull Request Description
we found a download error situation will add to the blacklisted when we close the network manually,and reopen the network it will not to download image.

Current coverage is 77.16% (diff: 100%)

Merging #1767 into master will increase coverage by <.01%

@@             master      #1767   diff @@
==========================================
  Files            27         27
  Lines          2653       2654     +1
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
+ Hits           2047       2048     +1
  Misses          606        606
  Partials          0          0

Powered by Codecov. Last update 5ea33a7...57502a9

@sunXiChun need to take a closer look.
@mythodeia what do you think?

@bpoplauschi more info here
i think its safe to add it to the list.

Great @mythodeia. We will include it in the next release. Still not sure what the next release is: 4.1.0 if everything with 4.0.0 works or 4.0.1 if we need to patch something fast.

Let's assume the best and go with 4.1.0 for now.

👍


Julia's version is not taken into account

Julia's version is currently not taken into account in the cache key. This probably has a negative effect on the usefulness of the compiled cache when there are multiple Julia versions being cached.
Is this something we can fix? Would it be safe for us to read out julia -e 'println(VERSION)'?

The compile cache is already indexed by the julia version on the file system, no?

Yes, but that could still mean that a cache by Julia version X results in a lot of X-specific files which are useless when restored on Julia version Y.

We could add julia --version to the cache key if that's useful. Particularly with #45 that moves the compiled cache to a separate cache anyway.


Why ThreadX entry function use ULONG as entry input instead of a void *?

UINT tx_thread_create(TX_THREAD *thread_ptr, CHAR *name_ptr,
                      VOID (*entry_function)(ULONG), ULONG entry_input,
                      VOID *stack_start, ULONG stack_size, UINT priority,
                      UINT preempt_threshold, ULONG time_slice,
                      UINT auto_start)

Documentation

If I need to pass more than one parameter to the entry_function I must necessarily use a void *, hence my question, why ThreadX uses a ULONG instead of a void * like FreeRTOS does?

It could be because of certification reasons, to avoid using void* types.
If your system is 32-bit, then pointer size will be 32-bits, which will fit the ULONG.
You can therefore use the casting, or pass the index, and retrieve the parameter via other API function passing index to it.

This explanation doesn't convince me.
If they wanted to avoid using void * types for certification reasons, why did they use VOID * type for the next param stack_start?

In fact you are right. Then it might be "legacy".
There are other details to challenge too, such as missing const keyword for thread name. Ive asked for an update in the past, they claimed we need to keep no const for legacy. Clearly unjustified reason as ut would not break anything.

This raises another question: How do I pass one or more parameters (more complex than a ULONG) to a thread when creating it?
Do I really have to use a message queue?

You should cast your pointer to ULONG and retrieve it back. This you can do.
It is a generic issue for OS, not linked to threadx IMO.

As far as I know in C there is no guarantee that an unsigned long can be converted to void * and vice versa.
There are platforms out there where the size of a pointer is larger than an unsigned long.
Also (I'm not 100% sure about this), could pointers and integers have a different representation in memory?

As far as I know in C there is no guarantee that an unsigned long can be converted to void * and vice versa. There are platforms out there where the size of a pointer is larger than an unsigned long. Also (I'm not 100% sure about this), could pointers and integers have a different representation in memory?

As stated above, in general you are right, but if you system is 32-bits, then void* and ULONG are of the same type, so you are good to go.

I think the "32-bit system" requirement is not enough to ensure safe conversion from void* to ULONG (and vice versa).
There are 32-bit architectures like, Intel Architecture 32-bit (commonly called i386), where addresses are 6 bytes (2 bytes segment number and 4 bytes offset within the segment).
I'm writing a code (portable across different platforms) where I need to pass multiple parameters to a thread during its creation, I guess I'm not the first to encounter this problem, what mechanism has ThreadX implemented to be able to do this?

Then the best proposal is to start the thread passing the data index and retrieving the data by:
void* get_thread_data(ULONG index) {
   return data_pointers[index];
}

void
thread_func(ULONG value) {
    void* data = get_thread_data(value);
}

I guess (as you already said in your first answer) this is the best solution, although I don't like the idea of a global data_pointer.

Hi we run across this often.  The purpose of the formal parameter is to pass either a start code scalar integer, or alternatively an opaque pointer to a context structure.  By convention ULONG is universal for 32 bit architectures and defined to be uint32_t, which also happens to be the size of a pointer.  However on 64 bit machines the pointer will typically be allocated 8 bytes.  For future updates it may be better to use stdint.h uintptr_t to pass an opaque pointer  https://cplusplus.com/reference/cstdint/

@cypherbridge As tx_thread_create() is currently designed the input parameter is meant to accept only an integer, you should not pass an opaque pointer, because (as I mentioned before) there are 32-bit architectures out there, where the ULONG is 32-bit and pointers are 48-bit.

It think there seems to be consensus that changing it to a portable pointer type makes sense. Maybe @parmi93 could create a respective PR?
In the mean time the opaque pointer cast can be considered a workaround for 32-bit architectures. The segmented 48-bit pointer case is hypothetical as to my knowledge ThreadX presently does not support such an architectures.

C99 defines uintptr_t is defined in such a way to transparently convert between a pointer and and scalar.
With the benefit of cross-platform code, 32bit 64 bit, whatever.
Its true that in some projects ThreadX is used in C89 compiler which predates uintptr_t so for that reason
void* is a better choice and additionally similar to FreeRTOS xTaskCreate()
It seems the only use case we are talking about is tx_thread_create(), is there anything else affected by this?
Do keep in mind that whatever we come up with has the potential for broad impact to the installed code base, documentation, and so on.  So what is the the rationale to do it?

So what is the the rationale to do it?

I think the rationale is well explained by @parmi93 and I agree with the need for a mechanism to pass arbitrary context data to the thread in creation. This is common practise with all OS I have come across being it RTOSes or Linux or Windows  and typically accomplished by passing a user defined pointer to the new thread. We are using this in our application as well and so far using the ULONG entry_input argument casted into from a pointer to a struct., but it would be better to change that to a void * pointer.

And I agree this would be a breaking change, but sometimes in order to move forward you have to leave lagacy stuff behind. A ULONG was find when the world embraced 32-bit 20 years ago but now we have micros entering the 64-bit realm.

Looks like tx_timer_create have a similar mechanism using a ULONG for its expiration_function id paramater and for its expiration_input.
I feel like these could be VOID * also.
Alex Grutter
Engineer
Future Designs, Inc.
996 A Cleaner Way SW Huntsville, AL 35805
Mobile:<PHONE_NUMBER>
Phone:<PHONE_NUMBER> ext. 34
Fax:<PHONE_NUMBER>
From: cypherbridge @.>
Sent: Thursday, October 3, 2024 7:05 PM
To: eclipse-threadx/threadx @.>
Cc: Subscribed @.***>
Subject: Re: [eclipse-threadx/threadx] Why ThreadX entry function use ULONG as entry input instead of a void *? (Issue #413)
C99 defines uintptr_t is defined in such a way to transparently convert between a pointer and and scalar.
With the benefit of cross-platform code, 32bit 64 bit, whatever.
Its true that in some projects ThreadX is used in C89 compiler which predates uintptr_t so for that reason
void* is a better choice and additionally similar to FreeRTOS xTaskCreate()
It seems the only use case we are talking about is tx_thread_create(), is there anything else affected by this?
Do keep in mind that whatever we come up with has the potential for broad impact to the installed code base, documentation, and so on. So what is the the rationale to do it?
—
Reply to this email directly, view it on GitHubhttps://github.com/eclipse-threadx/threadx/issues/413#issuecomment-2392535815, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AIBCG7ON34AOSKYZCHQZUKLZZXLRBAVCNFSM6AAAAABPF5CULWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJSGUZTKOBRGU.
You are receiving this because you are subscribed to this thread.Message ID<EMAIL_ADDRESS>

C99 defines uintptr_t is defined in such a way to transparently convert between a pointer and and scalar.

I don't understand why ThreadX needs to bother allowing the user to convert a pointer to a scalar?
If entry_input had been a void * users would still have had the option to convert it to a uintptr_t later in entry_function() if they needed to.

Its true that in some projects ThreadX is used in C89 compiler which predates uintptr_t

I would also like to add that the uintptr_t type is optional in the c99 standard, and is still optional in the new c23 standard, so there might be some "modern compilers" that don't support uintptr_t at all.
https://port70.net/~nsz/c/c99/n1256.html#<IP_ADDRESS>

In any case I wasn't suggesting changing tx_thread_create(), I just wanted to understand why a ULONG was used instead of a void *, changing tx_thread_create() would break backwards compatibility (regardless of whether you use void * or uintptr_t).
I would recommend adding a new tx_thread_create2() that supports void *, leaving the old tx_thread_create() intact.

I would recommend adding a new tx_thread_create2() that supports void *, leaving the old tx_thread_create() intact.

Or a threadx options where user can define the parameter type.

Or a threadx options where user can define the parameter type.

This solution is even better, because it would not change the size of the program (binary) for those who want to continue using ULONG, the only thing users should be careful about is not using this option inappropriately, for example by defining the entry_input type as a giant struct, because this will be copied into the thread control block. But I guess we can't protect users from themselves.

I like the option of being able to configure the type of entry_input, probably using a #define. This could default to ULONG and no backward compatibility issue arises then. Users can change it to be a VOID* or a struct ptr. Likewise the same could be done for the timer.
Having a second tx_thread_create2() with a new signature seems less ideal as more data needs to be added to the TX_THREAD_STRUCT structure and the the thread start code in _tx_thread_shell_entry() has to check which entry function to use, the old signature or the new signature. But its doable as well.

A pointer points to an address of memory. The address of the memory is also a ULONG-compatible type.

A pointer points to an address of memory. The address of the memory is also a ULONG-compatible type.

Not the case.

A pointer points to an address of memory. The address of the memory is also a ULONG-compatible type.

This is not true, please read the entire discussion above.


Merge the latest code into the 1.0 branch

Merge the latest code into the 1.0 branch

I think you can directly move the branch forward with syncing all new commits?


Fix docker tag when building images

Signed-off-by: Lukas Kral<EMAIL_ADDRESS>In #9 building of all images was correct, but we built it with wrong tag -> the images were built with $COMMIT tag, but when we wanted to re-tag it (for example to latest), the check failed because image with new DOCKER_TAG didn't exist. This PR fixes this issue.

Why didn't you do this as it is in most of our other repos? It always builds as latest and not under the variable commit tag. Then you do not need to set the final tag too early.

I checked our Strimzi clients-examples repo and in the build.sh there is also used the DOCKER_TAG=$COMMIT ([here|https://github.com/strimzi/client-examples/blob/main/.azure/scripts/build.sh#L7] - the docker_build is done separately and with correct tag. If it is wrong, I can remove the else with DOCKER_TAG=$COMMIT and keep latest always (if it will not be release tag/branch).


support for ssl for postgres

Some managed databases use SSL for encrypting connections.
Would love to be able to copy from those to clickhouse.
Should be easy to add as you use the pg client

Hi, @confact
I have no experience with psql over an SSL connection.
Could you advise me on how to change the following code to support SSL?
https://github.com/maiha/pg-copy-ch/blob/master/src/data/pg/client.cr#L47

"psql -h '#{pg_host}' -p #{pg_port} -U '#{pg_user}' -w #{cmd}"

Best,

hi @maiha.
Sure thing. I notice I needed an authdb as my managed postgres are using a different db for the auth.
mine command would look more or less like this:
psql -h '#{pg_host}' -p #{pg_port} -U '#{pg_user}' --dbname=#{pg_auth_db} #{!pg_ssl.nil? ? "--set=sslmode=require --set=sslrootcert=#{pg_ssl} " : ""}-w #{cmd}

Well that command won't work, i tried to compile with that one and I got this error:
psql: warning: extra command-line argument "postgres" ignored

this one works for me:
psql -h 'db-host' -p 25060 -U 'postgres' -W --dbname=postgres --set=sslmode=require --set=sslrootcert=./sslcert.crt

then I have to type in the password, and then it works :)
I think the command part might not work though.

Thanks for the specific examples. It helped me to sort out the problem.
The problems seem to fall into two types.
1. Reflecting the user's environment
I had no idea about settings like "ssl" and "auth-db", and the It feels unproductive to add them to the variables in config one by one. This is because it's hard to add more detailed variables and because it's not open to future unknown demands.
Therefore, I feel it's a good idea to add an arbitrary command line string for psql execution to the config .
[postgres]
psql = "psql -h 'db-host' -p 25060 -U 'postgres' -W --dbname=postgres --set=sslmode=require ..."

2. Specifying a password
I currently use ~/.pgpass to specify a password.
This also seems to be solved by using PGPASSWORD in the psql configuration described above.
[postgres]
psql = "PGPASSWORD=foo psql -h 'db-host' ..."

Thought?

Implemented #2. How about this?

@maiha I get IO::TimeoutError: connect timed out when I run that branch locally.
I can set a command that works standalone, but when I run pg-copy-ch copy -t table1,table2 it timeouts.
I thought it was the Postgres command so I added a debug log above, set debug on log_level in the config and run pg-copy-ch copy -d -v -t table1,table2
And I still got: IO::TimeoutError: connect timed out
So it seems to happen before or something.

@confact
Password prompting doesn't work. It would be waiting for password input if you are using '-W'.
Could you try '-w' with specifying ~/.pgpass or config: psql = "PGPASSWORD=foo psql ...?

@maiha I am not using -W in my command now, I am using PGPASSWORD. It is not asking for a password when I run it standalone directly.
I still get this error when using the same command in pg-copy-ch

@confact
I'm using .pgpass. I haven't tested about PGPASSWORD, so it may be that it is not passed well.

Please add '-w' to ensure to block prompting.
Do you see any temporary files in .pg-copy-ch/* ?

@maiha I tried and still get IO::TimeoutError: connect timed out
My cmd looks like this:
psql -h 'localhost' -p 25060 -U 'admin' --dbname=defaultdb --set=sslmode=require --set=sslrootcert='~/sslcert.crt' -d normaldb -w
``
When I run this outside, it works without a password prompt, as it use .pgpass.
When I ran inside pg-copy-ch I get that error.

I think it is not the psql anymore, it is something else. I run crystal 0.35.1

UPDATE: I tried building this with Crystal 0.33.0 - Still get IO::TimeoutError: connect timed out

--set=sslrootcert='~/sslcert.crt'

I'm sorry that the '~/' won't be expanded in pg-copy-ch.
This will cause another error, not Timeout, but please change it to an absolute path.

Crystal 0.33.0 - Still get IO::TimeoutError: connect timed out

This is a bit weird because 0.33.0 has not IO::TimeoutError but IO::Timeout.

No temporary files there, only two meta files.

Could you try init tables command and show the result of 'tree'?
This command does not copy the data, but simply fetches the table list, so we can check the pg for connection.
And the result of tree would be like this.
$ ./bin/pg-copy-ch-dev init tables -d -v
pg: created .pg-copy-ch/pg/meta.sql
pg: fetched 481 schema from PostgreSQL
Created .pg-copy-ch/tables

$ tree .pg-copy-ch
.pg-copy-ch
├── config
├── pg
│   ├── meta.csv
│   └── meta.sql
└── tables

1 directory, 4 files

@maiha sorry for not being clear.
I wrote --set=sslrootcert='~/sslcert.crt' for the example. I do write the full path to the certificate file while I tested.
here are the commands:
$ pg-copy-ch init tables -d -v
pg: (cached) .pg-copy-ch/pg/meta.csv
pg: fetched 68 schema from PostgreSQL
Created .pg-copy-ch/tables

$ tree .pg-copy-ch
.pg-copy-ch
├── config
├── pg
│   ├── meta.csv
│   └── meta.sql
└── tables

1 directory, 4 files

@confact
Well. There seems to be no problem connecting to the pg because .pg-copy-ch/pg/meta.csv that contains table list exists.

$ pg-copy-ch init tables -d -v

There is one thing that bothers me. The  pg-copy-ch is the very binary you've created on #2 ?
If you build by make command, it builds ./bin/pg-copy-ch-dev. So we must invoke it.
Could you check the version of those binaries?
$ pg-copy-ch --version
pg-copy-ch 0.5.0 [a317310] (2020-06-21)
$ ./bin/pg-copy-ch-dev --version
pg-copy-ch 0.5.0+1 [6bcede1] (2020-07-02)

If the binary is expected one and the pg connection is ok, the copy command should run.
$ ./bin/pg-copy-ch-dev copy -t users -n
Table PostgreSQL Action
----- ---------- --------------
users FOUND      (will) REPLACE

$ ./bin/pg-copy-ch-dev copy -t users -d -v
[23:36:26] (1/1) users cook REPLACE
[23:36:26]   (expired) last updated at: 2020-07-03 16:36:18 +09:00)
[23:36:26]   created meta.sql
[23:36:26]   created data.sql
[23:36:27]   fetched data.csv
[23:36:27]   inserted data.csv into users_new
[23:36:27]   replaced by new table (3850)
[23:36:27] (1/1) users REPLACED 3850 (0.75s)
[23:36:27] ok:1

$ tree .pg-copy-ch
.pg-copy-ch
├── config
├── copying
│   └── users
│       ├── ch.cnt
│       ├── data.csv
│       ├── data.sql
│       ├── meta.sql
│       ├── replace.json
│       └── replace.sql
├── pg
│   ├── meta.csv
│   └── meta.sql
└── tables

3 directories, 10 files

I didn't get this to work so I used your clickhouse.cr and coded a script that pushed all data as a query. It worked ok for my simple data.

@confact
I see...the timeout was caused by the connection to CH, not PG.
Yep, I would also prefer to use crystal libs without depending on an external clickhouse-client.
I would be happy if you would PR that code. 😊


[WIP] Consolidate Cloud Native Events schema

add type to this function, pick this value /sync/ptp-status/lock-state
https://github.com/redhat-cne/cloud-event-proxy/blob/c8653d692d5885176313076f68ff5ba35de77ced/plugins/ptp_operator/metrics/metrics.go#L542


Create a "IoTCLI version" Command

We need a "version" command so that the IoTCLI can be adequately used by the VScode plugin, It should return the current release version of the binary being used.

Yes we will need that.


Backup and restore stubbed method to and from prepended module

Define the stub method directly on the last prepended method on which the target method has been defined..
These changes helped to fix the test suite of a project I'm working on, where I've started using prepended modules. Ruby 2.3.7 and Rails 4.1.16

I have some troubles running the test suite so I didn't try to verify this yet, but would you be able to put a test here which can prove that this will fix something?

I have not managed to set properly the test suite. Have tried to change the gemspec and Gemfile locally with some hardcoded versions for rspec gems, but got a suite, that was giving spurious test failures - each time different - from 8 to a few hundreds of failures :(

And just to be clear, this is not the official rspec-mocks repository, so even if I merge it it's unlikely to go into the official branch soon.

That's not a problem for my project - I have forked you repo with this branch, implemented my changes, and our test suite is doing well.

I'll try to rebase at some point, and it might fix the test suite. However I would like to know what you're trying to fix first.

I am trying to fix working of allow_any_instance_of when prepending the modules (when including the modules it works OK, yes):
require 'rails_helper'

class C0
end

module M
  def f
    'f'
  end

  ::C0.prepend(self) if ::C0.included_modules.exclude?(self)
end

class C1
  include M
end

c0 = C0.new
c1 = C1.new

RSpec.describe C0 do
  it do
    # allow(c0).to receive(:f).and_return('g')
    allow_any_instance_of(C0).to receive(:f).and_return('g')

    c0.f # => g
    c1.f # => f?
  end
end

Without the patch is failing:
0) C0
     Failure/Error: allow_any_instance_of(C0).to receive(:f).and_return('g')
       Using `any_instance` to stub a method (f) that has been defined on a prepended module (M) is not supported.
     # ./spec/services/prepend_test_spec.rb:24:in `block (2 levels) in <top (required)>'

With the patch the allow_any_instance_of is working OK, but we got c1.f undefined method f' for #C1:0x00007fcd8b06f350`.

Thank you for the simple test which I can verify. I understand what you're trying to fix now, but I believe it's the wrong fix. I tried the same test on my mocking library, Muack, and it's not working as expected either.
Both c0.f and c1.f would give 'g'.
I think I understand why it's happening. The problem here is that the prepended module comes first than the singleton class, therefore it's acting on the prepended module M here, rather than the singleton class of C0.
In order to fix this, we'll need to add something before the prepended module, which, could be another generated prepended module. This is sad because there's no way to remove the prepended module therefore it means the class cannot be reset back to the original state.
But maybe we can minimize the damage by making it a truly transparent module? I have no answer yet. I'll see if I can fix this in my mocking library first, and see if that knowledge can be applied back to rspec-mocks because I am much more familiar with my mocking library, making it much easier to experiment potential solution.

So I committed https://github.com/godfat/muack/commit/dff0842139b06ac0dcc72599a05f84b421791a9b which should fix most of the use cases. It is essentially doing exactly what I described above: Prepend an additional module whenever we detected that there's a module being prepended and on the way.
def self.prepare_target singleton_class
  target = singleton_class.ancestors.first
  if target == singleton_class # no prepended module detected
    target
  else # prepend an internal module to override the prepended module(s)
    name = :MuackPrepended
    if singleton_class.const_defined?(name)
      singleton_class.const_get(name)
    else
      prepended = ::Module.new
      singleton_class.const_set(name, prepended)
      singleton_class.private_constant(name)
      singleton_class.prepend(prepended)
      prepended
    end
  end
end

And we mock on the newly prepended module to "override" the prepended module. Maybe this can be more precise that this is only needed when the method name was conflicted. I'll see if I can improve this part and see how that would be different.
I think the same idea can be applied to rspec-mocks but I am not fully confident where it should be applied and if this can be accepted. I will try to get there at some point, but no promise though, since I don't really want to maintain rspec-mocks.

Great!
I have been exactly thinking of dynamically prepending a Module, as per your suggestion 7 hours ago.
Maybe even not need to analyze is the method from a prepended Module, or not, just always prepend the stub?

@godfat , could you, please, rebase the https://github.com/rspec/rspec-mocks/pull/1218 on a fresh mainso maybe to fix the test suite?

Maybe even not need to analyze is the method from a prepended Module, or not, just always prepend the stub?

@texpert I think it would be much better to only prepend a module when it's absolutely needed, because there's no way we can remove this newly prepended module and that's changing the application code for the lifetime of the process, which can be breaking application codes which might be relying on ancestors chain being intact.
For example, this tool will be quite sensitive to that: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/utils/override.rb
I just pushed another commit to make this conditional: https://github.com/godfat/muack/commit/e8bd6473ae58b805cbc0101fb2bc14eff9c379fc The critical check is:
index = singleton_class.ancestors.index(singleton_class)
prepended_modules = singleton_class.ancestors[0...index]

if prepended_modules.find{ |m| direct_method_defined?(m, msg) }
  # .. an internal prepend is needed
else
  # can just use the singleton class
end

There's only one case which I think it's probably impossible to solve right now:
m0 = Module.new{ def f; :m0; end }
m1 = Module.new{ def f; :m1; end; prepend m0 }
c0 = Class.new{ prepend m0 }.new
c1 = Class.new{ prepend m1 }.new

mock(any_instance_of(m1)).f{:g}

expect(c0.f).eq :m0
expect(c1.f).eq :g # m1 does not know c1 thus no way to pass this

I am skipping this test for now, but I hope in the future it's possible to solve this.

could you, please, rebase the rspec#1218 on a fresh mainso maybe to fix the test suite?

Yes, I have rebased it, and it's great to see that all tests just passed now, and I didn't even change anything.

I've managed to implement stubbing the last prepended module, so no need to create dynamically another one prepended :)

I've managed to implement stubbing the last prepended module, so no need to create dynamically another one prepended :)

What about this case?
module M
  def f
    :f
  end
end

class C0
  prepend M
end

class C1
  prepend M
end

RSpec.describe do
  it do
    allow_any_instance_of(C0).to receive(:f).and_return(:g)

    expect(C0.new.f).to eq(:g)
    expect(C1.new.f).to eq(:f)
  end
end

If you're stubbing the last prepended module, I would guess now stubbing on C0 would affect C1, which is not desired.
That's where why we need to prepend a new module, because the prepended module can be used by the completely unrelated class.

Seems that I've managed to do it, finally, for all the cases - added few specs for these cases too.

Hopefully I'll review tomorrow.

And sorry for the delay! I went on vacation and didn't really want to review this while I was taking the vacation 😅

Thank you for review and hints, @godfat ! Will try to further work on the PR as soon, as I'll get some time.

I have still to work on restoring the original method visibility, but this will be another day when I'll got some time.

I have still to work on restoring the original method visibility, but this will be another day when I'll got some time.

I have overlooked that everything's OK with preserving and restoring method's visibility.

@texpert I am very sorry for the long delay, and I have less free time recently. Given that it's been awhile I am sure I must have forgotten some of the details and was probably missing a lot of context in my head. Apologies if some of my questions look a bit silly or out of places.
To be honest, I am feeling a bit tired of reviewing patches against codes not maintained by me. I don't really understand how those work, thus it's difficult to review patches against them. In order to properly give a proper review, I have to understand the original codes first, and then I can continue to understand the patch.
I've done this in the past few rounds of reviews, which really took a lot of time. I think I'd done the right thing, but given that my pull request isn't even merged yet, I am not fully sure if the effort spent upfront is justified.
I think I will pause on very thorough review, and only give some quick read and review from now on. And I would really like to pass the review to the RSpec team, if possible.
I thank you for contributing patches based on my patch, I am honored by that. Let's hope https://github.com/rspec/rspec-mocks/pull/1218 can be merged soon and we can move on from there.

@texpert Now the base branch is merged into 4-0-dev upstream, do you want to rebase and create a new pull request at https://github.com/rspec/rspec-mocks and also target 4-0-dev, so that RSpec team members can take a look?

@texpert Now the base branch is merged into 4-0-dev upstream, do you want to rebase and create a new pull request at https://github.com/rspec/rspec-mocks and also target 4-0-dev, so that RSpec team members can take a look?

Sure, @godfat - will find time either this, or next weekend.
Congratulations with the merge of your PR!


healthmgr: aurora heron shell controller

follow #2230:
The healthMgr/Dhalion resolver (RestartContainerResolver) calls Aurora scheduler to restart container. This PR adds a aurora scheduler which does not depend on Aurora CLI and which can be called inside Aurora container.

👍 LGTM

thanks @maosongfu


[BUG] Link not working in find queries on fields with alias

Explanation
Imagine an alias is set for a Link field (which it's value will be DBRef), when a find filter is used on the id of that DBRef to get a record, it does not work. However, if the field name in Document class is directly set to the previous class alias, it works perfectly.
Documents Example
class LinkDoc(Document):
    foo: str = 'foo'

class Doc(Document):
    field: Link[LinkDoc] = Field(alias='alias')

class DirectDoc(Document):
    alias: Link[LinkDoc]

Example Record in DB
_id: 6666cfcd915ab3ed5ff6155a
alias: DBRef('LinkDoc', '6666a7eca6fa9e0ac7a286b4')

Occurred Behavior
>>>  await Doc.find_one(Doc.field == ObjectId('6666a7eca6fa9e0ac7a286b4')
None
>>> await DirectDoc.find_one(Doc.field == ObjectId('6666a7eca6fa9e0ac7a286b4')
DirectDoc(id=ObjectId('6666cfcd915ab3ed5ff6155a'), revision_id=None, field=<beanie.odm.fields.Link object at 0x000002A731C38FD0>)

I'm hitting the same issue. @rexa222 , were you able to resolve it?
Is there a PR to address the issue?

Hi, thank you for reporting this issue.
I would say that in a way, this is similar to #1017. At least what I commented there about the aliases usage.
The issue is the same here, how to know which name/alias to use when doing the query, since we also don't know beforehand how it's actually stored in DB.
There is definitely an improvement to be made here, and the usage clarified in docs.


importing more than 20 repos causes fails

Hi, I am using latest version of the vcstool (0.1.20).
I have a YAML file consisting more than 35 repos. When I try importing repos to a single folder after 20~ repos it is throwing errors and stuck downloading next repos. I have tried splitting YAML file to 3 different files and running them in order to same folder. Every one of them has around 12 repos. First one goes without problem but second one either throws error or stuck downloading. I am able to clone all the repos manually meaning that there is no permission issue.
I get something like this :
.....................EE..EE....

The tool is actively being used to handle sets of many more repos then 20. Therefore I doubt the title is accurately describing the problem.
Please provide more information. When you clone the repos manually are you being prompted to enter credentials? What is the output for the failing repos? Can you share the repositories file which is problematic for you?

I am aware it can handle more then 20 repos, I was using before and there was no problem.
No, since I have generated ssh-keys, it doesn't ask me credentials. Unfortunately I cannot share them because all of them are private repositories but I have tried same YAML file on my Macbook and it has the same problem. I am using Ubuntu 14.04 desktop. Since it stucks waiting for next repo I couldn't see any failing output. I've tried --debug but it didn't show me anything either.

Without further details it will be difficult to narrow down the reason. Have you updated the version of vcstool since it worked before? Or have you added additional repos to the list since then? Can you try to narrow down the problem. It seems most of the repos in your file work fine and only one or a few are causing the problem. You can e.g. run vcs import with the option -w 1 to avoid parallel operations to narrow down which single repo is causing the trouble. Or you can manually bisect the set.

I've tried -w 1 but again no luck. Yeah, I've upgraded vcstool but did not add any new repo.  I am pretty sure that every repo is OK, I can clone them manually. I've split the YAML file to 3 different files and tried again but didn't work. It is really weird.

Can you please try to split it further up to the extreme case of having only one entry per file.

If you install the latest master branch passing --debug will output the progress of the various jobs. That will tell you which repository is "hanging" (or just taking very long).

Did you have a change to narrow down the problem and/or use the new debug information to investigate on which repo the command is hanging?

Hello, we still couldn't find a way narrow down the problem. We suspect it is a network problem rather than a bug.

As mentioned the new debug output should tell you exactly which repository is hanging. I agree that a network related issue is now likely from what I know.
I will close the ticket for now but please feel free to comment with more information when available and this can be reopened.


iap hacks

Hacks to get mobile app working with MM behind IAP

Thanks @canvaspixels for the pull request!
Per the CONTRIBUTING.md file displayed when you created this pull request, we need to add you to the list of approved contributors for the Mattermost project.
Please help complete the Mattermost contribution license agreement?
This is a standard procedure for many open source projects. Your form should be processed within 24 hours and reviewers for your pull request will be able to proceed.
Please let us know if you have any questions.
We are very happy to have you join our growing community! If you're not yet a member, please consider joining our Contributors community channel to meet other contributors and discuss new opportunities with the core team.


Fixes Masking and Out-of-Bounds over the Aleutians

Closes #100
See screenshots in that issue conversation and verify the padding value (5000) looks good. I started with 10000 and that seemed too expansive.

Hey @charparr can you give some concrete steps-to-recreate for what I should be looking for with a compare/contrast between the main branch and this one?  I tried clicking a few spots in the Aleutians but didn't see much of a difference (other than the improved underlying mask layer, which still has a few oddities around small islands (probably due to its simplified structure)).

Hey @charparr can you give some concrete steps-to-recreate for what I should be looking for with a compare/contrast between the main branch and this one?  I tried clicking a few spots in the Aleutians but didn't see much of a difference (other than the improved underlying mask layer, which still has a few oddities around small islands (probably due to its simplified structure)).

Ah yep! Sorry I should have copied this stuff from the linked issue (#100) - essentially the problems were:
Some of the most southern islands in the Aleutians were masked out with that broad stripe across the bottom. So navigate to that area and that gray band across the bottom (shown below) is now gone.

Also, locations near Unalaska are now clickable.
But maybe those things were already fixed indirectly somewhere earlier? Hence not noticing much a difference.

Alright the map padding proposed by this PR are not necessary due to some previous fixes that address #100 so I'm going to close this PR without merging.


FIX Add unique prefix to cache stores to prevent cache leak

fixes #6358
This adds a default prefix to cache identifiers so that servers with multiple sites have a lower likelihood of accessing each-others caches.

Will leave this open for a little while in case anyone has any other concerns with this :)

For config cache we currently generate our own unique hash so we need to incorporate that into this fix

Added fix to config to use custom prefix instead of the auto one

Looks good thanks @dhensby


How to train a sketch-rnn for interpolation between two objects?

Hi,
I am wondering how to train a sketch-rnn if I wanna realize the interpolation between two objects, such as the cat-bus and elephant-pig in your jupyter demo. I've tried to put multiple .npz files in the data_set parameter but it just messed up everything.
Thanks!

Hi @giada1198
Are you able to train sketch-rnn on a single .npz file with your current setup?
Can you let me know the exact command you used, to see if I can reproduce the error?
Thanks

@hardmaru thanks for your prompt reply, let me clarify my question:
I prepared two datasets: one is my hand-made small dataset(200/100/100), another is the airplane dataset from quick draw(7000/2500/2500). RNNs worked very well if I trained them individually. However, when I tried to trained them together in order to create some interesting interpolations, the outputs became a bunch of chaotic lines. I guess I used the wrong command:
python2 sketch_rnn_train.py --log_root='/home/giada1198/raw' --data_dir='/home/giada1198/raw' --hparams="data_set=[ren.npz, airplane.npz],enc_model=layer_norm,enc_rnn_size=512,save_every=500"

I used your demo and merely changed the model path to generate outputs.
Thanks again!

Hi @giada1198
I wonder if the data loader is doing something funky due to the big difference in dataset sizes between the two datasets.
If you have tried training sketch-rnn on both datasets (en.npz, airplane.npz) individually, and they both work, then a fix you can do is to manually concatenate the datasets together and train sketch-rnn on a single, combined npz file. To ensure that the random training batches are not skewed towards having mostly airplanes (since they dominate the in terms of the number of training samples), you may want to duplicate en.npz a few times so that the size is comparable, and perhaps use some data augmentation as well to avoid data fitting.

@hardmaru sorry for my delayed reply. Thanks for your suggestion! Everything works very well now.


Add export keys

Hello.
Can you add some export launch keys for export only sounds, meshes, textures, scripts and others?

I will add this option after I make GUI.


sealos add the third master report errors: check-etcd: etcd cluster is not healthy

Which command or component
sealos add --masters <IP_ADDRESS>
*The output errors
2022-09-21T17:16:44 error Applied to cluster error: exec kubeadm join in <IP_ADDRESS>:22 failed failed to execute command(kubeadm join --config=/root/.sealos/default/etc/kubeadm-join-master.yaml -v 0 --ignore-preflight-errors=SystemVerification) on host(<IP_ADDRESS>:22): output([preflight] Running pre-flight checks
[WARNING FileExisting-socat]: socat not found in system path
[WARNING Hostname]: hostname "master2" could not be reached
[WARNING Hostname]: hostname "master2": lookup master2 on <IP_ADDRESS>:53: no such host
[preflight] Reading configuration from the cluster...
[preflight] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -o yaml'
[preflight] Running pre-flight checks before initializing the new control plane instance
[preflight] Pulling images required for setting up a Kubernetes cluster
[preflight] This might take a minute or two, depending on the speed of your internet connection
[preflight] You can also perform this action in beforehand using 'kubeadm config images pull'
[download-certs] Downloading the certificates in Secret "kubeadm-certs" in the "kube-system" Namespace
[certs] Using certificateDir folder "/etc/kubernetes/pki"
[certs] Using the existing "apiserver" certificate and key
[certs] Using the existing "apiserver-kubelet-client" certificate and key
[certs] Using the existing "apiserver-etcd-client" certificate and key
[certs] Using the existing "etcd/server" certificate and key
[certs] Using the existing "etcd/peer" certificate and key
[certs] Using the existing "etcd/healthcheck-client" certificate and key
[certs] Using the existing "front-proxy-client" certificate and key
[certs] Valid certificates and keys now exist in "/etc/kubernetes/pki"
[certs] Using the existing "sa" key
[kubeconfig] Generating kubeconfig files
[kubeconfig] Using kubeconfig folder "/etc/kubernetes"
[kubeconfig] Using existing kubeconfig file: "/etc/kubernetes/admin.conf"
W0921 17:12:42.084455   30226 kubeconfig.go:249] a kubeconfig file "/etc/kubernetes/controller-manager.conf" exists already but has an unexpected API Server URL: expected: https://<IP_ADDRESS>:6443, got: https://apiserver.cluster.local:6443
[kubeconfig] Using existing kubeconfig file: "/etc/kubernetes/controller-manager.conf"
W0921 17:12:42.221950   30226 kubeconfig.go:249] a kubeconfig file "/etc/kubernetes/scheduler.conf" exists already but has an unexpected API Server URL: expected: https://<IP_ADDRESS>:6443, got: https://apiserver.cluster.local:6443
[kubeconfig] Using existing kubeconfig file: "/etc/kubernetes/scheduler.conf"
[control-plane] Using manifest folder "/etc/kubernetes/manifests"
[control-plane] Creating static Pod manifest for "kube-apiserver"
[control-plane] Creating static Pod manifest for "kube-controller-manager"
[control-plane] Creating static Pod manifest for "kube-scheduler"
[check-etcd] Checking that the etcd cluster is healthy
error execution phase check-etcd: etcd cluster is not healthy: failed to dial endpoint https://<IP_ADDRESS>:2379 with maintenance client: context deadline exceeded
How to reproduce（pictures can be attached if necessary）
add third master in cluster

What you expected to happen
add the third or more masters
Operating environment

Kubernetes version: 1.22.5
Sealos version: 4.1.3
Operating system: centos7.6
Runtime environment:  4core 8 memory 100 storage
Cluster size: 2 master, 4 node

Ooops,the reason for the security group rule。


Custom categories

There is currently no way to add your own category to post in within a country

#134


Feature request: Ip Lookup

Is your feature request related to a problem? Please describe.
A ip lookup for easy and quick lookup
Apis
https://ipapi.co/
https://ipgeolocation.io/
https://ip-api.com/
https://ipstack.com/
https://ipwhois.io/
These are all great apis anyone i think any will be good for everyone

How about HTTP Request? Some of these have CORS issues which will block an HTTP request but ipwhois works via a local instance:

[{"op":"HTTP request","args":["GET","http://ipwhois.app/json/<IP_ADDRESS>","","Cross-Origin Resource Sharing",false]},{"op":"JSON Beautify","args":["    ",false]}]

Implementing any of those APIs would be implicit endorsement. That said, the design principles do allow for external APIs:

If at all possible, all operations and features should be client-side and not rely on connections to an external server. This increases the utility of CyberChef on closed networks and in virtual machines that are not connected to the Internet. Calls to external APIs may be accepted if there is no other option, but not for critical components.

See https://github.com/gchq/CyberChef/wiki/Contributing#coding-conventions


GetterLazy results in NullPointerException when used in constants/enum params

I know it's very unreasonable to use GetterLazy in constants (because they will be triggered when the class is loaded), but this is still an issue that is worth attention.
Example code:
@RequiredArgsConstructor
enum Foo{
  FOO (getLazyBar());

  @Getter(lazy = true)
  public final static Bar lazyBar = new Bar();

  private final Bar bar;
}

Partial delombok:
@RequiredArgsConstructor
enum Foo{
  FOO (getLazyBar());

  public final static AtomicReference<Object> lazyBar = new AtomicReference<>();

  public static Bar getLazyBar(){
    Object value = Foo.lazyBar.get(); // <--
    // called from line 3 => lazyBar is not initialized yet
    if(value == null){ ... }
    return (Bar) value;
  }

  private final Bar bar;
}

It seems this issue is not fixable; at least, not easily, because enum constants are inevitably declared before normal constants in an enum.
Lombok plugin or the preprocessor, however, should raise warnings or errors when encountering this kind of code, or even automatically set lazy to false to continue compiling (if I turn lazy to false, it has almost the same semantics, but it can run)
The main problem is that it is less obvious to developers when debugging.

Edit: It actually still has a problem without lazy. It would return null. It is as hard to fix as well. Since it is an existent Java issue, it is reasonable that it works wrongly in lombok. Closing.


chore: Why chomp

Description
This PR adds an initial "Why Chomp" section to the README.md.

I've just pushed some rewording here, let me know what you think?

@guybedford it's great! 🥇


Use GitHub tokens to prevent rate-limiting

When creating a lot of recipes in a short time, it's possible that users could run up against GitHub's API rate limits. It would be excellent if we could leverage API tokens (as AutoPkg does) to prevent this limitation.

Here here!


Page is not fully compatible with dark theme

People, branch and commit names are not readable when using dark theme

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

ID: fc4fa671-48df-7fc6-eb39-06da85dc1e39
Version Independent ID: 4ef522f6-24df-df64-3257-854ae27b2b9f
Content: The Race to Push - Azure DevOps
Content Source: https://mseng.visualstudio.com/DefaultCollection/TechnicalContent/_git/devops-learn-pr?path=%2fdocs%2fgit%2frace-to-push.md&version=GBlive&_a=contents
Product: devops
Git Login: samgu
Microsoft Alias: sanoursa

@MMThornberg I apologize for that - this has been an ongoing issue, but I am going to get it fixed this week. I didn't realize it also applied to the "Git at Scale" articles.

This is fixed and should be live in a day or two, thank you.


Looking for new/additional maintainer for Emblem.js

edit: don't worry! Emblem is getting HTMLBars support momentarily!
I unfortunately don't have the time to maintain this project the way I'd like and would love to pass it off to an interested person. Certainly happy to explain code organization, plans for the future, integration with Handlebars/HTMLbars/Ember. Please let me know if you're interested!

i could help with maintaining, but i wouldn't be able to be the sole person on it.  also, any chance you can publish the latest to npm w/ handlebars 2.0.0? i'm trying to upgrade a few other projects that are using this as a dependency.

We'll definitely need Emblem on top of HTMLBars. And if it helps we are happy to maintain the project.

I'm getting Emblem working on top of HTMLBars as we speak, but after that it'd be nice to pass on the knowledge

I have a project in production build with emblem, so I have a vested interest in at least helping to maintain. Where do I sign up?

@CNDW I have some folk finishing up the HTMLbars migration, and after that's done, Emblem won't need as much work (perhaps none?) to keep up with Handlebars changes, so I'd feel comfortable continuing as "maintainer", but there are a lot of issues I won't get around to on my own and a lot of them seem open to aspiring contributors if you wanna look through those.

@machty I'm loving emblem, and I would love to contribute. I'm not sure what maintaining would entail, or what time commitment that would involve, but I'd be interested in helping at least some.
I'm just beginning to look through PegJS to get an understanding of how to contribute here. I was looking for a "How to Contribute" section—rules/guidelines—but couldn't find one.
If you are passing along knowledge on how to care for it, would you be into a Google hangout with interested possible maintainers/contributors? I'd like to be a part of something like that.

@machty Now that ember 1.10 stable with HTMLbars is out any reports on the progress of fixing compatibility?
Happy to contribute to emblem in order to help it stay compatible with current ember versions.

Hey @machty, is there a checklist or plan for the ember-cli branch?
I've been hacking on it, watching the latest fork and trying to learn as much as I can. I'd like to see if I can help out in any way...

@machty - i can also take over some of this stuff if you want. i was about to start upgrading to<EMAIL_ADDRESS>too. :beers:

The merge of https://github.com/machty/emblem.js/pull/196 in imminent. I suggest taking a peek! No more Handlebars AST, for one.

:dancers: kewl. thanks for the update :)


"Cannot allocate memory" while compiling Ruby gem

Here's the full message:
       Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

       /tmp/build/vendor/ruby-2.1.2/bin/ruby extconf.rb
       Cannot allocate memory - /tmp/build/vendor/ruby-2.1.2/bin/ruby extconf.rb  2>&1

       Gem files will remain installed in /tmp/build/vendor/bundle/ruby/2.1.0/gems/bcrypt-3.1.7 for inspection.
       Results logged to /tmp/build/vendor/bundle/ruby/2.1.0/extensions/x86_64-linux/2.1.0-static/bcrypt-3.1.7/gem_make.out
       Installing excon 0.13.4
       Installing multipart-post 2.0.0
       An error occurred while installing bcrypt (3.1.7), and Bundler cannot continue.
       Make sure that `gem install bcrypt -v '3.1.7'` succeeds before bundling.
       !
       !     Failed to install gems via Bundler.
       !
remote: Build failed: exec: job exited with status 1
To<EMAIL_ADDRESS> ! [remote rejected] master -> master (pre-receive hook declined)

The bcrypt gem is pretty standard, and the app I'm pushing is obviously being prepared with the standard ruby buildpack.

how was this fixed? @elia

@sbpipb have no idea, was 1.5yrs ago, I hardly remember what I ate the day before…

I had this issue on DE server and adding swap file fixed it for me https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-12-04