Katib updates

Which issue is resolved by this Pull Request:
Resolves #
Description of your changes:
user roles update and values fixes
Checklist:

[ ] Unit tests pass:
Make sure you have installed kustomize == 5.2.1+

make generate-changed-only
make test

@MaxKavun can you investigate this error? I got it using the quickstart.helm.local.sh script:
Error: 1 error occurred:
        * ClusterRole in version "v1" cannot be handled as a ClusterRole: json: cannot unmarshal string into Go struct field LabelSelector.aggregationRule.clusterRoleSelectors.matchLabels of type map[string]string


Google Sign-In Popup Closes Right After Launch

The sign-in button using Google in the login and sign up does not work! It briefly opens a window before closing. I am unsure why this is, but this really does need to be solved!

This is the button here!

Hi, "Sign in With Google" button is working fine in my system, just one thing, I'm able to log in even when I never signed up before, other than that, its working as expected, please let me know if I mis-understood the issue

Hi, "Sign in With Google" button is working fine in my system, just one thing, I'm able to log in even when I never signed up before, other than that, its working as expected, please let me know if I mis-understood the issue.

Is the “Sign in With Google” button working for you at https://lernit.site/ ? It works in my development server but not in the production server. Also, it is normal to be able to Log In with Google if you have not signed up before. They both do the exact same thing.

The current domain is not authorized for OAuth operations. This will prevent signInWithPopup, signInWithRedirect, linkWithPopup and linkWithRedirect from working. Add your domain (lernit.site) to the OAuth redirect domains list in the Firebase console -> Authentication -> Settings -> Authorized domains tab.

The current domain is not authorized for OAuth operations. This will prevent signInWithPopup, signInWithRedirect, linkWithPopup and linkWithRedirect from working. Add your domain (lernit.site) to the OAuth redirect domains list in the Firebase console -> Authentication -> Settings -> Authorized domains tab.

Ok yes it works now! Thanks!


Invalid XTAL setting

I have this warning:
W (71) rtc_clk: Possibly invalid CONFIG_ESP32_XTAL_FREQ setting (40MHz). Detected 40 MHz.
I selected the 40MHz, why is this warning appear?

https://www.esp32.com/viewtopic.php?f=13&t=3340#p15636


Rails 4.2 sanitize_sql_hash_for_conditions is deprecated, and will be removed in Rails 5.0

Upgraded to Rails 4.2 and there were a bunch of deprecation warnings about scopes. I'm using acts_as_list with Ancestry:
acts_as_list scope: [:project_id, :ancestry]
in Rails 5.0
. (called from scope_condition at (eval):40)
/gems/activerecord-4.2.0/lib/active_record/sanitization.rb:90:in sanitize_sql_hash_for_conditions' (eval):40:in scope_condition'
/gems/acts_as_list-0.5.0/lib/acts_as_list/active_record/acts/list.rb:318:in bottom_item' /gems/acts_as_list-0.5.0/lib/acts_as_list/active_record/acts/list.rb:312:in bottom_position_in_list'
/gems/acts_as_list-0.5.0/lib/acts_as_list/active_record/acts/list.rb:300:in add_to_list_bottom' (eval):1:in block in make_lambda'
/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:430:in instance_exec' /gems/activesupport-4.2.0/lib/active_support/callbacks.rb:430:in block in make_lambda'
/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:163:in call' /gems/activesupport-4.2.0/lib/active_support/callbacks.rb:163:in block in halting'
/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:92:in call' /gems/activesupport-4.2.0/lib/active_support/callbacks.rb:92:in _run_callbacks'
/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:734:in _run_create_callbacks' /gems/activerecord-4.2.0/lib/active_record/callbacks.rb:306:in _create_record'
/gems/activerecord-4.2.0/lib/active_record/timestamp.rb:57:in _create_record' /gems/activerecord-4.2.0/lib/active_record/persistence.rb:501:in create_or_update'
/gems/activerecord-4.2.0/lib/active_record/callbacks.rb:302:in block in create_or_update' /gems/activesupport-4.2.0/lib/active_support/callbacks.rb:117:in call'
/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:117:in call' /gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in block in halting'
/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in call' /gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in block in halting'
/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:219:in call' /gems/activesupport-4.2.0/lib/active_support/callbacks.rb:219:in block in halting_and_conditional'
/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:92:in call' /gems/activesupport-4.2.0/lib/active_support/callbacks.rb:92:in _run_callbacks'
/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:734:in _run_save_callbacks' /gems/activerecord-4.2.0/lib/active_record/callbacks.rb:302:in create_or_update'
/gems/activerecord-4.2.0/lib/active_record/persistence.rb:142:in save!' /gems/activerecord-4.2.0/lib/active_record/validations.rb:43:in save!'
/gems/activerecord-4.2.0/lib/active_record/attribute_methods/dirty.rb:29:in save!' /gems/activerecord-4.2.0/lib/active_record/transactions.rb:291:in block in save!'
/gems/activerecord-4.2.0/lib/active_record/transactions.rb:347:in block in with_transaction_returning_status' /gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/database_statements.rb:211:in transaction'
/gems/activerecord-4.2.0/lib/active_record/transactions.rb:220:in transaction' /gems/activerecord-4.2.0/lib/active_record/transactions.rb:344:in with_transaction_returning_status'
/gems/activerecord-4.2.0/lib/active_record/transactions.rb:291:in save!' /gems/activerecord-4.2.0/lib/active_record/persistence.rb:51:in create!'
          # Returns the bottom item
          def bottom_item(except = nil)
            conditions = scope_condition
            conditions = "#{conditions} AND #{self.class.primary_key} != #{self.class.connection.quote(except.id)}" if except
            acts_as_list_class.unscoped do
              acts_as_list_class.in_list.where(conditions).order("#{acts_as_list_class.table_name}.#{position_column} DESC").first
            end
          end

Closed in #140


Update MD file on new branch 2017-11-13_10-25-27

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

split/updateTestRef1.md
:white_check_mark:Succeeded

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.


Problem with Spam Txs in Mempool

As you all probably know, there are currently Txs in the Juno Mempool that would trigger arbitrage opportunitys if succesful.
Im currently working on a way to ignore these addresses and prevent fake swap transaction spam.

Steps to Reproduce

Start Bot
See Fake Transaction
Try Arb
waste tx fees if using mempoolloop

Merged to release branch


Request: "Copy result" should copy more formats than plain text

Is your feature request related to a problem? Please describe.
When I copy results from Azure Data Studio into an email, the results are formatted as TSV. I believe this is because ADS only provides plaintext values on the clipboard.
Describe the solution or feature you'd like
I'd like the results to be formatted as a table. E.G. I think this can be achieved by providing a suitably formatted text/html target to the clipboard on Mac/Linux, alongside the text/plain target.
Additional context
Running Azure Data Studio on Linux and pasting into Outlook Web in Firefox. Clipboard contents checked with python hackery.

May be related to #7189.

This is a good feature to have but not currently in the scope of ADS. You're welcome to provide this as a PR :)

don't think this is related to 7189, but I will have a peek if I get time.

close as dupe of https://github.com/microsoft/azuredatastudio/issues/168


TRAPI 1.4 validation issues

I'm hitting dev molepro and upon validation of the responses, it looks like there are a few errors:

you're sending resource_role with the biolink: prefix when it should be i.e. primary_knowledge_source
analyses is a dict when it should be a list

Thank you @maximusunc for your issue #306. To help our team to get a better understanding of the problem please tell what query and URL you had used to get that response with errors.
Many thanks,

Hi Larry, sure thing.
URL: https://translator.broadinstitute.org/molepro/trapi/v1.4/query
QUERY:
{
  "message": {
    "query_graph": {
      "nodes": {
        "chemical": {
          "ids": null,
          "categories": [
            "biolink:ChemicalEntity"
          ],
          "is_set": false,
          "constraints": []
        },
        "h": {
          "ids": [
            "UMLS:C1415478",
            "UMLS:C1415477",
            "UMLS:C1415477"
          ],
          "categories": [
            "biolink:Gene",
            "biolink:Protein"
          ],
          "is_set": false,
          "constraints": []
        }
      },
      "edges": {
        "edge_2": {
          "subject": "chemical",
          "object": "h",
          "knowledge_type": null,
          "predicates": [
            "biolink:affects"
          ],
          "attribute_constraints": [],
          "qualifier_constraints": [
            {
              "qualifier_set": [
                {
                  "qualifier_type_id": "biolink:object_aspect_qualifier",
                  "qualifier_value": "activity_or_abundance"
                },
                {
                  "qualifier_type_id": "biolink:object_direction_qualifier",
                  "qualifier_value": "increased"
                }
              ]
            }
          ]
        }
      }
    }
  }
}

Thank you @maximusunc !
We will have our best minds working on the errors right away.
Many thanks,
Larry

Fixed the analysis portion on branch md_trapi-<IP_ADDRESS>

For the biolink: prefix for the resource role, I can pull it out in the code or the DB has to be modified; the latter should be simple.

I'm getting another TRAPI validation error now: knowledge_graph.edge.qualifiers.qualifier_type_id does not have a biolink: prefix. This is the query I sent to https://translator.broadinstitute.org/molepro/trapi/v1.4/query:
{
  "message": {
    "query_graph": {
      "nodes": {
        "e": {
          "ids": [
            "PUBCHEM.COMPOUND:5284373",
            "PUBCHEM.COMPOUND:1102"
          ],
          "categories": [
            "biolink:ChemicalEntity"
          ],
          "is_set": false,
          "constraints": []
        },
        "i": {
          "ids": null,
          "categories": [
            "biolink:BiologicalEntity"
          ],
          "is_set": false,
          "constraints": []
        }
      },
      "edges": {
        "edge_2": {
          "subject": "i",
          "object": "e",
          "knowledge_type": null,
          "predicates": [
            "biolink:affects"
          ],
          "attribute_constraints": [],
          "qualifier_constraints": [
            {
              "qualifier_set": [
                {
                  "qualifier_type_id": "biolink:object_aspect_qualifier",
                  "qualifier_value": "activity_or_abundance"
                },
                {
                  "qualifier_type_id": "biolink:object_direction_qualifier",
                  "qualifier_value": "decreased"
                }
              ]
            }
          ]
        }
      }
    }
  }
}

@marcdubybroad  I ran Max's query above on  https://translator.broadinstitute.org/molepro/trapi/v1.4/query and I did find knowledge_graph.edge.qualifiers.qualifier_type_id without biolink: prefix:
…
        "e2-wEwtNV10fz": {
          "attributes": [
            {
              "attribute_source": "infores:ctd",
              "attribute_type_id": "biolink:OrganismTaxon",
              "attributes": [],
              "description": "Rattus norvegicus",
              "original_attribute_name": "TaxonID",
              "value": "NCBITaxon:10116"
            },
            {
              "attribute_source": "infores:ctd",
              "attribute_type_id": "biolink:relation",
              "attributes": [],
              "original_attribute_name": "Relation",
              "value": "abundance increased by",
              "value_type_id": "string"
            },
            {
              "attribute_type_id": "biolink:publications",
              "value": [
                "PMID:1644166"
              ],
              "value_type_id": "linkml:Uriorcurie"
            }
          ],
          "object": "PUBCHEM.COMPOUND:1102",
          "predicate": "biolink:affects",
          "qualifiers": [
            {
              "qualifier_type_id": "qualified_predicate",
              "qualifier_value": "biolink:causes"
            },
            {
              "qualifier_type_id": "subject_direction_qualifier",
              "qualifier_value": "increased"
            },
            {
              "qualifier_type_id": "subject_aspect_qualifier",
              "qualifier_value": "abundance"
            }
          ],
          "sources": [
            {
              "resource_id": "infores:ctd",
              "resource_role": "primary_knowledge_source"
            },
            {
              "resource_id": "infores:molepro",
              "resource_role": "aggregator_knowledge_source",
              "upstream_resource_ids": [
                "infores:ctd"
              ]
            }
          ],
          "subject": "NCBIGene:2520"
        }
 …

