req.user is undefined, passport not working with Express 4.0

I use<EMAIL_ADDRESS>and<EMAIL_ADDRESS>req.user is alway undefined and so req.isAuthenticated() also not working.
Here is my express-setup:
var env = process.env.NODE_ENV || 'development';

var path = require('path'),
    expressValidator = require('express-validator'),
    config = require('../config/config')[env],
    RedisStore = require('socket.io/lib/stores/redis'),
    redis  = require('socket.io/node_modules/redis'),
    pub    = redis.createClient(),
    sub    = redis.createClient(),
    client = redis.createClient(),
    utils = require('connect').utils,
    cookieParser = require('cookie-parser');
    bodyParser = require('body-parser'),
    expressSession = require('express-session'),
    compress = require('compression'),
    morgan = require('morgan'),
    errorHandler = require('errorhandler'),
    methodOverwrite = require('method-override');

module.exports = function (app, passport, express, io) {
  var RedisSessionStore = require('connect-redis')(expressSession);
  var redisSessionStore = new RedisSessionStore(config.redis.sessions);

  app.use(morgan());
  app.use(cookieParser());
  app.use(methodOverwrite());
  app.use(bodyParser({ keepExtensions: true, uploadDir: config.files.upload.path, limit: config.files.upload.size }));
  app.use(expressValidator());
  app.use(expressSession({
    secret  : 'foo',
    cookie  : {
      expires: false,
      domain: config.cookie.domain
    },
    store: redisSessionStore
  }));

  app.use(passport.initialize());
  app.use(passport.session());

  // response static files
  if(env == 'development'){
    app.use(compress({
      threshhold: 512
    }));
    app.use('/', express.static(path.join(__dirname, '../../frontend')));
    app.use(errorHandler({ dumpExceptions: true, showStack: true }));
  }

  if(env == 'production'){
    app.use(errorHandler());
    app.enable('trust proxy');
  };
}

... and passport-setup:
var LocalStrategy = require('passport-local').Strategy,
    User = require('../model/User');

module.exports = function (passport) {
  // serialize sessions
  passport.serializeUser(function(user, done) {
    var sessionData = {};

    sessionData.user = user._id;

    // store workingAt to build socket.io rooms
    if(user.workingAt){
      sessionData.workingAt = user.workingAt;
    }

    done(null, sessionData);
  });

  // deserialize sessions
  passport.deserializeUser(function(sessionData, done) {
    User.findById(sessionData.user, function (error, user) {
      if(error){
        done(error);
      } else {
        done(null, user);
      }
    })
  });

  // use local strategy
  passport.use(new LocalStrategy({
        usernameField: 'email',
        passwordField: 'password'
      },
      function(email, password, done) {
        User.checkCredentials({email: email, password: password}, function(error, user){
          if(error) {
            return done(error);
          } else {
            return done(null, user);
          }
        });
      }
  ))

EDIT:
I try to find the reason of that bug and its seems its related to express-session. On every request i have a new value in req.sessionID, also no cookie will be created with the sessionID.

I had the same issue. Turns out it was a dependency issue with express-sesssion:

If [sessions are] enabled, be sure to use express.session() before passport.session() to ensure that the login session is restored in the correct order.

Putting express.session() before passport.session() fixed the issue for me, thanks.

+1

+1

If you're using the window.fetch method to send requests to your server, you have to include 'same-origin credentials in your request. See the example below.
fetch(url, {   method: "POST",   body: JSON.stringify(data),   headers: {     "Content-Type": "application/json"   },   **credentials: "same-origin"** })

Watch out cookie property with 'secure' value if not in under https protocol req.user will be undefined.

Big thanks @valerieernst !

@valerieernst HUGE THANK YOU!!!! A ton of Googling and your advice got my stuff working.

@valerieernst thanks!

omg @SaydChada thank you so much! I've been stuck for ages, and it was this one line of code driving me insane.

I did what @mgutz said — Uninstall express-session and use cookie-session instead.  Here is Github Gold. No wait, but I'll subscribe to your channel. Or follow your feed. +1 your post, whatever, have all the upvotes!

In case someone is having this problem due to nginx as ssl proxy to express.
Found a working solution here:
https://gist.github.com/nikmartin/5902176

Guys, since you are using a custom callback to handle success/failures, it becomes the application's responsibility to establish a session . So we need to set req.session.user = {...} in the strategies.
I added a new route to use "req.user":
app.use((req, res, next) => {req.user = req.session.user; next()})

There's a suttle bug with express-session that can bite you, link but cookie-session is basically a drop in replacement that has worked perfectly for me.

It seems to me the real bug here isn't that req.user can be undefined: the real problem is that a million different things can all go wrong, and there's no diagnostic info provided to the user whatsoever to help them figure out what they did wrong.
It seems like at least the majority of the above cases could  be caught.  For instance, if passport sees two sessions, identical except one has www. and one doesn't, it seems like it would be trivial for it to console.warn("Multiple sessions for the same base URL detected").
I would imagine these warnings would be very easy to implement, but they also sound like they'd be hugely valuable.

@machineghost You can always do a PR yourself! 😉

As I said, I'd be happy to, but I never waste time on PRs that maintainers don't want.  Until a project maintainer indicates that such a warning would actually be desired I'll hold off.

I had same issue, both with req.isAuthenticated() and req.user, here is how I resolved

req.isAuthenticated()

resolved by replacing findOne() with find() in findById() method inside deserialize(), then I could save authenticated req, else it was returning nothing.

req.user

resolved by adjusting order, first express-session should be stored then passport should be initialized then next session store in passport.session() and after that we can access req.user, after saving session in passport.session()
app.use(session(...))
app.use(passport.initialize());
app.use(passport.session());
// Now we can access req.user so after we will call req.user, if we write it above these, it will always return underfined
app.use(function(req, res, next){
  res.locals.user = req.user || null
  next();
})

I have a problem if anybody here could help, please. In my case, cookies are being saved to the browser but they are not being used. I know this because my app doesn't go to a state of logged-in. I just keep getting redirected to google's site every time. I am using passport's google strategy.

I had this problem. The fix was to add the express-session secret into the cookie parser. problem solved.
So the fix for above would be:
app.use(cookieParser('foo'));
app.use(expressSession({
secret : 'foo',
cookie : {
expires: false,
domain: config.cookie.domain
},
store: redisSessionStore
}));
notice the cookie parser now contains the session secret.

@crsrusl This worked for me. Before this, I had to manually set req.user = user in my JWT verify callback but after passing the same secret to both cookie-parser and cookie-session, req.user got set automatically. I wonder why this is the case...I would appreciate any explanation regarding this.

I, too, had this problem, and @SaydChada's hint got me pointed in the right direction:

Watch out cookie property with 'secure' value if not in under https protocol req.user will be undefined.

Also note that if you do indeed want to request a secure cookie be sent to the browser (s/b typical, IMHO), but you're using express-session and terminating TLS somewhere upstream, this little gem right there in the docs is a good answer:

If you have your node.js behind a proxy and are using secure: true, you need to set "trust proxy" in express

In my case, I'm running in Google App Engine, configured for TLS/SSL only, which terminates TLS upstream.
See also:
https://github.com/expressjs/session#cookiesecure
https://expressjs.com/en/guide/behind-proxies.html
https://github.com/expressjs/session/blob/master/index.js#L639

in my case, i use this config, resolveded the problem
app.use(session({
secret: "123",
resave: true,
saveUninitialized: true,
cookie: {maxAge: 60 * 60 * 24 * 1000}
}));

app.use(passport.initialize());
app.use(passport.session());

Thank you @asdkazmi !!!
Adding these below the express session use in app.js did the trick for me here in March 2024 :-)


The showcase is showing old version of Repeater.js

🐛 Bug Report
The showcase in the documentation is showing Channel.js, but it has been changed to Repeater.js.

Have you read the Contributing Guidelines on issues?
Yes!
To Reproduce

Step 1: Go to https://docusaurus.io/showcase
Step 2: See that it still shows the old website (Channel.js) and it has been updated to Repeater.js.

Expected behavior
Show the new title and update the preview image.
Actual Behavior
It is showing the image and the title of the old website.
Your Environment

Docusaurus version used:  v2.0
Environment name and version: Chrome v89.0.4389.114, Node.js v15.2.1
Operating system and version (desktop or mobile): Windows 10 Desktop

I opened a PR to correct this in #4551.


How is it important to have reducers 100% pure?

I have this inside my reducer
    if (action.type == 'NEW_TWEET') {
        const id = uuid.v1();
        const tweets = {
            [id]: {
                id,
                text: action.text,
                authorId: state.myUser.id
            },
            ...state.tweets
        }

        return {...state, tweets}
    }

Random id from uuid.v1() makes it non-pure function. I suppose that this is not a problem because I will never write any logic that depend on predictable id. And there is no sanity in writing unit test which check that new id is correct. Am I right or not?

Don't do it.  The whole point of a "reducer" is that it is pure and deterministic.  Even if it doesn't break anything right now, it's a very bad habit to follow.  If you need non-determinism, like creating new Dates or UUIDs, do it in an action creator.

Well. I have habit to think before do something and will not follow "habit of writing non pure reducers" if there are adequate alternatives. Generating and passing id from actions seems more inadequate for me.

I'll counterbalance @markerikson's answer. In my opinion it's fine to generate this kind of data within the reducer. You don't have make your reducer 100% pure. What matters is how easy you will be able to maintain this code. If you don't need strict predictability, then it's fine!
Let's consider another use case.
function log(payload) {
  return {type: "LOG", payload}
}

function logReducer(state = [], action) {
  switch (action.type) {
    case "LOG":
      return state.concat({ts: Date.now(), data: String(action.payload)})
    default:
      return state
  }
}

function actionCounterReducer(state = 0, action) {
  return state + 1
}

The logReducer is no longer pure because it depends on Date.now(). actionCounterReducer also consumes LOG and is pure. It has no knowledge about when the action was dispatched and adding this information to the action is non-sense. Sometimes you simply don't have better options than making your functions impure.
I'm closing the issue but feel free to continue the discussion.

Impure reducers make writing tests harder (you don’t know exactly what you’re going to get) as well as screw up replaying actions recorded from user sessions (IDs don’t match anymore). Generating IDs in action creators solves these problems.

