Error: Unknown model for all Groq models in ChatGroq

Checked other resources

[X] I added a very descriptive title to this issue.
[X] I searched the LangChain.js documentation with the integrated search.
[X] I used the GitHub search to find a similar question and didn't find it.
[X] I am sure that this is a bug in LangChain.js rather than my code.
[X] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).

Example Code
import { ChatGroq } from "@langchain/groq";
const large_model = new ChatGroq({
    temperature: 0.0
});

import { ConversationSummaryBufferMemory } from "langchain/memory";
import db from "./db/sqlite";
import { small_model } from "./llms";
import {
    BaseMessage,
    StoredMessage,
    mapChatMessagesToStoredMessages,
    mapStoredMessagesToChatMessages,
} from "@langchain/core/messages";
import { BaseListChatMessageHistory } from "@langchain/core/chat_history";

// Not required, but usually chat message histories will handle multiple sessions
// for different users, and should take some kind of sessionId as input.
export interface CustomChatMessageHistoryInput {
    sessionId: string;
}

export class CustomChatMessageHistory extends BaseListChatMessageHistory {
    lc_namespace = ["langchain", "stores", "message"];

    sessionId: string;

    constructor(fields: CustomChatMessageHistoryInput) {
        super(fields);
        this.sessionId = fields.sessionId;
    }

    async getMessages(): Promise<BaseMessage[]> {
        const messagesStr = (db.prepare("SELECT data FROM chat WHERE sessionId = ?").get(this.sessionId) as {
            data: string;
        })?.data ?? "[]";
        let messages: StoredMessage[] = JSON.parse(messagesStr);
        return mapStoredMessagesToChatMessages(messages);
    }

    async addMessage(message: BaseMessage): Promise<void> {
        const retrievedMessagesStr = (db.prepare("SELECT data FROM chat WHERE sessionId = ?").get(this.sessionId) as {
            data: string;
        })?.data ?? "[]";
        let retrievedMessages: StoredMessage[] = JSON.parse(retrievedMessagesStr);
        const serializedMessages = mapChatMessagesToStoredMessages([message]);
        retrievedMessages.push(serializedMessages[0]);
        // console.log("retrievedMessage: ", retrievedMessages);
        db.prepare("INSERT OR REPLACE INTO chat (sessionId, data) VALUES (?, ?)").run(this.sessionId, JSON.stringify(retrievedMessages));
    }

    async addMessages(messages: BaseMessage[]): Promise<void> {
        const retrievedMessagesStr = (db.prepare("SELECT data FROM chat WHERE sessionId = ?").get(this.sessionId) as {
            data: string;
        })?.data ?? "[]";
        let retrievedMessages: StoredMessage[] = JSON.parse(retrievedMessagesStr);
        const serializedMessages = mapChatMessagesToStoredMessages(messages);
        retrievedMessages.push(...serializedMessages);
        // console.log("retrievedMessagessss: ", retrievedMessages);
        db.prepare("INSERT OR REPLACE INTO chat (sessionId, data) VALUES (?, ?)").run(this.sessionId, JSON.stringify(retrievedMessages));
    }

    async clear(): Promise<void> {
        db.prepare("DELETE FROM chat WHERE sessionId = ?").run(this.sessionId);
    }
}

export function getMemory(sessionId: string): ConversationSummaryBufferMemory {
    const history = new CustomChatMessageHistory({ sessionId: sessionId });
    return new ConversationSummaryBufferMemory({
        chatHistory: history,
        memoryKey: "chat_history",
        llm: small_model,
    });
}

memory.saveContext({ input: query }, { output: resp.response })