All qualifiers returned by MolePro now have biolink: prefix.


#778 - fix indentation for tagui step to call subflow

Hi @siowyisheng made a fix that passed the following tests. For your review and verification -
a.tag
for n from 1 to 3
    tagui b.tag

b.tag
echo 1
echo 2
echo 3

c.tag
http://tebel.org
click Automation projects
popup automation_projects
    tagui d.tag

d.tag
echo line 1
show file-automation_projects-LC2
echo line 2
show file-automation_projects-LC2

e.tag
echo 1
tagui f.tag
echo 2

f.tag
echo 1.5
echo 1.7

tested and working on my side.


KfCallback.java:35-36: Integration test for KfCallback...

The puzzle 204-5fca8491 from #204 has to be resolved:
https://github.com/eo-cqrs/eo-kafka/blob/3aa29855a785b99b9631f982795880fde8a4b5d4/src/main/java/io/github/eocqrs/kafka/producer/KfCallback.java#L35-L36
The puzzle was created by @l3r8yJ on 23-Apr-23.
role: DEV.
If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

@0pdd thank you for reporting this. I'll assign someone to take care of it soon.

@0pdd thank you for reporting this. I'll assign someone to take care of it soon.

I see you're talking to me, but I can't reply since I'm not a chat bot.

@h1alexbel this is your task now, please go ahead. Deadline (when this ticket should be closed) is 2023-05-03T16:32:20.250693.
Estimation here is 60 minutes, that's how much you will be paid.
Remember, you don't have to solve everything in this ticket - you can solve it partially and leave todo markers in the code, which will become future tasks.
If you have any questions don't ask me, I'm not a technical person. Open new tickets instead.
If you don't have time or simply don't want to work on this, you can always resign.

The puzzle 204-5fca8491 has disappeared from the source code, that's why I closed this issue.

@h1alexbel thank you for resolving this ticket. I've just added it to your active invoice. You can always check all your invoices and more on the Contributor Dashboard.

@0pdd thanks for reopening this, I'll find someone to take a look at it.
However, please keep in mind that reopening tickets is a bad practice. Next time, please open a new ticket.

@0pdd thanks for reopening this, I'll find someone to take a look at it. However, please keep in min...

I see you're talking to me, but I can't reply since I'm not a chat bot.

@l3r8yJ I can also took this one

@h1alexbel didn't see your message : 0, see #276

@l3r8yJ thank you for resolving this ticket. I've just added it to your active invoice. You can always check all your invoices and more on the Contributor Dashboard.


feat(coloc): step refactoring

✨ Context
The PR https://github.com/opentargets/gentropy/pull/830 added prior required arguments to the ColocalisationStep. As the step uses the colocalisation_method to evaluate which coloc method to use (Coloc or ECaviar), passing the required prior arguments to the ColocaliseMethod.coloc() will result in a bug within the ECaviar method, that does not require these parameters.

🛠 What does this PR implement
This PR attempts to fix the issue by

[x] introducing a list of keyword arguments that can be passed to the ColocalisationStep under the colocalisation_method_params
[x] Addition of ColocalisationStep tests to ensure the integrity of the step test with data extracted from

coloc_path = "gs://ot_orchestration/releases/24.10_freeze2/colocalisation"
cs_path = "gs://ot_orchestration/releases/24.10_freeze2/credible_set"

[x] Introduction of ColocalisationMethodInterface class that implements the interface for any colocalisation method that should satisfy the ColocalistationStep
[x] Refactoring of Coloc, ECaviar and ColocalisationStep classes

The default behavior of the Coloc method is to use the provided colocalisation_method_parameters if passed, else it fallbacks to the default values:

priorc1 = 1e-4
priorc2 = 1e-4
priorc12 = 1e-5

