Shouldn't fail if the YAML or JSON is not available

Hi,
I expect the Maven plugin shouldn't fail if the YAML or JSON is not available in the specified folder, i.e.:  rest-guide-validator.files.
In a situation, where I have a parent pom.xml (packaging as pom) and all my REST applications/projects are using the parent pom as a parent then it will be easy to define the plugin in the parent pom.xml instead of repeating the same plugin in the each REST applications/projects pom.xml.
Parent pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>be</groupId>
    <artifactId>parent-common</artifactId>
    <version>0.1.0</version>
    <packaging>pom</packaging>

    <name>parent-common</name>
    <description>Common functionality that is shared between all REST projects.</description>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>3.3.1</version>
        <relativePath/>
    </parent>

    <build>
        <plugins>
            <plugin>
                ....
            </plugin>
            <!-- The plugin to validate if an OpenAPI document conforms to the guidelines in the Belgif REST guide (https://www.belgif.be/specification/rest/api-guide/) -->
            <plugin>
                <groupId>io.github.belgif.rest.guide.validator</groupId>
                <artifactId>belgif-rest-guide-validator-maven-plugin</artifactId>
                <version>2.1.0</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>validate</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <files>
                        <folder>.swagger-codegen/</folder>
                    </files>
                    <outputTypes>CONSOLE</outputTypes>
                    <groupBy>file</groupBy>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

Then in all my REST applications that use the be:parent-common:0.1.0 as a parent, I don't need to add the same plugin in all my REST applications.
But as of now since the be:parent-common:0.1.0 doesn't have the OpenApi YAML or JSON files in .swagger-codegen/ location, it fails during the Maven build.

Desired behavior may depend on how it's used: if plug-in is configured to point to a specific OpenAPI file, it can be desirable to have it fail because there's an error in the config then e.g. after the file is renamed.
We could introduce a  config parameter which defaults to false (i.e. current behavior).


Demonstrate email recovery flow

To demo full account recovery, we will need to add an email component to the registration and recovery processes. We can do this using mailgun for now

This is blocked on upcoming server changes


[FLINK-29787][ci] fix ci METHOD_NEW_DEFAULT issue

What is the purpose of the change
org.apache.flink.api.connector.source.SourceReader declared a new default function pauseOrResumeSplits(), japicmp plugin failed during ci running, we should configure the plugin to make it compatible.
Brief change log

configure overrideCompatibilityChangeParameter

Does this pull request potentially affect one of the following parts:

Dependencies (does it add or upgrade a dependency): no
The public API, i.e., is any changed class annotated with @Public(Evolving): no
The serializers: no
The runtime per-record code paths (performance sensitive): no
Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: no
The S3 file system connector: no

Documentation

Does this pull request introduce a new feature? no
If yes, how is the feature documented? no

@flinkbot run azure

@flinkbot run azure

@flinkbot run azure

@flinkbot run azure

Thanks, @liyubin117 . Could you squash the commits into two? I would merge the PR then right away to unblock master. We can still revert this in case @HuangXingBo or somebody else objects this change.

@XComp Squash done. Thanks for your excellent idea :)

The commits got a bit mixed up. I decided to squash everything into one because the documentation change should be reverted as well if the change itself was wrong. I merged the PR without waiting for CI to unblock master.

Hello @XComp @liyubin117 , currently I meet a same problem when I'm trying to add a new default method to a class with @Public annotation.  Should I just need to add an @PublicEvolving annotation to the new added default method to avoid this?
BTW, according to the API compatibility guarantees  in flink website, we shouldn't check binary incompatible between minor versions flink/pom.xml. We need to open a issue to fix it.

The default method covers the old implementation? That shouldn't be degraded to @PublicEvolving. :thinking:

BTW, according to the API compatibility guarantees in flink website, we shouldn't check binary incompatible between minor versions flink/pom.xml. We need to open a issue to fix it.

I created FLINK-33009 to cover this. Let's keep the discussion there.

Thanks @XComp . 😄

The default method covers the old implementation? That shouldn't be degraded to @PublicEvolving.

Apologies for any confusion caused. I just want to add a new default method to an existed @ Public interface that already have several old methods.  I think this behavior shouldn't break source compatible. I have reported this to japicmp community and the community owner replied that they will fix this in the next release. The LINK is here.

I think you're right. I created FLINK-33009 to cover this. Let's keep the discussion there.

I will discuss in FLINK-33009.


Workaround for malloc inability to preallocate reserved vm space

Reference:
https://stackoverflow.com/questions/64126942/malloc-nano-zone-abandoned-due-to-inability-to-preallocate-reserved-vm-space

It seems that this warning has nothing to do with test failing. Closing.


Event Request] codeunit 99000834 "Purch. Line-Reserve" - OnCallItemTrackingOnAfterCalcShouldProcessDropShipment

Please add a parameter to the event OnCallItemTrackingOnAfterCalcShouldProcessDropShipment
[IntegrationEvent(false, false)]
local procedure OnCallItemTrackingOnAfterCalcShouldProcessDropShipment(var PurchLine: Record "Purchase Line"; var ShouldProcessDropShipment: Boolean; var ItemTrackingForm: Page "Item Tracking Lines")
begin
end;

TrackingSpecification.InitFromPurchLine(PurchLine);
if ((PurchLine."Document Type" = PurchLine."Document Type"::Invoice) and
    (PurchLine."Receipt No." <> '')) or
    ((PurchLine."Document Type" = PurchLine."Document Type"::"Credit Memo") and
    (PurchLine."Return Shipment No." <> ''))
then
    ItemTrackingLines.SetRunMode("Item Tracking Run Mode"::"Combined Ship/Rcpt");
ShouldProcessDropShipment := PurchLine."Drop Shipment";
OnCallItemTrackingOnAfterCalcShouldProcessDropShipment(PurchLine, ShouldProcessDropShipment, ItemTrackingLines);
if ShouldProcessDropShipment then begin
    ItemTrackingLines.SetRunMode("Item Tracking Run Mode"::"Drop Shipment");
    if PurchLine."Sales Order No." <> '' then
        ItemTrackingLines.SetSecondSourceRowID(ItemTrackingMgt.ComposeRowID(DATABASE::"Sales Line",
            1, PurchLine."Sales Order No.", '', 0, PurchLine."Sales Order Line No."));
end;

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.
Build ID: 52143.


Error connecting to Gitlab repository