Error Message and Stack Trace (if applicable)
Failed to calculate number of tokens, falling back to approximate count Error: Unknown model
    at getEncodingNameForModel (file:///C:/Github/fc-monolith/hono/node_modules/.pnpm/js-tiktoken@1.0.12/node_modules/js-tiktoken/dist/chunk-PEBACC3C.js:230:13)
    at encodingForModel (file:///C:/Github/fc-monolith/hono/node_modules/.pnpm/@langchain+core@0.1.63_openai@4.46.1/node_modules/@langchain/core/dist/utils/tiktoken.js:19:24)
    at ChatGroq.getNumTokens (file:///C:/Github/fc-monolith/hono/node_modules/.pnpm/@langchain+core@0.1.63_openai@4.46.1/node_modules/@langchain/core/dist/language_models/base.js:177:40)
    at ConversationSummaryBufferMemory.prune (file:///C:/Github/fc-monolith/hono/node_modules/.pnpm/langchain@0.1.37_@xenova+transformers@2.17.1_@zilliz+milvus2-sdk-node@2.4.2_better-sqlite3@9._byv6wm32l75bjvaef4ttqhmd3e/node_modules/langchain/dist/memory/summary_buffer.js:114:47)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async ConversationSummaryBufferMemory.saveContext (file:///C:/Github/fc-monolith/hono/node_modules/.pnpm/langchain@0.1.37_@xenova+transformers@2.17.1_@zilliz+milvus2-sdk-node@2.4.2_better-sqlite3@9._byv6wm32l75bjvaef4ttqhmd3e/node_modules/langchain/dist/memory/summary_buffer.js:96:9)

Description
I'm trying to summarize chat history and save using ConversationalSummaryBufferMemory, and when I switch out LLMs from ChatOpenAI or ChatOllama to ChatGroq, I get the error.
System Info
<EMAIL_ADDRESS>| MIT | deps: 18 | versions: 270
Typescript bindings for langchain
https://github.com/langchain-ai/langchainjs/tree/main/langchain/
keywords: llm, ai, gpt3, chain, prompt, prompt engineering, chatgpt, machine learning, ml, openai, embeddings, vectorstores
dist
.tarball: https://registry.npmjs.org/langchain/-/langchain-0.1.37.tgz
.shasum: 15db8ca5c24afc39e61773cab69e216dfb38e1bb
.integrity: sha512-rpaLEJtRrLYhAViEp7/aHfSkxbgSqHJ5n10tXv3o4kHP/wOin85RpTgewwvGjEaKc3797jOg+sLSk6a7e0UlMg==
.unpackedSize: 4.0 MB
dependencies:
@anthropic-ai/sdk: ^0.9.1        js-tiktoken: ^1.0.7              openapi-types: ^12.1.3
@langchain/community: ~0.0.47    js-yaml: ^4.1.0                  p-retry: 4
@langchain/core: ~0.1.60         jsonpointer: ^5.0.1              uuid: ^9.0.0
@langchain/openai: ~0.0.28       langchainhub: ~0.0.8             yaml: ^2.2.1
@langchain/textsplitters: ~0.0.0 langsmith: ~0.1.7                zod-to-json-schema: ^3.22.3
binary-extensions: ^2.2.0        ml-distance: ^4.0.0              zod: ^3.22.4
maintainers:

nfcampos<EMAIL_ADDRESS>jacoblee93<EMAIL_ADDRESS>andrewnguonly<EMAIL_ADDRESS>davidduong<EMAIL_ADDRESS>hwchase17<EMAIL_ADDRESS>basproul<EMAIL_ADDRESS>
dist-tags:
latest: 0.1.37    next: 0.2.0-rc.1
published 3 days ago by basproul<EMAIL_ADDRESS><EMAIL_ADDRESS>| MIT | deps: 5 | versions: 9
Groq integration for LangChain.js
https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-groq/
dist
.tarball<EMAIL_ADDRESS>.shasum: a44b19af3b784f324057bfb0217ff0613d148c2f
.integrity: sha512-/QGGgazYdxlN8FCmPfEVDO9Hg55POvQdnoou+b3lsugmwP1TYPRtqLW6JY7Atb36X4vjEJwiMCnntDXdT7vgaw==
.unpackedSize: 48.8 kB
dependencies:
@langchain/core: ~0.1.56    groq-sdk: ^0.3.2            zod: ^3.22.4
@langchain/openai: ~0.0.28  zod-to-json-schema: ^3.22.5
maintainers:

andrewnguonly<EMAIL_ADDRESS>basproul<EMAIL_ADDRESS>jacoblee93<EMAIL_ADDRESS>nfcampos<EMAIL_ADDRESS>sullivan-sean<EMAIL_ADDRESS>hwchase17<EMAIL_ADDRESS>
dist-tags:
latest: 0.0.9
published 2 weeks ago by basproul<EMAIL_ADDRESS>node --version: v20.11.0
Platform: Windows 11 Version	10.0.22631 Build 22631 x64

Hey, yes will have a look at this!

Hey, apologies for the delay!
The reason this occurs is because that type of memory is dependent on token counting:
https://github.com/langchain-ai/langchainjs/blob/main/langchain/src/memory/buffer_token_memory.ts#L115
We don't have a built-in accurate tokenizer at the moment - best we could do is add an option to suppress the warning?

If we just suppress the warning, will the buffer memory still continue to work to some extent? By approximating the token count somehow?

Hi @jacoblee93 , I'm having a similar issue as the OP except while using the ChatTogetherAI class. It seems that the memory classes only work with open ai out of the box and using any of the other providers results in the above error. The only thing I found in the docs related to token counting is this:

https://js.langchain.com/v0.1/docs/modules/model_io/chat/token_usage_tracking/

It seems to suggest that we use the token counts returned in the api response. Is that enough? Suppose i load a past conversation which is 99% close to hitting the context limit. Then the first message I send sends me over the limit. This message was already added to the context right? since there was no local way of knowing it would hit the limit, and we only found out with the response?
Even if just using the remote count is ok, at the moment the above error still occurs when using anything other than open ai. I was able to suppress it doing this:
    import llama3Tokenizer from 'llama3-tokenizer-js';

    ChatTogetherAI.prototype.getNumTokens = function(str) {
        const tokenCount = llama3Tokenizer.encode(str, {
          eos: false,
          bos: false
        }).length;
        return Promise.resolve(this.totalTokenCount);
    }

since I am using the llama 3 model from together ai I used this llama3Tokenizer to get the count locally. Is this enough to have the ConversationSummaryBufferMemory work and to set up local token counting? or is there more to it?
And how can I see the total count of the entire chain that the ConversationSummaryBufferMemory tracks? The above function will give me the token count for a single  message but how to get the running total that the class is using to make summary and trimming decisions?
Appreciate any help! 🙏


Pin contrib 1.10.11

Pin contrib 1.10.11 with Redis Binding fix for nil values

No idea what's going on with your tests - but this change is unrelated. Feel free to compare the contrib version diff.

CI sometimes is not stable as we wish, re-run to see the result.

With the release of 1.13 coming - 1.10 won't be supported, so this PR is now pointless.


[Feature] Back to top button in each page

Is your feature request related to a problem? Please describe.
It's really frustrating to scroll through a website from bottom to top, specially in this case where the header is not stuck on top of the screen
Describe the solution you'd like
I would like to add a floating button which takes the user back to the top of the page which is really helpful in case of long websites.
please assign it to me

@prasoonk1204 do it


Image is drawn as black "placeholder"

Version: pdf.js 1.1.155
Problem:
The image on the right hand side is drawn as a black placeholder.
Image drawn OK on this pdf: http://<IP_ADDRESS>/ok.pdf
Not OK (image drawn black) on this pdf: http://<IP_ADDRESS>/nok.pdf
Expected output of nok.pdf:

Console log: none
Opening the nok.pdf for example with Chromium Version 41.0.2272.76 Ubuntu 14.04 works fine.

The file nok.pdf appears to be corrupt. Even Adobe Reader fails to render the graphics, and warns that the file might not display correctly (sorry about the Swedish language in the prompt):

@Snuffleupagus you are right. There is something wrong with the pdf file since some other viewers do not show it correctly either.
How ever some do show it correctly (like the one in Chrome) so I do not know if pdf.js -team wants to still try to get this "fixed".
But from my behalf this issue can be closed.

Closing since the files are no longer available and we now have more logic in place for recovery of broken content in PDF files.


Serious h2 database corrupt under unusual high load

Description
Yesterday a hacker spammed my server by clicking a sign which executes commands for giving players items. During that, the h2 database engine of luckperms crashed. Then the server automaticly restarted but the database can not be opened anymore.
I also noticed that the version of h2 library is very outdated (1.4.199) which is not supported by their team and has known security vulnerabilities. They said in the changelog that 2.x version improved stability when an application crash. Although upgrading it will break a lot and not forward compatible, the security and stability benefits seem worthwhile.
Reproduction Steps
The problem happends by chance so there may be not a way to  stably reproduce it. Even though, I am trying my best to make it.
Expected Behaviour
Luckperms plugin can handle whatever high load without database corruption.
Server Details
https://github.com/Wind-Development/WindSpigot
LuckPerms Version
v5.4.36
Logs and Configs
https://gist.github.com/skbeh/38e3235a26f6abc1d508e844b3ff40d8
https://gist.github.com/skbeh/69cc1e30f9ed4843753bb3dc98b24bbf
Extra Details
No response

It looks like your server is in offline mode. Please know that being in offline mode inherently makes your server less secure. I don't see why LuckPerms should be responsible for someone causing your database to break because you run you server in offline mode. I haven't experience a corrupt H2 file before, but it appears your H2 file might just be locked because it wasn't unlocked properly from the server crashing, so there is a chance the data is still intact, but I could be wrong about that.

Please know that being in offline mode inherently makes your server less secure.

Online mode not solves any bugs in existing code (There have been reports that this h2 version is easy to be corrupted like https://github.com/h2database/h2database/issues/2730).

it appears your H2 file might just be locked

There is not any lock files around the he db file. Even the official database recover tool java -cp h2*.jar org.h2.tools.Recover which reports java.nio.BufferUnderflowException not works.

LP v5.4.50 upgrades h2 from 1.4.199 to 2.1.214.
The migration is automatic on startup:

And a backup of the old format is retained in the LuckPerms folder:

Hopefully this will help with the corruption issues some people are seeing. Unfortunately, not sure what to suggest to fix any existing broken db files. If the recovery tool doesn't work, then you might be s' out of luck :(


Reland "Avoid calling performLayout when only the relayout boundary is different"

Reverts flutter/flutter#100068, now that https://github.com/flutter/flutter/pull/100519 has been merged. This pull request alone should no longer cause internal test failures, but https://github.com/flutter/flutter/pull/100519 is expected to change some internal golden images.

Will land once we've confirmed that https://github.com/flutter/flutter/pull/100519 is safe to roll in.


paper_list query returns different results than on the website

When I run the query for "utrecht university" on the website (https://paperswithcode.com/search?q_meta=&q_type=&q=utrecht+university), I get 5 results in total:

When I run the same query, I get only 3 results and some of them are different results:

For example the paper I marked (see this link also: https://physics.paperswithcode.com/paper/long-lived-non-equilibrium-interstitial-solid) isn't even in the original query I did on the website. Is this an issue or am I using this wrong?

Hi @kequach,
The frontpage search is not a paper search. It's a compound search over repositories and papers that's why it returns more results. It's also limited to only 200 results.
I added a /search/ endpoint to the api that emulates the frontpage search. Also added a .search method on the client. Hope that solves your issue, and also sorry for a really late response.


Added ability to change user password

Added ability to change user password
How has this been tested?
Manual testing
Checklist

[x] I submit my changes into the develop branch
[x] I have added description of my changes into CHANGELOG file
[ ] I have updated the documentation accordingly
[ ] I have added tests to cover my changes
[ ] I have linked related issues (read github docs)
[ ] I have increased versions of npm packages if it is necessary (cvat-canvas,
cvat-core, cvat-data and cvat-ui)

License

[x] I submit my code changes under the same MIT License that covers the project.
Feel free to contact the maintainers if that's a concern.
[x] I have updated the license header for each file (see an example below)

# Copyright (C) 2020 Intel Corporation
#
# SPDX-License-Identifier: MIT

Pull Request Test Coverage Report for Build 6633

0 of 0   changed or added relevant lines in 0 files are covered.
21 unchanged lines in 3 files lost coverage.
Overall coverage decreased (-0.02%) to 65.003%

Files with Coverage Reduction
New Missed Lines
%

datumaro/datumaro/components/extractor.py
1
90.43%

src/api-implementation.js
8
76.43%

src/api.js
12
64.06%

Totals

Change from base Build 6627:
-0.02%

Covered Lines:
11104

Relevant Lines:
16679

💛  - Coveralls

@ActiveChooN
Could you please also take a look at this PR?

@azhavoro Please, update minor versions for cvat-ui and cvat-core

@azhavoro, can you also fix linting problems related to your PR, please?

@zhiltsov-max , could you please look at the PR and test it?


[ITBL-5386]-add-ci-codecov

Add ci and code coverage for Swift SDK. Make necessary changes to schemes, project files etc.

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@3662ef3). Click here to learn what that means.
The diff coverage is 100%.

@@            Coverage Diff            @@
##             master       #8   +/-   ##
=========================================
  Coverage          ?   47.91%
=========================================
  Files             ?       19
  Lines             ?     1436
  Branches          ?        0
=========================================
  Hits              ?      688
  Misses            ?      748
  Partials          ?        0

Impacted Files
Coverage Δ

notification-extension/TestFile.swift
100% <100%> (ø)

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 3662ef3...bf49f36. Read the comment docs.

Now we have ci and codecov. Finally.


Should not throw on missing modules

It should just log a warning instead

Just the plugin I was looking for, I'm surprised it does not exist anywhere else yet. Nice work so far 👍
When a module is not found I'm getting this:
throw new Error(`'${moduleName}' is not available through cdn, add it to https://github.com/mastilver/module-to-cdn/blob/master/modules.json if you think it should`);

Would it be possible to add an option which can be additional to the modules.json file, rather than needing to do a pull request every time it doesn't find it.
i.e.
new ModulesCdnWebpackPlugin({
  modules: ['vue'],
  extra: {
    "vue": {
      "var": "Vue",
      "url"<EMAIL_ADDRESS>    }
  }
})

This would make it much more flexible and less opinionated, what are your thoughts?
Cheers.


Add support for setting of different colors for container's border and title

Introduce options for setting border title color and border title focus color.
Fixes #73

Pull Request Test Coverage Report for Build 2078

22 of 22 (100.0%)  changed or added relevant lines in 2 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.02%) to 91.28%

Totals

Change from base Build 2072:
0.02%

Covered Lines:
8385

Relevant Lines:
9186

💛  - Coveralls

Pull Request Test Coverage Report for Build 2078

22 of 22 (100.0%)  changed or added relevant lines in 2 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.02%) to 91.28%

Totals

Change from base Build 2072:
0.02%

Covered Lines:
8385

Relevant Lines:
9186

💛  - Coveralls

(optional) Consider adding a line about this new functionality into the CHANGELOG. We can do that in the same PR.

(optional) Consider adding a line about this new functionality into the CHANGELOG. We can do that in the same PR.

Addressed the comment and updated the CHANGELOG.

Addressed the comment and updated the CHANGELOG.


Thanks anyway for your pull and support to the project! Best, Davide


[Bug]: Unable to flag a chat connection

What browser are you using?
Chrome
What operating system are you using?
macOS
Actual Behavior
Unable to flag a chat connection. The button click is inactive.

Expected Behavior
Clicking the report icon button should open the report flow.
Reproduction

Sign in to the app
Select a conference
Select "Messages"
Select an ongoing message
Click the flag icon in the top right of the chat

Additional Information
There is absolutely no functionality on this icon.

This flow seems reasonable, proceed.


Metric requestCharge: is it cost or throughput?

Both can be inferred from this page:
throughput:
requestCharge ... The number of RU/s that are used by the operation
cost:
MongoRequestCharge ... Mongo Request Units Consumed
Sounds like a confusion bw RUs (plural) and RU/s (per second).

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

ID: 83be8d0a-348a-303a-6424-401b4522661d
Version Independent ID: e72b9ae2-f26a-77f1-348b-5eec7acf3390
Content: Monitoring Azure Cosmos DB data reference
Content Source: articles/cosmos-db/monitor-cosmos-db-reference.md
Service: cosmos-db
GitHub Login: @StefArroyo
Microsoft Alias: esarroyo

#assign:seesharprun
Hello @ciufudean!
You are correct! The request charge header is the amount of RU currency used by a specific operation. RU/s measures the total amount of RUs available in a time interval.
We have a change queued that will be released shortly. Thank you for your feedback!


feat(amTimeAgo): add am-time-ago-formatter attribute

Adds optional am-time-ago-formatter which can take a function to alter the displayed text
based on custom logic. Example:

$scope.customFormatter = function(date) {
   // any date within 5 minutes from now or in the past will be displayed
   // as 'in a few moments'
   if (date > Date.now() - 5 * 60000) {
      return 'in a few moments';
   }
};

Fixes:
https://github.com/urish/angular-moment/issues/44
https://github.com/urish/angular-moment/issues/153

we ever going to merge this?

this would be great!

How can i get the angular-moment version with m-time-ago-formatte


Highlight contact button to make it easier for users to find it

There was a comment from Aoife about the Contact button not been easy to find.
Here's how it looks today

Here's how it looks when I: 1) remove padding, 2) add border-style: solid, and 3) add border-width: 1px in the element: .Button__inlineTextButton__3IeDs

We would also need to adjust the hover effect when we position the mouse to click it.
This is a proposal.

@RohrerHope Aoife never mentioned the contact host button. We'll talk about this on Friday.

@buckwierd

@RohrerHope I know and if you think back this is the question related to "Contact", from your own "Ideas for QUestions" checklist: "Contact the Whichost team by email/phone".
It doesn't matter if this was a confusion because it was a good one. We'll change the colors and adapt the buttons after we agreed on one style. Please look at this website www.gaest.com and see how they solved the problem. They only use their main color and it looks great. These are the guys that Airbnb bought a couple of weeks ago.
https://luckey.fr/en/ does the same but they're also combining their main color with ghost buttons (the ones with the white frame). This company was also bought by Airbnb a couple of weeks ago.

@buckwierd
Both Gaest and Luckey manage their buttons great and I enjoyed both. I also appreciate that both of them have their buttons always on the main brand colour.

Both "Contact" H links at the top and bottom of the L page were transformed into ghost buttons.
Top area:
https://drive.google.com/open?id=1yxy-l6vkNF9ibVL_TJ0uRWOOZUKqoDKC
Bottom area:
https://drive.google.com/open?id=130_5_xAAWXZyd1SL3hERHVJLnLnFX65E
@lcoenen was pushed on 4-adjust-the-static-centent. Feel free to close the issue after it was pushed to master.

I confirm this are okay in Staging. 👍
BTW, the drive URLs you entered in your last comment don't work when clicking on them. They go to an empty page. I had to copy and paste them.
Thanks.

This will be pushed to master


Added rehook-segment documentation

Proposed changes

Added integration document for Rehook as Destination in Segment

Merge timing

ASAP once approved

@tushardhara thanks, looks good! Just need one more review from someone on our docs team, and we can get this merged.

@tushardhara @tcgilbert I created #5228 to deploy these docs.


Using with Svelte-Kit, error: "The requested module does not provide an export name"

Hi @timostamm! Your work is great! Really, I'm speechless! ❤
i tried both v1 and v2 (now I'm on 2.0.0-alpha.17) and using https://vitejs.dev I get this error:
The requested module '/node_modules/.vite/@protobuf-ts_runtime.js?v=e308126a' does not provide an export named 'BinaryReadOptions'

and also for:

BinaryWriteOptions
IBinaryReader
IBinaryWriter
and so on...

If I open the generated files and change this:
import { ServiceType } from "@protobuf-ts/runtime-rpc";
import { BinaryWriteOptions } from "@protobuf-ts/runtime";
import { IBinaryWriter } from "@protobuf-ts/runtime";
import { WireType } from "@protobuf-ts/runtime";
import { BinaryReadOptions } from "@protobuf-ts/runtime";
import { IBinaryReader } from "@protobuf-ts/runtime";
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
import { MessageType } from "@protobuf-ts/runtime";

to this:
import { ServiceType } from "@protobuf-ts/runtime-rpc";
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
import type { IBinaryWriter } from "@protobuf-ts/runtime";
import { WireType } from "@protobuf-ts/runtime";
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
import type { IBinaryReader } from "@protobuf-ts/runtime";
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
import { MessageType } from "@protobuf-ts/runtime";

(and in the other file too... ex: import type { RpcTransport } from "@protobuf-ts/runtime-rpc";)
it works!
Why?
How can I automagically fix this? With a .tsconfig option, maybe?

Hi Frederik,
not sure what is going on - I can't reproduce, unfortunately:
I just created a simple app with npm init @vitejs/app with the react-ts template.
Then generated a simple message from msg-scalar.proto:
npx protoc -I . --ts_opt long_type_string --ts_out ./src msg-scalar.proto

And use the message in App.tsx:
import {ScalarValuesMessage} from './msg-scalar';
console.log(
	ScalarValuesMessage.create()
);

npm run dev and npm run build work as expected, there are not compilation errors or warnings.
Vite 2.1.5, Typescript 4.2.3 got installed and tsconfig.json looks ok:
{
  "compilerOptions": {
    "target": "ESNext",
    "lib": ["DOM", "DOM.Iterable", "ESNext"],
    "types": ["vite/client"],
    "allowJs": false,
    "skipLibCheck": false,
    "esModuleInterop": false,
    "allowSyntheticDefaultImports": true,
    "strict": true,
    "forceConsistentCasingInFileNames": true,
    "module": "ESNext",
    "moduleResolution": "Node",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "noEmit": true,
    "jsx": "react"
  },
  "include": ["./src"]
}

This might be related to https://www.typescriptlang.org/tsconfig#importsNotUsedAsValues
It might be worth trying to set "importsNotUsedAsValues" : "remove" (the default behaviour) in a tsconfig.json for the generated code.
Do you have some more info so I can reproduce?

I will create a repo for you in a few moments. I'm using svelte kit which uses vite.

This is the repo: https://github.com/frederikhors/protobuf-ts-issue-94.
I used this cmd:
npx protoc -I .\src\routes\protobuf\ --ts_opt long_type_string --ts_out .\src\routes\protobuf\ ./src/routes/protobuf/msg-scalar.proto
Steps:

clone it with git clone https://github.com/frederikhors/protobuf-ts-issue-94.git

npm install

npm run dev -- --open

click on "Protobuf" top menu link

this is the error on my Windows 10:

the console.log() works but NOT in browser console: on node/PC console!

I'm using Win 10 64, node v14.16.0, npm v7.8.0.

I can reproduce, thanks.
The root cause seems to be a limitation of svelte's TypeScript preprocessor. It is not smart enough to figure out that an import of an interface for example can simply be omitted in Javascript. You have to explicitly use import type in svelte to import types. See this issue: https://github.com/sveltejs/svelte-preprocess/issues/206
I am not sure whether I would consider this limitation acceptable. As a user, I don't want to think about whether I am using an import as a type or as a value.
For example, I have to use import type in this case:
import type {MyClass} from "./my-class";
let x: MyClass;

But not in this case:
import {MyClass} from "./my-class";
let x: MyClass = new MyClass();

The TypeScript compiler sorts this stuff out flawlessly by default. Maybe svelte should too.
There is an easy workaround:
npx protoc -I . --ts_opt long_type_string,force_optimize_code_size --ts_out ./src msg-scalar.proto
                                          ^^^^^^^^^^^^^^^^^^^^^^^^

If you use the plugin parameter force_optimize_code_size, protobuf-ts will use reflection for the binary format. This results in much smaller code size (you probably want this in a web app), and by coincidence the code only uses value imports.
I am not sure if this works in all cases, but it certainly does work with msg-scalar.proto. Could you give this workaround a try? If you notice any problems, let me know.

I opened https://github.com/sveltejs/svelte-preprocess/issues/340.
Thank for your precious answer.
I don't like workarounds. And I know this is not your fault!
But I'm worried for two reasons:

today I could solve it like this, but what if something changes tomorrow?

are we sure that optimization for CODE_SIZE is better for web apps? I mean, apart from the gain on the size of the final bundle to download, does the speed in operations suffer? Do we have benchmarks in this regard?

Thanks again for all your work.

Small note: I'm trying with the force_optimize_code_size option and anyway the *.client.ts files have that problem.
So not even in this way I can solve.

are we sure that optimization for CODE_SIZE is better for web apps? I mean, apart from the gain on the size of the final bundle to download, does the speed in operations suffer? Do we have benchmarks in this regard?

Yes, see packages/benchmarks/perf.ts
The difference in speed is surprisingly negligible.
### read binary
google-protobuf             : 12.33 ops/s
ts-proto                    : 22.69 ops/s
protobuf-ts (speed)         : 25.07 ops/s
protobuf-ts (speed, bigint) : 25.54 ops/s
protobuf-ts (size)          : 22.68 ops/s
protobuf-ts (size, bigint)  : 23.12 ops/s
### write binary
google-protobuf             : 14.25 ops/s
ts-proto                    : 10.7 ops/s
protobuf-ts (speed)         : 11.9 ops/s
protobuf-ts (speed, bigint) : 11.63 ops/s
protobuf-ts (size)          : 10.64 ops/s
protobuf-ts (size, bigint)  : 10.95 ops/s
### from partial
ts-proto                    : 36.7 ops/s
protobuf-ts (speed)         : 27.75 ops/s
protobuf-ts (size)          : 27.57 ops/s
### read json
ts-proto                    : 35.96 ops/s
protobuf-ts (speed)         : 15.92 ops/s
protobuf-ts (size)          : 17.38 ops/s
### write json
ts-proto                    : 139.48 ops/s
protobuf-ts (speed)         : 29.2 ops/s
protobuf-ts (size)          : 28.36 ops/s
### read json string
ts-proto                    : 14.14 ops/s
protobuf-ts (speed)         : 8.79 ops/s
protobuf-ts (size)          : 8.84 ops/s
### write json string
ts-proto                    : 19.28 ops/s
protobuf-ts (speed)         : 18.49 ops/s
protobuf-ts (size)          : 18.91 ops/s

Why is ts-proto faster?

Why is ts-proto faster?

This is a microbenchmark, take it with a grain of salt 🙄
protobuf-ts is way more strict in JSON I/O than ts-proto and this costs some cycles. Note that you probably want to work with JSON strings, where most of the difference disappears. Also, you probably don't even want to use JSON, but the binary format.

Small note: I'm trying with the force_optimize_code_size option and anyway the *.client.ts files have that problem.

Version 2.0.0-alpha.18 was just published. This should generate import type where necessary.
It is very likely that there are some edge cases that don't work yet. Just let me know when you notice something missing.
Cheers!

Did you published it with latest tag?

I tried 2.0.0-alpha.18 and with my files it works amazingly well!

Did you published it with latest tag?

Thanks for the heads up, that was not intentional.  🔥   🚒
I could not unpublish in time. v1.0.13 fixes the "latest" channel,
v2.0.0-alpha.19 adds type imports to grpc clients in the "next" channel.

"You have to explicitly use import type in svelte to import types."
Thank you @timostamm !!
For anyone else who came here from a Google search import type { MyType} from "$types"; fixed this.
I ran into this problem tonight, and I'm on:
svelte - v3.42.5
@sveltejs/kit - v1.0.0-next.166
@sveltejs/vite-plugin-svelte - v1.0.0-next.24

BTW, svelte apparently fixed this in v4.9.0, see https://github.com/sveltejs/svelte-preprocess/pull/392


Update send-external-object.md

Updated docs for send-external-object

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

@adeel2023 Thank you for sending us the pull request.
Can you please sign the Contributor License Agreement first so that we can move forward with your update? Thanks.

The changes made in this PR are tranferred to PR: https://github.com/mendix/docs/pull/6431.
Close this PR because the update was made to the wrong doc version.


Merge :: Filesystem, File, Luaobj, Love, Source, Tremor (lib), Make

We now have filesystem, file handling, and ogg playback! Thank you guys at ctrulua!


use cmake+appveryor+travis to build and run tests on Windows and Linux

Hi
Here is my pull request I spoke about in #4 .
There is at least one thing to change: currently, the CI badges use my account and my forked github repo.

Please be patient. I am at NDC Techtown the next days and at CPPCon in two weeks and might be too busy to work on that.

yes no pb. It is not urgent :-)

@menuet I noticed that in the proposed CMakeLists.txt file that there is no interface library for scope  itself.  This is something that cmake users may appreciate.  Ideally, the scope_test target could be included only if we are calling cmake on scope17 as the master project, otherwise only enable the interface library.  I am not a cmake expert, but I think something like the following is a start.  As for conditionally enabling targets if the library is the master project, I see that fmt does this.
add_library(scope INTERFACE)
target_add_sources(scope ${CMAKE_CURRENT_SOURCE_DIR}/scope.hpp
target_include_directories(scope INTERFACE
  $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)
target_include_directories(scope SYSTEM INTERFACE
  $<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/scope17>
)

I have a branch and pull request with @menuet to address my previous concerns / desires for this pull request.  Thanks for your consideration.

Peter, I never heard back from @menuet about the fixes that I proposed.  I have created a new pull request #13 which bases them off of your new commit, e10de17.  Hopefully, you will consider the changes as they make scope17 a better CMake sub-project.  Thanks.

Hi Everybody
Sorry, I had completely forgotten about this pull request that I did a long time ago.
Of course, I agree that it is better to provide an INTERFACE target for developers consuming the cmake config.
(My primary goal was to set up a continuous integration)


Revisit concerns in #2244

See https://github.com/kennethreitz/requests/pull/2244 for more context:
Specific concerns are:

Should redirects handled by the cache count against the max number of redirects? (e.g., if we set a max of 30 and find 2 redirects in the cache, the max number of redirects a user could encounter after that would be 28)
Should history be some-how generated by the redirect cache? (i.e., should we be making responses and adding them to the final  response's history?)
Should a separate error be raised for the case where there's a loop in the cache? (When documented this would help the user realize they're stuck in a cached loop and that they may want to clear it to retry using the live site. Note: this also affects the API of Session#resolve_redirects.)

@Lukasa is it still worth keeping this open?

I still hate the redirect cache, but I think we should talk about it at PyCon. In particular, we should talk about whether we should yank it out and instruct people to use CacheControl instead.


theme: dark option not working as expected

Hi,
The option theme: dark is not working as expected to generate reports for Github dark mode. All the images rendered are still considering the light mode which does not allow us to visualize properly the X and Y title for each one of the graphs generated by the telemetry report

https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#specifying-the-theme-an-image-is-shown-to
It might be better if this action generates light mode and dark mode images and switches between them using the above.


Scene plotter visualiztion features

Added the capability to change the colours of all agents, including the colour of their edges, to ScenePlotter. This should not force any existing implementations of ScenePlotter but give some visualization flexibility internally or externally if the user chooses to do so.
Are there any other features that might be interesting to add to this PR such as adding agent path visualization to ScenePlotter?

Do you have more changes coming? If so, I'll hold off on reviewing for now.

Do you have more changes coming? If so, I'll hold off on reviewing for now.

I do have some more changes coming and am doing a larger refactor.

OK, let me know when it's ready.

This PR is ready for a re-review. Noteable changes include:

All the open_drive relevant parameters as kwargs since this functionality will be used rarely.
Condensed the input parameters to a LocationResponse instead of inputting the parameters individually.
Added docustrings to the client-facing member functions of ScenePlotter.
Added data validation to the client-facing functions.
Added the ability to manually control the colours of the faces and edges of all agents.
Added sphinx documentation so ScenePlotter will be documented on our website.

@bzwartsenberg coming back to this and seeing if there is time to review this?

@adscib I am going through old PR's and I've changed this to be more backwards compatible, requiring less concern about merging. Essentially this adds documentation and cleaned up the scene plotter, as well as adding left-hand option for visualizing Carla maps more easily.
Let me know if you think there are any issues and if we can merge this into develop.

@adscib Pinging this PR again to get the go-ahead to merge this into develop. Added some changes to update this branch to fit with changes to the develop branch.


add "other" to the statistics tables; closes #507

OK, I see.  So "other" = "total" - sum(every_other_country) - since total + country count are explicitly tracked separately, there can be this gap here.


Dynamo (Revit) 2.16 compatibility

I hope this one isn't already posted/requested before, but Speckle doesn't seem to work with Dynamo Revit 2.16 (newest version).
The Speckle manager doesn't install it into the packages folder. Copying and pasting from 2.13 to 2.16 doesn't work either. It does show up in the installed packages (obviously), but the receiver doesn't do much (it does GET the stream but it doesn't output anything)

Hey @joostschlebaum ,
thanks for the report! Where are you using Dynamo 2.16?
AFAIK Revit 2023 uses 2.13 and can't be updated by the user.

Hi Matteo,
In Revit 23. That one got updated to 23.1 and now has 2.16
Regards

Txs! Updating right now; will give it a go as it's installed!

Hey @joostschlebaum I've been debugging this morning, and it seems to be an issue in Dynamo actually.
Please see my message on their forum: https://forum.dynamobim.com/t/watch-nodes-not-working-with-complex-dictionaries-in-2-16/86002
The data is coming through but doesn't appear in the watch nodes.
We can easily add support for Dynamo 2.16 in our installers, but this bug might be on their end to fix!

Hi @teocomi ,
Good find! Thanks!
We also seem to have some trouble with codeblocks i.c.w. Speckle. Hope this gets resolved soon.
Cheers Joost

For code blocks, we do have a temporary solution: https://speckle.community/t/dynamo-code-block-not-working-in-revit-2023/3788/14?u=teocomi

It's been confirmed it's a bug in Dynamo, closing this here: https://forum.dynamobim.com/t/watch-nodes-not-working-with-complex-dictionaries-in-2-16/86002


Cannot mark topic as solved or switch topic type

In both my current implementation of NodeBB (v0.8.1) and the NodeBB community, there are a few issues with this plugin for marking topics as solved or marking questions as normal topics, etc.
Chrome console is showing this error:
Uncaught TypeError: ajaxify.variables.get is not a function nodebb.min.js:13

I can help confirm that this was fixed with https://github.com/psychobunny/nodebb-plugin-question-and-answer/commit/ca7c4c0c06a97c673f86c40810fda51141b2456c

thanks :+1:


Update: Use ReleasesURLProvider to solve gitHubURL prop drilling issue

What is the purpose of this pull request? (Check any that's applicable)

[ ] Feature
[ ] Bug fix
[ ] Dependency updates
[ ] Documentation updates
[ ] Build related changes
[ ] Changes an existing functionality
[x] Other, please explain:
gitHubURL prop was drilled down upto level 4 and twice. To solve this issue a ReleasesURLProvider is created that provides the releasesURL value to whoever needs it.

Does this introduce a breaking change?

[ ] Yes
[x] No

What changes did you make? (Give an overview)
Add any screenshots: N/A

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


add a cookbook for AWS iOS SDK with Minio

add a cookbook for AWS iOS SDK with Minio #154

Thanks a lot for your contribution @atom2ueki - this is really helpful for app developers to get started with Minio.
Added few review comments to make sure it is inline with our docs style. Please take a look.


add a method to debateService that connect to deepl api and perfome HTTP request with auth key and parameters(set the target language to german).

closed on 5f34c00


Possible bug in DiscardMissingTileImagePolicy.js?

Hi,
just dig into DiscardMissingTileImagePolicy.js and found that for line 58 & 129,
should a specific point that needs to be compared in bitmap be pos.x *4 + pos.y * width * 4 instead of pos.x *4 + pos.y * width?
Correct me if I'm wrong.
Regards,
Dirk.

I'm closing this issue due to inactivity. If you believe this is still an issue, please feel free to re-open with a code example replicating any issues. Thanks!


Distribution of cross-msg rewards to validators.

Related: https://github.com/consensus-shipyard/ipc-actors/issues/18
Background
In  https://github.com/consensus-shipyard/ipc-actors/pull/36 we introduced the collection of fees for every cross-message operation. These fees are assigned to a governance account in the gateway of the subnet. Through the distribution of these fees we want to:

Incentivize the commitment of checkpoints to the parent.
Reward the validators of the subnet.
To achieve this, the reward distribution will be triggered with the commitment of the subnet checkpoint in the parent. This is also really convenient, as the subnet_actor is the only one keepeing track of the validator set in the subnet. We won't enforce any kind of reward distribution in subnets, and developers will be able to implement whatever reward policy they need in the subnet actor.

Design

New checkpoint templates in the gateway of the subnet are initialized with a new reward_msg in its CrossMsgMeta directed to the Reward function of the subnet_actor in the parent. This message has an initial value of zero.
With every cross_msg_fee collected, the fee is burnt and the amount of the reward message is increased.
When the checkpoint is propagated and committed up, the reward message will be executed, triggering the corresponding forwarding of the message and the call to the reward function in the subnet actor.
With this, the subnet actor distributes the rewards according to whatever policy it implements.

Closed by #36


We should allow the helm chart to be "released" independently of the service catalog release

We currently pin the version of the helm chart to the version of service catalog:
name: catalog
description: service-catalog API server and controller-manager helm chart
version: 0.1.24

The version string gets updated when the release happens.  When issues like #2193 occur, this means the Chart remains broken until we do a new release.
Helm allows you to specify both a Chart version (version) and the version of the associated application (appVersion).
I propose that we introduce an appVersion property to the Chart.yaml that is pinned to the version of service catalog, and then use the Chart's version to enable us to release the chart in response to bugs like #2193.

right now the chart release is tied to creating a tag.
we'll have to adjust this logic for this to be possible.


Move repository

Move repository to @b67-engineering

Codecov Report

Merging #7 (d5f1c37) into master (b695b49) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##            master        #7   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files            5         5
  Lines          191       191
=========================================
  Hits           191       191

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 b695b49...d5f1c37. Read the comment docs.


Check that INSTANCE_PADDING is correct

This hard-coded padding size has been the cause of headaches in the original C version, because it may need to be adjusted every time a change is made to the Instance structure.
Furthermore, the context is platform-dependent, so the padding cannot be one-size-fits-all.
The globals pointer must be right at the end of the page, and the last member of the structure. This is documented, but not enforced in code.
Reintroduce the checks making sure that this is the case.
The INSTANCE_PADDING constant remains fragile, and we can probably find a better way to handle this. Even on Linux, I'm not convinced that the current value is correct on non-x86_64 architectures.
The check can save quite a bit of debugging time when it's off.
Also add the current value for macOS.
We probably don't want a catchall value, as it is likely to be wrong on untested platforms.

Was this test not already catching this? https://github.com/fastly/lucet/blob/9e9d34b14c1f3cc1b988a340e6677fac5f4289b8/lucet-runtime/lucet-runtime-internals/src/instance.rs#L858

When the padding is incorrect, the global containing the stack address is wrong, and half the tests are failing. Finding the root cause is not obvious.
With the assertion being hit as soon as an instance is created, it immediately becomes obvious.
The rest of the code assumes that the structure has that specific and unusual layout. That check being present in the code itself documents this and improves clarity.

Yeah, it's unfortunate that you can't enforce ordering of tests, though we could via the Makefile by specifying instance tests before the others. But I don't think that's great either.
Perhaps we could combine this check with the way we assert host page size at runtime? https://github.com/fastly/lucet/blob/9e9d34b14c1f3cc1b988a340e6677fac5f4289b8/lucet-runtime/lucet-runtime-internals/src/alloc/mod.rs#L15
This also reminds me that we should be making some of these checks conditionally compile only in debug mode, but I can take care of that separately if you want.

Closing, as we are going to remove hard-coded padding length completely 🎉


session playback blogpost

Release Playbook

[ ] Rebase against master
[ ] Code review
[ ] Merge into master
[ ] Verify changes at http://site-staging.convox.com
[ ] Promote release on site-production in the convox/production Rack

 audit logs blog post


Want to add Hovers to all buttons

Is your feature request related to a problem? Please describe.

The UI looks great but addition of hovering effect will give it more better look and UI.

Describe the solution you'd like

Want to add hover effect to buttons of all pages

If valid issue assign me @purnima143 @codewithvk

I would like to work on this issue as I have prior experience with this website as well as I know the colours and themes that will suit it the best.

@vedant-jain03 go ahead


[Bug] internal server error for specific API call

Describe the bug
Internal server error when running the API with these params:
https://www.anyway.co.il/api/infographics-data-by-location?lang=he&road_segment_id=400030&years_ago=5
https://www.anyway.co.il/api/infographics-data-by-location?lang=he&road_segment_id=400030&years_ago=1
Also for this news flash: https://media.anyway.co.il/newsflash/154488 - This call fails:
https://www.anyway.co.il/api/infographics-data?lang=he&news_flash_id=154488&years_ago=5
To Reproduce
see API calls
Expected behavior
receive an infographics data json

PR : https://github.com/data-for-change/anyway/pull/2487

Fixed (probably after PR https://github.com/data-for-change/anyway/pull/2526)

@EliorGigi AWESOME WORK!


Fix particles when viewport scaled

In the current version particles do not consider the current viewport zoom when drawing themselve to the canvas. This PR fixes that and also adds an option to specify an offset from the base entity it is attached to.
original contribution in pr #743 by @johnHacksworth .
additional documentation & misc added by me.

The issue can be seen in the requirebin demo here. Also uploaded to craftyjs/demos/devDemos for future reference.

minor fix, so going ahead and merging since no objections


Update page with screenshots and instructions for App registrations

Now that Applications is deprecated in B2C, this page should be updated to talk users through the correct steps with App registrations.
Further, the instructions to select a Signup and Signin policy were completely vague and unhelpful.

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

ID: 18a8a3ac-153d-90b9-4c66-cc6207eaafac
Version Independent ID: 35488468-4002-093e-1155-00c7fd063d13
Content: Authorize developer accounts by using Azure Active Directory B2C - Azure API Management
Content Source: articles/api-management/api-management-howto-aad-b2c.md
Service: api-management
GitHub Login: @miaojiang
Microsoft Alias: apimpm

@bussemac Thank you for your feedback! We will review and update as appropriate.

Upon further review, we have assigned this issue to the author to take the next course of action.

@bussemac - Apologies for the delay responding to your issue. The article has been updated with steps to use the App Registration workflow in Azure AD B2C. Thanks for your feedback!
#please-close


hide network speed indicator if not connected internet

hide network speed indicator if not connected internet

Hide from where? From the wingpanel or from the Popover Widget?

from the wingpanel

I will think to a solution to this one. Thanks!


Add Onet table to Administrate

Asana ticket: https://app.asana.com/0/1203289004376659/1205360607082024/f
This is my first time adding something to the admin site. I tried following what was going on with the other models. Let me know if anything else needs to be added

@jenlu33 looks good! Congrats on your first administrate dashboard 🥳
I'd add some tests for the policy and for the requests. You can take a look at this PR to see some examples


Has anyone managed to get it working with Nuxt?

Would love to use this repo in my Nuxt package, however I keep bumping into the following error
Does anyone know what's going on? Thanks!
Module parse failed: Unexpected token (559:31)                                                     friendly-errors 08:23:26
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|         this.stopAutoplay();
|         // remove pagination buttons
>         this.paginationButtons?.forEach((button) => button.remove());
|         // remove classes
|         this.el.classList.remove('static');
                                                                                friendly-errors 08:23:26
 @ ./plugins/blaze-slider.js 1:0-39
 @ ./.nuxt/index.js
 @ ./.nuxt/client.js
 @ multi ./node_modules/eventsource-polyfill/dist/browserify-eventsource.js (webpack)-hot-middleware/client.js?reload=true&timeout=30000&ansiColors=&overlayStyles=&path=%2F__webpack_hmr%2Fclient&name=client ./.nuxt/client.js

Hi @notflip looks like your having issues with optional chaining syntax ?.
You need to configure Nuxt so that it understands optional chaining syntax
Try this: https://stackoverflow.com/a/62129486/11811017

Aah didn't think of that! Thanks @MananTank


Image Preview Fucntionality

Add functionality to automatically preview an image that is uploaded.

https://codepen.io/hartzis/pen/VvNGZP


document functionality to have multiple pathes / directories for static files and fix typings

Checklist

[ ] The code has 100% test coverage.
[x] The documentation was properly created or updated (if applicable) following the correct guidelines and appropriate language.
[x] I branched out from the latest main or is a sub-branch.

Summary or description
Changes:

expose functionality to have multiple pathes/directories
allow tuple

@tarsil Can you give me some guidance regarding the required tests.

@devkral we already have tests for multiple configs. It was just not properly documented. Good stuff here.
https://github.com/dymmond/esmerald/blob/main/tests/test_static_files.py#L98


How i can rewrite /api/ to api.php in htaccess

I have file api.php like that. How i setting up this on htaccess?
route::add('/test', function(){
	echo 1;
},'GET');
// Run the router
Route::run('/api');

I tried like that but doesnt work
RewriteRule ^/api/(.*)$ api.php [QSA]

Hey! If you don't want to use the index.php file and if you have an api.php inside an api folder like "api/api.php" instead please alter the .htaccess to the following:
# enable apache rewrite engine
RewriteEngine on

# set your rewrite base
# Edit this in your init method too if you script lives in a subfolder
RewriteBase /api/

# Deliver the folder or file directly if it exists on the server
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# Push every request to index.php
RewriteRule ^(.*)$ api.php [QSA]

Take a look at RewriteBase and RewriteRule. I have altered the both lines for you. Note: Both, the api folder and the .htaccess file must be placed in your public reachable folder relative to your domain. So you can reach your api by connecting to https:/ /yourdomain.com/api/getProducts for example.
In your api.php file create now your routes and init the api. Also use your basepath inside the run method:
...

Route::add('/getProducts', function() {
  echo 'List products...';
});

Route::run('/api');

Thank you.


Streaming a custom (regression) model on a server

Hi there, I've been using the coral dev board for a couple of months now, and I'm still pretty new to using gstreamer for inferencing and overlay simultaneously.  I'm currently using a modified version of edgetpuvision on the dev board but I've run into a couple of problems.  The first one is I can't seem to install edgetpuvision without breaking PyCoral on the dev board.  The second is that upon running my custom edgetpuvision, I'm getting the error:
gi.repository.GLib.GError: gst_parse_error: could not set property "filter" in element "glfilterbin0" to "glbox"
I know that glbox is not installed as a filter in gstreamer but I can't seem to install it manually.  I can get it installed by installing edgetpu Python, but I also know this is deprecated.  Can you suggest the best course of action to make a custom gstreamer server using a custom model and PyCoral API?  Thanks!

Hello @bayntun since the edgetpu API was deprecated, it is necessary to run the newest edgetpuvision package that we upgraded to pycoral. Since you mentioned that you are using a modified version of it, I'm guessing that it must not be the latest version, you can checkout the code here:
https://coral.googlesource.com/edgetpuvision/+/refs/heads/master/edgetpuvision/


Low FPS with 3D, and crashes.

My laptop: Intel(R) Core(TM)2 Duo CPU P8700 @ 2.53GHz,
RAM: 4.00 GB
GPU: ATI Mobility Radeon HD 3400 Series 128mb
Windows 7 pro
Godot version: 1.1rc2
All 3D demos can't reach 20 fps in editor and needs a lot of CPU percentage. The .exe frequently crashes.

This is a very old and low-end card. AMD no longer supports it since 2012, for instance.

these old radeon cards also have horrible opengl support, are you using the
latest drivers anyway?
On Fri, May 8, 2015 at 3:30 PM, Calinou<EMAIL_ADDRESS>wrote:

This is a very old and low-end card. AMD no longer supports it since 2012,
for instance.
—
Reply to this email directly or view it on GitHub
https://github.com/okamstudio/godot/issues/1869#issuecomment-100321119.

--
OkamStudio

Some precisions : the first Far Cry game runs smootly on this laptop. (Don't know how many fps but my processor level is lower than the kinematic 3D demo). The kinematic 3D demo only displays some cubes !
Perhaps it's an issue with GLES2 ?
I suggest to give your performances in this thread if you want.
http://www.godotengine.org/forum/viewtopic.php?f=9&t=1970

Perhaps the hardware have a poor compatibility with GLES2 ?

GLES2 is for mobile and embedded devices (ARM / MIPS), your laptop (x86 / x86_64 / x64) is either using DirectX or OpenGL 2.0+.
Just a thought, the issue #1796 says it might not handle properly the kinematic 3D demo either and it literally shutdown. This one is also using an older laptop/hardware... He might also be using an old "deprecated" Radeon video card...
@reduz, Is it possible that Godot 1.1 will need a higher minimal amount of MB for the GPU or any other similar specs?

The problem is mainly due to the card having bad OpenGL (which is what Godot uses). This is a card from a time when GPU vendors only cared for Direct3D, so OpenGL support is just bad.

OK. I'm waiting for Windows 10 release to change my PC.
Good luck to Godot team and Okam !

This is a card from a time when GPU vendors only cared for Direct3D, so OpenGL support is just bad.

Yeah, I have an old laptop with similar issues, but as mentionned by @DriNeo and @GungnirInd in issue #1796, dismissing realtime shadow could be a workaround for old hardware.
So an option for old hardware in a custom project disabling this could keep some "legacy" support?
Sorry to insist, I tend to do my best to support people stuck with old PCs and laptops... It's not everyone (or organizations) who's fortunate enough to get our good hardware. :(

It seems baking system may contain shadows.
Probably with the layers it is possible to have real shadows on the moving objects only, but I'm never tested this. Sorry if I'm write badly, I hope that my post is understandable.

It looks that this bug was cased because of insufficient gpu. Moving to archive.


pull request for e2e test at 01/19/2017 21:26:15

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


BugFix Fix backends() tvf

Proposed changes
Issue Number: close #xxx
Problem summary
Change the Alive/SystemDecommissioned/ClusterDecommissioned field type of the backends()tvf to bool
Checklist(Required)

[ ] Does it affect the original behavior
[ ] Has unit tests been added
[ ] Has document been added or modified
[ ] Does it need to update dependencies
[ ] Is this PR support rollback (If NO, please explain WHY)

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run buildall

run buildall

run buildall


black screen bootup

its a gallop-fobb asus CX1700
first try: gnome debian using dd to write from a kali linux
second try: cli fedora via omitting the ISO command, kali again
both options lead to just a black screen after selecting external boot option in CTRL-U developer menu

Same issue here on a Samsung Galaxy Chromebook model KOHAKU-JPZQ
First try: CLI Ubuntu using Ecther to write from Ubuntu 22.04 Dell XPS 13 on a SanDisk 32gb USB 3.0 device (Black screen at boot and never moves)
Second try: Gnome Ubuntu using Rufus on Windows to write (Unable to boot error message)
Third Try: Minimal Ubuntu using dd to write from Pop OS 22.04 5.18 to a Sandisk 256GB USB 3.1 device (Black Screen boot and never moves)

Same here on an ASUS CX1400 Chromebook...
first: FEATURES=ISO,KEYMAP bash setup.sh xfce ubuntu focal-20.04
second: FEATURES=ISO,KEYMAP bash setup.sh cli ubuntu focal-20.04
Boots to white screen, Ctrl-U makes the screen go black, and it stays that way.

Same issue with an Lenovo IdeaPad Flex 3i Chromebook Gen 6 (11" Intel N4500), board name: Botenflex.
Tried multiple distros, options and storage devices but still a black screen on boot.
RW_LEGACY Firmware works well on the Chromebook, but with the known issues around onboard audio and touchscreen support.

Same issue with Samsung Galaxy Chromebook 2.
Tried every supported distro.  Tried cli, gnome, and xfce.  Ran from my chromebook crostini install with FEATURES=ISO,crostini bash setup.sh as well as from a Debian vm.

I know about this issue. Please be patient, I'm solving it. It emerged from a destructive PR.

Thanks for the prompt response... glad to hear that the issue has been identified... I thought I'd broken something :-) I tried using an older bzImage (to no avail) as it was suggested that might be the issue.

Thanks for the update. Just adding info. Same issue on an HP Chromebook 14:
Chromebook Model
HP Chromebook Model 14a-na0010ca
Prod ID: 9VU02UA
Board Model
BLOOGLET C2E-A4D-B2K-X3R-M3A-A6P
Background/ frivolous personal colour
This is very exciting. My son's been living with ChromeOS for a couple of years, and as cool as it is, all too often I'm butting heads with the OS just not doing something. Not can't, but won't and it's maddening. Also, Minecraft wouldn't work past 1.16 on ChromeOS(LinuxVM) for no obvious reasons, so the whole family hasn't migrated. Then it just stopped working entirely. sigh
Anyways, he's looking forward to this. :)

I know about this issue. Please be patient, I'm solving it. It emerged from a destructive PR.

I thought I was losing my mind, or maybe my Acer CB317 (MAGPIE) wasn't supported for some reason. Thanks for the work on this!

Fixed, run sudo rm -rf ~/linux-build; bash updatekernel.sh on the PC you built Breath with.

Many thanks, it just worked a treat! I did clean install as I'd been fiddling with the checked out version.
Now to install it to the SSD... Seems much simpler than the flashing that was required for GalliumOS. Loving it so far!
Perhaps when I understand how it's put together I may be able to find some way to contribute to the project (as a retired unix admin / developer)

Thanks as well.  I am confirming now that I was able to install Ubuntu and Debian.


Issue #25: Adding capability to set JAVA_HOME for jvm in use

It is probably worth pointing out that the script really has this wrong, although this is very common.
The ‘which’ command is not portable. It originally came from CSH, and made its way into TCSH as well. It is an external command, and does something relatively useful – but on non-Linux OS’s, this usually begins with alias expansion taken directly from the user’s .cshrc file – which is generally not applicable when using another shell. People started using it while ignoring this fact. Of course, on Linux, which arrived after most of this history, ‘which’ also does something completely different – it locates commands using the BASH algorithms, again completely inappropriate if the shell is something else (even BASH running as /bin/sh).
The portable POSIX equivalent utility is ‘command –v ’, which is a built-in in all POSIX shells, and therefore will locate commands in the same manner as the current shell. You can also ensure you get the ‘default’ variant of a command by invoking it using ‘command –p’, which ignores aliases and the current PATH, using the system-defined default PATH to locate the command (if available).


jaegertracing/jaeger-es-index-cleaner TIMEOUT variable ignored

Describe the bug
Elasticsearch index cleaner times out at 10 seconds regardless of what the TIMEOUT environment variable is set to for the container.
This may also affect #2938 as that PR seems to copy what the non rollover cleaner is doing.
To Reproduce
Steps to reproduce the behavior:
The operation has to take more than 10 seconds for this to trigger. If I clean less data the error goes away.
$ docker run -it --rm --net=host -e ROLLOVER=false -e TIMEOUT=120 jaegertracing/jaeger-es-index-cleaner:latest 60 http://<IP_ADDRESS>:9200
Removing jaeger-service-2021-03-02
Removing jaeger-service-2021-03-05
Removing jaeger-span-2021-03-03
Removing jaeger-service-2021-03-08
Removing jaeger-span-2021-03-05
Removing jaeger-span-2021-03-02
Removing jaeger-span-2021-03-06
Removing jaeger-service-2021-03-07
Removing jaeger-span-2021-03-08
Removing jaeger-span-2021-03-04
Removing jaeger-service-2021-03-10
Removing jaeger-span-2021-03-09
Removing jaeger-service-2021-03-03
Removing jaeger-service-2021-03-09
Removing jaeger-service-2021-03-04
Removing jaeger-service-2021-03-06
Removing jaeger-span-2021-03-10
Removing jaeger-service-2021-03-11
Removing jaeger-span-2021-03-07
Removing jaeger-span-2021-03-11
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 384, in _make_request
    six.raise_from(e, None)
  File "<string>", line 2, in raise_from
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 380, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/local/lib/python3.8/http/client.py", line 1347, in getresponse
    response.begin()
  File "/usr/local/lib/python3.8/http/client.py", line 307, in begin
    version, status, reason = self._read_status()
  File "/usr/local/lib/python3.8/http/client.py", line 268, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/usr/local/lib/python3.8/socket.py", line 669, in readinto
    return self._sock.recv_into(b)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/elasticsearch/connection/http_urllib3.py", line 251, in perform_request
    response = self.pool.urlopen(
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 637, in urlopen
    retries = retries.increment(method, url, error=e, _pool=self,
  File "/usr/local/lib/python3.8/site-packages/urllib3/util/retry.py", line 344, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/usr/local/lib/python3.8/site-packages/urllib3/packages/six.py", line 686, in reraise
    raise value
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 597, in urlopen
    httplib_response = self._make_request(conn, method, url,
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 386, in _make_request
    self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 306, in _raise_timeout
    raise ReadTimeoutError(self, url, "Read timed out. (read timeout=%s)" % timeout_value)
urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='<IP_ADDRESS>', port=9200): Read timed out. (read timeout=10)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/curator/actions.py", line 678, in do_action
    self.__chunk_loop(lst)
  File "/usr/local/lib/python3.8/site-packages/curator/actions.py", line 647, in __chunk_loop
    self.client.indices.delete(
  File "/usr/local/lib/python3.8/site-packages/elasticsearch/client/utils.py", line 153, in _wrapped
    return func(*args, params=params, headers=headers, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/elasticsearch/client/indices.py", line 296, in delete
    return self.transport.perform_request(
  File "/usr/local/lib/python3.8/site-packages/elasticsearch/transport.py", line 415, in perform_request
    raise e
  File "/usr/local/lib/python3.8/site-packages/elasticsearch/transport.py", line 381, in perform_request
    status, headers_response, data = connection.perform_request(
  File "/usr/local/lib/python3.8/site-packages/elasticsearch/connection/http_urllib3.py", line 263, in perform_request
    raise ConnectionTimeout("TIMEOUT", str(e), e)
elasticsearch.exceptions.ConnectionTimeout: ConnectionTimeout caused by - ReadTimeoutError(HTTPConnectionPool(host='<IP_ADDRESS>', port=9200): Read timed out. (read timeout=10))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/es-index-cleaner/esCleaner.py", line 117, in <module>
    main()
  File "/es-index-cleaner/esCleaner.py", line 53, in main
    delete_indices.do_action()
  File "/usr/local/lib/python3.8/site-packages/curator/actions.py", line 680, in do_action
    utils.report_failure(err)
  File "/usr/local/lib/python3.8/site-packages/curator/utils.py", line 181, in report_failure
    raise exceptions.FailedExecution(
curator.exceptions.FailedExecution: Exception encountered.  Rerun with loglevel DEBUG and/or check Elasticsearch logs for more information. Exception: ConnectionTimeout caused by - ReadTimeoutError(HTTPConnectionPool(host='<IP_ADDRESS>', port=9200): Read timed out. (read timeout=10))

Expected behavior
Indexes deleted without error.
Actual behavior
Currently the indexes are deleted correctly but the timeout error shows up.
Rerunning the same command shows no indexes are to be deleted.
So this is mostly a cosmetic error.
Screenshots
Version (please complete the following information):

OS: Linux
Jaeger version: 1.16.0
Deployment: Docker

What troubleshooting steps did you try?
Tried multiple version of the jaeger-es-index-cleaner:
jaegertracing/jaeger-es-index-cleaner               latest         4dcabe316894   12 hours ago    126MB
jaegertracing/jaeger-es-index-cleaner               <none>         10585b89206d   6 days ago      126MB
jaegertracing/jaeger-es-index-cleaner               1.22.0         f7cd0bdf56a9   2 months ago    122MB

Additional context
Elasticsearch 6.8.7 is being used here. The cleaner version in theory should not matter as it is just an interface to curator.

Any suggestion how to fix this?
The TIMEOUT is passed to https://curator.readthedocs.io/en/latest/actionclasses.html#deleteindices correctly https://github.com/jaegertracing/jaeger/blob/7636530bbfe36fdd9f8e50f71cc8307787851056/plugin/storage/es/esCleaner.py#L52


Add Mark Unmark Commands

Create two new commands (Mark and Unmark) which allow the user to mark attendance for students
Create new attribute Attendance to Person, and updated subsequent Storage + Serialization + UI
Add corresponding JUnit tests

Codecov Report
Base: 69.74% // Head: 70.65% // Increases project coverage by +0.91% :tada:

Coverage data is based on head (da741f4) compared to base (606f688).
Patch coverage: 77.52% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff              @@
##             master      #40      +/-   ##
============================================
+ Coverage     69.74%   70.65%   +0.91%
- Complexity      428      470      +42
============================================
  Files            75       81       +6
  Lines          1388     1561     +173
  Branches        141      161      +20
============================================
+ Hits            968     1103     +135
- Misses          382      405      +23
- Partials         38       53      +15

Impacted Files
Coverage Δ

...va/seedu/address/logic/commands/AddTagCommand.java
94.82% <ø> (ø)

...va/seedu/address/logic/commands/DeleteCommand.java
100.00% <ø> (ø)

.../seedu/address/logic/parser/AddressBookParser.java
76.19% <0.00%> (-8.03%)
:arrow_down:

src/main/java/seedu/address/ui/PersonCard.java
0.00% <0.00%> (ø)

.../java/seedu/address/model/util/SampleDataUtil.java
14.51% <54.54%> (+8.74%)
:arrow_up:

...in/java/seedu/address/logic/parser/ParserUtil.java
92.68% <60.00%> (-4.54%)
:arrow_down:

...in/java/seedu/address/model/person/PersonData.java
91.30% <71.42%> (-8.70%)
:arrow_down:

...va/seedu/address/logic/commands/UnmarkCommand.java
77.41% <77.41%> (ø)

.../seedu/address/logic/parser/MarkCommandParser.java
80.00% <80.00%> (ø)

...java/seedu/address/logic/commands/MarkCommand.java
80.64% <80.64%> (ø)

... and 7 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


fix: configure jx-pipeline-visualizer with lighthouse

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To complete the pull request process, please assign jstrachan
You can assign the PR to them by writing /assign @jstrachan in a comment when ready.
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jstrachan: The following test failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

gsm
b9c4fc8bdd9d1c3543d473ffcdc6ac8bb6e6e58d
link
/test gsm

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the jenkins-x/lighthouse repository. I understand the commands that are listed here.

@jstrachan: The following tests failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

gsm
b9c4fc8bdd9d1c3543d473ffcdc6ac8bb6e6e58d
link
/test gsm

vault
b9c4fc8bdd9d1c3543d473ffcdc6ac8bb6e6e58d
link
/test vault

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the jenkins-x/lighthouse repository. I understand the commands that are listed here.

/approve

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: jstrachan
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS [jstrachan]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment


Enable string normalization for black

Enforces double-quoted strings, except for cases where the string content itself contains a double-quote, in which case single-quoted strings are kept unchanged.
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Job PR-202/1 is complete.
Docs are uploaded to http://gluon-ts-staging.s3-accelerate.dualstack.amazonaws.com/PR-202/1/index.html

Job PR-202/2 is complete.
Docs are uploaded to http://gluon-ts-staging.s3-accelerate.dualstack.amazonaws.com/PR-202/2/index.html

Codecov Report

Merging #202 into master will not change coverage.
The diff coverage is 66.04%.


Our SBOMs should reference the base image's SBOMs

Currently our SBOMs only capture the contents of the Go binary we overlay on the base image, but it should be possible to (at least) discover the SBOM for the base image, or capture its contents.
I believe the prevailing wisdom (from @puerco) is to reference the base image's SBOM, and there is some precedent for "external references" in SBOMs such as this "external reference" from the K8s SBOMs
ExternalDocumentRef:DocumentRef-kubernetes-v1.23.5 https://sbom.k8s.io/v1.23.5/source SHA1: c7c35638348a5c2cf6d3af72cfdc94a66e33252b

I think the work here would be:

Detect whether our base image has an SBOM, and if so
Encode some sort of ExternalDocumentRef into our image-level SBOMs.

cc @jdolitsky @imjasonh @jonjohnsonjr

Here was the K8s SBOM he pointed me at: https://sbom.k8s.io/v1.23.5/release

He also mentioned:

and that reference is used in other places to describe that the artifacts were produced from a package in it:

Relationship: SPDXRef-Package-k8s.gcr.io-kube-controller-manager-amd64-v1.23.5 GENERATED_FROM DocumentRef-kubernetes-v1.23.5:SPDXRef-Package-kubernetes

Once https://github.com/chainguard-dev/apko/pull/149 lands (+releases) it would be nice to start on this, so that images based on ghcr.io/distroless/static can take advantage.
@Puerco any thoughts on the form of this syntax to target for a base image?

The cosign repo has a spec for specifying layered SBOMs: https://github.com/sigstore/cosign/blob/main/specs/SBOM_SPEC.md#scopes
I'm not sure if anybody actually adheres to it today, either on the producing- or consuming-side. If we decide not to follow that advice we should probably advocate to have it removed as a recommendation, just to limit the proliferation of unimplemented or half-implemented specs in the world.

I think @puerco wants to chase this a bit.

In #743 I pass the image/index into the functions generating SBOMs, and we can access the OCI annotations we populate on those (if present, ahem docker ahem 👀 ), which may be good enough, especially as we switch to an OCI default base image w/ ghcr.io/distroless/static.
If folks are cool with that (@imjasonh @jonjohnsonjr ) then I think we just need to understand how to encode this relationship in the SBOM.
Another thing I did in #743 was make it so that the SBOM DESCRIBES the image/index, vs. the Go binary, so perhaps this is just a new "relationship" between the image/index package and the base image?  WDYT @puerco?

Yes! This is something I been wanting to build for a long time in bom. There is of course the problem of linking to the doc but we can add the base image as a package as mentioned in this comment and have them referenced something like this:
SBOM 1 - ko image
======================
package - ko_image
  \ package - binary layer
     \ file - binary
     \ file - kodata1
     \ file - kodata
  \ package base_image (purl: oci://YYYY)

SBOM 2 - Base image (apko example, arch image)
====================================
package base_image (purl: oci://YYYY)
  \ package os_layer
     \ package apk1
     \ package apk2
     \ package apk3

@puerco is this a correct list of SPDX relationship types? https://cloud.google.com/container-analysis/docs/reference/rest/v1beta1/RelationshipType
DESCENDANT_OF seems perfect for base images.

Found this as well: https://spdx.github.io/spdx-spec/v2-draft/relationships-between-SPDX-elements/

I also noticed DEPENDENCY_MANIFEST_OF which seems like a way to say "this is an SBOM for that" 🤔

Yes the list in gcp seems to be from the spdx spec. DESCENDANT_OF sounds like a great fot for base images :+1:

https://github.com/google/ko/pull/744 should do this for SPDX


Koin - Crashes when activity opened multiple times

2019-07-06 19:56:30.740 8477-8477/com.muvi E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.muvi, PID: 8477
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.muvi/com.muvi.film_detail.FilmDetailActivity}: org.koin.core.error.DefinitionOverrideException: Already existing definition or try to override an existing one: [type:Factory,primary_type:'com.muvi.film_detail.FilmDetailViewModel']
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2805)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2883)
        at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4726)
        at android.app.ActivityThread.-wrap18(Unknown Source:0)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1619)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:164)
        at android.app.ActivityThread.main(ActivityThread.java:6523)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:857)
     Caused by: org.koin.core.error.DefinitionOverrideException: Already existing definition or try to override an existing one: [type:Factory,primary_type:'com.muvi.film_detail.FilmDetailViewModel']
        at org.koin.core.registry.BeanRegistry.addDefinition(BeanRegistry.kt:144)
        at org.koin.core.registry.BeanRegistry.saveDefinition(BeanRegistry.kt:101)
        at org.koin.core.registry.BeanRegistry.saveDefinitions(BeanRegistry.kt:71)
        at org.koin.core.registry.BeanRegistry.loadModules(BeanRegistry.kt:49)
        at org.koin.core.KoinApplication.loadModulesAndScopes(KoinApplication.kt:66)
        at org.koin.core.KoinApplication.modules(KoinApplication.kt:60)
        at org.koin.core.KoinApplication.modules(KoinApplication.kt:44)
        at org.koin.core.context.GlobalContextKt.loadKoinModules(GlobalContext.kt:86)
        at com.muvi.film_detail.FilmDetailActivity.onCreate(FilmDetailActivity.kt:35)
        at android.app.Activity.performCreate(Activity.java:7013)
        at android.app.Activity.performCreate(Activity.java:7004)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2758)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2883)
        at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4726)
        at android.app.ActivityThread.-wrap18(Unknown Source:0)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1619)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:164)
        at android.app.ActivityThread.main(ActivityThread.java:6523)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:857)

It crashes if you try to go into the same activity multiple times. E.g. open a film, then press back and open a film.
Similar issue if you rotate the screen.
org.koin.core.error.DefinitionOverrideException:
Already existing definition or try to override an existing one: [type:Factory,primary_type:'com.muvi.film_detail.FilmDetailViewModel']

Had a quick look. It's because we're loading modules with the same types defined without unloading them in between:
Feed --click film--> FilmDetail (1) --press back--> Feed --click another film--> FilmDetail (2)
Even though FilmDetail (2) is a new Activity, we're calling loadKoinModules(feedModule) again, which loads definitions into Koin that already exist, e.g. the FilmDetailViewModel factory bean.
There's a few way I can see to solve this but I'm not sure which is correct :grimacing:
1. Unload modules in onDestroy
We load the modules in onCreate. So we can unload them in onDestroy. This is what I did in the PR that I'm about to open, but it's not a good solution:
FilmDetail (1) --click actor--> ActorDetail --click another film--> FilmDetail (2)
We'll still get the crash, because we never called onDestroy for FilmDetail (1).
2. Reload: unload before every load
So this one should work, but I'm unsure what the cost of loading and unloading modules are :sweat_smile:
fun reloadKoinModules(vararg modules: Module) {
    unloadKoinModules(*modules)
    loadKoinModules(*modules)
}

The benefit of this one is that we can define a public function for our project and it's a single line swap whenever we load modules:
- loadKoinModules(feedModule)
+ reloadKoinModules(feedModule)

Where would this live? We'd probably have to introduce that core module that things depend on for utils :grimacing:
3. Lazy loadKoinModules
Mario takes this approach here.
Each Activity/Fragment where we load the module would instead call a top-level function in the file.
private val loadFeature by lazy { loadKoinModules(feedModule) }
private fun injectFeature() = loadFeature

internal class FeedFragment : Fragment() {

    override fun onCreate(savedInstanceState: Bundle?) {
        ...
        injectFeature() // instead of `loadKoinModules(feedModule)`
    }

This one has more boilerplate per injection site.
Modules never get unloaded. Does this mean that we're keeping a reference to everything that we inject? :thinking: Or is it just that we're keeping how to build these things (the definitions, factories etc) which is less of an issue.

I think Koin ought to handle this for us :thinking: Or failing that, allow us to check if a module or definition is loaded.

ah we can also set a module-wide option (or on individual factories) to allow overriding definitions.
I set this instead; I think this should only be an issue if we define two or more types with different implementations (or behaviour) which I don't think will ever be the case :thinking:


.contains() method

It would be really useful to have a .contains(str, substr) method to improve readability. Currently, I have to use assert(str.indexOf(substr) > 0), which does read as nicely.
Thoughts?

Hi, @conorgil.
It's already implemented in the chai.js
http://chaijs.com/api/assert/#method_include
http://chaijs.com/api/bdd/#method_include


Add new rock types (sandstone, shale, limestone), refactor rock properties handling and fix some smaller issues

The main change is that now we have 3 more rock types: sandstone, shale, limestone. They cover continents. Shale and limestone are visible only on the continental shelf.

Demo:
https://tectonic-explorer.concord.org/branch/178449561-new-rock-types/index.html?preset=subduction
https://tectonic-explorer.concord.org/branch/178449561-new-rock-types/index.html?preset=continentalCollision1
https://tectonic-explorer.concord.org/branch/178449561-new-rock-types/index.html?preset=islandCollision2
https://tectonic-explorer.concord.org/branch/178449561-new-rock-types/index.html?&planetWizard=true
I've updated continentalCollision1 preset - I've made continent boundaries smoother, so these new rocks can be visible there. There's also a small refactoring of rock properties, I hope it's much cleaner now. Plus one random rendering bug fix.
There's some magic related to imports... If I import Rock type from ./rock-properties in get-cross-section.ts file, the model gets broken. There are no plates visible. If I import the same enum from ./crust, things work fine. Absolutely weird, but that's why I'm re-exporting Rock in the crust.ts file. I've added a comment about it too. I hope I have more time to investigate it.

@knowuh,

I am intrigued by the import/export of Rock definitions you describe here. Looking forward to hearing that resolution once you work it out, which I am sure you will eventually.

FYI: it was caused by circular dependencies between constants in different TS files. It somehow worked in the web browser, but it was failing in Node.js. That's how I found the problem. It's been fixed in these two commits:

https://github.com/concord-consortium/tectonic-explorer/commit/bda5ed68f6ca89809678315b0d0b42a21a9bd36b
https://github.com/concord-consortium/tectonic-explorer/commit/b039d2600f63473a9e6d2eeecedc0062cf958b5b

FYI: it was caused by circular dependencies between constants in different TS files. It somehow worked in the web browser, but it was failing in Node.js. That's how I found the problem. It's been fixed in these two commits:

If I'm reading this right, it looks like you still have a circular dependency in the sense that crust.ts imports from field.ts and vice-versa.

Right, I should have been more specific. I've explained it better here:
https://github.com/concord-consortium/tectonic-explorer/pull/93#discussion_r666342802


File Name Issue

According to the Bike Sharing Project Instructions, the name of the file at deep-learning-v2-pytorch/project-bikesharing/ should have been changed to Predicting_bike_sharing_data.ipynb but it's still Your_first_neural_network.ipynb:

In your browser, open Predicting_bike_sharing_data.ipynb. Note that in the previous workspace this was called Your_first_neural_network.ipynb but the contents are the same, this is just a descriptive difference.

Resolved. PR Merged #137


Recompute journey manager highlights on element change

If the element changes, positions need to be recomputed.

@jakub-nlx I think we will have to do both and that's a can of worms for next week...


DynamoDB autoscaling

It'd be interesting to demonstrate how to use DDB autoscaling to provision a 1,1 table but that could burst to 10x throughput without any management from the ops side of the table.

This would be a welcome addition to the project for sure!
It would be particularly useful right now as the SAM simple table doesn’t support using parameters for capacity.

This might get added upstream: https://github.com/awslabs/serverless-application-model/issues/377


Scan ops do not support complex types yet

Scan ops do not support complex types yet

I get this error when trying to optimise with a loss containing .product() operation.
.sum() works fine.

Hmm, that's the gradient of product which I believe uses cumprod.  This is basically a duplicate of https://github.com/ml-explore/mlx/issues/673 which is that scan ops don't currently work on 64-bit types. We should fix that.


Preparation for v1.1.0

[ ] Add tcp server support
[ ] Add Dockerfile as a reference

Optionally:

[ ] Add management console
[ ] Add management server

Things to consider: Percentile and histogram


perf(zoom): unconnect the zoomHandler.

Coverage increased (+0.4%) to 69.188% when pulling c3bfbdc15b6d0b7a55543298c756436b1209d825 on refactor/unconnect-zoomhandler into 2073beaf65421e2328deee1e50f133951bd06e58 on master.


Request: allow Deserialize<'de> for .query()

The Tide counterpart of https://github.com/http-rs/http-types/pull/333

Merging since this is just a replication of http-type's api here now.


Require subtypes for music and mixed materials.

closes #2687
Why was this change made? 🤔
Per user feedback for errors.
How was this change tested? 🤨
⚡ ⚠ If this change involves consuming from or writing to another service (or shared file system), run integration test create_object_h2_spec.rb and/or test manually in [stage|qa] environment, in addition to specs. ⚡
Unit, cypress

@justinlittman Approved. Not sure if @amyehodge wanted to test before merging. If not, merge away!

She didn't mark it as requiring review, so I'm going to merge.


Bug 1682978: Report builder version

Burn in version using git tags
Log binary version if verbose logging is enabled

Fixes Bug 1682978

/assign @bparees

i've never fully understood all this scripting, but is there a reason we can't just do what @dmage did in the image registry operator?
https://github.com/openshift/cluster-image-registry-operator/blob/master/hack/build/build.sh#L17-L18

Existing code uses kube's version.Info object, hence the semver parsing. I started with the origin scripts and pared them down to only the things we care about. Origin's needs are obviously much more complex than ours.

/lgtm

/hold
aws builds red

/hold cancel
e2e-aws-builds should be green again

/retest


Create a custom scc to run VDB on Openshift

Previously we were running PODs with privileged scc so we decided to use a more restrictive scc like anyuid. Given that anyuid does not support SYS_CHROOT and AUDIT_WRITE capabilities that our vdb cluster use on OpenShift, we created a new scc called anyuid-extra which is very similar to anyuid but support both capabilities.

There is no need to set the priority to 1 as when a sa is linked to 2 scc, the system will automatically pick the most restrictive. However this scc is basically anyuid + caps, and as anyuid has a non null priority, I did the same for this custom scc. So this choice is purely for coherence.

There is no need to set the priority to 1 as when a sa is linked to 2 scc, the system will automatically pick the most restrictive. However this scc is basically anyuid + caps, and as anyuid has a non null priority, I did the same for this custom scc. So this choice is purely for coherence.

Okay, I think I understand what you are doing here.  What is the priority of anyuid?

There is no need to set the priority to 1 as when a sa is linked to 2 scc, the system will automatically pick the most restrictive. However this scc is basically anyuid + caps, and as anyuid has a non null priority, I did the same for this custom scc. So this choice is purely for coherence.

Okay, I think I understand what you are doing here. What is the priority of anyuid?

I did not want to put exactly the same priority. My intention was just to set a non null value while keeping some difference from anyuid.

I did not want to put exactly the same priority. My intention was just to set a non null value while keeping some difference from anyuid. I think I overthought that part.

Should it have the same priority as anyuid then?  The only difference is the additional capability.  I would think everything else should be the same.

I added more fields to the scc yaml because they are required on validation phase. That way we don't have to call apply with --validate=false each time.