Example how to run the ColocalisationStep with overloading the parameters
ColocalisationStep(session, credible_set_path, coloc_path, colocalisation_method="coloc", colocalisation_method_params={"priorc1:e-4, "priorc2":1e-4, "priorc12": 1e-5})

To run the step from the CLI
gentropy \
      step=colocalisation \
      step.credible_set_path=gs://ot_orchestration/releases/24.10/credible_set \
      step.coloc_path=gs://ot_orchestration/releases/24.10/colocalisation \
      step.colocalisation_method=Coloc \
      +step.colocalisation_method_params='{priorc1: 1e-4, priorc2: 1e-4, priorc12: 1e-5}'

step:
  session:
    start_hail: false
    write_mode: errorifexists
    spark_uri: local[*]
    hail_home: /Users/ss60/Public/projects/gentropy/.venv/lib/python3.10/site-packages/hail
    extended_spark_conf: {}
    _target_: gentropy.common.session.Session
  credible_set_path: gs://ot_orchestration/releases/24.10/credible_set
  coloc_path: gs://ot_orchestration/releases/24.10/colocalisation
  colocalisation_method: Coloc
  colocalisation_method_params:
    priorc1: 0.0001
    priorc2: 0.0001
    priorc12: 1.0e-05
  _target_: gentropy.colocalisation.ColocalisationStep
datasets: {}

🙈 Missing

🚦 Before submitting

[x] Do these changes cover one single feature (one change at a time)?
[x] Did you read the contributor guideline?
[x] Did you make sure to update the documentation with your changes?
[x] Did you make sure there is no commented out code in this PR?
[x] Did you follow conventional commits standards in PR title and commit messages?
[x] Did you make sure the branch is up-to-date with the dev branch?
[x] Did you write any new necessary tests?
[x] Did you make sure the changes pass local tests (make test)?
[x] Did you make sure the changes pass pre-commit rules (e.g poetry run pre-commit run --all-files)?

if I understand this correctly the .lower() will not impact the data only the checks?
If it impacts the data, we would need to look downstream where the colocalisation methods are used (mainly L2G)

Yes you assume correctly. The .lower() just makes sure that if we pass step.colocalisation_method=Coloc or step.colocalisation_method=COLOC we always run the Coloc class, the ColocalisationMethod column does not change it's value - see tests [coloc[(https://github.com/opentargets/gentropy/pull/845/files#diff-18eb39c5df16c7bba87c3e86c9d8001d0cf908eaf339d75818d342051ce4d8eaR251)
ecaviar


⚠ Bofrost.lu has degraded performance

In debfc1e, Bofrost.lu (https://www.bofrost.lu) experienced degraded performance:

HTTP code: 200
Response time: 2134 ms

Resolved: Bofrost.lu performance has improved in d17ad7c after 6 minutes.


Bind local tests to localhost

Internal security team got mad at me for exposing insecure endpoints.
Seems like this is an easy fix with no impact on the tests.

@howardjohn: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

unit-tests_istio
69d1851f69b622f523ce2c61c35bd486c5b2559e
link
/test unit-tests_istio

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 kubernetes/test-infra repository. I understand the commands that are listed here.

/retest

@howardjohn: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

unit-tests_istio
69d1851f69b622f523ce2c61c35bd486c5b2559e
link
/test unit-tests_istio

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 kubernetes/test-infra repository. I understand the commands that are listed here.

/retest


Build lookup tables at compile time

This makes it much clearer what the lookup tables contain, and to audit them for correctness.

Ah, snap! I authored d9c5007c0953b51651dbc0d7b8b0bbb65c0542d4 before I got a chance to see your work. I'm so sorry :sob:
I went with static tables because they were faster in benchmarks somehow. The only difference in wat output was different offsets for lookups... maybe the static section is somehow faster to access?
Let me see if I can merge your change in a different way, because I like how you reused the DEC array.

Thank you so much!


[gpt-3.5-turbo] Getting "Invalid status code: Cannot read properties of undefined (reading 'create')"

Describe the bug
I'm getting "Invalid status code: Cannot read properties of undefined (reading 'create')" on the next Node JS code:
To Reproduce
const { Configuration, OpenAIApi } = require("openai");
 const openai = new OpenAIApi(configuration);
const completion = await openai.ChatCompletion.create(
 model="gpt-3.5-turbo",
 messages=[
   {"role": "system", "content": "You are a helpful assistant."},
   {"role": "user", "content": "How are you?"},
 ],
  max_tokens=1000,
 );
Code snippets
No response
OS
Windows 11
Node version
Node.js v18.12.1
Library version
3.2.0

Use wrong syntax. createChatCompletion

Then the documentation is wrong on this page:
https://platform.openai.com/docs/guides/chat/introduction


Add PhysicsTimescale resource for slow-motion or fast-forward simulation

I can't think of much to say about this change right now.
If something is unclear, please ask. Thanks for your work and your time!

Thanks, looks good overall, and I appreciate the docs with a code example.
The only thing I'm not sure of is if it should actually change the number of physics runs as well. With the current implementation, large time scales will cause jittery behaviour and some missed collisions, because it's running the same number of steps as before, but just advances the time more.
It might make sense to run physics more times with larger timescales by just removing the multiplication of raw_dt by the timescale. This would give consistent behaviour accross time scales for fixed and variable timesteps, although it will also impact performance, and it wouldn't work with PhysicsTimestep::FixedOnce because it only runs once per frame.
I guess this could also be done by the user by dividing DeltaTime by the time scale, but in that case it should maybe be mentioned in the docs. I'm not sure how other engines handle time scale though, so not sure what the best approach is

Actually no, I think the way it is now might be better. If we ran physics a different number of times based on the time scale, slow motion would be very choppy, as the positions would be updated way less.
We can maybe keep it as it currently is, but we should mention in the docs that the timescale can change the accuracy of the simulation and introduce jitter, and that the behaviour can be made consistent by dividing the delta time by the timescale. Does that sound fine?

Thanks, looks great now!


AmsTcpIpRouter delays when using windows containers and NAT network driver

This is the setup I am using

The use case for this setup is to be able to preform a hot swap of our software.  Container 1 would be running version 1.1 of our software and container 2 startup running version 1.2.   Once a handoff is completed container 2 would take over and container 1 would shutdown.
After many trial and error and support from<EMAIL_ADDRESS>the above setup is working with one quirk, there is a 4000ms delay from when a client sends a request to when the router forwards the request to the PLC.
log example
//AdsClient.ReadAny called
2024-02-13 09:01:38.906 -05:00 [DBG] ReadRequest: Addr:<IP_ADDRESS>.1.1:851, InvokeId:14, IG:f005, IO:19000010, Len:2)
2024-02-13 09:01:38.906 -05:00 [VRB] RequestSync: Addr:<IP_ADDRESS>.1.1:851, InvokeId:14, serviceId:"Read", Len:0, header:ReadReqHeader(IG:f005,IO:19000010,Len:2, data:
2024-02-13 09:01:38.906 -05:00 [DBG] RequestSync: Addr:<IP_ADDRESS>.1.1:851, InvokeId:14, serviceId:"Read", Len:0, header:ReadReqHeader(IG:f005,IO:19000010,Len:2, data: succeeded!

//4 seconds later router sends read request
2024-02-13 09:01:42.933 dbug: AdsRouter[0] Send: --> Sending AmsSend Command: <IP_ADDRESS>.1.1:32768 --> <IP_ADDRESS>.1.1:851, Cmd:Read REQ, State:MaskAdsRequest, Err:0, User:14, Bytes:12
2024-02-13 09:01:42.933 info: AdsRouter[0] Send: --> Send AmsSend Command: <IP_ADDRESS>.1.1:32768 --> <IP_ADDRESS>.1.1:851, Cmd:Read REQ, State:MaskAdsRequest, Err:0, User:14, Bytes:12

//router recieves response
2024-02-13 09:01:42.936 dbug: AdsRouter[0] Received: <IP_ADDRESS>.1.1:32768 <-- <IP_ADDRESS>.1.1:851, Cmd: Read RES, State:MaskAdsResponse, Err:0, User:14, Bytes:10 (Sender<IP_ADDRESS>.1.1:851 (Endpoint: [::ffff:<IP_ADDRESS>]:48898), CNT: 1)
2024-02-13 09:01:42.936 info: AdsRouter[0] Received: <IP_ADDRESS>.1.1:32768 <-- <IP_ADDRESS>.1.1:851, Cmd: Read RES, State:MaskAdsResponse, Err:0, User:14, Bytes:10 (Sender:<IP_ADDRESS>.1.1:851 (Endpoint: [::ffff:<IP_ADDRESS>]:48898), Receiver:<IP_ADDRESS>.1.1:32768 (Endpoint: <IP_ADDRESS>:49160), Count:1

//AdsClient receives response
2024-02-13 09:01:42.941 -05:00 [DBG] onConfirmationReadAsync: Addr:<IP_ADDRESS>.1.1:851, InvokeId:14, Result:"NoError", Len:2, Data:CE-00
2024-02-13 09:01:42.941 -05:00 [DBG] RequestAndReceiveSync: InvokeID:'14' succeeded!

The router and client console apps are based on the example code Beckhoff provides, I've attached the program.cs file.
client and router.zip
I've also attached the docker images
docker images.zip
I've tested the same setup with linux containers using the same container host (Win 11).
There is no delay using linux, so I assume the problem is related to using the nat driver as opposed to the bridge driver.

Unfortunately I am not an expert in Docker usage so that I cannot answer why windows containers should behave this way.
For reproducing the issue I miss some relevant information in the attached files or there are some inconsistencies to your description.

I see a router instance not only in the attached router-program.cs, but also in  the client-program.cs. Was that the intention? I cannot match this situation to your overview picture.
What Version of ADS packages is used in your tests?
About the delay, is this appearing with every read or only in the 'takeover' situation?
If its only  in the hot swap, how is the hot swap realized? (Cannot see it in the code files)

Sorry for the delay.

client-program.cs should NOT have the router running,  I have re-uploaded with the router task commented up -  I must have uploaded the wrong file previously
client-program.zip
6.1.197
Occurs with every read even if only one client container is connected.


entityAudit state does not activate

Hi m8,
For some reason the translatePartialLoader in the state entityAudit prevents the entityAudit state from activating without logging an exception whatsoever.
After commenting out the lines the state did load.
            resolve: {
//            	translatePartialLoader: ['$translate', '$translatePartialLoader', function ($translate, $translatePartialLoader) {
//					$translatePartialLoader.addPart('audits');
//					return $translate.refresh();
//            	}]
            }

This behaviour might be caused due to my project not being multi-lingual?

its fixed in master and will be available in the next release, you can comment this out for the mean time


Weatherford - The number of jobs posted on Peviitor isn't the same as the number of jobs returned by the API.

ENVIROMENT: production
URL: https://peviitor.ro/
Browser: Chrome
Device: laptop
OS: Windows 10
STEPS TO REPRODUCE:

Open "https://peviitor.ro/" in the browser.
Type "Weatherford" in the search bar.
Check the number of jobs available for Weatherford.
Run "Weatherford" scraper on "https://dev.laurentiumarian.ro/scraper/based_scraper_py/".
Check the number of jobs displayed.

EXPECTED RESULTS:
The number of jobs posted on "https://peviitor.ro/" and the number of jobs returned by the API should be the same.
ACTUAL RESULT:
The number of jobs posted on Peviitor website is 8 while the number of jobs returned by the API is 9.

I don't think there is any problem!

Retested. Fixed. Closed issue.


we are unable to connect marketplace vscode error

Does this issue occur when all extensions are disabled?: Yes/No
I cant even download extension

VS Code Version:
OS Version:

we are unable to connect marketplace vscode error .  i an dacing this error since last 1yr

/needsMoreInfo but if you are on certain flavours of Linux (Arch, Manjaro) then the issue is that the distribution modifies VS Code to go to Open VSX for its extensions instead of the Microsoft Marketplace, and doing that produces a CORS failure. Try searching on some of these terms for duplicate issues here, or ask on places where you get support for the distro you're running.

/needsMoreInfo but if you are on certain flavours of Linux (Arch, Manjaro) then the issue is that the distribution modifies VS Code to go to Open VSX for its extensions instead of the Microsoft Marketplace, and doing that produces a CORS failure. Try searching on some of these terms for duplicate issues here, or ask on places where you get support for the distro you're running.

That's it. I'm using archlinux oss-code.

Please close this issue.


Add arguments support for SwiftLint

This PR makes sure the SwiftLint portion of https://github.com/samuelmeuli/lint-action/pull/39 can be merged directly so it doesn't need to wait for the rest of the PR being fixed. Thank you @EfficientSetting! 🎉

What’s missing on my other PR? I fixed everything last week...

@EfficientSetting I don't know, I just saw it's not merged but the SwiftLint part wa already approved. If your branch is ready and is merged, this can be closed, of course. 👍

Sorry for my delay in reviewing #39. Let's get @EfficientSetting's PR merged though since he discovered the bug first 🙂


Docs don't show PublishCodeCoverageResults@2 task version

There is a bug in the PublishCodeCoverageResults@1 task where it incorrectly handles zero line coverage. It appears there's a V2 of the task that may not have the issue but the docs only show the @1 version of the task. Why don't the docs show the @2 version of the task?

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

ID: aff16109-cc76-cea4-d41b-3fc9c4e9c534
Version Independent ID: efd08832-ddbc-921a-f682-3ea68ecd27c3
Content: Publish Code Coverage Results task - Azure Pipelines
Content Source: docs/pipelines/tasks/test/publish-code-coverage-results.md
Product: devops
Technology: devops-cicd-tasks
GitHub Login: @shashban
Microsoft Alias: shashban

@tillig I see that task in the open source tasks repo but it does not appear to have ever been released. The v2 task isn't available for use, or it would be in our new task reference which is located here: https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/publish-code-coverage-results-v1?view=azure-pipelines&viewFallbackFrom=azure-devops
The new task reference is autogenerated from the task source and metadata that are published to Azure DevOps Services (and the on-premises versions).
You can file an issue on the open source repo for tasks to see if they plan to release this task, but I think it has been stalled for quite some time. https://github.com/microsoft/azure-pipelines-tasks


Defeating the windmill

This is a first pass at decoupling (and rewriting) the jax-rs web service in challenge-1.
The premise for scaling here is two fold:

horizontal/vertical scaling of databases using AWS databases (mysql in this instance, but applies to any managed db)
horizontal/vertical scaling of the application engine using a serverless framework - AWS Lambda and the serverless deployment framework (https://serverless.com)

My initial attempt was to keep the application as-is in Java, hooking it up to the Serverless event trigger. However, after running into a few blocks (Lambda does not read .war packages, .jar packaging failing, madness descending), I've decided to jump ship and rewrite the thing in Node.
Improvements needed

Load test to prove scaling: so far, I've run 10, 100, 1000 concurrent postman requests on the endpoint. Average response time is stable around 65ms in all cases. This, of course, needs to be scaled up and made reproducible
Automatic DB provision: Creating the database and table(s) using the serverless.yml file. This was in the Dynamo DB tutorial but somehow for RDS it not as simple...
Credentials management for DB: no one likes unencrypted credentials lying around in source control...
Containerization: Another way of scaling this would be inside a Docker container as part of a Kubernetes or Marathon cluster. This is something I'm hoping to try when I get back end of March
Identity management: hooking the service up to Cognito or a custom identity management layer
CI/CD: versioning artifacts, versioning the API, build server and so on

In conclusion, please consider this an initial effort, before I head off into the jungles of Siem Reap.
Happy reviewing!
Eli

Good start....can we see more ? :)
I also believe some part of this code are exposed to an SQL injection attach...maybe prove me wrong or fix it ? :)

Tested for SQL injection:

GET /reminders?name=;DROP TABLE reminders
GET /reminders?name=asd OR 1=1

POST /reminders/213
{
"name": "; DROP TABLE reminders",
"--; DROP TABLE reminders": "asd"
}

They are not successful. This is because all of the queries use `mysql.escape` and `mysql.escapeId` either explicitly (when composing from request parameters) or implicitly (when passing values to replace '?')

Also, I'm having a fascinating read about about db connection management and serverless design. Since there is no state, there is no (simple, obvious) way to reuse an open connection. In AWS specifically, the VM that runs the lambda does in fact stay alive for 300 seconds [citation needed], so using a connection pool is not a bad idea. Anecdotally, with 1000 concurrent requests, # of connections did not exceed ~8. So much learning :)

First load test complete: 20 requests per second for 60 seconds
All virtual users finished
Summary report @ 13:59:08(-0400) 2018-03-26
  Scenarios launched:  1200
  Scenarios completed: 1200
  Requests completed:  1200
  RPS sent: 19.69
  Request latency:
    min: 80.2
    max: 11081.3
    median: 98
    p95: 147.7
    p99: 1416.7
  Scenario counts:
    0: 1200 (100%)
  Codes:
    200: 1200

Looks like I spoke too soon. A test with 15000 users has hit the DB connection limit:
Error: ER_CON_COUNT_ERROR: Too many connections
Looks like I'll have to open and close the connection each query

Turns out my machine couldn't open 15,000 connections on its own anyways....but the connection issue is now fixed. This is the highest RPS I've tested so far, and the results are not bad for free-tier DB and Lambda, without any caching:
Report @ 18:33:33(-0400) 2018-03-26
Scenarios launched:  811
Scenarios completed: 791
Requests completed:  792
RPS sent: 81.1
Request latency:
min: 141.2
max: 1368.4
median: 222.4
p95: 358.1
p99: 497.4
Codes:
200: 388
201: 398
502: 6

We got good news... poke the Galyna :)

Initiating pokage! Thanks for the heads up
On Mon, Apr 9, 2018, 12:47 PM Bruno Morel<EMAIL_ADDRESS>wrote:

We got good news... poke the Galyna :)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/b-yond-infinite-network/amaze-us/pull/2#issuecomment-379818259,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGSt2ADR0IUz96L2Vg6BfkFPV-0JSimjks5tm5ClgaJpZM4SbPuA
.


Refactor Git module to use a Storer

Right now, the git module can only be tested via actually cloning stuff.
I would like to avoid that, but my current PR is convoluted enough. :) I'm going to do that refactoring with in the confines of this ticket.

What's bad about cloning stuff? 😄
I mean, that's the real use-case and we can easily test it. What are the disadvantages in your opinion? 🤗

Generally it's frowned upon if you poll github a lot and Gods know they need a break. :-) we need end to end tests don't get me wrong. One or more but this scenario needs a push. Which means everytime someone runs this it will pull and push into a repo which is bad. We could mske this test with a switch to only run in Ci but better would be if all it would do is do it in memory.

This is just like the store needs to be an interface in order to test stuff at the unit level instead of using a really bolt db. And have some end to end tests that actually use bolt db. :-)