When trying to connect to my gitlab repository, I get the following ssl error:
I tried to go through issue https://github.com/larshp/abapGit/issues/1225 and change the profile parameters, no luck.
Certificate from Gitlab and CA has been imported into anonymous SSL client in Strust.
System details: Netweaver trial 7.52 SP1 running in Docker container
Error log:
[Thr<PHONE_NUMBER>34080] Wed May 13 01:05:55:690 2020
[Thr<PHONE_NUMBER>34080]   SSL_get_state()==0x11c0 "TLS read finished A"
[Thr<PHONE_NUMBER>34080] *** ERROR during secussl_read() from SSL_read()==SSL_ERROR_SSL
[Thr<PHONE_NUMBER>34080]   srv SSL session PSE "/usr/sap/NPL/D00/sec/SAPSSLS.pse"
[Thr<PHONE_NUMBER>34080]   session ciphersuites=135:PFS:HIGH::EC_P256:EC_HIGH
[Thr<PHONE_NUMBER>34080]   Server SSL_CTX 7f6e640688d0 pvflags=897 (TLSv1.2,TLSv1.1,TLSv1.0,BC)
[Thr<PHONE_NUMBER>34080]   TLSextSNI server_name="localhost"
[Thr<PHONE_NUMBER>34080] secussl_read: SSL_read() failed  (536875078/0x20001046)
[Thr<PHONE_NUMBER>34080]    => "received a fatal TLS certificate unknown alert message from the peer"
[Thr<PHONE_NUMBER>34080] >>            Begin of Secu-SSL Errorstack            >>
[Thr<PHONE_NUMBER>34080] 0x20001046   SAPCRYPTOLIB   SSL_read
[Thr<PHONE_NUMBER>34080] SSL API error
[Thr<PHONE_NUMBER>34080] received a fatal TLS certificate unknown alert message from the peer
[Thr<PHONE_NUMBER>34080] 0xa0600263   SSL   ssl3_read_bytes
[Thr<PHONE_NUMBER>34080] received a fatal TLS certificate unknown alert message from the peer
[Thr<PHONE_NUMBER>34080] 0xa0600263   SSL   ssl3_accept
[Thr<PHONE_NUMBER>34080] received a fatal TLS certificate unknown alert message from the peer
[Thr<PHONE_NUMBER>34080] 0xa0600263   SSL   ssl3_read_bytes
[Thr<PHONE_NUMBER>34080] received a fatal TLS certificate unknown alert message from the peer
[Thr<PHONE_NUMBER>34080] <<            End of Secu-SSL Errorstack
[Thr<PHONE_NUMBER>34080]   SSL NI-hdl 107: local=<IP_ADDRESS>:44300  peer=<IP_ADDRESS>:53744
[Thr<PHONE_NUMBER>34080] <<- ERROR: SapSSLSessionStartNB(sssl_hdl=7f6e80008d40)==SSSLERR_SSL_READ
[Thr<PHONE_NUMBER>34080] *** ERROR => IcmConnInitServerSSL: SapSSLSessionStartNB returned (-58): SSSLERR_SSL_READ [icxxconn.c   1894]

Found issue https://github.com/larshp/abapGit/issues/3281 that solved it.


Check for NULL instead of FALSEY

If the field has a value of "0" the lose comparison determines it is equal to NULL and should be left blank.
When a value of "0" is loaded from the DB the the fields value attribute isn't set. When re-submitting the form 0 must be manually entered into the field for it to pass validation (numeric). This can become annoying when there are multiple fields on a page.

Nicely done!


[1.16] Bio Reactor input filter / insert predicate is breaking contract of isItemValid

Industrial Foregoing Version: 1.16.5-3.2.11-55cb112
Titanium Version: 1.16.5-<IP_ADDRESS>.jar
Other Versions:
Forge: 1.16.5-36.1.4
Mekanism: 1.16.5-<IP_ADDRESS>8
JEI: 1.16.5-<IP_ADDRESS>
Patchouli: 1.16.4-50
Crashlog If Applicable (Upload to pastebin/gist): N/A
To Reproduce

Place down a Bio Reactor (leaving it unpowered).
Fill a chest with 9 different stacks of bio-reactor compatible items, e.g.: 9 dyes (or combination of Carrots, Potatoes, Seeds, etc...).
Use a Mekanism Ultimate Transporter (or other item transfer that can move stacks of items), set to move from chest to the Bio Reactor.
Wait for the stacks to be transfered in.
Remove some items from the Bio-Reactor, and putting them back into the chest.
Observe that the items are not going back into the Bio-Reactor.
Test with a hopper and see that items aren't being pulled in.
Place a chest adjacent to the Bio Reactor and set it to pull into the input 3x3 from the chest.
Put the items into the chest.
Observe it properly fills the Bio Reactor.

Code in question
https://github.com/InnovativeOnlineIndustries/Industrial-Foregoing/blob/d7346515b89d0e78215aa82c4e94e730594c0e2d/src/main/java/com/buuz135/industrial/block/generator/tile/BioReactorTile.java#L134-L146
Description
net.minecraftforge.items.IItemHandler#isItemValid requires that implementation should not consider the current state of the inventory (the input filter insert predicate is used for that method).
I was going to do a PR to make the change but I think you want to preserve the "only insertable into existing slot or if another slot does not contain the same item" and inventory state should not be taken into account and more, explained further below.
Potential Fix 1
In order to do this properly, a larger structural change to Titanium lib's InventoryComponent whould probably need to be done.
What is currently referred to as "input filter / insert predicate" could probably be renamed to "slot filter / slot predicate" since it is used for implementing IItemHandler#isItemValid. I'm suggesting the rename because in most implementations of an "input filter" properly don't take inventory state into account and just filter by slot and item stack alone.
Then, re-adding the original "input filter / insert predicate", which is allowed to take the state of the inventory into account, and having that be used in the implementation of IItemHandler#insertItem (as well as checking the slot filter for sanity perhaps).
I'm not sure if this change would mess with the the auto-pull feature though...?
It's also a breaking api change if it was made.
Potential Fix 2
A quicker / hacky fix would be to just always return true in IItemHandler#isItemValid and then move the predicate check to the IItemHandler#insertItem method, but IMO it is not as proper as the first suggested change. If going with this, IItemHandler#isItemValid should probably be checked in the IItemHandler#insertItem implementation.
Related Change: Remainer Insertion
Updating the code in question to be:
    private boolean canInsert(int slot, ItemStack stack) {
        for (int i = 0; i < input.getInventory().getSlots(); i++) {
            if (input.getInventory().getStackInSlot(i).isItemEqual(stack)) {
                return i == slot;
            }
        }
        for (ITag<Item> itemTag : VALID) {
            if (itemTag.contains(stack.getItem())) return true; //contains
        }
        return false;
    }

This change breaks the contract so doesn't really fix the root problem. I don't recommend doing this on it's own, but I put this here because I noticed a bug with the code in question (assuming that it was okay to take into account inventory state for IItemHandler#isItemValid), where if the item stack trying to be inserted was more than the remaining space in the stack, it would not top-off the stack. I think the remaining space check should be left to the IItemHandler#insertItem implementation in InventoryComponent instead.
So combining this with either of the potential fixes would be good. For Potential Fix 1, the first loop would be for the insert filter, and the second for loop would be for the slot filter.
Related Change: Bio Reactor tag (off-topic, ignore this)
Also, I think for more modpack maker configurability, you could make all the tags other than BIOREACTOR_INPUT be part of BIOREACTOR_INPUT. That way a modpack maker could decide to remove a tag from BIOREACTOR_INPUT if they want to keep the tag but not have it be used in the Bio Reactor. As a bonus you'd only have to check a single tag in the code instead of looping through multiple. The JEI plugin will need to be updated too I think, since it'll only be a single entry otherwise, but maybe this is okay?
Currently I think all the items for the Bioreactor don't give varying amounts, it's just based on the number of filled slots?
Not sure if you wanted to change this to use recipes or something instead of a tag... Yeah this is super off topic, just ignore this one haha.
End Note
Let me know if either of the two related changes should be moved to another issue. Especially the last one, it's probably not be that relevant to this issue. I wouldn't mind doing a PR for that one since it is a smaller change with less side-effects, but it touches relevant code (removing the for loop), so I decided to mention it here.