Similarly, Redux DevTools replay your reducers when you change their code so you’ll get different IDs every time you save a file which is likely to screw up the logic, as your later actions likely rely on these IDs. Same problem with enhancers like https://github.com/omnidan/redux-undo. If you don’t use any of these tools though it’s fine—just be aware that you might bump into limitations later.

The answer for a number of these things tends to be "well, it is technically possible to do that, but you break stuff like time-traveling, which is a big part of why you'd even want to use Redux in the first place".

I pick Redux for another reason, but you all have good point and I definitely have to try all those dev tools


merge it with necrobot?

have you asked necro to maybe have this merged into one project?

Release notes mention an official UI on the way. I hope it's half as good as this is.
@nicoschmitt Props for everything you've done with this! Totally killer, man!


eolearn.io S2L1CWCSInput issue

Hello,
Currently I am developing an API for crop classification, and I use S2L1CWCSInput for fetching sentinel data. It was working fine until last month. Now, when I try to create a S2L1CWCSInput object, I am getting the following error:
During execution of task S2L1CWCSInput: index -1 is out of bounds for axis 0 with size 0
This happens during this method:

Here, PRODUCT[name] is a layer name (NDVI for example).
I would be really thankful if you explain the reasoning and if possible help me to devise a solution.

Hi @mahinkhankishizade,
If this is still relevant, could you please provide a bit more info where this fails (e.g. stack trace)? The code snippet you pasted seems ok.

Additionally, S2L1CWCSInput is deprecated, so please use SentinelHubInputTask from eo-learn and let us know if the issues persist.
Closing.


Allow react 17 as peerDependency

Allow react 17 as peerDependency.
The enzyme react 17 support is not yet released: https://github.com/enzymejs/enzyme/issues/2429. I don't know if we should wait for enzyme, it might take a while though?
According to release notes seems quite safe: https://reactjs.org/blog/2020/10/20/react-v17.html

Yep, seems to work fine as far as I can see. Lets push this out.


[GSSOC] wants to add full fledge social media app

I want to add a social media app called sociopedia.
the tech stack is MERN.
screenshot:-

Please assign this issue to me

@souravbhunia07 may i also help you contribute? I am a beginner and I have just learnt HTML, CSS, JS

Yeah sure! @keenpaul29  let the admin assign me the issue.

please assign me this issue under GSSoC'23.


build: prefix packages with autoware_

Description

Related links

Tests performed

Notes for reviewers

Interface changes

Effects on system behavior

Pre-review checklist for the PR author
The PR author must check the checkboxes below when creating the PR.

[ ] I've confirmed the contribution guidelines.
[ ] The PR follows the pull request guidelines.

In-review checklist for the PR reviewers
The PR reviewers must check the checkboxes below before approval.

[ ] The PR follows the pull request guidelines.
[ ] The PR has been properly tested.
[ ] The PR has been reviewed by the code owners.

Post-review checklist for the PR author
The PR author must check the checkboxes below before merging.

[ ] There are no open discussions or they are tracked via tickets.
[ ] The PR is ready for merge.

After all checkboxes are checked, anyone who has write access can merge the PR.

Related discussion: https://github.com/orgs/autowarefoundation/discussions/4097

Closing in favor of submitting per-package PRs


net/http.ReadRequest can leak pool entry

https://github.com/golang/go/blob/2551324cd01b295915c10c6d3d06625676401610/src/net/http/request.go#L1041
Line mentioned above should be a few lines earlier before first return.