Well. I know from other big projects they are also pulling something (docker images, files from servers etc.) and a git clone is basically the same. We are downloading files from a server. I don't know if github has some kind of DDoS protection which will, at some point, lock you out but I'm pretty sure you will never hit that locally. 😄
Why do we need a push test? We do not provide any push functionality.

Ah so that I can test the pull on repo change functionality of the update pipeline on code change feature. :-)
Well, just because other people do it doesn't mean Gaia has to do it. :-)
Generally I think that a unit test is a test where your have full control over all the moving parts. An integration test is where you have a third party of any kind. Generally what I don't want is a test failing because github happens to not be available or throttling us. An integration test is fine frol failing that way. But not a unit test. A unit test should run without Internet in the extremes.

Alright, good point. Didn't thought about the pull on repo change test. 😄

Fair enough, it's a new feature after all. :) 👍 Thanks. :)

This might not be an issue any longer as I found a way to nicely get around the github interface. I can do the same with git as well.

In test:
https://github.com/gaia-pipeline/gaia/blob/master/pipeline/git_test.go#L252
Using this pattern to mock out a certain part of an API by wrapping it into an interface:
https://github.com/gaia-pipeline/gaia/blob/master/pipeline/git.go#L168-L194


Idea - Measure power using smartplug attributes. Need help from electrician

Thank you for a fantastic and innovative integration.
I'm putting together a submission of data measurements from a selection of Lidl/Livarno smartbulbs  (GU10s, LED strip, ES bulb) and Nanoleaf hexagons.
Since LED bulbs draw such a low current it is recommended to wire several units up at the same time to get a measurable power reading when the bulbs are dimmed low. This means realistically you need a number of bulbs to use the measuring tool.
This can be awkward and inconvenient.
I have used a Smartthings plug and I noticed that while the state equals the current wattage (21W in the example below) the attributes also have useful data.  This is measuring an LED light strip at full white brightness and the 21W reading (almost) matches the box rating which says 22W max.

Assuming that 'current' reading in the screenshot is mA (i.e. 1.57A) then the P = VI ( watts = volts x amperes) still doesn't work as that would be 238 x 1.57 = 373W which is higher than the real value of 21W.
Trying to find more info I looked in deconz and saw that the 'Current' value is actually 'RMS Current'.