I hope it is okay I'm adding a comment to this, because I've been going out of my mind, trying to figure out what I was doing wrong with the Bioreactor. I am using Item/Universal Pipes from Pipez mod, and I simply couldn't get it to fill up the bioreactor correctly.
Good to hear this is known and hopefully a fix is in the pipeline. In the meantime, I will use a chest as relay :)


fix(docs): Update pnpm install commands

pnpm install is used to install all dependencies for a project, according to the pnpm documentation.
and the appropriate command to install a single package is pnpm add.
Reference

https://pnpm.io/cli/add
https://pnpm.io/cli/install

Thank you!


Fixing indentation of examples and new custom validator example

I added a custom validator example (see #191).
Some of the examples have tabs and spaces mixed in, so they look quite hideous (especially in GitHub, where the default tab size is 8, not 4), and I took a liberty of replacing them all with spaces.
If you do not want the indentation change, I can just pull request the custom validator example.

Awesome, great work! Thanks for putting this in :+1:

No problem :)
I would like to contribute more. I am thinking of writing the other example and help with porting test. I could probably write the other example, but the ~1250 line tests module is a bit daunting...

@sru there are some problem with tests, because of we now can't write in-lib false-negative tests. Negative results in parsing now leads to hard exiting. I am working now on changing functions to return Result instead of exiting. Positive tests are easy to port.
Your contribution is always welcome, if you will have some questions - you can ask it in gitter thread. Also you can ask @kbknapp or me. ;)

I'm also open to moving the tests into a tests directory so they can be broken out into separate files as described here.
We're grateful for any and all help ;)


Will the paper be released on ArXiv?

Hi, will this paper be available on ArXiv?
The question is for many people like me, we can find it has been accepted in ECCV'2022 and can be found in springer link, but most of us do not have accounts to view the full paper.
Best,

For example, currently we can not see the detailed numerical results in public, neither nor ckpts which are usually released on Github repo.
Thanks in advance!

Thanks for your attention,
We have added a [link]((https://www.ecva.net/papers/eccv_2022/papers_ECCV/html/383_ECCV_2022_paper.php) to our paper in the updated README file. Numerical results on ADE20K and their corresponding training logs are also included.
As to ckpts, due to the complex inner review process, it is difficult for them to be released in a short time. We will continue to facilitate this process.


HPO term does not load

It would be nice to get feeedback if the HPO term does not exist in the Phizz db.

We can try to add this

I guess this is something for the server, no? I'll take lead on this

Yes server thing

What kind of feedback were you thinking about? Log message/pop up/something in the interface?

There is a very nice feature in Flask called flash which is kinda for these things - would you like to add that functionality @guillermo-carrasco?
It will likely be some kind of list on the base layout
http://flask.pocoo.org/docs/0.10/patterns/flashing/

Sure, I would need a bit more -v though. Like a use case scenario, you know what I mean?

 The message should then show up during the next page load (taken care of by Flask) as a notice (maybe a popup in the top right corner?) should inform the user :)
try:
    fun()
except:
    flash("HPO term ({}) not found in database".format(term))
    return redirect(request.referer)

ah, nice :-) :eyeglasses: tack @robinandeer

Any time, hacker :hamburger:
I look forward to reviewing your code

Was this fixed @guillermo-carrasco , @robinandeer ?

Hmm nope, I'll do it now.

:+1:


[BTS-724][DEVEL] Added test for opt-rule: remove-redundant-path-var

Scope & Purpose
Add missing test for optimizer rule: remove-redundant-path-var

[x] :hammer: Added missing test

Checklist

[x] Tests

[x] integration tests

[x] :book: CHANGELOG not required, only added a new test

Related Information

[x] GitHub issue / Jira ticket: https://arangodb.atlassian.net/browse/BTS-724

All tests green except one unrelated windows failure.


Zend\Mvc\I18n\Translator no longer exists

I'm not sure when this has been introduced but Zend\Mvc\I18n\Translator no longer exists (cf. zend-validator translation doc).
Modules used:

zendframework/zend-validator: 2.8.1 (8ec9f57a717dd37340308aa632f148a2c2be1cfc)
zendframework/zend-mvc: 3.0.3 (69ac3e4dcf0639101ac71478dcb39941ba4e7e7e)
zendframework/zend-i18n: 2.7.3 (b2db0d8246a865c659f93199f90f5fc2cd2f3cd8)

Following the doc blindly I have an issue:
use Zend\I18n\Translator\Resources;
use Zend\Mvc\I18n\Translator;
use Zend\Validator\AbstractValidator;
...
$translator = new Zend\Mvc\I18n\Translator();
AbstractValidator::setDefaultTranslator($translator);
// Error: Class 'Application\Zend\Mvc\I18n\Translator' not found

Using the i18n module, I have another issue:
use Zend\I18n\Translator\Translator;
use Zend\Validator\AbstractValidator;
...
$translator = Translator::factory([
    'locale' => 'fr_FR',
]);
AbstractValidator::setDefaultTranslator($translator);
//TypeError: Argument 1 passed to Zend\Validator\AbstractValidator::setDefaultTranslator() must be an instance of Zend\Validator\Translator\TranslatorInterface, instance of Zend\I18n\Translator\Translator given

I plan to wrap the I18n Translator to make it pass the AbstractValidator type checking but I thought you guys should know about this issue. Please note that I could be doing something wrong here.
EDIT: the translator wrapper
namespace Application\Util;

use Zend\I18n\Translator\Translator as ZendI18nTranslator;
use Zend\Validator\Translator\TranslatorInterface;

/**
 * Class Translator
 *
 * The Zend validator expects a translator that implements a specific interface
 * The zend i18n translator does not implement this interface
 * the zend-mvc translator did but it's being refactored
 * Related issued
 *   https://github.com/zendframework/zend-validator/issues/142
 *   https://github.com/zendframework/zend-validator/issues/95
 * @package Application\Util
 */
class Translator extends ZendI18nTranslator implements TranslatorInterface
{
    // nothing to do here as both modules share the same translator api
}