Want to send a change moving it to its own defer a few lines up? (keeping the existing one where it's at)

cc  @neild


fix: changed soarThroat to soreThroat to get rid of error

Was getting a bug from SymptomsTracker.js so this fix resolves it!

The PR description does not reflect the changes made. It is difficult to review.

Ah sorry, let me fix it up so it's easier to review.

It's my bad, I can fix it right now

Just changed lines 72 and 122 @friedger. Not sure why it's recording more insertions and deletions for me. It is the same as before other than that though. But removed a dummy component I had so changes are a bit easier to see. And no worries @pavel-ilin

Need to rebase off master now as well

rebased and fixed merge conflict.

I might be missing something but now I'm looking at the Files Changed tab here and I'm not seeing any changes made with this PR?

I think this can be closed as these changes already appear in master


Propose Logo

Hi @LeoAJ . I'm a graphic designer and an open source enthusiast. I would like to contribute to your  project by proposing logo design. I'll be doing it as a gift for free to your awesome project. this is my design, what dou you think? if you have an idea please share with me, it would be better for me. Thanks.
Best Regard.
Mirza Zulfan

@mirzazulfan Thanks for contributing to this project! That is very kind. I really love this design ~ ! Please go ahead and submit the PR or if you need anything from me, let me know. Thanks again and I appreciated!

@LeoAJ . Thank for your response sir. I'm glad you liked it. I'll prepare the files and create a pr.

Hi @mirzazulfan I preferred the second one, again I am sorry for the late reply. Thanks for the contribution once again. Please process the changes and I will prove and merge the PR. Thanks!


Add support for time entry contraints

duplicate of https://github.com/toggl/toggl-button/issues/1430


Ensure bde header is checked for each input file.

Potential fix for #3. Needs to be reviewed that this change doesn't have any implications that I might have missed.
Note this fix could be improved to deal with issue during the the first open file/ print metadata block.    See https://github.com/linz/linz_bde_copy/blob/master/src/bde_copy.cpp#L1581.  That would require storing an array of bde header sizes for each input file that could then be tested after each copy iteration. While strictly a better fix, as the metadata will get printed for each input file, I wasn't sure of the value of doing this...

Not needed, implemented via cd8aec6


A11y improvment (part 2) : Customize textarea props

Second part of the improvments proposed in #544 : giving access to all content editable component props so we can customize the textbox as we want (such as putting an id, a dynamic aria-label or any a11y prop we want)
I add some examples in the "examples" folder

Your right for breaking changes. I will get class name back.
Can I push a deprecated notice on it (as it's covered by the general "attributes" / "props") ? That way, you could delete it in few versions.
The "props" suffix seems clearer for me (as you pass props directly to this child componen) but if you think "attributes" is better, I'll follow you ^^ Do you wants just "attributes" or "contentEditableAttributes" ?

Hello @petyosi, do you think this PR (and the #552) could be merged ? Thank you :-)

@basile-parent Referring to both PRs, I'm very hesitant to merge a large change given that the final outcome should be a couple of changed attribute values.
This being said, I will try to find the time to examine the intended attribute change from your PRs and find a way to apply those changes in a less intrusive manner.


Debug and Trace levels are the same color (blue) making it unnecessarily difficult to differentiate.

I created a simple profile that included mapping for both Debug and Trace level logs.
The application assigns both the same color of blue - why? Wouldn't it be more useful to differentiate?
Or better yet let me edit the color (though I see someone else suggested that earlier)
OS: mac 14 M2
Steps

Create profile
Add mapping for both Debug and Trace level.
Load a log file containing both Debug and Trace logs

Result:
App assigns both to use the same color, unlike every other log level.
Example

Colors are adjested in <IP_ADDRESS>1-dev.

Thank you! Much appreciated!


Item Icon in Main Menu gets set to default when you link a Shop

When you first set an Icon for something in the Main Shop Menu and then link a Shop to it, the item Icon goes back to the default (Emerald)
This can be a bit annoying when setting up Shops

https://github.com/7sat/DynamicShop/commit/c210fa77d6c4913f339cf2edf916552a7ce37341


[SPARK-29956][SQL] A literal number with an exponent should be parsed to Double

What changes were proposed in this pull request?

For a literal number with an exponent(e.g. 1e-45, 1E2), we'd parse it to Double by default rather than Decimal. And user could still use  spark.sql.legacy.exponentLiteralToDecimal.enabled=true to fall back to previous behavior.
Why are the changes needed?

According to ANSI standard of SQL, we see that the (part of) definition of literal :
<approximate numeric literal> ::=
    <mantissa> E <exponent>

which indicates that a literal number with an exponent should be approximate numeric(e.g. Double) rather than exact numeric(e.g. Decimal).
And when we test Presto, we found that Presto also conforms to this standard:
presto:default> select typeof(1E2);
 _col0
--------
 double
(1 row)

presto:default> select typeof(1.2);
    _col0
--------------
 decimal(2,1)
(1 row)

So, we think that Spark should also conform to this standard.
Does this PR introduce any user-facing change?

Yes.
For 1E2, before this PR:
scala> spark.sql("select 1E2")
res0: org.apache.spark.sql.DataFrame = [1E+2: decimal(1,-2)]

After this PR:
scala> spark.sql("select 1E2")
res0: org.apache.spark.sql.DataFrame = [100.0: double]

And for 1E-45, before this PR:
org.apache.spark.sql.catalyst.parser.ParseException:
decimal can only support precision up to 38
== SQL ==
select 1E-45
  at org.apache.spark.sql.catalyst.parser.AbstractSqlParser.parse(ParseDriver.scala:131)
  at org.apache.spark.sql.execution.SparkSqlParser.parse(SparkSqlParser.scala:48)
  at org.apache.spark.sql.catalyst.parser.AbstractSqlParser.parsePlan(ParseDriver.scala:76)
  at org.apache.spark.sql.SparkSession.$anonfun$sql$1(SparkSession.scala:605)
  at org.apache.spark.sql.catalyst.QueryPlanningTracker.measurePhase(QueryPlanningTracker.scala:111)
  at org.apache.spark.sql.SparkSession.sql(SparkSession.scala:605)
  ... 47 elided

after this PR:
scala> spark.sql("select 1E-45");
res1: org.apache.spark.sql.DataFrame = [1.0E-45: double]

How was this patch tested?

updated literals.sql.out and ansi/literals.sql.out

Test build #114080 has started for PR 26595 at commit 811f01e.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/18939/
Test PASSed.

Test build #114080 has finished for PR 26595 at commit 811f01e.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/114080/
Test FAILed.

cc @cloud-fan

Test build #114100 has started for PR 26595 at commit 25ae0f6.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/18958/
Test PASSed.

Test build #114101 has started for PR 26595 at commit f1db275.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/18960/
Test PASSed.

Test build #114101 has finished for PR 26595 at commit f1db275.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/114101/
Test FAILed.

Test build #114100 has finished for PR 26595 at commit 25ae0f6.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/114100/
Test FAILed.

Test build #114113 has started for PR 26595 at commit ea82e5d.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/18971/
Test PASSed.

Test build #114113 has finished for PR 26595 at commit ea82e5d.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/114113/
Test FAILed.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/18983/
Test PASSed.

Test build #114126 has started for PR 26595 at commit a1afe1f.

Test build #114126 has finished for PR 26595 at commit a1afe1f.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/114126/
Test FAILed.

Test build #114134 has started for PR 26595 at commit 24d19de.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/18992/
Test PASSed.

Test build #114134 has finished for PR 26595 at commit 24d19de.

This patch fails due to an unknown error code, -9.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/114134/
Test FAILed.

retest this please

Test build #114152 has started for PR 26595 at commit 24d19de.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/19009/
Test PASSed.

Test build #114152 has finished for PR 26595 at commit 24d19de.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/114152/
Test PASSed.

also cc @viirya @maropu

Test build #114444 has started for PR 26595 at commit 32f6b64.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/19279/
Test PASSed.

Actually, it seems this behaviour depends on implementations (the standard says so though).
In PgSQL;
postgres=# select pg_typeof(1E2);
 pg_typeof
-----------
 numeric
(1 row)

postgres=# select pg_typeof(1.2);
 pg_typeof
-----------
 numeric
(1 row)

Just in case, can you check the other system behaviour other than PgSQL/Presto?
btw, when the PgSQL dialect enabled, should we follow the current Spark behaviour (that is, in both cases, we regard them as decimal)?

Actually, literals like 1E2 are parsed as Double before Spark2.1, but changed to Decimal after #14828 due to "The difference between the two confuses most users" as it said. But I also see support(DB2 test) of original behavior at https://github.com/apache/spark/pull/14828#issuecomment-251805403.

btw, when the PgSQL dialect enabled, should we follow the current Spark behaviour (that is, in both cases, we regard them as decimal)?

hmm... as for this, I'd say yes. But I agree that things here may be a little awkward when we switch to PostgreSQL....as we need to back to legacy Decimal mode again.

Actually, literals like 1E2 are parsed as Double before Spark2.1, but changed to Decimal after #14828 due to "The difference between the two confuses most users" as it said. But I also see support(DB2 test) of original behavior at #14828 (comment).

Ah, I see. Thanks for that info. Either way, I personally think its worth adding a note about this behaivour change in the migration guide. Can you update?

hmm... as for this, I'd say yes. But I agree that things here may be a little awkward when we switch to PostgreSQL....as we need to back to legacy Decimal mode again.

NVM, if necessary, we can update that behaivour in follow-up. Thanks, anyway.

yea a migration guide is needed.

Test build #114444 has finished for PR 26595 at commit 32f6b64.

This patch fails due to an unknown error code, -9.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/114444/
Test FAILed.

Test build #114452 has started for PR 26595 at commit 904d61e.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/19286/
Test PASSed.

Not sure if this is necessary. Looks like we have changed this behavior before. Previous reason is for user experience, and this is for standard?

I'd say this change can improve UX. It's super weird that select 1e40 works but select 1e-40 fails

Test build #114452 has finished for PR 26595 at commit 904d61e.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/114452/
Test FAILed.

01:02:36.134 ERROR org.apache.spark.sql.SQLQueryTestSuite: Error using configs:
[info] - postgreSQL/numeric.sql *** FAILED *** (1 minute, 14 seconds)
[info]   postgreSQL/numeric.sql
[info]   Expected "struct<LOG([CAST(1.2345678E-28 AS DOUBLE)]):double>", but got "struct<LOG([1.2345678E-28]):double>" Schema did not match for query #550
[info]   select ln(1.2345678e-28): QueryOutput(select ln(1.2345678e-28),struct<LOG(1.2345678E-28):double>,-64.26166165451762) (SQLQueryTestSuite.scala:419)

How does this query passed previously? It's quite weird.

Test build #114467 has started for PR 26595 at commit 966b743.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/19301/
Test PASSed.

LGTM

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/19305/
Test PASSed.

Test build #114471 has started for PR 26595 at commit 23fcf3b.

Test build #114467 has finished for PR 26595 at commit 966b743.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/114467/
Test PASSed.

Test build #114471 has finished for PR 26595 at commit 23fcf3b.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/114471/
Test PASSed.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/19340/
Test PASSed.

Test build #114507 has started for PR 26595 at commit ca56ceb.

@Ngone51 . Could you summarize the previous discussions (on the above comments) into the PR description in terms of the reference PostgreSQL and old Spark 2.1 behavior?
Also, cc @gatorsmile

@dongjoon-hyun OK.

Test build #114515 has started for PR 26595 at commit a780330.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/19345/
Test PASSed.

Test build #114515 has finished for PR 26595 at commit a780330.

This patch fails due to an unknown error code, -9.
This patch merges cleanly.
This patch adds no public classes.

Test build #114507 has finished for PR 26595 at commit ca56ceb.

This patch fails due to an unknown error code, -9.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/114515/
Test FAILed.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/114507/
Test FAILed.

Jenkins, retest this please.

Test build #114529 has started for PR 26595 at commit a780330.

Build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/19359/
Test PASSed.

Test build #114529 has finished for PR 26595 at commit a780330.

This patch fails Spark unit tests.
This patch does not merge cleanly.
This patch adds no public classes.

Build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/114529/
Test FAILed.

Test build #114536 has started for PR 26595 at commit 15dae85.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/19365/
Test PASSed.

Test build #114536 has finished for PR 26595 at commit 15dae85.

This patch passes all tests.
This patch merges cleanly.
This patch adds the following public classes (experimental):
public class GetLocalDirsForExecutors extends BlockTransferMessage
public class LocalDirsForExecutors extends BlockTransferMessage
sealed trait ViewType
trait OperationHelper
case class CreateViewStatement(

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/114536/
Test PASSed.

thanks, merging to master!


Fix-up grid-based layout for mobile, 1-3, and 2-1

Changes:
Adds mobile grid-auto-columns to keep wide content from breaking the grid
Before:

After:

Sets a minimum width on the column layouts to auto prevent grid breakage in either the sidebar or the main content
Before:

After:

What are some pages this was affecting? I was briefly trying to find the ones in the screenshots using the crawler, but if you'll had URLs handy that would be easier.

@wpears @BrewCityBoy This busts our RTL pages. See https://www.consumerfinance.gov/language/ar/

RTL pages to test can be found in https://github.com/cfpb/consumerfinance.gov/pull/7629 and https://github.com/cfpb/consumerfinance.gov/pull/7754

Hmm could we revert this PR for now? My understanding is it is affecting one unreleased page? It does look like https://www.consumerfinance.gov/data-research/small-business-lending/filing-instructions-guide/2024-guide/ could be affected by this too. However, I think we should scrutinize why these pages break out of the grid a bit more before introducing magic numbers into the grid columns.

https://github.com/cfpb/consumerfinance.gov/pull/7964 fixes the missing px which is causing the arabic page breakage


Fixed UB (of textures) after loading textures to egui Context

I was migrating from eframe to sdl2 and my app was breaking almost always if I tried to egui_ctx.load_texture. I then discovered that there was not fully implemented textures delta handling and so, I fixed it myself.
Note: I fixed only TextureId::Managed handling since those are used to load_texture. In the case of TextureId::User i added println! warning.
My app before and after:

This seems to have been addressed with the latest changes to support egui 0.22.


Exception while getting hyperlink URI

Exception in thread "main" java.lang.ClassCastException: com.aspose.pdf.LaunchAction cannot be cast to com.aspose.pdf.GoToURIAction
`Document document = new Document("C:\Users\admin.v.ramesh\Downloads\hyperlink to file.pdf");
Page page = document.getPages().get_Item(1);
AnnotationSelector selector = new AnnotationSelector(new LinkAnnotation(page, Rectangle.getTrivial()));
page.accept(selector);
List list = selector.getSelected();
// Iterate through individual item inside list
if (list.size() == 0)
System.out.println("No Hyperlinks found..");
else {
// Loop through all the bookmarks
for(LinkAnnotation annot : (Iterable<com.aspose.pdf.LinkAnnotation>)list)
{
//Annotation an = (Annotation)annot;
// Print the destination URL
System.out.println("URL: " + ((com.aspose.pdf.GoToURIAction)annot.getAction()).getURI());
}
}`

@velpukondaramesh
Please try the latest version of Aspose.PDF for Java 22.2 and let us know how it goes on your side. Hope this helps you.
If you still face problem, please share your input PDF file here for testing.


Automatically verify links from documentation to our GitHub issues

We set links from documentation content to GitHub issues, usually to provide more information about a planned feature or a change in progress.
As of May 2024, we have 173 links to https://github.com/giantswarm/* in our docs content (excluding /changes).
This sort of information usually gets outdated at some point. The feature described in the issue might be implemented, the change might be done. Usually the issue gets closed. Often, the required change in the referring documentation part is forgotten.
Example
Here is a proposal on how to tackle this problem:

We create a script that crawls all links to Github issues (in the giantswarm organization at least). If the linked issue is closed, a warning is emitted.
We introduce a HUGO shortcode to allow for more expressiveness, e. g. to allow linking to a closed issue without emitting such warning. Example: {{ github_issue repo="giantswarm/roadmap" state="closed" }}.
Once an issue gets closed, we check docs references to the issue and add a comment to the closed issue, informing about the reference and the need to check for content up-to-dateness.

This linter could potentially even function without GitHub API credentials, as all linked issues should be public and issue state should be accessible via the public API.
Example query for https://github.com/giantswarm/roadmap/issues/103 :
curl -L \
  -H "Accept: application/vnd.github+json" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  https://api.github.com/repos/giantswarm/roadmap/issues/103

I would avoid putting any "future plans" into documentation, with maybe very few exceptions. Changelogs provide major updates and new features, and progress on new development is typically communicated directly with customers. As this issue says, those links get 100% outdated or invalid very soon, and it's unrealistic for the author to come back to a documentation page – those pages are usually written/rewritten at most once a year, and not revised in that detail on a regular basis.

Why would one remove links to old issues?
I have often used such to retrace what lead to certain decisions being taken or designs implemented. Why take that away?

I am in favour of not adding roadmap issues to our documentation. For current customers we can directly provide them with a way to follow the progress, we have an open Github Roadmap board that anyone can view and it could be mentioned on our support page to explain how we work, but I don't see value to link to GH issues in regular doc entries. I am happy to remove those during the revamp, WDYT?

@AndiDog The problem you describe is exactly the one I'm trying to address.
@lyind The proposal is not necessarily about removing a link. It's about getting notified if a linked issue gets closed, as this might be a good occasion to review the reference.


ROS 2 Dynamic System Handle

[x] Update official documentation --> https://github.com/eProsima/Integration-Service-docs/pull/43
[x] Update Readme
[ ] Add an example to the Readme (yaml in the main repository)
[x] Add test to check if the custom type support is installed correctly
[x] Adapt static System Handle tests

Could this PR please be incorporated?


Fixes issue reported in #26551 by treating field names as case insensitive...

thus complying with rfc2616 section 4.2
also rfc7230 section 3.2
and rfc7540 section 8.1.2
#26551

@yashykt

The csharp solution does not compile after cloning the repo and following the readme ('cmake' is not recognized as an internal or external command, operable program or batch file.).  I dont see any unit tests that would be affected that need to be fixed as well.  This is just a correction to a string comparison.
I dont know what this status check means or what it wants.

@yashykt any insight into what I need to do to satisfy the mergeable status check?

@StingyJack Sorry for the delay!

np @yashykt, I have a workaround.   However I'm not sure what to do about the failing status checks, I wont have a mac available to do any testing with, and the sanity check failed because it couldnt find a python module (ModuleNotFoundError: No module named '_bz2'). I'm pretty sure I didnt do anything to cause that.

@StingyJack Ignore the failures. They are unrelated to your change.

Thanks for proactively trying to fix a potential source of confusion, but I'm not sure if this is a correct fix. The problem is that this modifies behavior of an already-existing public method and there might be user code somewhere that relies on the existing behavior. Whether the old behavior is wrong and the new behavior is correct is something that's subjective. To avoid disruption, a more conservative choice might be to just improve the documentation and clearly describe the current behavior.
Btw, is there any good reason why you're working with mixed-case header names in your app. Since gRPC converts all the header names to lowercase anyway, you can simply pass only lower case values as metadata entry names and you won't have any problems.

is there any good reason why you're working with mixed-case header names in your app.

public const string OneReasonIs  = "BecauseHumansReadSourceCode"; // snake_case_not_an_option

... and the actual code that prompted this. UserExecutionContext is a type, but nameof() works for pretty much anything
//the .ToLowerInvariant() is due to a defect in the Grpc Metadata class. I've submitted https://github.com/grpc/grpc/pull/26552 to fix it.
var uecRaw = serverCallContext.RequestHeaders.Get($"{nameof(UserExecutionContext)}{Metadata.BinaryHeaderSuffix}".ToLowerInvariant());
if (uecRaw == null)
{
     throw new InvalidOperationException($"Unable to get the {nameof(UserExecutionContext)} from the request headers");
}

The problem is that this modifies behavior of an already-existing public method and there might be user code somewhere that relies on the existing behavior

Grammar rules aside, is there a difference in meaning between "The dog barks" and "The Dog Barks" ?  No, because humans dont assign different meaning to a word when the case differs. If they did, the http standard wouldn't allow the headers to be forced to lowercase on transmit.
I dont see how this would break an existing implementation. Can you give a reasonably possible, concrete, non-theoretical example please?
The relevant spec from IETF.
8.1.2.  HTTP Header Fields

   HTTP header fields carry information as a series of key-value pairs.
   For a listing of registered HTTP headers, see the "Message Header
   Field" registry maintained at <https://www.iana.org/assignments/
   message-headers>.

   Just as in HTTP/1.x, header field names are strings of ASCII
   characters that are compared in a case-insensitive fashion.  However,
   header field names MUST be converted to lowercase prior to their
   encoding in HTTP/2.  A request or response containing uppercase
   header field names MUST be treated as malformed (Section <IP_ADDRESS>).

Whether the old behavior is wrong and the new behavior is correct is something that's subjective.

Also @jtattermusch  this is not a matter of subjectivity or grey area. The spec is very clear on this point.
Before the proposed change, if I added a header with a key of "SomeHttpHeaderKey" when sending a message, the receiver could not retrieve the header value using the same "SomeHttpHeaderKey" and would have to use "somehttpheaderkey". Whereas after these proposed changes, the same header value can be retrieved by the receiver using any casing; "SomeHttpHeaderKey", "somehttpheaderkey", "SOMEhttpHEADERkey", etc.   How exactly does the proposed change break someone's code?

@yashykt @markdroth  - can this be reassigned to someone else to review? This fixes something that is very clearly not compliant with the HTTP spec and makes it compliant.
There has been no problem identified with these changes, none of the tests report failure after this change, and neither the reviewer or I can come up with a concrete legitimate scenario where this change could break anything. I'm not sure what the current reviewer's hesitation is, but at this point its clear they do not intend to act on this one way or another.

@yashykt @markdroth - can this be reassigned to someone else to review? This fixes something that is very clearly not compliant with the HTTP spec and makes it compliant.
There has been no problem identified with these changes, none of the tests report failure after this change, and neither the reviewer or I can come up with a concrete legitimate scenario where this change could break anything. I'm not sure what the current reviewer's hesitation is, but at this point its clear they do not intend to act on this one way or another.

@StingyJack  nice try bypassing me ;-)
Let's not invoke HTTP/2 spec compliance, as the problem you're seeing has nothing to do with it.
Note that the fact that gRPC's "metadata" are transferred on the wire using HTTP/2 headers/trailers is an implementation details. The "metadata" (as defined in   In https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md) is a gRPC specific concept that is independent of headers/trailers HTTP/2 spec and their similarity is a "concidence".
The gRPC spec (https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md) clearly states that the metadata keys are only allowed to use lowercase characters (see grammar: Header-Name → 1*( %x30-39 / %x61-7A / "_" / "-" / ".") ; 0-9 a-z _ - .).  So whenever a gRPC implementation (grpc c# in our case) allows you to use upper-case characters in your code, it can be considered a convenience feature / syntactic sugar, but as said is in no way related to HTTP/2 spec.
The way I look at the problem reported in https://github.com/grpc/grpc/issues/26551 is that it's a gRPC C# specific API oddity and I agree it can result in some confusion in some situations, but the situations in which it exihibits itself aren't comment, are completely preventable and it doesn't influence the correctness of gRPC's behavior in any way (as long as you use lowercase metadata keys, as you should according to the grpc spec).
I'm trying to figure out what's the best way of addressing the API oddity you described and since IMHO the answer isn't as clear cut as you say, it's taking time (also because this is not really a high-priority issue as you are making it seem, but rather a cleanup item).
I hope we're on the same page now.

Created https://github.com/grpc/grpc/pull/27383

https://github.com/grpc/grpc/commit/d64f75d0294b0f7d383033e06e9fcbecf3d6a926
@jtattermusch - I asked for a different reviewer because you had decided to ignore my PR because you were afraid it would break something. I took the time and effort to explain how it would not in several posts above and you continued to ignore a fix for where these gRPC tools was not following the HTTP spec.  After a few weeks I asked for this to be assigned to a different reviewer because you were continuing to ignore it.
You have deleted the comment requesting the reassignment, It was not abusive, or hate speech, or criminal, or a violation of any Code of Conduct provision. It wasnt even rude, and it could very easily have been by just reflecting what has been cast toward me.
And then rather than accept these changes, you made your own changes to do (almost, but not quite) the same thing. Aren't you afraid of your changes breaking some existing usages as you were of mine? Mine arent going to throw a NullReferenceException if a key is null. Mine are also considerably simpler, clearer, and more conventional, so there will be less chance of any later maintenance gaffes.  I think that you found mine unsatisfactory for no other reason except personal pride and that, along with deleting my comment here, is completely unprofessional and unethical and is a violation of the CoC.
You didn't even have the decency to leave a note or explanation, just a merge conflict on this PR and a missing comment.
CC: @yashykt @markdroth and taking a screenshot in case JT deletes my comment again.  And since working in this repo is probably part of your day job duties, once I can find where to report this conduct to google, it will be reported.

Superseded by #27383 which:

introduces a single place where keys are compared for equality (clearer if in the future there are more places where we need to compare key or if we need to change the way the keys are compared).
explains in a comment why StringComparison.OrdinalIgnoreCase is fine to use (since lowercasing is done with .ToLowerInvariant()).
adds tests.


Introduce new icon to site.

Addresses https://github.com/GoogleContainerTools/kpt/issues/1717 for kpt.dev

Cool! Where did this icon come from? Did you design it?

@frankfarzan provided the image; I merely converted it to a vector graphic : )


[IDEA] Generic object to delay work

Hi,
I don't know how do you handle your jobs, but I end up creating a lot of small jobs whenever an operation do more than 2 HTTP calls to other services, or when I know the task will take some time.
To that extent, I have a lot of small jobs, whose only job is simply delaying to the service layer. For instance:
class DeleteUserJob extends AbstractJob
{
     private $userService;

     public function __construct(UserService $userService)
     {
           $this->userService = $userService;
     }

     public function execute()
     {
          $this->userService->deleteUser($this->content['user_id']);
     }
}

I have tons of them and it's only boring to write. Couldn't we actually think of a way to make this more transparent and avoid all that boilerplate code?
I kinda like the work on Laravel and "delayed commands" (http://laravel.com/docs/5.0/bus). I'm not an expert of this bus command stuff, but it seems that each command can be decided to be delayed, by appending some kind of "delay handler".

Couldn't we actually think of a way

I'm assuming you have some sort general idea?


Nest - Current temperature displaying as null

Current Version: 0.66.0
Last working: 0.65.6
Environment:  Hass/pi3, debian 9.1, python 3.6
Component: Nest Thermostat
Description of problem:  Card not displaying current temperature and displays "null - null" instead.

Duplicate of https://github.com/home-assistant/home-assistant-polymer/issues/1051.


No suggestions when there are no characters for suggest widget

VSCode Version: latest alpha
OS Version: os x

Steps to Reproduce:

open any file, js, ts, css, for instance actionbar.css
enter a new line and try to trigger css intelli-sense, notice there are no suggestions
now try to trigger intelli-sense after any character, e.g 'b' notice you get intelli-sense

I also get no suggestions when triggering after a '.'

fixed that yeserday


Issue closed with/without code change

I was looking through our Issue metrics and didn't find specifically what I was looking for:
I want a metric for what percentage of issues resulted in code changes. In GitHub that could be   expressed as a reference between an issue and a merged pull request. This metric would be helpful to get a gauge for whether a community is more talkative or more outcome-driven.
Here is a visual for what the data may look like for this metric:

Week
Issues closed with code changed
Issues closed without code changed
Ratio with/total

1
12
88
12%

2
30
20
60%

3
5
15
25%

Should this metric be a filter for Issues Closed?
Is there another related metric?
Is it its own metric?

For code changes you mean everything that is in a PR (even PRs containing changes on the documentation)?
Focusing on the issue closed without code changed, they may include more kinds of "talkative" issues, for instance the ones asking about how to use a functionality or invalid bug reports (which don't lead to a PR, but born as potential outcome-driven). For this reason, it would be helpful to define the concept of talkative, wfyt?
Should this metric take into account also references to other issues/PRs? An example could be this one: https://github.com/crossminer/scava-deployment/issues/89 where the issue is linked to a PR (which improved the documentation), or https://github.com/crossminer/scava-deployment/issues/94. In a nutshell, the issue makes a summary referencing other related issues, one of them is the first example.

I find this metric you propose as a holy gray, not easy to implement, but very interesting. WRT the metrics we have now, yes, it would be implemented as "Issues_Closed", with the filter for "is source code" set to "touched at least one source code file when fixed". The problem, as @valeriocos states, is how to know if the fix touched code or not.
To begin with, you need to know if there is a fix. That can be done if the project has the policy of labeling commits with the issue they are closing (eg, Closes #23), or if issues are cited in PRs (in a similar way). In some very specific cases (such as when people use Bugzilla for code review), code review tickets are semi-automatically associated to issues (because the project has the policy of citing related issues in Bugzilla, and both code reviews and issues are on the same system). Something similar happens in the case of some projects using Gerrit, which usually link to the issue being fixed with a new patchset (patch proposed for code review).
The second problem, is that you know this only when the bug is fixed. Since at any given moment may issues are still open, and there is (still) no commit fixing them, if you can produce this metric, it is going to be difficult to use for the recent past, because you really don't know how many of the currently open bugs are going to be closed by touching code, until they are actually closed. But this is something that can be a no-problem, depending on what you need your metric for (eg, just knowing the fraction of issues that were closed touching code is rather useful in many cases).
So, in summary: from the "theory" point of view, we have this covered with the "Closed_Issues" plus a strict filter on "fix touched source code". From the practical point of view, it is not that easy to implement (but it is certainly doable).

This would require consistent practices on development team. Connecting a change request with an issue is possible, but again, this requires the project to follow the practice making these associations. Until it is automated, as Jesus notes, it is kind of an impractical ambition to do this, AND be consistent, and accurate across repositories.


kubectl create secret not working, but same with yaml works

This is the same issue raised here in the kubernetes website repo.
I'm following this documentation. Secret gets created when tried using yaml, but not using "kubectl create secret" command.
Thought this is the right forum to raise this issue.

/assign
It's because when using kubectl create secret tls nginxsecret --key /tmp/nginx.key --cert /tmp/nginx.crt, it creats Data with :
Data
====
tls.crt:  1143 bytes
tls.key:  1704 bytes

But when using yaml we defines the data:
Data
====
nginx.crt:  1143 bytes
nginx.key:  1704 bytes

Which would lead no such file or directory error.

@gireeshp I hope this PR would help that :)https://github.com/kubernetes/website/pull/17810


Add a CI/CD project for the Desktop project

I think this will be the most painful part of the project, wpf is not very friendly with CI and CD processes. CI/CD will be necessary if I want that the software updates don't break everything and that I can deliver something without too much pain.

Api build on docker hub working, but Api integration tests and Desktop still fail.

will move this to another repository.
no need to keep this issue here, so closing it.


Time scale tickFormat broken by latest Chrome version?

To replicate:
var s = d3.scaleTime().domain([-7506057600000, -4213184400000]).range([0, 500])
s.ticks().map(s.tickFormat());
// actual: [ ":00", ":00", ":00", ":00", ":00", ":00", ":00", ":00", ":00", ":00" ]
// expect: [ "1740", "1750", "1760", "1770", "1780", "1790", "1800", "1810", "1820", "1830" ]

In previous versions of Chrome, this produced the expected output (which is what Safari and Firefox still produce). It looks like Chrome is arriving at formatSecond rather than formatYear within the time scale tickFormat method...

Moved to d3/d3-time#29.


Remove include/grpc/impl/codegen/compression_types.h

This PR is a part of b/196639718. It tries to move the content of include/grpc/impl/codegen/compression_types.h to include/grpcpp/impl/compression_types.h. We do not remove anything to achieve backward compatibility. The file include/grpc/impl/codegen/compression_types.h should be removed in the future.
This does not require any internal change, which has been verified through a test import CL.

Alisha Nanda @.***>于2022年11月23日 周三02:37写道：

@.**** approved this pull request.
—
Reply to this email directly, view it on GitHub
https://github.com/grpc/grpc/pull/31726#pullrequestreview-1190600105,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A4I3M6E4473SH7XM7AOR3Z3WJUHFFANCNFSM6AAAAAASHAYMU4
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

Cheng-Yu Chung @.***>于2022年11月23日 周三03:43写道：

Merged #31726 https://github.com/grpc/grpc/pull/31726 into master.
—
Reply to this email directly, view it on GitHub
https://github.com/grpc/grpc/pull/31726#event-7871144276, or unsubscribe
https://github.com/notifications/unsubscribe-auth/A4I3M6HAIARLIPXZ246WUNDWJUO5LANCNFSM6AAAAAASHAYMU4
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>


Remove the dependency on go-logger. Define an interface in this library

This MR is no longer relevant due to #17


Regarding the Issue of Sleep and Wake-up

When the device is in sleep mode, pressing the volume keys or other function keys wakes up the device, but the controller does not cause a wake-up, which can easily lead to accidental activation. I would like only the power key to be able to wake up the device. Additionally, disconnecting and connecting the power also causes a wake-up, which doesn't happen on SteamOS.

Can you edit /etc/device-quirks/device-quirks.conf and change USB_WAKE_ENABLED from 1 to 0, reboot, and see if the issue persists?

Can you edit /etc/device-quirks/device-quirks.conf and change USB_WAKE_ENABLED from 1 to 0, reboot, and see if the issue persists?

Still there, the device is aya one air 1s

As far as I know, the Air 1s cannot enter sleep mode; the screen simply goes dark, while the fan continues to operate. My Neo 2s also experiences the same situation.

They are sending me a geek 1S at some point. This will probably need to wait until that is delivered, assuming it's the same on all three

They are sending me a geek 1S at some point. This will probably need to wait until that is delivered, assuming it's the same on all three

Is there no other way? I can help with testing.

i am having the same sleep issue on Aya Neo Geek 1S. The sleep only shutdown the steam console/big picture mode, but the fan, the backlight and joystick ring lights are all on. And it can be waken by ayaneo button.
This happens on both ChimeraOS and Holoiso.
Any fix so far?

We don't have a device to work on. This device will likely need community support to resolve.

Currently have the issue on an Ayaneo 2s.
ChimeraOS details:
OS Version: 44-1
OS Build: 4b7363e
Kernal: 6.5.6-chos1-chimeraos-1
Confirmed same issue is occurring when using systemctl suspend.
Ran  journalctl --reverse to capture.
Logs show that the device goes into suspend:
Nov 19 09:20:34 chimeraos systemd-sleep[4523]: Entering sleep state 'susp end'...
But then drops out pretty quickly:
Nov 19 09:20:40 chimeraos systemd-sleep[4523]: System returned from sleep  state.
Will need someone with a bit more background on what actually sticks out as an issue.
systemctl suspend gamer journalctl output.txt
Full journalctl attached.

Ran freedesktops s2idle script to grab more details.
Results are showing the below:
2023-11-27 10:27:21,765 WARNING:	🚦 The kernel didn't emit a message that low power idle was supported    2023-11-27 10:27:21,765 WARNING:	🚦 AMD-PMC driver is missing                                              2023-11-27 10:27:21,765 WARNING:	🚦 Shenzhen Longsys Electronics Co., Ltd.  missing ACPI attributes
I am going to follow up with Aya about the nvme (Shenzhen Longsys Electronics Co.) and BIOS conifg for s2idle.
Full output:
s2idle_report-2023-11-27.txt

Got my hands on an Ayaneo2 (6800U) with working sleep.
Interesting find in /sys/power/mem_sleep:
Ayaneo2: Supports s2idle and deep. Deep is enabled
Ayaneo2s: Only supports s2idle

Got my hands on an Ayaneo2 (6800U) with working sleep. Interesting find in /sys/power/mem_sleep: Ayaneo2: Supports s2idle and deep. Deep is enabled Ayaneo2s: Only supports s2idle. s2idle is enabled
s2idle the issue? why is deep not supported on the ayaneo2s? Seems general issues revolving around sleep across Linux distros deep is the solution to fix sleep.

Microsoft has been strong arming vendors into supporting modern sleep so they can push updates to the system while it is idle. Deep sleep is being deprecated and all 7000 series we've seen so far have issues with sleep in Linux because of this.

Any solution to this issue ?
I am still facing this using ayaneo 2s and Chimeraos 46

Any solution to this issue ? I am still facing this using ayaneo 2s and Chimeraos 46

https://github.com/ChimeraOS/chimeraos/wiki/Community-Guides#enable-modern-sleep

Any solution to this issue ? I am still facing this using ayaneo 2s and Chimeraos 46

https://github.com/ChimeraOS/chimeraos/wiki/Community-Guides#enable-modern-sleep

Thank you very much , this worked

Somebody has a video taught to make because I couldn't.


Coordinate Conversion: losing positional accuracy between coordinate formats (ArcMap)

This is an extremely important bug
The addin is not maintaining the same input coordinate positional accuracy in the output values for DD, DDM, and DMS.
For example, if I set the default map unit in the addin to "DD" and using the Map Point tool, add the location of Sevastopol as the input value. See screenshot below:

The addin sets the input value to 44.608559N 033.528627E; (6 decimal places lat/long). Which using the calculator at NGA to determine the length of a degree of latitude and longitude at 45 degrees, I calculate that storing a coordinate down to 6 decimal places will allow a location to be stored down below a 1/10 of a meter (i.e. 0.11 meters of latitude and 0.08 meters of longitude). See snapshot of my spreadsheet below:

However, the default formatting for DD, DDM, and DMS do not allow us to output the coordinate down to the same accuracy.

The output for DD displays out to 2 decimal places, only gets us down to approx. 1,111 meters of latitude and approx. 788 meters of longitude (see screenshot above).

The output for DDM displays the decimal minute out to 2 decimal places, which based on my calculations, gets us down to approx. 18 meters of latitude and approx. 13 meters of longitude.

The output for DMS displays seconds out to a single decimal place, which based on my calculations, gets us down to approx. 3 meters of latitude and 2 meters of longitude.

The default configuration of the output coordinate formats should not store a less accuracy position then the user has entered. If the user wants to add custom formats and change the number of decimal places that's fine, but out of the box, the addin must calculate the same positional accuracy
Another example, would be the user entering the MGRS coordinate down to the meter, such as 36TWQ4194739604 (Sevastopol location specified above) and asking for DD, DDM, or DMS as the output. We are not providing the same coordinate back to the user.

Was testing with ArcGIS Pro 1.2

@jmhauck The default formatting for DD was not altered to handle 6 decimal places. It's still the original 2 decimal places:

@elinz I will need to check why it is automatically switching to "Custom" and why that is still showing the old format there. You should see the new default format when you select the example coordinate from the Formats list...in this case "70.49N 40.32W".
Would it also be better to just say "Default" in the formats list rather than showing an example there and another example below the Formats list...that don't even show the same coordinate?

@jmhauck Oh I see. I didn't even notice that the dialog was set to Custom when I opened it.
I like the idea of changing it to say "Default".

It is confusing to show an example coordinate in the Formats list and then show a sample.

@jmhauck Yes, lets make the change so the default format is listed as "Default" instead of showing a coordinate pair in the format list.

@elinz ok, sounds good.

@elinz  In terms of using the word Default for each. The code is currently using those example values as a unique key for looking up and storing the formats. Anything can be changed but this would require a fair bit of effort. As a possible alternative I switched them to be "Default DD" and "Default DDM" for example so they would retain the unique nature and avoid showing an additional coordinate value. Please let me know what you think and if we need to alter any further.

@jmhauck Ok. Understand the issue. The alternative of using "Default DD", "Default DDM" is a good alternative.

Verified that the default DD format is set to display up to 6 significant digits.
Verified that the default DDM format is set to display up to 4 significant digits.
Verified that the default DMS form is set to display up to 2 significant digits.
Performed the following test:

Entered the MGRS coordinate:10TET4889274330
10TET4889274330
47.620528N 122.349328W
47° 37.2317'N 122° 20.9597'W
47° 37' 13.9"N 122° 20' 57.58"W
116MM35
10TET4889274330
10TET4889274330
10T<PHONE_NUMBER>330

Took the DD output (47.620528N 122.349328W) from #1 above and entered as input. The output
is shown below:
47.620528N 122.349328W
47.620528N 122.349328W
47° 37.2317'N 122° 20.9597'W
47° 37' 13.9"N 122° 20' 57.58"W
116MM35
10TET4889274330
10TET4889274330
10T<PHONE_NUMBER>329 <- 1 meter different, but believe this is just a rounding issue.

Took the DDM output (47° 37.2317'N 122° 20.9597'W) from #1 above and entered as input. The output
is shown below:
47 37.2317N 122 20.9597W
47.620528N 122.349328W
47° 37.2317'N 122° 20.9597'W
47° 37' 13.9"N 122° 20' 57.58"W
116MM35
10TET4889274330
10TET4889274330
10T<PHONE_NUMBER>330 <- 1 meter different, but believe this is just a rounding issue.

Took the DMS output (47 37 13.9N 122 20 57.58W) from #1 above and entered as input. The output is shown below:
47 37 13.9N 122 20 57.58W
47.620528N 122.349328W
47° 37.2317'N 122° 20.9597'W
47° 37' 13.9"N 122° 20' 57.58"W
116MM35
10TET4889274330
10TET4889274330
10T<PHONE_NUMBER>329 <- 1 meter different, but believe this is just a rounding issue.

@jmhauck @topowright All the coordinates were the same except for UTM; I believe the 1 meter difference is do to a rounding issue. Can you please review? If you believe my assessment is true and you think the 1 meter difference is okay then I can close this issue.

@jmhauck Verified this is working on ArcMap addin build 10 Jan 2017 05:53 on ArcMap 10.3.1 final. Closing this issue.


doubleToLongBitsPolyfill(9007199254740991.0) is incorrect

println(doubleToLongBitsPolyfill(9007199254740991.0))
// expected:<PHONE_NUMBER>050653695
// actual:<PHONE_NUMBER>050653696

This shows up in Rhino for java.lang.Double.doubleToLongBits. On JS engines supporting typed arrays, the bug is not visible because the polyfill is not used.

Fixed in #2908.


Cannot read property 'settings' of undefined

bindingSchema can be undefined causing this to throw.
The repro that I have is, switch quickly between functions multiple times then wait for a second.

another easy way to repro this is to have an invalid function.json. I changed "direction": "in" => "direction": "inx"

binding UI will no be shown if binding has syntax errors


Param annotation bugfix

The validation checks for @Param now in all annotations of a method param.

see https://github.com/canoo/dolphin-platform/issues/463

Reviewed 2 of 2 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.

Comments from Reviewable

Coverage increased (+0.03%) to 65.74% when pulling 75486c1c632992eb331fc9f863eca1e1f389ac63 on param-annotation-bugfix into 9162f019a7928ea0479d6431443b160703045d32 on master.


Added Ratsgymnasium Peine

URL: https://www.ratsgymnasium-pe.de

@DeinAlbtraumTV I am sorry for a delay with processing your request.
Pull request merged. Thank you!

Thanks a lot! I am going to open another pull request, as my school now switched over to using isurf and i don't know how long the old domain will be active! Would appreciated it if you merged that one as well, thanks


Improve BlockchainInstance class usage

In such classes like ProposalBuilder, TransactionBuilder we can see usage of BlockchainInstance in such way
BlockchainInstance.__init__(self, **kwargs)
But it's not pythonic way, there are a lot of warnings - from Expected type 'BlockchainInstance', got 'TransactionBuilder' instead to Unresolved attribute reference 'blockchain' for class 'TransactionBuilder'.
I suggest inherit from class BlockchainInstance instead of using it in this way.

I am passing **kwargs over to the __init__() method so that I can extract variables like blockchain_instance.
Anyways, I agree that it should inherit from BlockchainInstance too.


Is it possible to add "NO VM" ?

Is it possible not to run it when it detects a virtual machine or older windows such as below win10

Depends, you can't really detect hardened VMs easily of course but simple ones are possible. I probably won't ever add a feature that stops it from working on anything below Windows 10.


使用osgi导致NotFoundException

[ ] I have searched the issues of this repository and believe that this is not a duplicate.
[ ] I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

Dubbo version: 2.6.2
Operating System version: 国产凝思操作系统6.0.45
Java version: 1.7

Steps to reproduce this issue

使用java api的方式调用服务
在非osgi平台时没有问题
在osgi平台使用报错：NotFoundException

Pls. provide [GitHub address] to reproduce this issue.
Expected Result
What do you expected from the above steps？
错误详情

解决
通过搜索我找到了，这个https://blog.csdn.net/paincupid/article/details/51175244
通过在代码中加入以下语句解决问题：

但是，我不知道这样做是否是正确的。

Hello,  you can fire a pr for this issue.  I think you should check the code work in non-osgi environment.


Testing Code Level 4

Hi, I was doing level 4 and have just completed the generateRule() method. Is there any way for me to test my code before moving on to gameOfLife()? Thank you!

hi u can try doing something like
UnaryOperator<List> a = Main.generateRule()
a.apply(List.of(0,0,0,1,0,0,0))
hope ur generateRule() method works as intended!

hi u can try doing something like
UnaryOperator<List> a = Main.generateRule()
a.apply(List.of(0,0,0,1,0,0,0))
hope ur generateRule() method works as intended!


Allows case insensitive searching in within option

In order to maintain backward compatibility, caseSensitive needs to be explicitly false to search for case insensitive keys.

Coverage remained the same at 100.0% when pulling 2fe8a9e48ce276ec6f7513344c8dd5b8965f15d3 on jakerichan:case-sensitive-option into 2f8e8b596e277be90a9ba0648c428a9c7d38edce on ansman:master.


Do not remove HTML comment

Whene you put some content to edit with grapesjs, the editor remove all HTML comment like
<!--[if !mso]><!-- --> so it's impossible to create good responsive template.
Can you fix that behavior ?

Use the grapesjs-preset-mjml for responsive templates. It's quite good for that.
Yet i still need the comments for a template engine, to hide the conditions and loops.

@IceCrystal0k when you say "include it in the grapejs" do you mean as a plugin? Could you give an example? I too am running into this issue. Thanks!

I see, you simply run that function with the editor instance as the argument and it will add the HTML comment node type to the dom components? Thanks!

You can either create a component with the code above and add it in the plugin list when you initialize grapes. You gonna need node js to compile the component.
Or you could use it directly in your code, after initializing the editor, passing the editor as an argument. In this case just give a name to the function, instead of exporting it.

@artf could you advice in here ?
This is mandatory behaviour to keep HTML comments within email HTML body. Otherwise, outlook will not show our template properly.

This is mandatory behaviour to keep HTML comments within email HTML body. Otherwise, outlook will not show our template properly.

Yes, the comment node is not included by default.

your solution works when getting HTML body, but when email is being edited in Grapes - it shows up without comments.

I don't get it

Hello and thank you for this really nice editor which is Grapejs.
I'm using it with grapejs newsletter and have the same issue as @SwithFr and the conditional comment tag in the editor.
We try to implement the component mentioned above and it works well but in the edition mode, all the comments are displayed.
I didn't found if a commit is plan to let grapejs editor read the conditional comment tag or if someone can help on fixing that displaying comment bug.
Thank you all !

Closing as the comment component was introduced in the core long time ago


[$1000] Web - Chat - Message appears in two lines after using option copy to clipboard

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Action Performed:

Go to staging.new.expensify.com
Log in with any account and select any chat
Send a message containing a word followed by a space followed by a URL.
Triple click the first word.
Verify both the word and the URL are selected.
Right click on your keypad and select Copy to clipboard
Paste into composed box and send it

Expected Result:
Message appears in one line after using option copy to clipboard
Actual Result:
Message appears in two lines after using option copy to clipboard
Workaround:
Unknown
Platform:

Where is this issue occurring?

Web

Version Number: <IP_ADDRESS>
Reproducible in staging?: Yes
Reproducible in production?: Yes
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~0112e7ce1cc51739ef
Upwork Job ID:<PHONE_NUMBER>752056832

Taking a look!

I can't seem to reproduce the issue, so closing for now. @kbecciv, any step I missed?
https://user-images.githubusercontent.com/19366280/203523319-7f142248-0512-4d3a-9870-67a96bf3ab18.mp4

I can reproduce it with current build <IP_ADDRESS>, steps are updated.
https://user-images.githubusercontent.com/93399543/203679053-86002b09-44e3-4014-aea6-56fb7f1c735e.mp4

Hmm, yeah that's odd. I can reproduce it as well.
https://user-images.githubusercontent.com/1127863/204109545-da4eff0c-d4ca-46a0-8fd6-1161ab25002a.mov

Proposal
Seems the issue occurs when we do the selection of text from rendered DOM, it contains the div tags  which might be causing this. 1 option to resolve this, we can take out the

 tags by replacing them with empty strings.
https://github.com/Expensify/App/blob/b4f1be977bb4d628ab4b55e4732b2158488dbc82/src/pages/home/report/ContextMenu/ContextMenuActions.js#L112
const finalContent = content.replaceAll('
', '').replaceAll('
', '');
Clipboard.setHtml(finalContent, parser.htmlToText(finalContent));

@JmillsExpensify, should we get a C+ in here?

Ah yeah, sorry about that.

@mananjadhav We have a proposal above for your review. Thanks!

Thanks for the proposal @Pujan92. You might be right about the issue about div but I am not convinced of the solution. If you observe the htmlToText function, it has htmlToTextRules defined ExpensiMark.js, where we have a stripTags rule, with a regex to remove all tags.

Still open for better proposals.

Proposal
Root cause
https://github.com/Expensify/App/blob/2881f18300a1b31a2047f1f61f2cdf93d2f7b79e/src/libs/SelectionScraper/index.js#L86
When an element is copied we remove extra attributes with the above function. And when we render a link we are rendering it wrapped with multiple display: inline; div elements.

After we strip extra attributes we will have an anchor element wrapped around with multiple empty div elements.
This will result in an extra line being rendered after the paste.
Solution 1
On replaceNodes function we can replace div elements with display: inline; style to span elements so it will not render extra line.
--- a/src/libs/SelectionScraper/index.js
+++ b/src/libs/SelectionScraper/index.js
@@ -112,6 +112,11 @@ const replaceNodes = (dom) => {
         domAttribs.href = dom.attribs.href;
     }

+    if (dom.attribs && dom.attribs.style && dom.name === 'div') {
+        dom.attribs.style.indexOf('display: inline;');
+        domName = 'span';
+    }

Solution 2
We can preserve style attribute on replaceNodes function. I don't think this is good idea to approve every style.
Solution 3
We can just remove div elements with display: inline;. I also think this is not so good idea to remove whole element with replaceNodes function.
Working example
https://user-images.githubusercontent.com/6459339/204861267-fa72478d-7ac6-431a-816c-533d4acca96e.mov

stripTags

@mananjadhav Then to copy the text only we can use the setString function for html selection too.
https://github.com/Expensify/App/blob/2881f18300a1b31a2047f1f61f2cdf93d2f7b79e/src/pages/home/report/ContextMenu/ContextMenuActions.js#L113
Clipboard.setString(Str.htmlDecode(parser.htmlToText(content)));

Still working through proposals.

It's not about the text. I could be wrong here, but can you please confirm setString doesn't remove all the styling?

As with the direct context menu CopyToClipboard we are generating the text only, I assume we need to do the same when the selection of text is applied for CopyToClipboard.
Considering that I thought it is fine to use setString which copies the plain text without any html tags & style.
https://github.com/Expensify/App/blob/820e876d5e4a8cbffe272220c1182c8942ed93cf/src/pages/home/report/ContextMenu/ContextMenuActions.js#L110-L114
if (!Clipboard.canSetHtml()) {
    Clipboard.setString(parser.htmlToMarkdown(content));
} else {
    Clipboard.setString(Str.htmlDecode(parser.htmlToText(content)));
}

@bernhardoj's proposal looks to be in the correct direction. But quick question here, does it only happen with links and not the other formatted rich text?

@mananjadhav It seems wrong to fix this issue during the paste phase. The issue occurs because we lose styling when we copy. If we fix this in paste, it will only affect contents that are copied from our chat, not contents that are copied from other sites.

proposal looks to be in the correct direction.

@Delgee Sorry should've been more clear here. I meant it is about modifying the parsing rules/config to ensure that we get the correct text. Haven't finalized if it is going to be Clipboard or Paste phase.

The issue is the div tag will be replaced by [block] which will be replaced into newline by replaceBlockWithNewLine.

@bernhardoj's proposal looks to be in the correct direction. But quick question here, does it only happen with links and not the other formatted rich text?

I tried some other styling (bold, italic) and it does not have div wrapped around the tag (except for other tags that need to be shown on the next line, e.g.,
), but after @Delgee mentioned about copying from another web, it's very possible any tag would have a div tags around them. We can easily create a new .html file with this text:
abcd
test

So, it all depends on how a web html is structured. The reason why the anchor tag has around 3 div is because of our AnchorRenderer component. 2 of the divs come from Tooltip, and the other div comes from PressableWithSecondaryInteraction.
https://github.com/Expensify/App/blob/bcdb1413fab510ee97c38928aba053b37b1d46d9/src/components/AnchorForCommentsOnly/BaseAnchorForCommentsOnly.js#L36-L66
If we are okay ignoring the copying from another website case, I think removing div tag around anchor tag is a decent solution.
And here is the video where I tested with other tag that have custom HTML renderer.
https://user-images.githubusercontent.com/50919443/205331701-a2703fd0-93e1-4375-b86c-6e1a8b9b22d6.mp4
But if we care about copying from another web, then the only solution I could think of is to remove all div tag that has display style with one of the values from:
inline (and all its variants, e.g., inline-block, etc.)
contents
initial
unset
table-caption
table-row
table-row-group
table-header-group
table-footer-group

    htmlToMarkdown(htmlString) {
        ....
        generatedMarkdown = removeInlineDiv(generatedMarkdown);
        ....
    }
    removeInlineDiv(htmlString) {
        const r = /
<]*style=['"][^><]*display: (?:[\w-]*inline[\w-]*|contents|initial|unset|table-(?:caption|cell|row[-\w]*|(?:header|footer)-group))[^><]*['"][^><]*>(.*)<\/div>/gi
        let html = htmlString;
        while (html.match(r)) {
            html = html.replace(r, '$1');
        }
        return html;
    }

This will work when we copy from another web. However, when we copy from our web, all attributes are stripped away by replaceNodes. We can preserve the style attribute for div tag only like this:
const replaceNodes = (dom) => {
...
    if (dom.attribs && dom.attribs.style && dom.name === 'div') {
        domAttribs.style = dom.attribs.style
    }
...

But there are still many edge cases that does not get covered here, so I don't think doing this is good. Actually, when we copy the text (abcd https://google.com) from Expensify to Slack, it will also have a new line
abcd
https://google.com

The best solution I think is to flatten all div around anchor tag into one span, but I don't have idea how to achieve that.

Still working through proposals.

@Gonals @JmillsExpensify Can you confirm if we're trying to resolve this for internal copy to clipboard only.

@mananjadhav, I'm not sure I follow your question, but the issue only occurs when copying to the clipboard through the button, right?

@Gonals this issue also occurs using the hotkey.


automation: Explicitly enable IPv6 on test container

It has been seen that some containers (locally and on CI) do not come up with IPv6 enabled and it causes the tests to fail.
Basically, IPv6 is not enabled if it was never configured (the case for many tests, so it depends on test run order).

Coverage remained the same at 72.395% when pulling 2fdda3f2a9ee843f08faaaf5f0951a418558d897 on EdDev:explicitly-enable-ipv6-on-container into ac344f101686790f09dedbaa998c94ffbf54045d on nmstate:master.


Make "Your Partner" custom

Wherever the form says "Your Partner" should be customized to be replaced with the partner's name.

Changed


Create a type-safe method of dealing with angle measurements.

Describe the issue (if no issue has been made)
Currently, when drawing rotated quads it is possible to pass degrees when radians are required.  This would likely continue to be an issue as additional features that use angles are added in the future.
PR impact (Make sure to add closing keywords)
List of related issues/PRs this will solve:

Impact
Issue/PR

Issues this solves
None

Other PRs this solves
None

Proposed fix (Make sure you've read on how to contribute to Hazel)
Created types for Radians and Degrees.  Both use only explicit conversions to make it much more difficult to unintentionally pass
angles using incorrect units to the functions that need them.  Additionally both types are constexpr allowing computations to be made at compile time wherever possible.
I needed the constant pi for conversions so I also added PI as constant as M_PI is not defined in all implementations of the Standard Library (in Base.h).
Additional context
Add any other context about the solution here. Did you test the solution on all (relevant) platforms?
If not, create a task list here.
I've only tested compiling in Visual Studio 2019.  More testing/polish may be necessary but I believe everything to be correct.
Additionally, I had renamed tilingFactor to textureScale before I added these types.  I decided not to revert those as I think it is a more easily understandable name.

The recent updates to Hazel, i.e.: supplying transforms to the draw quad functions make these changes obsolete.   There's also some things that I probably should not have committed it as-is.   So, it's probably okay to close this request for now, but I'll leave that for someone else to decide.
However, I do think having type safe angles is a worthwhile addition to the engine so I'll work on it a bit more, just make it more polished and robust after which I'll make a new pull request.

I still feel it's a bit over the top... I feel like just creating a typdef for them should be sufficient since Hazel wants to stay consistent in using degrees.... At that point we should also create a typedef for RendererID and some others like cherno keeps saying... I'll close it for now, but we need to do something at some point...


Inferno Test Kit - Manifest Invalid Types Check

The Check For Invalid Types in Import Manifest part of the Inferno Test Kit will throw errors if it finds US Core Practitioner or Organization resources. Shouldn't it ignore those?

UDS+ resources directly reference US Core Organization and Practitioner, so I'd expect to send those in the manifest along with the UDS+ resources.
Can the test kit be updated to not throw an error for those two resources?

We are aware of this issue and hope to resolve it in an upcoming release of the IG and Inferno Kit. Thank you! FYI @nbashyam


THRIFT-3851

We can ignore the failed apache jenkins build - as such this one looks okay from a build perspective.  I would like someone with some go experience to code review it however.


Flash programming sequence error caused by incorrect write procedure

I've noticed that in certain circumstances the flash controller returns BankError::PROGRAMMING_SEQUENCE.
It doesn't seem to happen in all circumstances, but the following doesn't work for me within my application:
let mut buffer: [u8; 256] = [0xFF; 256];
// ... fill buffer with data
flash.erase_sector(Bank::UserBank2, 7).unwrap();
flash
    .write_sector(Bank::UserBank2, 7, 0, &buffer)
    .unwrap();

I believe the issue is due to an incorrect write procedure regarding the program enable bit (PG1/2)
cc. @richardeoin  @lachlansneff-parallel
Kind regards

@richardeoin , please see https://github.com/stm32-rs/stm32h7xx-hal/pull/383

Closed by #383


add CI

@homunkulus r+

:pushpin: Commit bc41724 has been approved by japaric

:hourglass: Testing commit bc41724 with merge bc41724...

:sunny: Test successful - status-travis
Approved by: japaric
Pushing bc417244df6cd68bf98fdd4014a909f578152858 to master...


🪲 Runtime error on search results change

Part 12 of me not understanding Angular, at least the app behaves correctly
ERROR Error: NG0100: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked.

Fixed on feature branch


OFBIZ-4030: change the id Attribute for input fields in the model macro form renderer from String to FlexibleStringExpander

Documented: change the id Attribute for input fields in the model macro
form renderer from String to FlexibleStringExpander
(OFBIZ-4030)
Document that the id-name attribute for a form widget's field
element can use ${} notation. Also document the default value if id-name is
not set.

Dan, are you sure it's connected to OFBIZ-4030? That's quite an old issue.
Also, please do not use an empty line between the commit title and (OFBIZ-xxxx) if possible.
Thanks for your work!

Hi Michael,
4030 was a typo. Now fixed to be 4035.
On Sun, 23 Feb 2020 at 18:04, Michael Brohl<EMAIL_ADDRESS>wrote:

Dan, are you sure it's connected to OFBIZ-4030? That's quite an old issue.
Also, please do not use an empty line between the commit title and
(OFBIZ-xxxx) if possible.
Thanks for your work!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/apache/ofbiz-framework/pull/24?email_source=notifications&email_token=ABNMQPSMJVUBOBGLITR4A4LREK3A5A5CNFSM4KZ4PEY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMWC2YI#issuecomment-590097761,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABNMQPRAPTK2TIVIAZPIC33REK3A5ANCNFSM4KZ4PEYQ
.

--
Daniel Watford

Hi Michael,
The newlines were added to the commit to comply with https://cwiki.apache.org/confluence/display/OFBIZ/OFBiz+commit+message+template

You are right, the message template was changed in confluence recently with a newline between title and issue number.

But you should change the commit message to the right issue number else they are not linked correctly.

To amend the commit message I'll need to either modify the existing commit locally and force-push it to github, or create a new branch and cherry pick the commit with a new message.
I'm assuming that since the commit is already public it is best to create a new branch and a new PR. I'll start that now unless anyone jumps in and tells me that I'm being too cautious by not amending an already pushed commit.

This PR replaced by https://github.com/apache/ofbiz-framework/pull/28 which has fixed the jira ticket reference in commit comments.


Update README.md with MacOS/ZSH Installation specifics

Following the conversation in issue #86, the following PR is made to help clarify potential issue with macOS or ZSH installs with pip.

@alexrashed Sure! I moved it higher in the README and shorted it to have less words. Does that look more like what you wanted?

You're welcome @alexrashed!


APEX charts example is broken

With the latest version (2.2.0) the example of the apex charts including the lowest period is broken.
https://github.com/mampfes/ha_epex_spot#3-i-want-to-combine-and-view-everything
The cause seems to be sensor.epex_start_low_period that no longer exists.
Is there any way to achieve an indication of the lowest hours of the day using the price_rank sensor or the low period service? I'm trying to visually indicate on a chart when some appliances would start.

You can still add the template sensor from the previous chapter. But indeed, the example will not work with the new sensors and services anymore.
The example was provided by an user, I don't know apex charts good enough to fix it. Maybe s.o. with better apex chart skills can help, please.

If it does not work, perhaps a note would be nice, if not fixed, as I ran into the same problem. But the one in the HA community works
https://community.home-assistant.io/t/epex-spot-and-awattar-electricity-prices/519151/42?u=h3rb3rt
and perhaps "webwude" can help you out on this, as it seems he has good apex skills ;)

(i think) i have it working. since it's past midnight, i can't tell for sure, as i don't have data for the 'next day'.
not knowing what changed in this integration recently, just wild guesses based on what i see in my setup:

sensor.epex_spot_be_price (or sensor.epex_spot_at_price as seen in other examples) has changed to  sensor.epex_spot_data_price, but i switched to sensor.epex_spot_data_net_price anyways
hence entry.price_eur_per_mwh became entry.price_ct_per_kwh in the data_generators of the apexchart
hence color_threshold values had to be adapted, i took over the ones of the link above.

the logic of the chart:
the first series draws the line plus extremas of the first 24 hours, to also get extremas shown for the second 24 hours there's the separate second series, again drawing a line. the third series is the green bar for the cheapest 2 hours.
so, here goes the apexchart card:
`type: custom:apexcharts-card
header:
show: false
graph_span: 48h
span:
start: day
now:
show: true
label: now
experimental:
color_threshold: true
series:

entity: sensor.epex_spot_data_net_price
yaxis_id: preis
float_precision: 2
type: line
stroke_width: 4
curve: stepline
extend_to: false
show:
extremas: true
data_generator: >
return entity.attributes.data.map((entry, index) => { return [new
Date(entry.start_time).getTime(), entry.price_ct_per_kwh]; }).slice(0,24);
color_threshold:

value: 2
color: 00ed01
value: 4
color: 3af901
value: 6
color: 87fa00
value: 8
color: cefb02
value: 10
color: eeff00
value: 12
color: ffde1a
value: 14
color: ffa700
value: 16
color: ff8d00
value: 18
color: ff7400
value: 20
color: ff4d00
value: 22
color: ff4d00
value: 24
color: ff0000
value: 26
color: e60000
value: 28
color: cc0000
value: 30
color: b30000
value: 32
color: '990000'
value: 34
color: '800000'
value: 36
color: '660000'
value: 38
color: 4d0000
value: 40
color: '330000'

entity: sensor.epex_spot_data_net_price
type: line
stroke_width: 4
curve: stepline
extend_to: end
float_precision: 3
yaxis_id: preis
show:
extremas: true
data_generator: |
return entity.attributes.data.map((entry) => {
return [new Date(entry.start_time), entry.price_ct_per_kwh]; }).slice(23,47);
color_threshold:

value: 2
color: 00ed01
value: 4
color: 3af901
value: 6
color: 87fa00
value: 8
color: cefb02
value: 10
color: eeff00
value: 12
color: ffde1a
value: 14
color: ffa700
value: 16
color: ff8d00
value: 18
color: ff7400
value: 20
color: ff4d00
value: 22
color: ff4d00
value: 24
color: ff0000
value: 26
color: e60000
value: 28
color: cc0000
value: 30
color: b30000
value: 32
color: '990000'
value: 34
color: '800000'
value: 36
color: '660000'
value: 38
color: 4d0000
value: 40
color: '330000'

entity: sensor.epex_spot_data_net_price
yaxis_id: preis
color: green
float_precision: 2
type: area
stroke_width: 0
curve: stepline
extend_to: false
data_generator: >
return entity.attributes.data.map((entry, index) => { return [new
Date(entry.start_time).getTime(),
entry.price_ct_per_kwh];}).slice(parseInt(hass.states['sensor.epex_start_low_period'].state.substring(0,2)),parseInt(hass.states['sensor.epex_start_low_period'].state.substring(0,2))+4);
yaxis:
id: preis
decimals: 0
apex_config:
title:
text: ct/kWh
tickAmount: 5
apex_config:
legend:
show: false
tooltip:
x:
show: true
format: HH:00 - HH:59
`

and that's what the template sensor looks like for me (adding it as a helper via the ui doesn't work as there seems to be a limit of characters there, so i had to put it in the configuration.yaml):
`

name: epex_start_low_period
state: >-
{% set ns = namespace(attr_dict=[]) %}
{% for item in (state_attr('sensor.epex_spot_data_price', 'data'))[0:24] %}
{%- set ns.attr_dict = ns.attr_dict + [(loop.index-1,item["price_eur_per_mwh"])] %}
{% endfor %}
{%- set price_map = dict(ns.attr_dict) %}
{%- set price_sort = price_map.values()|list %}
{%- set keys_list = price_map.keys()|list %}
{%- set ns = namespace(combo=[]) %}
{%- for p in keys_list %}
{%- set p = p|int %}
{%- if p < 22 %}
{%- set ns.combo = ns.combo + [(p, ((price_sort)[p] + (price_sort)[p+1] + (price_sort)[p+2])|round(2))] %}
{%- endif %}
{%- endfor %}
{%- set ns.combo = ns.combo[6:22] %}
{%- set mapper = dict(ns.combo) %}
{%- set key = mapper.keys()|list %}
{%- set val = mapper.values()|list %}
{%- set val_min = mapper.values()|min %}
{{ key[val.index(val_min)]|string + ":00" }}
`

I was it able to get it work like drahdiwaberl said. But I was able to create the ,epex_start_low_period sensor via Settings>Devices&Services>Helpers
Then choose a Template type helper and choose Template a sensor.
Content of the template starts then from line : {% set ns = namespace(attr_dict=[]) %}

Hi, thank you drahdiwaberl drahdiwaberl; I got the card working. However the apexchart does not load automaticaly. I need to swith to another view and the go back and then the card shows the loaded apexchart.
Do you have any idea how I can resolve this?

However the apexchart does not load automaticaly. I need to swith to another view and then go back. Then the card shows the loaded apexchart. Do you have any idea how I can resolve this?

this sounds like an issue with the apexchart integration or limited ressources for it .. mind you it's quite demanding, so might not work too well on weaker hosts (often read from people giving up on it for that reason).