Note: I'm out of my depth here. I need someone with proper electrical knowledge to help and I am probably wrong.
I looked up RMS Current and found this formula:
Current = RMS Current  x  sqrt(2)
= 1.57 x 1.41
= 2.2A
But that making the Power (W) calculation  of 524W even farther from the real value. So I am even more lost.
Basically the plug itself is working out the correct wattage using (I'm assuming) the voltage and current readings.  I've no idea how they get 21W from the 1570  and 238  measurements
Why bother with this?
If someone can explain the formula it means I can run the measure tests on a single bulb/device.
I recently ran the measure test on a Lidl GU10 bulb. I had to use a lighting circuit with 6 bulbs to get a measurable reading - the tests took about 5 days to complete (for numerous reasons I won't go into here).  It's not practical to essentially have a lighting setup (kitchen in my case) out of action for 5 days while the tests run. I wanted to see could we use the current and voltage attributes to get the power consumption when the light is very dim.
For example here is another screenshot with the same LED strip but set on the lowest possible dim setting.

We see that the state is registering as 0W which is not true. I just assume its rounding down.
We can see there are still measurements for Voltage and Current. I'm hoping we can work out the 'real' power consumption which I assume its in the 0.1 - 0.4A range

I looked up RMS Current and found this formula:
Current = RMS Current x sqrt(2)
= 1.57 x 1.41
= 2.2A

Formula above works only for resistive load, but for LED bulbs and lights it is NOT resistive load at all.

Basically the plug itself is working out the correct wattage using (I'm assuming) the voltage and current readings. I've no idea how they get 21W from the 1570 and 238 measurements

Power isn't calculated from voltage and current readings, it is calculated inside measuring system and it is also exposed, so even exposed current value is improper it does not matter (it is different data output from measuring system).
I think: reported current value can be peak current value (not RMS) so it is useless, but more likely this value is completely wrong.

We see that the state is registering as 0W which is not true. I just assume its rounding down.

For low values it is just filtered out (it is NOT rounding down, it is cut off), it is just technical limitation of  measuring system used inside all smartplugs I've ever seen.

Ok fair enough. Thank you for that info.
So looks like I won't be able to run measurements on a single bulb with my current (pardon the pun) smart plug.
Are there any devices people would recommend for this task?

Thanks for answering @nepozs.
I am using the Shelly Plug S, and I was only experiencing issue with unability to measure 2 lights of 12 on very low power.
More people has contributed using this plug and I am enthousiastic about it.
Also see this discussion where some user was doing some research on different smart plugs, but there is not really a conslusion / recommendation yet.
I also see you mention the Nanoleaf. This is a whole different story however as they can have patterns / different colors etc. So it's not easy to lookup values corresponding to a selected color / brightness in HA. A friend of mine has a couple of them and we want to have a look how to integrate this in powercalc somehow. But need to find the time to do that.
So you can skip that for now for contribution.

Thank you for that @bramstroker
Regarding the lights measurement data - I'll move that to a different issue to avoid going off topic here.


Unit Test initialization Error when unit testing MongoDB Java Driver

From<EMAIL_ADDRESS>on September 03, 2010 14:40:49
What steps will reproduce the problem? 1. Create a class that uses MongoDB Java Driver v2.1
2. Create a unit test for class that uses MongoDB
3. Run unit test What is the expected output? What do you see instead? Test execution successful What version of the product are you using? On what operating system? Linux, powermock-mockito-1.4 Please provide any additional information below. I've attached an eclipse project that I was able to reproduce the issue with.
Stack Trace.
java.lang.LinkageError: loader constraint violation: loader (instance of org/powermock/core/classloader/MockClassLoader) previously initiated loading for a different type with name "javax/management/MBeanServer"
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.lang.ClassLoader.defineClass(ClassLoader.java:466)
at org.powermock.core.classloader.MockClassLoader.loadUnmockedClass(MockClassLoader.java:190)
at org.powermock.core.classloader.MockClassLoader.loadModifiedClass(MockClassLoader.java:148)
at org.powermock.core.classloader.DeferSupportingClassLoader.loadClass(DeferSupportingClassLoader.java:65)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at com.mongodb.DBPortPool$Holder.get(DBPortPool.java:58)
at com.mongodb.DBTCPConnector._set(DBTCPConnector.java:458)
at com.mongodb.DBTCPConnector.(DBTCPConnector.java:46)
at com.mongodb.Mongo.(Mongo.java:137)
at com.mongodb.Mongo.(Mongo.java:123)
at com.mongodb.Mongo.(Mongo.java:113)
Attachment: PowerMockError.tar.gz
Original issue: http://code.google.com/p/powermock/issues/detail?id=277

From<EMAIL_ADDRESS>on September 12, 2010 07:51:19
I've seen several reports of this kind lately. It could be a Javassist issue actually and in that case we'll have to wait until the next version of Javassist to be released and hope that they've fixed it. It would be of great interest for us if you could try to run the code in PowerMock 1.3.9 with Javassist 3.13 and see if it makes any difference? It could also be a problem that MongoDB instantiates classes using reflection with a different classloader. You could try to make use of the @PowerMockIgnore annotation to see if you can get around it. For example try using @PowerMockIgnore("javax.management.MBeanServer").
Status: Accepted

From<EMAIL_ADDRESS>on October 07, 2010 20:09:45
should some one familiar with powermock and Javassist fix it? We all bocked at this issue.
Thank you very much.

From<EMAIL_ADDRESS>on October 07, 2010 22:42:55
Hmm I think I was a bit fast blaming Javassist. I think it must be an error in the MockClassloader. Could you try using @PowerMockIgnore("javax.management.*")?

From<EMAIL_ADDRESS>on October 28, 2010 10:42:15
I have found the same problem and [@PowerMockIgnore("javax.management.*")] solves it.

From<EMAIL_ADDRESS>on October 28, 2010 11:40:50
Thanks a lot for sharing!

From<EMAIL_ADDRESS>on November 14, 2010 23:48:28
Status: WontFix

From<EMAIL_ADDRESS>on September 27, 2012 21:49:06
Thanks, my problem is solved with @PowerMockIgnore("javax.management.*")

From<EMAIL_ADDRESS>on November 01, 2012 07:11:30
Yeah.  I also found that this worked to fix the same issue: @PowerMockIgnore("javax.management.*").
Although note that in Scala, the syntax is slightly different for all of the class annotations:
@RunWith(classOf[PowerMockRunner])
@PrepareForTest(Array(classOf[Broker]))
@PowerMockIgnore(Array("javax.management.*"))

From<EMAIL_ADDRESS>on January 13, 2015 16:47:47
I have a similar problem. The difference for me is that it is causing an error in a logback-classic class. The result is that my tests still run and pass, but errors are reported.
@PowerMockIgnore("javax.management.*") with my other test class annotations fixes it for me too!
I'll attach my error log in case it is helpful for anyone here.
Attachment: Logback-PowerMock-LinkageError.log.txt

From<EMAIL_ADDRESS>on January 13, 2015 17:06:07
Is my error, from https://code.google.com/p/powermock/issues/detail?id=277#c9 A separate issue? Should I make a new ticket for it?


📋 [TASK] - Implement Project Infrastructure in New Specifications Repository

Parent Feature
#782
Task Description
As an AaC Developer, I want my project infrastructure implemented within my new repository, so that I provide a consistent and quality plugin.
Acceptance Criteria
As an AaC Developer, I want my project infrastructure implemented within the new aac-spec repository, so that I provide a consistent and quality plugin.
AC:

[x] Include pertinent pieces from /.github directory.

[x] Include pertinent workflows for pipelines.
[x] Include pertinent issue templates for requests and tracking.

[x] Update to reference new repository housing location.

[x] Include pertinent documentation requirements and configurations.

[x] Ensure from the /docs directory that the necessary documentation configurations and structure were brought over.

[x] Include pertinent project requirements and configurations.

[x] Root level configuration and infrastructure pieces, i.e. setup.py.

[ ] Configure repository for proper permissions.

[ ] Match configuration of core AaC Repo.

Unresolved questions
No response

I do not have access to the settings tab for the repo on github, so I am unable to complete the Configure repository for proper permissions portion of the this task.

Updated the settings around PRs to match what I am able to set within core AaC.


Starter templates that rely on fontawesome produce errors so they can't be tried out...

Unable to try out this corporate template and the blog template because of an error installing the fortawesome dependency.
  npx create-strapi-starter my-project next-blog
  npx create-strapi-starter my-project next-corporate

Gives:

Error: Couldn't find package "<EMAIL_ADDRESS>required by "<EMAIL_ADDRESS>on the "npm" registry.
error Couldn't find package "<EMAIL_ADDRESS>required by "<EMAIL_ADDRESS>on the "npm" registry.
Error: Couldn't find package "<EMAIL_ADDRESS>required by "<EMAIL_ADDRESS>on the "npm" registry.
Error: Couldn't find package "<EMAIL_ADDRESS>required by "<EMAIL_ADDRESS>on the "npm" registry.
Error: Couldn't find package "<EMAIL_ADDRESS>required by "<EMAIL_ADDRESS>on the "npm" registry.
Error: Couldn't find package "<EMAIL_ADDRESS>required by "<EMAIL_ADDRESS>on the "npm" registry.
Error: Couldn't find package "<EMAIL_ADDRESS>required by "<EMAIL_ADDRESS>on the "npm" registry.
Error: Couldn't find package "<EMAIL_ADDRESS>required by "<EMAIL_ADDRESS>on the "npm" registry.
Error: Couldn't find package "<EMAIL_ADDRESS>required by "<EMAIL_ADDRESS>on the "npm" registry.
Error: Couldn't find package "<EMAIL_ADDRESS>required by "<EMAIL_ADDRESS>on the "npm" registry
Error: Couldn't find package "<EMAIL_ADDRESS>required by "<EMAIL_ADDRESS>on the "npm" registry.
Error: Couldn't find package "<EMAIL_ADDRESS>required by "<EMAIL_ADDRESS>on the "npm" registry.

The error seems to be because those packages were deprecated:
https://www.npmjs.com/package/@fortawesome/fontawesome-free-brands
https://github.com/FortAwesome/Font-Awesome/blob/master/UPGRADING.md#50x-to-510

My bad. Apparently if you already used the pro license on your system you will get this error. Solution is to:
npm config delete @fortawesome:registry
https://github.com/strapi/strapi/issues/12179#issuecomment-1010779472


feat: use new input component everywhere [DRAFT]

This PR resolves []
Description
This PR adds the new input component everywhere in Eigen.
TODO: Add masking for phone numbers, it was never working properly and this PR exposed it to me.
Please note: Once the Input changes are approved - I will update everything to use Input instead of Input2. I am doing this intermediate step because I couldn't find any better way to test both out gradually.
Related Palette changes https://github.com/artsy/palette-mobile/pull/207

PR Checklist

[x] I have tested my changes on iOS and Android.
[x] I hid my changes behind a feature flag, or they don't need one.
[x] I have included screenshots or videos, or I have not changed the UI.
[x] I have added tests, or my changes don't require any.
[x] I added an app state migration, or my changes do not require one.
[x] I have documented any follow-up work that this PR will require, or it does not require any.
[x] I have added a changelog entry below, or my changes do not require one.

To the reviewers 👀

[ ] I would like at least one of the reviewers to run this PR on the simulator or device.

Changelog updates
Changelog updates

Cross-platform user-facing changes

use new input component everywhere  - mounir

iOS user-facing changes

Android user-facing changes

Dev changes

Need help with something? Have a look at our docs, or get in touch with us.

This PR contains the following changes:

Cross-platform user-facing changes (use new input component everywhere  - mounir)

  Generated by :no_entry_sign: dangerJS against eb6291b31666a94c97980779b0394f6dd967f518

Hey @olerichter00 Good point, I think the main issue here was that the changes need to be reflected everywhere if we want to make sure that we have the same input design across the app.
My rollout strategy with this will be different though, I am planning an out of schedule QA session with Applause today in order to make sure everything is alright, meanwhile, this PR will keep pointing to a canary build from palette-mobile and won't be merged unless everything has been approved.
About the errors you had, they should be gone now - maybe you pulled at a time when the PR wasn't working. I will mark the PR as ready for review although I didn't make much changes since you reviewed it other than renaming back to the Input (instead of Input2)


Will work with DatabaseViews

We would like to see views from the database as a grid (also Databaseviews…)
We generate the code with the Serenity Code Generator and the Grid is Empty…
What are we doing wrong? With tables from the database everything works perfectly!!!
Can you give me a tip or help us.
Thank you for your quick response

Set your identity field in Row.cs

To add some detail to what Volkan has said,

Go into the xxxxxRow.cs file… you will have an error in the lines like below
IIdField IIdRow.IdField
{
get { return Fields.; }
}
Modify so that Fields.xxxxxx;   defines your ID field
Go into the xxxxxxGrid.ts file and add the identity refrence to the typescript
protected getIdProperty() { return xxxxxxxxxRow.idProperty; }

Rebuild, should see data now.

Thank you. There was still the entry getIdProperty () in the TypeScript file :-))


chore: align alpine versions in dockerfile

@davosian This is what my comment in the other PR meant, sorry if I wasn't clear.
Your CI seems to fail on the publish btw.

I fixed the failed CI job. A new env variable was missing.


Broken link on yearn.finance/vaults

yearn.finance/vaults
The "learn more" button under "Strategy Rewards" takes you to a broken link: https://docs.yearn.finance/how-to-guides/how-to-contribute-a-yvault-strategy/
The link should be: https://docs.yearn.finance/how-to-guides/how-to-participate-in-a-yvault

commit a048550b5d00b7f2f7aab9743668d90fa5fff33c (HEAD -> develop, origin/develop)
Author: x48<EMAIL_ADDRESS>Date:   Tue Oct 27 18:44:00 2020 -0500

    fix: fix broken link on vaults page


[BUG] TableServiceClient.createTableIfNotExistsWithResponse() with wrong error handling and response code

Describe the bug
I can't use the this function. The response is a really confusing.
I want to call this function and write some data into the new created table.
It only retruns a simple reponse code.
For 409, it can be "The table specified already exists" or "The specified table is being deleted." but the infomation only in log! I can't decide what to do with the simple 409. It is much different for the caller.
Besides,  it throw an InterruptedException when it hit an timeout issue. The meaningful error message and exception was hided!
To Reproduce
Steps to reproduce the behavior:
class java.lang.InterruptedException cannot be cast to class java.lang.RuntimeException (java.lang.InterruptedException and java.lang.RuntimeException are in module java.base of loader 'bootstrap')
Code Snippet
Add the code snippet that causes the issue.
Expected behavior
A clear and concise description of what you expected to happen.
the function createTableIfNotExistsWithResponse should have an attribute to let the caller decide to just use the table or create another one.  it should throw valid exception.
Screenshots
If applicable, add screenshots to help explain your problem.
Setup (please complete the following information):

OS: Windows 11
IDE: IntelliJ
Library/Libraries: [e.g. com.azure:azure-core:1.16.0 (groupId:artifactId:version)]
Java version: 11
App Server/Environment: [e.g. Tomcat, WildFly, Azure Function, Apache Spark, Databricks, IDE plugin or anything special]
Frameworks: [e.g. Spring Boot, Micronaut, Quarkus, etc]

If you suspect a dependency version mismatch (e.g. you see NoClassDefFoundError, NoSuchMethodError or similar), please check out Troubleshoot dependency version conflict article first. If it doesn't provide solution for the problem, please provide:

verbose dependency tree (mvn dependency:tree -Dverbose)
exception message, full stack trace, and any available logs

Additional context
Add any other context about the problem here.
Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

[ ] Bug Description Added
[ ] Repro Steps Added
[ ] Setup information Added

blow function very easily to hit InterruptedException after upgrading from 12.3.19 to 12.3.20
        ListTablesOptions options = new ListTablesOptions();
        options.setFilter(String.format("TableName" + FilterConstants.EQ + "'%s'", tableName));
        return tableServiceClient.listTables(options, Duration.ofSeconds(60), Context.NONE)
            .stream().anyMatch(tableItem -> tableItem.getName().equals(tableName));

Can you put thee.detailMessage into the null place?

@jairmyree could you take a look at this issue

Hello @DragonLi-Mi. Thank you for reaching out. After reviewing your issue I'd like to point out that the documentation does not guarantee any particular behavior as far as the handling of 409 status-code responses. With that being said, I will take your suggestions about changing the response value for 409 status-codes to the greater Tables team for feedback. Thank you very much.

@DragonLi-Mi Thank you for identifying the potential confusion with the 409-status-code swallowing for createTableIfNotExists. For clarity, I've split it off into its own issue which you can track here: https://github.com/Azure/azure-sdk-for-java/issues/39389
As for the response value, to remain aligned with the SDKs design, we will continue to swallow the 409-status-code responses for instances where the table already exists.
Thank you very much.


'next' and 'prev' skip a page when using href-option

When clicking the next- or prev-button combined with the use of the custom href-option, the {{number}} in the href will skip a page.
When beginning on page 1, clicking on 'next' will have these effects:

page 2 in the pager is highlighted as the current (expected)
but the browser URL will have changed to #page-3 (or ?page=3, whatever actual href-option was configured) (unexpected)

Same goes for the 'prev' button.
Example with debug logging in JS Fiddle: http://jsfiddle.net/SuUZ6/

should work fine since 1.0.6

...still had this issue with 1.0.7. Thanks to @gvanderploeg, your idea helped us a lot!

I'm also having the same issue, with 1.0.7...

I'm also having this issue with 1.0.7. Thanks for the suggestion @gvanderploeg.

I am also facing the same issue on 1.0.7

Hi @gvanderploeg , Can you please let me know the fix you did for the above issue

@chaitu234kin , it's more than 5 years ago... I don't know by heart anymore. But according to my comment above, that workaround did it for me.


Uniformize links in LayoutPropTypes docs

The links was a mix of W3Schools, CSS-Tricks and MDN.
Everything is now a MDN link now. Why?

By analyzing the blame information on this pull request, we identified @lacker and @javache to be potential reviewers.

@facebook-github-bot shipit

Thanks for importing. If you are an FB employee go to Phabricator to review internal test results.


Defining FieldLevel Access rules on more than one GlobalConfig results in 500 errors when hitting access endpoint

Link to reproduction
/api/access
Describe the Bug
This is probably related to https://github.com/payloadcms/payload/commit/ad42d541b342ed56463b81cee6d6307df6f06d7f
Hi there,
we ran into seemingly random 500 errors being thrown when hitting /api/access in multiple of our projects. After a lot of debugging I was able to reproduce the issue with a (really) minimal example detailed below.
When you define field level access rules on more than one GlobalConfig this results in some consistency error regarding database transactions. That's really everything required to reproduce the issue. (MongoDB Transactions must be enabled.)
i.E.
MongoServerError: Given transaction number 28 does not match any in-progress transactions. The active transaction number is 27
...
MongoServerError: Given transaction number 36 does not match any in-progress transactions. The active transaction number is 35

This is a minimal example which is sufficient to reproduce the error:
// payload.config.ts
import { GlobalConfig } from "payload/types";

export const AdminConfig: GlobalConfig = {
  slug: "admin-config",
  fields: [
    {
      name: "feature1",
      type: "checkbox",
      access: {
        read: () => true,
      },
    },
  ],
};

export const Settings: GlobalConfig = {
  slug: "settings",
  fields: [
    {
      name: "option1",
      type: "checkbox",
      access: {
        read: () => true,
      },
    },
  ],
};
...
 globals: [Settings, AdminConfig],
...

Thanks for the help on this!
-Tobi
To Reproduce
npx create-payload-app@latest

  Welcome to Payload. Let's create a project!

✔ Project name? … access-endpoint-bug
✔ Choose project template › blank
✔ Select a database › MongoDB
✔ Enter MongoDB connection string … mongodb://<IP_ADDRESS>/access-endpoint-bug

connect to mongo server with transactions enabled or use this docker-compose.yml
version: "3"

services:
  payload:
    image: node:18-alpine
    ports:
      - "3000:3000"
    volumes:
      - .:/home/node/app
      - node_modules:/home/node/app/node_modules
    working_dir: /home/node/app/
    command: sh -c "yarn install && yarn dev"
    depends_on:
      - mongo
    environment:
      DATABASE_URI: mongodb://mongo/access-endpoint-bug?replicaSet=rs0
    env_file:
      - .env

  mongo:
    image: mongo:6.0
    command: ["--replSet", "rs0", "--bind_ip_all", "--port", "27017"]
    ports:
      - 27017:27017
    extra_hosts:
      - "host.docker.internal:host-gateway"
    healthcheck:
      test: echo "try { rs.status() } catch (err) { rs.initiate({_id:'rs0',members:[{_id:0,host:'host.docker.internal:27017'}]}) }" | mongosh --port 27017 --quiet
      interval: 5s
      timeout: 30s
      start_period: 0s
      start_interval: 1s
      retries: 30
    volumes:
      - "mongo_data:/data/db"
      - "mongo_config:/data/configdb"

volumes:
  data:
  node_modules:
  mongo_data:
  mongo_config:

import { GlobalConfig } from "payload/types";

export const AdminConfig: GlobalConfig = {
  slug: "admin-config",
  fields: [
    {
      name: "feature1",
      type: "checkbox",
      access: {
        read: () => true,
      },
    },
  ],
};

export const Settings: GlobalConfig = {
  slug: "settings",
  fields: [
    {
      name: "option1",
      type: "checkbox",
      access: {
        read: () => true,
      },
    },
  ],
};

create first user
login
hit /api/access a couple of times

These errors will appear in console and it will cause 500 toast notifications in the admin UI.
payload-1  | [08:54:09] ERROR (payload): MongoServerError: Given transaction number 22 does not match any in-progress transactions. The active transaction number is 21
payload-1  |     at Connection.onMessage (/home/node/app/node_modules/mongodb/src/cmap/connection.ts:449:20)
payload-1  |     at MessageStream.<anonymous> (/home/node/app/node_modules/mongodb/src/cmap/connection.ts:241:56)
payload-1  |     at MessageStream.emit (node:events:517:28)
payload-1  |     at MessageStream.emit (node:domain:489:12)
payload-1  |     at processIncomingData (/home/node/app/node_modules/mongodb/src/cmap/message_stream.ts:188:12)
payload-1  |     at MessageStream._write (/home/node/app/node_modules/mongodb/src/cmap/message_stream.ts:69:5)
payload-1  |     at writeOrBuffer (node:internal/streams/writable:392:12)
payload-1  |     at _write (node:internal/streams/writable:333:10)
payload-1  |     at MessageStream.Writable.write (node:internal/streams/writable:337:10)
payload-1  |     at Socket.ondata (node:internal/streams/readable:809:22)

Payload Version
2.25.0
Adapters and Plugins
No response

Hey @1b0t we've got this on our radar. It's been assigned internally and we'll report back with what we find out. Appreciate the detail here. Thanks!

@1b0t how are you enabling MongoDB transactions without using the docker-compose file?

@JessChowdhury, the docs indicate that transactions in MongoDB require a replica set, which isn't easy to set up locally. That's why we're using docker-compose. However, if you connect to a managed MongoDB cluster like Mongo Atlas, transactions should be available out of the box.
I've pushed my sample project here: https://github.com/1b0t/payload-issue-7482

@1b0t not sure what I am missing, but I am unable to spin it up with your docker file.
I get:
ERROR (payload): Error: cannot connect to MongoDB. Details: connect ECONNREFUSED <IP_ADDRESS>:27017

@JarrodMFlesch is it possible that you have a MONGODB_URI specified in an .env file? That would overrides the DATABASE_URI defined in the docker-compose.yml here? Otherwise i can't think of a reason why this would resolve to <IP_ADDRESS>.
For this setup the mongo uri must be mongodb://mongo/access-endpoint-bug?replicaSet=rs0.


Pytorch 2.0 Request for Nvidia Tesla K40C

Hi @nelson-liu
Can you provide  Pytorch 2.0-2.2 for Nvidia Tesla K40C?
We are looking forward to it!
Embracing 2024 with the Excitement of PyTorch 2.0: A Leap into the Future of AI and Deep Learning)
Thank you so much!!!