EDIT 2:
In the end, to enable translation on default zend validators, you have to include another package: zend-i18n-resources:
use Application\Util\Translator;
use Zend\Validator\AbstractValidator;
use Zend\I18n\Translator\Resources;
....
$translator = Translator::factory([ 'locale' => 'fr', ]);
$translator->addTranslationFilePattern(
    'phparray', // WARNING, NO UPPERCASE
    Resources::getBasePath(),
    Resources::getPatternForValidator()
);
AbstractValidator::setDefaultTranslator($translator);

I dit it, but that was not the smoothest development process I had to experience.

The MVC <-> i18n integration was removed to its own package for 3.0; read more about it in the [migration documentation] (https://docs.zendframework.com/zend-mvc/migration/to-v3-0/#i18n-integration).


[Snyk] Upgrade @sentry/nextjs from 7.69.0 to 7.75.1

This PR was automatically created by Snyk using the credentials of a real user.Snyk has created this PR to upgrade @sentry/nextjs from 7.69.0 to 7.75.1.
:information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.

The recommended version is 11 versions ahead of your current version.
The recommended version was released 21 days ago, on 2023-10-25.

The recommended version fixes:

Severity
Issue
PriorityScore (*)
Exploit Maturity

Server-Side Request Forgery (SSRF) SNYK-JS-SENTRYNEXTJS-6054452
751/1000  Why? Recently disclosed, Has a fix available, CVSS 9.3
No Known Exploit

(*) Note that the real score may have changed since the PR was raised.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs

Already resolved in https://github.com/City-of-Helsinki/linkedregistrations-ui/pull/102


@auth directive doesn't work as expected when combining {allow: owner} and {allow: private, provider: userPools}

** Which Category is your question related to? **
Amplify Javascript --> GraphQL Transform --> Directives --> @auth
** What AWS Services are you utilizing? **
Cognito, S3, AppSync.
** Context **
A website has a marketplace you can sell products on.
Users can create markets and add products to them.
Users are identified via Cognito.
There is a relationship (Market <--> Products) using a named connection:
type Market
  @model
  @searchable {
  id: ID!
  name: String!
  products: [Product]
    @connection(name: "MarketProducts", sortField: "createdAt")
  owner: String
  createdAt: String
}

type Product
  @model
  ) {
  id: ID!
  description: String!
  market: Market @connection(name: "MarketProducts")
  shipped: Boolean!
  owner: String
  createdAt: String
}

** Expected behavior **
Here is what I would like to achieve:

Only the owner of a market can update / delete / create markets.
Only the owner of a product can update / delete / create products and associate them to a market.
Only identified users can see markets and products.

** Question **
How would go about it? How would you configure the @auth directives?
** Additional notes **
Even though it seems to be a pretty common use case, I've a tried plenty of stuff and I can't seem to get it right...
Either users could see other users' markets but not the products they contain or users could see everything but could also add products to another user's market.
** What I tried **
I tried this combination:

type Market
  @model
  @auth(
    rules: [
      { allow: owner, operations: [create, update, delete] }
      {
        allow: private
        provider: userPools
        identityClaim: "sub"
        operations: [read]
      }
    ]
  )
  @searchable {
  id: ID!
  name: String!
  products: [Product]
    @connection(name: "MarketProducts", sortField: "createdAt")
  owner: String
  createdAt: String
}

type Product
  @model
  @auth(
    rules: [
      { allow: owner, operations: [create, update, delete] }
      {
        allow: private
        provider: userPools
        identityClaim: "sub"
        operations: [read]
      }
    ]
  ) {
  id: ID!
  description: String!
  market: Market @connection(name: "MarketProducts")
  shipped: Boolean!
  owner: String
  createdAt: String
}

but in this case, any user can create markets or products on behalf of someone else.
2) I also tried plenty of other stuff that (I've been trying to solve this problem for hours), in my opinion, make no sense. So I won't post them here.
** Environment **
"aws-amplify": "^1.1.40"
"aws-amplify-react": "^2.4.4"

@arnaud-cortisse could you please try these auth rules on both entities:
@auth(
    rules: [
        { allow: owner, operations: [create, update, delete], identityClaim: "sub" }
        { allow: private, operations: [read], identityClaim: "sub" }
    ]
)

for private userPools is the default provider so you don't need to specify it, but since you're using sub to identify the user I'd use it across the schema.
From your requirement you're saying that "only owners can create markets". Owners of what? since you're creating a market with the authenticated user, that user will become the owner of THAT given market.
The same stands for products. If you need to enforce market ownership for products, then you need to access the products through the market type and not directly, OR you can use a pipeline resolver and first you can validate if the passed in marketId for the product is owned by the authenticated user or not. You only need these enforcements/validations for the create operations, since after creation the owner rules will be effective.

@attilah thanks for your response.

@arnaud-cortisse could you please try these auth rules on both entities:
@auth(
    rules: [
        { allow: owner, operations: [create, update, delete], identityClaim: "sub" }
        { allow: private, operations: [read], identityClaim: "sub" }
    ]
)

for private userPools is the default provider so you don't need to specify it, but since you're using sub to identify the user I'd use it across the schema.

I tried it but like you said a little further, that doesn't enforce market ownership (which I need, otherwise, anyone can pretend he or she is someone else and put products in someone else's market).

From your requirement you're saying that "only owners can create markets". Owners of what? since you're creating a market with the authenticated user, that user will become the owner of THAT given market.

Right, that's what I expected.

The same stands for products. If you need to enforce market ownership for products, then you need to access the products through the market type and not directly...

So, you mean something like this:
type Market
  @model
  @auth(
    rules: [
      {
        allow: owner
        operations: [create, update, delete]
        identityClaim: "sub"
      }
      { allow: private, operations: [read], identityClaim: "sub" }
    ]
  )
  @searchable {
  id: ID!
  name: String!
  products: [Product]!
  owner: String
  createdAt: String
}

type Product {
  description: String!
  market: Market
  file: S3Object!
  price: Float!
  shipped: Boolean!
  owner: String
  createdAt: String
}

where "Product" doesn't have a @model directive?
In this case, is it still possible auto-generate IDs for products on the server side without having to create a custom resolver?

OR you can use a pipeline resolver and first you can validate if the passed in marketId for the product is owned by the authenticated user or not. You only need these enforcements/validations for the create operations, since after creation the owner rules will be effective.

Sounds good... though it's a shame I need to learn and write VTL for such a common use case...
Thanks again!

You've to create your custom resolver, but it is not that hard as it seems and CLI has support for that.
When it comes to pipeline resolvers you are not tied to VTL, you can do Lambda functions with the language of your choice as well or combine them. Currently the CLI does not have built-in support to create the pipeline resolvers, but it is something we'd like to add in the future.


Implement a filter for viewing textbooks

Please do work for this task in a branch named issue-25.

On the "ListBook" page:

Create a dropdown that has a list of majors as pickable options.
Create another dropdown that has a list of pickable textbook conditions.
Selecting an option from a dropdown will filter the visible textbook listings.

did the major filter


Ability to use alternative "S3" providers

Have the ability to use alternative S3 compatible services such as Backblaze, minio etc

Yes, I will add in next release, I was thinking to add Wasabi, Digital Ocean Storage and your requested services. Please keep update it recently

Support for self-hosted Minio would be awesome, thanks.

@siccous I will add Minio in next version.

Maybe also Azure Blob Storage, or Google Cloud Storage (their equivalents to S3),

Will be planned ahead!

Do you know when the next version with alternate S3 providers may be available?
Being able to sync to a local minio will be awesome!

We will plan soon. Thanks!

yes, I'm planned please wait for next updates.

hi @all hope you love the plugin, we've just released version 1.5.0 and will support S3 Compatibility Custom Storages,
you all could upgrade and try.

Please support us for more future contributions. 💪 💪


elements replacement

lets say i have elements 1,2,3,4,5. What i can do with dragula now is to move one element after/ before another, but i would need ability to replace elements in one move.
Like 1,2,3,4,5 - > 1,4,3,2,5 just by drag 2 and drop it over 4.
I know that maybe it is somewhere in docs and i missed it. You asked to make all support request like this on slack. But your slack seems to be dead.

@vullankib Im ot sure if get what you mean by mergin here. I asked about simple swap as described in original issue description. i would like to be able to do permutation 1,2,3,4,5 - > 1,4,3,2,5 i one move by drag element 2 and drop it over element 4.


Extract relevant grant and project data from the GovGrants tracker

What is it?
The first step is getting a handle on which projects have received growth grants and for what intended objectives. This spreadsheet has all relevant information about the projects (including links to their grant applications).
I've taken a first step in parsing the sheet here.
We should try to obtain the following for all growth grants:

Project info (see JSON)
Markdown or plaintext version of project application
Relevant dates of disbursement
L2 addresses (the application may include other addresses)
The chain(s) where activity is expected. See here for a list of OP chains. Once that are not on OSO but on OP Labs will be coming soon.
List of metrics that are referenced in the growth grant application

PR created: https://github.com/opensource-observer/insights/pull/78

https://github.com/opensource-observer/insights/pull/81


Getter unrecognized when encapslating class within $ReadOnly

Flow version: 0.95.2
When a class has a getter (no setter) the property defined by this getter should be found even if the class is encapsulated inside $ReadOnly<> utility type.
Actual behavior
When a class has a getter (no setter) the getter is no longer found when encapsulating the class within a $ReadOnly<class>  type. Flow gives an error of a missing property.

Link to Try-Flow or Github repo:
https://flow.org/try/#0PQKgBAAgZgNg9gdzCYAoVBjGBDAzrsAQTAG9UwwBzAUwBcwATbW7ACgEoAuMAfgDsArgFsARtQBOpchTDi6A8XzC0AFgEtcAOgD6DANzSAvtN3dBoiQYoY4fXLXECMtOOI5SZy9Vt1gAvGAArFZgxsboNnb02JwAJABK1NgMAPJ8MACeADyEAHz+YHzUSIQcBtiaTCwG6NKoQA

Related: https://github.com/facebook/flow/issues/7572

I went ahead and tested it a bit more - and noticed this worked pre version 0.77. Between 0.76 and 0.77 this stopped working.

Because of this change probably

https://github.com/facebook/flow/commit/ecbace2a34c4843bb0c2438e8759e818e1786394

Is this still known? Especially since the workaround -- double declaring variables (first in an declaration list in the class and then later as getter setter is now actually being shown as error).

@pulli23 Your example in try flow seems to work now. Can you confirm?


Cluster unresponsive

Not really sure what happened here: there was no loss of underlying node, but monitoring reports that we lost host, router, and scheduler on this node around 6:02PM, and they never recovered.
https://bazaarvoice.box.com/s/zr0sh334c8msrlfh5cvja0mhbfby52ra
I'll keep the offender around for a bit, in case you want more. Speak up soon; I'll probably nuke it tomorrow afternoon if I don't hear otherwise.

If you still have the broken node around (<IP_ADDRESS>): Is /var/lib/docker around with subdirectories and data in those directories?

Also, can you check the uptime of the host? Everything I'm seeing points to a reboot.

Uptime confirms it's a reboot. /var/lib/docker/ is indeed empty; we don't handle the reboot well, and so it looks like the mount which happens underneath that did not happen. I'll put it on the list of things to clean up.


refactor: refine Elvish profile setup

Remove str:join usage for better portability and simplicity
using str:join requires use str first, and we can directly operate on $paths to avoid dealing with : in PATH manually

Add general logic to deal with normal env vars

relates to https://github.com/moonrepo/proto/issues/361
follows https://github.com/moonrepo/proto/pull/362

I'm very new to Rust and I'm afraid if I have done anything wrong here. Please point out if any exists :)

Replacing $E:HOME with {~} does not change the meaning of code.
For completeness and readability of output, I added the replace() to both PATH and other env vars.

Awesome thanks!


Also, given that they will only refresh the current page, the headers on /song/n/view pages probably should not be clickable.

Fixed by PR #282


Fixing obsolete installation guide

Fixing issue - https://github.com/dmlc/mxnet/issues/6305
@piiswrong @szha

Why is everything else removed except ubuntu? Is the ubuntu page linked from anywhere?

For Julia and Scala (from install page) this page is linked. Hence, fixed issue with build step rather than removing it.


boards: longan_nano: add dfu-util runner

This adds the runner arguments for dfu-util to the longan_nano board, to allow flashing via DFU in addition to openocd.
I added the CONFIG_FLASH_BASE_ADDRESS since that results in the proper dfu-util flag -s 0x08000000, which i found in the platformio sources from sipeed.
I'm not sure if this has other, unintended effects... (This option also did not seem available for RISCV, was this on purpose?)

(sorry for removing the review-requests? i think manually requesting re-review interfered with the bot somehow...)

Hi @ottojo , any update?

This file may no need to change because the CONFIG_FLASH_BASE be set correctly by arch/Kconfig settings that enabled by this PR. (Please check generated .config file.)
@soburi yes this is the case, i removed the explicit CONFIG_FLASH_BASE setting

@cameled i re-added the configuration in esp32c3/Kconfig.soc

Hi @ottojo, thanks for you contirbutions! One thing left now, please update the signed-off-by info in arch commit. Remove my info and add your's.

done!


Questionable addition

Wanted to add a little project of mine:
https://github.com/marcellourbani/abap_debugger_object_graph_extension
which is pretty much a better UI for https://github.com/larshp/ABAP-Object-Visualizer
It's about 600 lines of ABAP, but my contribution is probably less than 100, not counting the JS stuff I ended up putting in a different project

feel free to add it 😄


Game.js after collecting 13 discs, only 9 pics appears

Versions
npm -v 8.19.x
tsc -v 4.8.x
Terminal: Git Bash
Tested on branch: main
What happened
Self-explanatory
Expected outcome
13 pictures of discs should appear

ops


project billable button does not work

The billable button under a projet does not do anything, is this behaviour wanted?

I'm not sure I understand what you mean, this button marks a project as billable. Is this a UI issue? If so, which browser etc are you using?