Hi @umitkacar , just a heads up that I haven't had a chance to look into building PyTorch 2.0 binaries / if there'd be any major changes for the K40s. I'm pretty busy over the next few months, and probably won't have too much bandwidth to do so.


payload: Sometimes it drops title of current state

Expected Behavior
Once written, title or anything else should always preserve
Actual Behavior
Sometimes title mysteriously disappears
Steps to Reproduce
Can't
Context
Seems like some bug in useOutpostState hook, it's a mess, we should refactor it

Adding message makes title disappears!


CWMS-DATA/RATINGS defaults to JSON - Gives ORA-31011 XML Parse Failed

Change
cwms-data/ratings
to default to XML for now. I know the pending fixes for the data types might fix this but thought I would mention it.
If you do this query,
curl -X 'GET' \
  'https://cwms-data.usace.army.mil/cwms-data/ratings?name=Chester-Mississippi.Stage%3BFlow.USGS.Production&office=MVS' \
  -H 'accept: application/json'

You get this
{
  "ratings": {
    "query-info": {
      "time-of-query": "2024-06-14T13:51:40Z",
      "process-query": "PT7.774S",
      "format-output": "PT0S",
      "requested-format": "JSON",
      "requested-office": "MVS",
      "requested-start-time": "2024-06-13T13:51:40Z",
      "requested-end-time": "2024-06-14T13:51:40Z",
      "requested-items": [
        {
          "name": "Chester-Mississippi.Stage;Flow.USGS.Production",
          "unit": "NATIVE",
          "datum": "NATIVE"
        }
      ],
      "templates-retrieved": 1,
      "total-specifications-retrieved": 1,
      "unique-specifications-retrieved": 1,
      "total-ratings-retrieved": 1,
      "unique-ratings-retrieved": 1
    },
    "error": "[Chester-Mississippi.Stage;Flow.USGS.Production] ORA-31011: XML parsing failed"
  }
}

Knowing the DB returns XML directly to CDA it might be worth returning the types completely from the swagger docs at least.
Setting the format to xml returns the expected results

@RyanM-RMA @rma-rripken Charles has a point here. For this particular end point XML should be the default as it is the native format of our ratings and thus the least risk of error by default for retrieval.

There is already an issue for this.  https://github.com/USACE/cwms-data-api/issues/639
That url goes to RatingController.getAll.  Looking at that method - it only pays attention to the format arg - the Controller does nothing with the accept header.
We can easily make it default to xml but...have you looked at the xml ?   Its built by pl/sql and the  element is a wall of text.   I think the reason we see those "ORA-31011: XML parsing failed" errors are because the output format is not "standard".
For a different Rating related thing I got exports of a bunch of different ratings to test against.  Not a single one of those files has this style of  element.   All the files I have (that do parse) have a series of  under .

@MikeNeilson @rma-rripken, Peter had me put these tickets on hold for a bit, but I was working on #527 just beforehand.  I have it updated to read the accept header as well as the query param and default goes to JSON.  I can easily update that to XML once I'm back on it.

There is already an issue for this.

In my defense - I submitted the first as a result of testing from CWMSjs
This ticket was made because a user was actively trying to use this and ran into it
Duplicate issue none the less. Wondering if I should make a duplicate tag


Code: Text is larger than text box

Environment:
Android 4.4.4 Chrome v48
iPhone 6 iOS 8.1
iPad iOS 9.2.1 Chrome 48.0, Safari
Steps:
Get Started and Documentation pages - 1.png is attached.

Since this issue isn't in scope of bootique project itself it moved to site repository.


Handle condition going from privileged to non-privileged user in whic…

…h the cwd disables descent.
Fall back to Mitogen's temporary directory. Related to #636.
Allows Mitogen to fallback to a safe temporary directory when become is used and become_user cannot use the cwd. For example, fixes the following code assuming directory of playbook_dir is owned by root with permission 0700.
- hosts: localhost
  gather_facts: no
  tasks:
    - stat: path="{{ playbook_dir }}"
    - command: cd {{ playbook_dir | quote }}
    - command: sudo -u nobody cd {{ playbook_dir | quote }}
      ignore_errors: True
      args:
        warn: False
    - stat: path="{{ playbook_dir }}"
      become: True
      become_user: nobody

Previously, os.chdir fails:
The full traceback is:
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/ansible/executor/task_executor.py", line 147, in run
    res = self._execute()
  File "/usr/lib/python3.6/site-packages/ansible/executor/task_executor.py", line 665, in _execute
    result = self._handler.run(task_vars=variables)
  File "/root/mitogen/build/lib/ansible_mitogen/mixins.py", line 142, in run
    return super(ActionModuleMixin, self).run(tmp, task_vars)
  File "/usr/lib/python3.6/site-packages/ansible/plugins/action/normal.py", line 47, in run
    result = merge_hash(result, self._execute_module(task_vars=task_vars, wrap_async=wrap_async))
  File "/root/mitogen/build/lib/ansible_mitogen/mixins.py", line 392, in _execute_module
    timeout_secs=self.get_task_timeout_secs(),
  File "/root/mitogen/build/lib/ansible_mitogen/planner.py", line 599, in invoke
    kwargs=planner.get_kwargs(),
  File "/root/mitogen/build/lib/ansible_mitogen/connection.py", line 451, in call
    return self._rethrow(recv)
  File "/root/mitogen/build/lib/ansible_mitogen/connection.py", line 437, in _rethrow
    return recv.get().unpickle()
  File "/root/mitogen/build/lib/mitogen/core.py", line 963, in unpickle
    raise obj
mitogen.core.CallError: builtins.PermissionError: [Errno 13] Permission denied: '/usr/local/apnscp/resources/playbooks'
  File "<stdin>", line 3676, in _dispatch_one
  File "master:/root/mitogen/build/lib/ansible_mitogen/target.py", line 422, in run_module
    return impl.run()
  File "master:/root/mitogen/build/lib/ansible_mitogen/runner.py", line 440, in run
    self.setup()
  File "master:/root/mitogen/build/lib/ansible_mitogen/runner.py", line 851, in setup
    super(NewStyleRunner, self).setup()
  File "master:/root/mitogen/build/lib/ansible_mitogen/runner.py", line 623, in setup
    super(ProgramRunner, self).setup()
  File "master:/root/mitogen/build/lib/ansible_mitogen/runner.py", line 374, in setup
    self._setup_cwd()
  File "master:/root/mitogen/build/lib/ansible_mitogen/runner.py", line 384, in _setup_cwd
    os.chdir(self.cwd)

fatal: [localhost]: FAILED! =>
  msg: Unexpected failure during module execution.
  stdout: ''

With this change it succeeds falling back to /var/tmp restoring normal Ansible operation.
The full traceback is:
  File "master:/usr/lib/python3.6/site-packages/ansible/modules/files/stat.py", line 464, in main
fatal: [localhost]: FAILED! => changed=false
  invocation:
    module_args:
      checksum_algorithm: sha1
      follow: false
      get_attributes: true
      get_checksum: true
      get_md5: false
      get_mime: true
      path: /usr/local/apnscp/resources/playbooks
  msg: Permission denied