yeah UI issue, if I click on the button nothing happens, afaik I should be able to trigger it on or off. I am using iceweasel 31.7.0 as browser on Debian 8. Also I was wondering if you can define somewhere the hourly rate for a project?

Also goes wrong for Firefox I see

Also I was wondering if you can define somewhere the hourly rate for a project?

Nope, it's just time registration. You can easily export the data and could cook something up in google docs/excel though.

@hostingnuggets this is because you first need to specify a client before the toggle is active:

No client selected (toggle is inactive):

Client selected (toggle is active):

Billable = true:

So what I think we can take from this is that the UI here lacks clarity.

The difference between the toggle being inactive of active is negligible.
We don't explain why the toggle is inactive.
Why can't a project be billable without a client? (maybe you want to add the client later?)
Why can't we add a new client inline here? Instead of first having to create a client at /clients.

Also some explanatory stuff and or inline validation would help here..
Any thoughts?

@dkhgh your suggestions are very good. At least if the billable is inactive, we need telll user to create client first.

Maybe we could hide the button until you select a client?

I think the reason a project can't be billable without a client was a request from defacto. For now i agree with hiding the button until you select a client.
Or what would be nice is that you can enter a new client already instead of having to select one in the dropdown.

Hi, I will like to contribute to this project, Have this been fixed?
I can work on it

I think the reason a project can't be billable without a client was a request from defacto.

Still makes sense IMO.

Hi, I will like to contribute to this project,

Cool.

Have this been fixed?

It's not really clear if this needs work.

It's not really clear if this needs work.
Ok that's fine then
Looking for where to start?


DOC-313: Added note about cardinality for composite indexes

Fixes DOC-313

In composite indexes, columns with a higher cardinality (higher number of distinct values) should go before columns with lower cardinality.

This change is


add some media strings to content strings resources

content layer doesnt ship audio strings which media resources depend on, chrome ships it in generated_resources.grd.

Wasn't sure if its required to provide localized string for default audio device labels. Just following chromes' behavior.

Not needed, since we are not localizing the default audio label strings.


Rewrite chart-bump-action

Is your feature request related to a problem? Please describe.
Our current solution for automatically bumping charts is a custom action written in Node. This action is hard to maintain and very often gets security warnings, given the high number of dependencies.
Additionally, since this workflow also uses a third party action for creating pull requests, we cannot supply it a custom token to allow it to run CI checks due to security concerns.
Describe the solution you'd like
It would be great to rewrite the chart-bump action in go, and automate PR creation with the gh tool rather than a third-party action.

This is now done by the renovate bot.


Cant include underscore 3rth party library

I'm following the 3rth party library installation guide but for underscore, I basically do that same but instead of every 'moment' I replace it with 'underscore', just had to install the typings with typings install dt~underscore --global --save, but the compiler wont find underscore.
The Broccoli Plugin: [BroccoliTypeScriptCompiler] failed with:
Error: Typescript found the following errors:
  /home/franco/Repositories/freyja-estore/tmp/broccoli_type_script_compiler-input_base_path-LIIKQ8Cj.tmp/0/src/app/freyja-api/basket-api.ts (6, 20): Cannot find module 'underscore'.
    at BroccoliTypeScriptCompiler._doIncrementalBuild (/home/franco/Repositories/freyja-estore/node_modules/angular-cli/lib/broccoli/broccoli-typescript.js:115:19)
    at BroccoliTypeScriptCompiler.build (/home/franco/Repositories/freyja-estore/node_modules/angular-cli/lib/broccoli/broccoli-typescript.js:43:10)
    at /home/franco/Repositories/freyja-estore/node_modules/angular-cli/node_modules/broccoli-caching-writer/index.js:152:21
    at lib$rsvp$$internal$$tryCatch (/home/franco/Repositories/freyja-estore/node_modules/angular-cli/node_modules/broccoli-caching-writer/node_modules/rsvp/dist/rsvp.js:1036:16)
    at lib$rsvp$$internal$$invokeCallback (/home/franco/Repositories/freyja-estore/node_modules/angular-cli/node_modules/broccoli-caching-writer/node_modules/rsvp/dist/rsvp.js:1048:17)
    at lib$rsvp$$internal$$publish (/home/franco/Repositories/freyja-estore/node_modules/angular-cli/node_modules/broccoli-caching-writer/node_modules/rsvp/dist/rsvp.js:1019:11)
    at lib$rsvp$asap$$flush (/home/franco/Repositories/freyja-estore/node_modules/angular-cli/node_modules/broccoli-caching-writer/node_modules/rsvp/dist/rsvp.js:1198:9)
    at nextTickCallbackWith0Args (node.js:420:9)
    at process._tickCallback (node.js:349:13)

Moment seems to work fine though
My ng --version:
angular-cli: 1.0.0-beta.5
node: 4.4.4
os: linux x64

Thanks!

Have a some problem with jquery
I think this not a mistake of ng-cli, but you, guys, can help us :)
My solution: include jquery directly in index.html.
<script src="vendor/jquery/dist/jquery.js"></script>

Or as a dependency of main in system-config.ts.
And remove import in ...component.ts
But im sure theres is a better decision.

@MNBuyskih How would you then reference it in for example a component? Using the typings $?

@RicardoVaranda yes, you can use $, but $ confict with protractors $. See https://github.com/DefinitelyTyped/DefinitelyTyped/issues/2734 But jQuery` is available.

Yea I just ran into that issue couple of hours ago and can confirm jQuery worked fine, hope the implementation is made easier down the line as it seems like more of a work around rather than a fix.

If you include your library inside index.html your production build probably won't work. It is better to include it within angular-cli.build.js, and declare it as a "Global" module in system-config.ts

Check out the wiki:
https://github.com/angular/angular-cli/wiki/3rd-party-libs
I've updated it recently and included installation guide for underscore, currently using angular-cli beta 6 and can confirm it is working.

The wiki page is in-correct for the /// reference it should be
/// <reference path="../../typings/globals/underscore/index.d.ts" />
not three sets of dots.

Closed as obsolete following #1455.


Avoid the problem of named param matches in plurals

plurals sometimes add or subtract categories, so the named parameter matching will sometimes find false errors because the category containing the parameter is not present in the target plural

Ready for re-review. Fixed in a different way. In this method, we just avoid including the plural in the stripped string altogether. Instead, we will rely on a different rule to handle matching regexps inside of plurals at a later time when we have implemented a proper nested resource type and updated the DeclarativeResourceRule to check the new resource type.


Implementation UTC_DATE/UTC_TIME/UTC_TIMESTAMP

Description
UTC_DATE, UTC_TIME, UTC_TIMESTAMP are all implemented according to MySQL standard.
Issues Resolved
Support date and time functions for new engine · Issue #709 · opendistro-for-elasticsearch/sql
Date time query improvement · Issue #46 · opensearch-project/sql
opensearchsql> select utc_date();
fetched rows / total rows = 1/1
+--------------+
| utc_date()   |
|--------------|
| 2022-10-03   |
+--------------+
opensearchsql> select utc_time();
fetched rows / total rows = 1/1
+--------------+
| utc_time()   |
|--------------|
| 17:54:27     |
+--------------+
opensearchsql> select utc_timestamp();
fetched rows / total rows = 1/1
+---------------------+
| utc_timestamp()     |
|---------------------|
| 2022-10-03 17:54:28 |
+---------------------+

Check List

[X] New functionality includes testing.

[ ] All tests pass, including unit test, integration test and doctest

[ ] New functionality has been documented.

[ ] New functionality has javadoc added
[ ] New functionality has user manual doc added

[X] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

When you'll publish PR on upstream, please, mention that value of these functions is cached as it happens with now. Due to the limitations in the caching mechanism, the function can't accept the fsp argument.

Rebase and squash after all updates to ensure that you have DCO on the commit.


Rename "point light" to "clusterable object" in cluster contexts.

We want to use the clustering infrastructure for light probes and decals as well, not just point lights. This patch builds on top of #13640 and performs the rename.
To make this series easier to review, this patch makes no code changes. Only identifiers and comments are modified.
Migration Guide

In the PBR shaders, point_lights is now known as clusterable_objects, PointLight is now known as ClusterableObject, and cluster_light_index_lists is now known as clusterable_object_index_lists.

I added the contentious label because it's a non-trivial breaking change that may affect the ecosystem as a whole. If the rendering people generally agree with this change, it can be switch to X-Blessed.

I haven't discussed it with other SMEs yet, but I don't think this is contentious. It's pretty much agreed that this code needs a refactor and the change is motivated by future features that we also want.
@BD103 I'm also not sure why you consider it non-trivial, it's just a rename with no behaviour change and the things that are renamed are probably not used by the vast majority of users except advanced users making custom lighting systems.

Once CI is passing I'll merge this in.

@BD103 I'm also not sure why you consider it non-trivial, it's just a rename with no behaviour change and the things that are renamed are probably not used by the vast majority of users except advanced users making custom lighting systems. A migration guide entry mentioning the rename seems more than enough to me.

I mainly marked it as straightforward due to the amount of files being modified, even if those modifications are trivial. It's really up to interpretation, so I'll switch it over. :)

@BD103 Ah, I didn't realize that's what you meant by non-trivial, I wasn't thinking about labels, I think the "may affect the ecosystem" part was what confused me. I agree that the straightforward label is fine here.

@BD103 Ah, I didn't realize that's what you meant by non-trivial, I wasn't thinking about labels, I think the "may affect the ecosystem" part was what confused me. I agree that the straightforward label is fine here.

Yup! It was probably confusing because my understanding of Bevy's rendering setup is severely lacking. You didn't understand it because I probably didn't understand it either; I just guessed that a rename may affect existing libraries / plugins.
Either way, glad we got this resolved!


[BUG] K8s version detection of the chart return wrong results

Rancher Server Setup

Rancher version: v2.7.9
Installation option (Docker install/Helm Chart):

If Helm Chart, Kubernetes Cluster and version (RKE1, RKE2, k3s, EKS, etc):
Harvester VCluster plugin

Information about the Cluster

Kubernetes version: v1.25
Cluster Type (Local/Downstream):