Debug log from the task.
[mux  3057890] 14:13:52.493340 D mitogen.[fork.3058008]: Parent is context 4 (parent); my ID is 1006
[mux  3057890] 14:13:52.493396 D mitogen.[fork.3058008]: pid:3058008 ppid:3057993 uid:65534/65534, gid:65534/65534 host:'c8-test'
[mux  3057890] 14:13:52.493452 D mitogen.[fork.3058008]: Recovered sys.executable: '/usr/bin/python3.6'
[mux  3057890] 14:13:52.498076 D mitogen.service.[local.3057927.sudo.nobody]: PushFileService().store_and_forward('/usr/lib/python3.6/site-packages/ansible/modules/files/stat.py', [blob: 19038 bytes], Context(4, 'sudo.nobody')) 'mitogen.Pool.5940.0'
[mux  3057890] 14:13:52.504938 D mitogen.service.[local.3057927.sudo.nobody]: Pool(5940, size=2, th='MainThread'): initialized
[mux  3057890] 14:13:52.505143 D mitogen.[local.3057927.sudo.nobody]: Dispatcher: dispatching ('c8-test-3057968-7f5a555b4b80-77a7276d47', 'ansible_mitogen.target', None, 'run_module', (), Kwargs({'kwargs': {'runner_name': 'NewStyleRunner', 'module': 'stat', 'path': '/usr/lib/python3.6/site-packages/ansible/modules/files/stat.py', 'json_args': '{"path": "/usr/local/apnscp/resources/playbooks", "_ansible_check_mode": false, "_ansible_no_log": false, "_ansible_debug": false, "_ansible_diff": false, "_ansible_verbosity": 3, "_ansible_version": "2.9.17", "_ansible_module_name": "stat", "_ansible_syslog_facility": "LOG_USER", "_ansible_selinux_special_fs": ["fuse", "nfs", "vboxsf", "ramfs", "9p", "vfat"], "_ansible_string_conversion_action": "warn", "_ansible_socket": null, "_ansible_shell_executable": "/bin/sh", "_ansible_keep_remote_files": false, "_ansible_tmpdir": null, "_ansible_remote_tmp": "/var/tmp"}', 'env': {}, 'interpreter_fragment': None, 'is_python': None, 'module_map': {'builtin': ['ansible.module_utils._text', 'ansible.module_utils.basic', 'ansible.module_utils.common', 'ansible.module_utils.common._collections_compat', 'ansible.module_utils.common._json_compat', 'ansible.module_utils.common._utils', 'ansible.module_utils.common.collections', 'ansible.module_utils.common.file', 'ansible.module_utils.common.parameters', 'ansible.module_utils.common.process', 'ansible.module_utils.common.sys_info', 'ansible.module_utils.common.text', 'ansible.module_utils.common.text.converters', 'ansible.module_utils.common.text.formatters', 'ansible.module_utils.common.validation', 'ansible.module_utils.compat', 'ansible.module_utils.compat._selectors2', 'ansible.module_utils.compat.selectors', 'ansible.module_utils.distro', 'ansible.module_utils.distro._distro', 'ansible.module_utils.parsing', 'ansible.module_utils.parsing.convert_bool', 'ansible.module_utils.pycompat24', 'ansible.module_utils.six'], 'custom': []}, 'py_module_name': 'ansible.modules.files.stat', 'good_temp_dir': '/var/tmp', 'cwd': '/usr/local/apnscp/resources/playbooks', 'extra_env': {}, 'emulate_tty': True, 'service_context': Context(0, None)}}))
[mux  3057890] 14:13:52.505239 D ansible_mitogen.runner.[local.3057927.sudo.nobody]: <ansible_mitogen.runner.NewStyleRunner object at 0x7f41cc4d5a58>: could not CHDIR to '/usr/local/apnscp/resources/playbooks' fallback to '/var/tmp'

I believe a test case wouldn't hurt; however, I'm not terribly great with Python and wouldn't know where to begin with creating a non-privileged user or skipping the test if "become" is unavailable.