If downstream, what type of cluster? (Custom/Imported or specify provider for
Harvester v1.2.1

User Information

What is the role of the user logged in? (Admin/Cluster Owner/Cluster Member/Project Owner/Project Member/Custom)

If custom, define the set of permissions:
Admin

Describe the bug
Rancher Chart version detection mechanism for K8s returns wrong version
To Reproduce

Install Harvester v1.2.1
Install Rancher VCluster plugin with Rancher version v2.7.9

Result
Rancher v2.7.9 can't be installed on a K8s v1.25 cluster because the chart thinks it's being installed on a K8s v1.27 cluster
Expected Result
Installing Rancher on a K8s v1.25 cluster should work
Additional context
+ helm_v3 repo add rancher https://releases.rancher.com/server-charts/stable/
"rancher" already exists with the same configuration, skipping
+ helm_v3 repo update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "rancher" chart repository
Update Complete. ⎈Happy Helming!⎈
+ helm_update install --namespace cattle-system --version v2.7.9 --set-string bootstrapPassword=password1234 --set-string fleet.apiServerURL=https://rancher.<IP_ADDRESS>.nip.io/ --set global.cattle.psp.enabled=false --set-string hostname=rancher.<IP_ADDRESS>.nip.io --set-string ingress.tls.source=rancher --set replicas=1
+ [[ helm_v3 == \h\e\l\m\_\v\3 ]]
++ helm_v3 ls --all -f '^rancher$' --namespace cattle-system --output json
++ jq -r '"\(.[0].app_version),\(.[0].status)"'
++ tr '[:upper:]' '[:lower:]'
+ LINE=null,null
+ IFS=,
+ read -r INSTALLED_VERSION STATUS _
+ VALUES=
+ [[ install = \d\e\l\e\t\e ]]
+ [[ null =~ ^(|null)$ ]]
+ [[ null =~ ^(|null)$ ]]
+ echo 'Installing helm_v3 chart'
+ helm_v3 install --namespace cattle-system --version v2.7.9 --set-string bootstrapPassword=password1234 --set-string fleet.apiServerURL=https://rancher.<IP_ADDRESS>.nip.io/ --set global.cattle.psp.enabled=false --set-string hostname=rancher.<IP_ADDRESS>.nip.io --set-string ingress.tls.source=rancher --set replicas=1 rancher rancher/rancher
Error: INSTALLATION FAILED: chart requires kubeVersion: < 1.27.0-0 which is incompatible with Kubernetes v1.27.10+k3s2
> k versions
error: unknown command "versions" for "kubectl"

Did you mean this?
        version
> k version
WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short.  Use --output=yaml|json to get the full version.
Client Version: version.Info{Major:"1", Minor:"24", GitVersion:"v1.24.13", GitCommit:"49433308be5b958856b6949df02b716e0a7cf0a3", GitTreeState:"clean", BuildDate:"2023-04-12T12:15:50Z", GoVersion:"go1.19.8", Compiler:"gc", Platform:"linux/amd64"}
Kustomize Version: v4.5.4
Server Version: version.Info{Major:"1", Minor:"25", GitVersion:"v1.25.9+rke2r1", GitCommit:"a1a87a0a2bcd605820920c6b0e618a8ab7d117d4", GitTreeState:"clean", BuildDate:"2023-04-12T19:05:26Z", GoVersion:"go1.19.8 X:boringcrypto", Compiler:"gc", Platform:"linux/amd64"}

I figured this one out and it's a clear case of PEBKAC:
The Rancher VCluster plugin's installation manifest specifies a K3s version for the vcluster to install the Rancher instance in. This ends up being the version that is detected by Rancher, so this needs to be set to a compatible version.


Conda installation documentation needed

A comprehensive conda install guide is needed, similar to this.
@stasj is there a reason a wrapper, install_vapor.sh, is needed to perform the conda install?

@StasJ is there a reason a wrapper, install_vapor.sh, is needed to perform the conda install?

Since this is an in-review beta version of vapor, it has not been uploaded to Conda's servers. So the installer is needed because it contains the vapor api.

Will address once PR is merged.

Fixed a long time ago.


#2524 refatoring profiler

#2524

bug fix : unrecognized ApplicationSeverType
change className : InstrumentClassPool -> InstrumentEngine
fix klockwork (Null pointer dereference)

Codecov Report

Merging #2620 into master will increase coverage by 0.03%.
The diff coverage is 75%.

@@            Coverage Diff             @@
##           master    #2620      +/-   ##
==========================================
+ Coverage   40.07%   40.11%   +0.03%
==========================================
  Files        1761     1761
  Lines       60729    60732       +3
  Branches     8457     8456       -1
==========================================
+ Hits        24338    24362      +24
+ Misses      36391    36370      -21

Impacted Files
Coverage Δ

...p/pinpoint/profiler/instrument/JavassistClass.java
15.89% <ø> (ø)
:white_check_mark:

...point/profiler/DefaultAgentInformationFactory.java
80.95% <ø> (ø)
:white_check_mark:

...rofiler/DefaultClassFileTransformerDispatcher.java
74.57% <ø> (ø)
:white_check_mark:

.../com/navercorp/pinpoint/profiler/DefaultAgent.java
0% <ø> (ø)
:white_check_mark:

...ler/context/provider/AgentInformationProvider.java
78.57% <ø> (ø)
:white_check_mark:

...n/server/bo/serializer/trace/v2/SpanDecoderV0.java
92.01% <ø> (ø)
:white_check_mark:

...ofiler/instrument/BootstrapClassLoaderHandler.java
0% <ø> (ø)
:white_check_mark:

.../pinpoint/profiler/instrument/JavassistEngine.java
42.66% <100%> (ø)

...t/profiler/util/ApplicationServerTypeResolver.java
93.1% <100%> (+31.81%)
:white_check_mark:

...ercorp/pinpoint/profiler/instrument/ASMEngine.java
47.61% <100%> (ø)

... and 24 more

Continue to review full report at Codecov.

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


Fixes to dimension indices

This PR fixes a few known issues with the way highdicom deals with the dimension indices in the Segmentation Image IOD. The following changes are implemented:

Dimension Organization UIDs are now created for every segmentation image, rather than the old, incorrect behaviour of using a fixed literal UID for every instance highdicom creates.
A fix to the way dimension index values are calculated: previously this was wrong if there were empty frames in the segmentation pixel array
In order to make the above fix, it was necessary to remove the add_segments() method of the Segmentation class because information about all segments is required when the instance is created in order to correctly calculate the dimension index value for every segment. To make this possible, the constructor can now accept a 4D array, where multiple segments (that would have previously been added sequentially via add_segments) may be concatenated along the fourth (final) dimension. This has a nice side effect of bringing the constructor in line with the "decoding" behaviour in #74, which returns 4D arrays with the same interpretation.
An option to turn off the behaviour that omits empty frames from the segmentation image was added
More unit tests to ensure that the dimension index values are correct

Also added a release notes page to the docs that should guide users through the backwards-incompatible removal of add_segments. Calling add_segments now raises a deprecation error pointing to that page

@hackermd I have moved some of the low hanging fruit to methods, unfortunately I don't think there's much more that can be done without passing huge parameter list around

@hackermd I have moved some of the low hanging fruit to methods, unfortunately I don't think there's much more that can be done without passing huge parameter list around

Yeah, I also found this difficult on other classes. The changes that you've made are nice. The constructor has already lost quite a bit of weight.


standards

Apply some code quality standards like black to the repo and make it a pre-commit hook

resolved in fe0bb0720a390e926eb60e4b5bcd4a83f4f0527f


Upload function

Hi, one could introduce an upload function... Here is an example:
attachment.upload({
    provider: 'pastebin',
    format: `#${numberUp}`
}).then(link => {
    interaction.reply({
        content: 'Link:' + ' ' + link,
        ephemeral: true
    })
})

provider specifies the service provider, such as Pastebin, Hastepin and others.
format specifies the format, where numberUp simply counts upwards from and to a number. One could also generate random strings with randomString...

You can implement it yourself, also since pastebin, hastebin or others aren't rendering html, then it doesn't makes any sense. You can however use ExpressJS, generate a transcript as a buffer then save it in a static folder served by express

I think this is out of the scope of the module as of now.
This would require me to maintain a ton of different providers and adds extra complexity.

Actually, since this is a very common question, I will turn this into a different sort of feature.
I'll work on some documentation outlining how to upload to different providers.

It would be really good

WIP: https://discord-html-transcripts.derock.dev
will finish this up soon, lmk if you have any suggestions

Use something like jsdocs or Discord.js docs generator? @ItzDerock

Use something like jsdocs or Discord.js docs generator? @ItzDerock

Well the real bulk of the documentation will be the guide, sort of like https://discordjs.guide
There's only really two functions that need documenting so having something like the discordjs docs is a little overkill.
I might try and see if there's a way to autogenerate the markdown files for the functions though.

Hello! i found a way to upload that html transcripts to an ExpressJS server.
script that you trigger a transcripts:
// ...
const attachment = await discordTranscript.createTranscript(
  interaction.channel // or message.channel
);

const ticketid = "0001";

const filePath = `./transcripts/ticket-${ticketid}.html`;
await fs.writeFileSync(
  filePath,
  Buffer.from(attachment.attachment, "base64").toString()
);
// ...

expressjs server:
const fs = require("fs");
const app = require("express")();
app.listen(80); // change port if you dont want it.

app.use("/transcript/:ticketid", (req, res) => {
  const filePath = `${__dirname}/transcripts/ticket-${req.params.ticketid}.html`;
  if (fs.existsSync(filePath)) {
    res.status(200).sendFile(filePath);
  } else {
    res.status(404).send("404 - Transcripts not found!");
  }
});

It should work!

Hello! i found a way to upload that html transcripts to an ExpressJS server.
script that you trigger a transcripts:
const fs = require("fs")
// ...
const attachment = await discordTranscript.createTranscript(
  interaction.channel // or message.channel
);

const ticketid = "0001";

const filePath = `./transcripts/ticket-${ticketid}.html`;
await fs.writeFileSync(
  filePath,
  Buffer.from(attachment.attachment, "base64").toString()
);
// ...

expressjs server:
const fs = require("fs");
const app = require("express")();
app.listen(80); // change port if you dont want it.

app.use("/transcript/:ticketid", (req, res) => {
  const filePath = `${__dirname}/transcripts/ticket-${req.params.ticketid}.html`;
  if (fs.existsSync(filePath)) {
    res.status(200).sendFile(filePath);
  } else {
    res.status(404).send("404 - Transcripts not found!");
  }
});

It should work!

Sounds good, will give it a try....