This change looks ok to me, but I'm not sure why we didn't do this to begin with (the so don't even try part of the docstring). Deferring to @dw on this.

This looks harmless and reasonable. "Current working directory" logic has been a bit of a nightmare in the past, but I can't see how this would break any situation that wasn't already broken (and is fixed by the chdir to tmpdir instead).

What's the status here?  I'm starting to run into this issue as well.

Ping?  Just hit this again.  This most recent bug that toggled the os.chdir() behavior was #591 so we want to make sure that still works with this.


Quick start environment vars in description don't match what user fills in

In the quick-start:

Fixed in the latest commit.
Thank you.


Added deletion modal in account page

This PR replaces the PopConfirm shown when a key is going to be deleted with a bigger modal.

/deploy-staging

/merge

/merge


Authentication with Google: not matching redirect URL

I was trying to perform a login with Google Service.
Hereby the executed code

let provider = Provider.Google(clientID: "$(the_client_id)", clientSecret: "$(the_client_secret)", redirectURL: "$(bundle_identifier):/urn:ietf:wg:oauth:2.0:oob")

provider.scopes = ["https://www.googleapis.com/auth/analytics.readonly"]

provider.authorize(self) { (result) in
    switch result {
    case .Success(let token):
        print(token)
    case .Failure(let error):
        print(error)
}

When the authorisation is granted in the Safari View Controller the redirect URL gets triggered with following format:
$(bundle_identifier):/urn:ietf:wg:oauth:2.0:oob?code=$(the_authorization_code)

This cause an issue for when the library checks if the redirect URL use during the initialisation of the Provider matches the received redirect URL from the AppDelegate.
I've tried other combination of redirect URL but that's the redirect URL format that the Google guide advocates.
Did anyone experienced this when trying the built in Google Provider?
I think an easy fix would be to match the retrieved URL by removing and GET parameter from the URL but before open a new PR I'd like to receive some feedback about this.

redirectURL: "$(bundle_identifier):/urn:ietf:wg:oauth:2.0:oob")
$(bundle_identifier):/urn:ietf:wg:oauth:2.0:oob?code=$(the_authorization_code)
They look like matching to me. What's the issue?

I think an easy fix would be to match the retrieved URL by removing and GET parameter from the URL

Removing what?

Removing what?

The ?code=$(the_authorization_code) at the end of the URL which makes it different from the redirect URL used to initialise the provider.

We need the code param. https://github.com/delba/SwiftyOAuth/blob/master/Source/Provider.swift#L220
This is how OAuth works. Also, the two URL are matching. We don't compare the query string.

We need the code param in order to exchange it for a token. This is how OAuth works.

Sorry I'm not being clear enough.
I do not want to remove that part from the URL for the OAuth authorisation flow but only for checking if it matches the redirect URL used to initialize the provider.
More in detail this code fails:
    func matchingURLs(a: NSURL, _ b: NSURL) -> Bool {
        return (a.scheme, a.host, a.path) == (b.scheme, b.host, b.path)
    }

That's because
print(a.host) returns
 $(bundle_identifier):/urn:ietf:wg:oauth:2.0:oob?code=$(the_authorization_code)

while b.host returns
 $(bundle_identifier):/urn:ietf:wg:oauth:2.0:oob

My idea is to improve to implement an improved getter to retrieve the proper host from the URL.

I don't get the same result.
let url = NSURL(string: "foo://urn:ietf:wg:oauth:2.0:oob")!
print(url.host) // "urn"

let redirect = NSURL(string: "foo://urn:ietf:wg:oauth:2.0:oob?code=abc123")!
print(url.host) // "urn"

Maybe you could change the redirect URL to something else ?

If I try to use // instead of / I get an error in the Google page.
I tried a lot of combinations but only that one is working for me :(

I got nil for both of them when using only one /

Thank you for your feedback.
I'll try again by using the Provider to find out what is causing this behaviour about different host output.
I'll publish the results later in case someone else will have the same issue.

Yes, let me know please :)

Hey @fabiomassimo ,
You might want look at the next branch. Here is how to use it with Google:
let google: Provider = {
    let provider: Provider = .Google(clientID: "***", clientSecret: "***", redirectURL: "http://anything.com/callback")
    provider.useWebView = true
    return provider
}()

Note that you can set the redirectURL to anything you want so it might solve your issue when working with Google.
I tried it with Instagram, Dribbble, Github etc. Let me know if it works with Google and I'll be happy to merge it in master.
Thanks!

Unfortunately with any callback URL I get back following error:
Invalid parameter value for redirect_uri: Invalid scheme.
The only combination the works for me is with following format:
$(bundle_identifier):/urn:ietf:wg:oauth:2.0:oob // with only one /
Should we mention this in the README?
Last but not least the URL matching algorithm works great now. I got my token back.

And this is mandatory too:
google.scopes = ["$(a_google_scope)"]

I meant set the callback to `"http://myValidCallback.com/callback". Literally ahaha
When using webviews, we only listen for the redirectURL. We don't use it to open the app.

What are the mandatory scopes please?

A lot: https://developers.google.com/identity/protocols/googlescopes

You have to specify at least one

I'll leave the scopes part to the user. But if it works, I'll specify provider.userWebView = true in the .Google func.

That's a good idea.
Maybe a link in the README or commented in the code to the list of available scopes?

I'll add a page to the wiki if useWebView works. Let me know please

It works great but only with callback format specified before.
Anything starting with http or another scheme gets an error.
Is it what you meant?

I tested with the redirectURL "http://www.hello.com/callback" and it works

I get back from Google in the browser:
redirect_uri_mismatch
Same init as yours but with different scope.

You have to update the redirect url google...

Where should I update it?
I receive the error with following Provider
    let google: Provider = {
        let provider: Provider = .Google(clientID: "***", clientSecret: "***", redirectURL: "http://www.hello.com/callback")
        provider.useWebView = true
        return provider
    }()

https://console.developers.google.com

I did another try with http://hello.com/callback, it works well. Sorry

Weird but anyway it is not blocking because the Provider works with my strange redirect URL when using a WebView 👍
I think it is ok to merge next to master

It's because you didn't update the redirect URL on https://console.developers.google.com

Yep looking into that right now ;)

It seems that because it is an iOS app I can only enter my bundle identifier and Google uses that to create a proper redirect URL. I can not see where I can set the redirect URL.
Anyway, I'll look into this better in the docs. Thank you.

Again, it works with http://hello.com/callback. With an iOS app.

I can not see where I can set the redirect URL.

Did you register on  https://console.developers.google.com ?

This is what I get for iOS settings:

This is what I get for Web Application settings:

I just pushed v0.4 😃
Use it with Google (and web server) like so:
let google: Provider = {
    let provider: Provider = .Google(clientID: "***", clientSecret: "***", redirectURL: "http://www.hello.com/callback")
    provider.useWebView = true
    provider.scopes = ["https://www.googleapis.com/auth/analytics.readonly"]
    return provider
}()


Update existing data to include the new relationship

child of #996
Create a process to add the new member predicates to existing File Set records.  Both Solr and Fedora will need to be updated.

Focus of the project has changed and we are moving to a new ScholarSphere that may not be dependent on the current technology stack.


Fix casing of commonmark package name

Hi, I maintain the commonmark package on pypi, and I have a question about the package name. When I navigate to https://pypi.org/project/commonmark, this gets rewritten to https://pypi.org/project/CommonMark. However, on the pypi test site that I just uploaded to, the package name stays correctly at commonmark: https://test.pypi.org/project/commonmark/  Can someone fix this to make "commonmark" the canonical package name?
Thanks

@nikolas Thanks for the report. As a policy, we don't do special-case SQL queries for things like this.
I created https://github.com/pypa/warehouse/issues/4680 which captures the overall issue and proposes a change that would fix this for anyone in the future as well.

Thank you, I'll close this issue, then.


Delete styles not getting included

This is about Bulma ~| Bulma | Extentions | the Docs~.
This is, potentially, a bug in bulma. It might also be me doing something wrong.

Overview of the problem

This is about the Bulma CSS framework

I'm using Bulma version [0.11.13]

Description
I am using bulma via @import instead of @use because I was using it like that with regular Bulma. That might be related.
The issue is that the .delete class doesn't include the ::before or ::after of the .delete class for some reason. I can see it is in the sass file as a mixin, but it is not in the css output. The rest of that mixin is, just not the ::before, :;after. I also believe the .is-small and such classes of the .delete are not included.
Steps to Reproduce
This is how I import the Bulma, everything else seems to work fine with it:
// Bulma Import
@import "node_modules/@bulvar/bulma/sass/utilities/initial-variables";
$navbar-breakpoint: $widescreen;
@import 'node_modules/@bulvar/bulma/bulma';

I use the delete inside notifications:

  <button class="delete"></button>

      Content...

Expected behavior
The delete is rendered properly. See screenshot below using regular Bulma

Actual behavior
The delete isn't rendered properly. See screenshot below using @bulvar/Bulma

Changing bulma/sass/elements/other.sass like below seems to fix it:
diff --git<EMAIL_ADDRESS><EMAIL_ADDRESS>index 2674f36..c5e141c 100644
---<EMAIL_ADDRESS>+++<EMAIL_ADDRESS>@@ -16,7 +16,7 @@ $-css-vars-map: ("number-background": $number-background, "number-radius-rounded
   @extend %block

 .delete
-  @extend %delete
+  +utilities.delete

 .heading
   display: block

I don't know enough about sass to understand the implication of @extend vs +, but if you want I can make a PR with this change.

Good catch @larsk2009 ! I'll take a look in a bit and will fix it shortly

As you fixed this, I'll close this issue. Thanks!


Recipe Number format: handle errors with commas and underscores

including a comma or underscore in a number causes errors that are hard to diagnose (eg column not found). I noticed it with batch_size but guessing it would happen wherever a 'bad' number is entered. Now that we have a universal interface for wrangles, can we catch those and either deal with it or alert the user?
And can we add it to the linting logic?
Also, let's add it to docs.

This is largely specific to batch_size because it's a temporary fix (and hopefully going away sooner rather than later) and not part of the schema. This will already flag as an error if the place it's added doesn't allow strings.

Underscores behave as digit separators in yaml, so you can use those. This works:

It looks like the library we're using for it in Excel doesn't actually recognize that though, so unfortunately flags them as errors even though they work. It isn't an option by the looks of it, just a deficiency in their implementation of the standard, so not something we can fix. It's actually the same in VSCode (fairly sure we're using the same library).


[BEAM-5820] vendor calcite

This PR is proof of concept for vendoring calcite and supporting in sql

@kennknowles @iemejia pass unit test locally

cc @apilloud

This would be great!

Minor requirement, can you please add a checkstyle validation so other Beam modules don't accidentally import the non vendored version of calcite (similar to what is done for ByteBuddy in #9313).

We'll need to break this PR up into two pieces eventually:

A piece which just vendors calcite (so that it can go through the release process)
The change which consumes vendored calcite.

Yes. If vendor/calcite-1_20_0/build.gradlelooks good, I'll open a self-contained pr for build vendored calcite package and we can go through the release process.

We'll need to break this PR up into two pieces eventually:

A piece which just vendors calcite (so that it can go through the release process)
The change which consumes vendored calcite.

Yes. If vendor/calcite-1_20_0/build.gradlelooks good, I'll open a self-contained pr for build vendored calcite package and we can go through the release process.

Yes, the build.gradle looks fine but I didn't validate where the vendored calcite artifact actually works. I'm relying on your proof of concept to validate the contents are good and meet the Beam SQL needs. If it doesn't work, you can always produce another update version and release 0.2.

We'll need to break this PR up into two pieces eventually:

A piece which just vendors calcite (so that it can go through the release process)
The change which consumes vendored calcite.

Yes. If vendor/calcite-1_20_0/build.gradlelooks good, I'll open a self-contained pr for build vendored calcite package and we can go through the release process.

Yes, the build.gradle looks fine but I didn't validate where the vendored calcite artifact actually works. I'm relying on your proof of concept to validate the contents are good and meet the Beam SQL needs. If it doesn't work, you can always produce another update version and release 0.2.

sure. I opened pr #9333 for releasing vendor calcite.

Run Java PreCommit

Run CommunityMetrics PreCommit

Run Python_PVR_Flink PreCommit

Run SQL PostCommit

Thanks for replace calcite in Beam ZetaSQL to vendor calcite, which will unblock us to move Beam ZetaSQL to a separate module.

Thanks for replacing calcite in Beam ZetaSQL to vendor calcite, which will unblock us from moving Beam ZetaSQL to a separate module.

Cool! Looking forward to this. Once this effort is done, we can move ZetaSQL code to a separate module path.

LGTM but do wait for other reviewers comment.

@apilloud @lukecwik @iemejia @kennknowles
As this PR has passed tests before(although it has conflicts now but that's can be solved quickly), if you don't have other comments, I will merge this PR.

Sorry @vectorijk, as your PR is big(which is a great refactor to move to vendor calcite), it's easy to have conflicts by code changes on java imports.
You could wait until PR reviewers have a consensus, then do a final rebase and pass test to make PR be merged.

I only reviewed the shading changes and not its usage. I would be fine with a rebase and update as all the vendoring of Calcite was done in a different PR.
Please also update the PR title/description and link to JIRA.

Since vendoring has been done separately, it is a good time to rebase.

Run Flink Runner Nexmark Tests

Run Dataflow Runner Nexmark Tests

Maybe ask in dev@ about why Nexmark tests failed?

I triggered Spark/Flink Runner Nexmark Test in #9553 and those tests are passed. This PR is against branch-2.16.0. I am not sure if it breaks Nexmark Test because latest commits on master branch.
Since only Direct Runner nexmark test passes currently,  For sure, I will ask in dev@ why this happened. Meanwhile, I'll try to run nexmark test with non-direct runner locally later  :D

I took a look at the gradle scan. The error message is truncated. But it looks like a transform translator registered with AutoService is not a subtype of the expected interface. I do not know why this is different with Dataflow and Direct runner. The stack trace does lead through the DataflowRunner replaceTransforms method. https://scans.gradle.com/s/tqk3vel4olim4/console-log?task=:sdks:java:testing:nexmark:run

Run Direct Runner Nexmark Tests

Run Spark Runner Nexmark Tests

Run Dataflow Runner Nexmark Tests

@vectorijk this aparently still needs a rebase

Run SQL Postcommit

Run Direct Runner Nexmark Tests

Run Spark Runner Nexmark Tests

Run Dataflow Runner Nexmark Tests

Run Java PreCommit

Run Dataflow Runner Nexmark Tests

Run SQL Postcommit

Run Portable_Python PreCommit

Run Direct Runner Nexmark Tests

Run Dataflow Runner Nexmark Tests

Run Direct Runner Nexmark Tests

Run SQL PostCommit

@amaliujia pass nexmark tests (direct runner and non-direct runner). could you take a look again?

Thanks Luke!
LGTM to the content of changes.

Thanks Luke!

Nice work! This is huge.


Adding plugins to docs

How do you all feel about adding plugins to the docs somewhere?
A few very useful ones:
https://github.com/estate/bookshelf-bcrypt - automatic password hashing
https://github.com/estate/bookshelf-uuid - automatic uuid generation
https://github.com/estate/bookshelf-paranoia - soft deletes that work with all types of relations, even eager loaded relations
https://github.com/estate/bookshelf-history - restore and backup data to a history table
https://github.com/bsiddiqui/bookshelf-modelbase - validation and CRUD methods
It'd be great to know what else is out there.
Hapi.js has done a good job of sharing plugins: http://hapijs.com/plugins

These could be added to the readme (which is rendered into the site).

Great, I'll add it

The project leadership of Bookshelf recently changed. In an effort to advance the project we close all issues older than one year.
If you think this issue needs to be re-evaluated please post a comment on why this is still important and we will re-open it.
We also started an open discussion about the future of Bookshelf.js here https://github.com/bookshelf/bookshelf/issues/1600. Feel free to drop by and give us your opinion.
Let's make Bookshelf great again

So, the only ones from that list missing on the Readme are bookshelf-bcrypt and bookshelf-history. For reference community plugins were added to the Readme in 5835928a0f a few months after this issue was opened.
@bsiddiqui Are you still interested in adding those two plugins to the list?


Linked Data Editor - Closes when trying to select a look-up entity

In stage - select sinopia:resourceTemplate:bf2:Monograph:Work Under "Primary Contribution" select "Primary contributor" > "Person" > "Search LCNAF"  > type name in look-up "Twain, Mark" and try to select an entity.  Editor page unexpectedly closes and the entity is not selected.  Similar behavior with other QA look-ups in different profiles and with different source look-ups.

@mmcgee I'm trying to look at the resource template "harvard:RT:bf2:Work:DigitalMap" to see how it's set up. When I look at the one in Harvard's github profile repo (https://github.com/LD4P/sinopia_sample_profiles/tree/master/cohort-profiles/Harvard), I think I am seeing an older version of the profile, because in the github one, the "Form of Work" resource template is referring to "sinopia:resourceTemplate:bf2:Form" , not "harvard:resourceTemplate:bf2:Form:DigitalMap"
could you upload here the latest resource template "harvard:RT:bf2:Work:DigitalMap", the same one you've loaded into stage, so I can see the actual RT JSON?

@michelleif apologies, uploaded now: https://github.com/LD4P/sinopia_sample_profiles/blob/master/cohort-profiles/Harvard/Harvard BIBFRAME 2.0 Form - Digital Map.json
Thanks for looking, maybe I missing something

@mmcgee I need this: harvard:RT:bf2:Work:DigitalMap

@mmcgee never mind I see you updated that one in github too

I don't see anything amiss in the templates but I do notice that if I'm here harvard:RT:bf2:Work:DigitalMap and open Form of Work, and try to delete the default value (not trying to search for an additional value), I get the blank screen.

here's a test Profile  that might help isolate the problem
a profile to test blank screen issues.json.txt
open the template test:RT:blankscreen. (it refers to another resource template test:RT:blankscreennested, which has one field, and it's a lookup). (both templates are in the profile for easy uploading)
When I open the main RT, then the nested one, I can look up successfully (example lookup "water") but when I select the result I want, I get the blank screen.
now if I open just the referenced RT on its own (test:RT:blankscreennested) I can successfully lookup and select with no problem.
it doesn't seem that the default is an issue, since the test example has no defaults.
it seems to be something with the nesting.

@michelleif just looking at the profile itself I think I know what is going on. It's the same as https://github.com/LD4P/sinopia_editor/pull/684 except this time there is no defaultURI to fall bask to when there is no defaultLIteral. I will add a condition to check for this.


Drag and Drop for file path not working

[x] I am on the latest Hyper.app version
[x] I have searched the issues of this repo and believe that this is not a duplicate

OS version and name:  MacOS 10.14
Hyper.app version:  3.0.2
Link of a Gist with the contents of your .hyper.js:  https://gist.github.com/vedantsingh1404/d1fe1c14eeee391551f33283d8659119
Relevant information from devtools (CMD+ALT+I on macOS, CTRL+SHIFT+I elsewhere):
The issue is reproducible in vanilla Hyper.app:

Issue

The path is not given by the terminal when I drag and drop files.

I'm having the same problem after update to latest version.

Same on Windows 7 (Hyper 3.0.2, no custom configuration)

Oh and dupe of #3582

guys, I create a plugin for this: https://github.com/qweasd1/hyper-drop-file, just  hyper install hyper-drop-file