"Unexpected token import" with angularfire2 on angular-cli, AOT, SSR, and firebase-functions

Has anyone done this?  I'm stuck, would love some suggestions, or pointers if I'm missing something obvious or misunderstanding the problem.
Version info
Angular: 4.2.4
Firebase: 4.1.3
AngularFire: 4.0.0-rc1
Firebase-functions: 0.5.9
How to reproduce these conditions
Using AOT compiling, and server-side rendering, as described in this blagpost:
https://medium.com/@evertonrobertoauler/angular-4-universal-app-with-angular-cli-db8b53bba07d
Repo:
https://github.com/SparksNetwork/exp-angular-firebase/tree/shared-code
(note I am working from the shared-code branch)
(the repo structure is kind of haphazard, everything lives in /functions because thats what firebase-functions requires)
Steps to set up and reproduce
App runs successfully JIT running ng serve.
Compile client and server with ng run build.
Serve via standalone node express server with ts-node src/server.ts or via firebase-functions local emulator with firebase serve --only functions.
Debug output
FirebaseError: Error occurred while parsing your function triggers.

/Users/sdebaun/exp-angular-firebase/functions/node_modules/angularfire2/app/firebase.app.module.js:1
(function (exports, require, module, __filename, __dirname) { import { InjectionToken, } from '@angular/core';
                                                              ^^^^^^
SyntaxError: Unexpected token import
    at createScript (vm.js:53:10)
    at Object.runInThisContext (vm.js:95:10)
    at Module._compile (module.js:543:28)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/sdebaun/exp-angular-firebase/functions/fn/dist/dist/ngfactory/src/app/app.server.module.ngfactory.js:23:13)
i  functions: No HTTPS functions emulated. Support for other function types are coming soon.

Diagnosis
I suspect it's choking because the angularfire2 npm module is compiled with es2015 syntax which doesn't work in node (which firebase-functions is based on).
Possible fix?
I don’t know a lot about how NPM works, but I’m wondering if I:

Fork angularfire2
change the target and/or module settings in forked tsconfig until I find something that works
in my app, npm install from my forked angularfire2

Only thing I don’t know how to do there is: how do I ensure that my forked angularfire2 gets built?  There’s a bunch of stuff in the repo that has to do with the build process that is totally alien to me.
The only other thing I can think of is to try to write my own firebase wrapper for angular, with blackjack and hookers that compiles to commonjs.  That sounds like an awful idea.
Things I’ve Tried
Using DI to swap out AngularFire2 on server
Per the discussion in this thread (https://github.com/angular/universal-starter/issues/127#issuecomment-287644140), I started writing a fake service that adhered to the angularfire2 interfaces that I could use in my app.server.module.ts.  Quickly I realized that because all my services actually have to import from the real angularfire2 module, it still wouldn’t work, because the error gets thrown when the file is imported, not when it’s run.
Copying angularfire2/src into a local lib directory and building it with the project
When I try this, I get all sorts of errors about Zone not being found.  I can’t figure out what needs to be included, or how, in order to get it to compile the ts.

@sdebaun I recently ran into this myself. I have a fix in the works but I just moved halfway across the country so my schedule is pretty jammed right now. I do expect to get something out next week.
There's a big overhaul needed in how we package these modules. We need a UMD bundle for each feature (auth, db) rather than one larger one. I'm looking into mimicking the structure that the main Angular repo uses with their package.json and tsconfig.files. A good example is with the HTTP module.

@davideast thankyouthankyouthankyouthankyouthankyouthankyouthankyou!  I was so excited that I got a client/server monorepo working with SSR, and then wanted to cry when I found out angularfire didn't play nicely.
So I should just hold off for a bit, eventually angularfire will work with ssr?
YOURETHEBEST!!!

I've just run into this too trying out universal build with angular-cli, so would love to know what your work around was. I was going to try to build targeting commonjs and pull in to packages.json direct from my own branch. Alternatively I was thinking about swapping out for the firebase admin sdk using getPlatform and some jigging about with the code.
Both seemed horrid options atm, the later in particular.
I haven't tried either yet, both seem horrid. I'll keep my fingers crossed, in the mean time I will continue to play if I get the chance.

@justingrayston @sdebaun  I'm close to a next release for this fix. If all goes well I'll be testing an Angular Universal build with the CLI. I'll keep you updated.

@davideast when can we expect this release. I am using "angularfire2": "^4.0.0-rc.1" with "firebase": "^4.2.0" . AOT with angular cli . I am getting the same issue.
E:\Angular\designcourse\angular-seo\node_modules\angularfire2\app\firebase.app.module.js:1
(function (exports, require, module, __filename, __dirname) { import { InjectionToken, } from '@angular/core';
^^^^^^
SyntaxError: Unexpected token import
at Object.exports.runInThisContext (vm.js:76:16)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (E:\Angular\designcourse\angular-seo\dist\ngfactory\src\app\app.server.module.ngfactory.ts:26:1)
at Module._compile (module.js:570:32)

@justingrayston my workaround was... disable SSR until the fix is posted :)

@davideast , does rc2 fixes this issue ?

@sdebaun @justingrayston @KrGyan

does rc2 fixes this issue ?

Yes and no. Mostly no. #1088 fixed the problem that @sdebaun ran into. The Angular Compiler used deep imports to pull back the data, when I needed to use the UMD bundle. I spent a lot of time getting the packaging of each module correct.
Now, if you use AngularFire2 with Angular Universal, there will be no errors*. However, the data will not render on the server. You'll get back null in your templates. This is because AngularFire2 uses the Firebase SDK which uses websockets. Websockets are long-lived persistent connections. Angular Universal doesn't know when this socket will end. I can fix this by wrapping the calls for Universal, but that will be another PR. I plan on working on that next week.
*i think

@davideast when you say that you intend to wrap the calls, how do you plan on doing so? I imagine there is the possibility to wrap the socket connection into an RxJS websocket but I imagine that would require a lot of work and wouldn't be the right approach... If you want though I would love to help you in any endeavor/steps you want to move forward with this!

Is the data null because Universal isn't waiting or because it doesn't even open the socket? If the first case, I only need data in perhaps one component for SEO, so for now, I could grab the master and force Universal to wait - with a mock HTTP call, timeout or sth, until I got the first data?

@davideast any progress with getting AngularFire2 to play nice with Universal?

Got around the problem by providing firebase-admin to a FirebaseAdminService, then using that instead of Angularfire2 in a ServerDatabaseModule. Sorry, not a complete example but hope this gives you ideas:
https://gist.github.com/funkizer/6d6559787c17a88c60cf2ddc9ca06527
https://gist.github.com/funkizer/e162adff4191cae3c897e6bc5b7fd605
If you're hosting Universal on your own server, you might get away with not getting rid of all Angularfire2 stuff, but at least on Cloud Functions, you'll get ctor is not a constructor or other funny errors or timeouts because injectors fail, so I just got rid of everything related to FB client. :) Key thing is also to run firebase-admin related things wrapped in zone.runOutsideAngular().

I fixed a similar problem in @ngx-translate/core. Please take a look to my comment
here.
i did it locally too for the angularfire2 module.
I used the cli of babel to compile all js file into es5 - commonjs so that i can use them in nodejs (express) with angular universal --> finally no more SyntaxError: Unexpected token import!

Any fix for this?

@davideast what is the timeframe for this? do you need any help with this? SSR is critical for the stuff we are building and I would love to use firebase for it.

I have Firebase Auth "working" in my starter project here:
code: https://github.com/patrickmichalina/fusebox-angular-universal-starter
demo: https://angular.patrickmichalina.com/login

I tried to do SSR on Cloud functions with AngularFire2 included. There are no errors and data is fetched from RTDB as it can be seen printed in to the logs. But the html pages never render and soon timeout. @davideast Any updates on the possible fix you mentioned?

Have same problem here, html pages never render when using AngularFire. @davideast any update?

I was able to resolve the usage of angularfire2 on server side creating and injecting a "stub" version of AngularFireDatabase that uses the firebase rest api. As @davideast said the problem of timeouts or never render templates is the websocket that never finish and angular do not knows when finish rendering.
I didn't even include the angularfire modules on server side.
Hope it helps.

@ncherian @paulogr  so the main problem is actually not the socket, but Zone.js, we have a bug in our handling. The microtasks are never allowing appRef isStable to go true, thus Universal never letting go of the rendering until Timeout and state restoration to never happen once the browser actually does get the rendered page.
If you wrap in a zone.runOutsideAngular() things work. I have on my list to fix.

There's also no node.js entry to firebase/app which is a bug + why Websockets aren't getting pulled in.
(global as any).WebSocket = require("ws"); in your server.ts works until I get that patched upstream ;)

so what should we do ? firebase is very important to me and without SSR to SEO, my angular 2 application is just a toys :(

@hiepxanh I know its not elegant, nor does it cover all scenarios, but it gets me by until the official supports lands in this library: https://github.com/patrickmichalina/fusebox-angular-universal-starter/blob/master/src/server/server.angular-fire.service.ts

We use angularfire2 and firestore in our application. Firestore does not render data as @davideast mentioned. From this conversation I understand its going to take time. @hiepxanh you can try other solutions. One which I saw recently is to use chrome's rendertron. Definitely not better than universal. But will work. Check this blog

Finally Server Side Rendering with Firebase :blush:

🎉 Introducing AngularFire Lite 🎉
AnglularFire Lite is a very very simple library to use Angular with Firebase it supports server-side rendering out of the box for both firebase realtime database and firestore. It renders the SSR app and then switches to the non-SSR to receive real-time updates from firebase with no flickering at all when the angular app bootstraps.
Visit AngularFire Lite repo to get started today:

Get Started

Demo App

Please note that this is a personal initiative I started and it's still in very early beta so your help by contributing and supporting the library will be the only way to improve it.

@hamedbaatour This is really cool! I wish you would have contributed to this project however. We plan on adding support for the rest of the Firebase features soon.
I do have one question, is it actually lighter than AngularFire? AngularFire itself is really small, the DB API is 3kb. The Firestore API is 2.3kb. The Auth API is 950 bytes.

wow, you deserve this 🥇
I love that, finally, I can't wait to use this, thanks you for your initiative. That help me a lot and make my dream come true. I still didn't using any different database to only work with firebase

Looking forward to SSR support

well, without support for socket method from angular. We (angularfire, or anything use socket) cannot work with universal. That really bad news,

there are some investment in socket.io with ssr  from angular universal but look like very slow. They are trying to doing something with ZoneMacroTaskWrapper but i don't understand.

Mr. @jamesdaniels  is trying to doing something different, he work with service worker and xmlhttprequest to make our dream come true. I hope that work. 👍  everything I can help, you just mention, sir.

are there already results of an AngularFire Lite cooperation? When can we expect SSR in AngularFire?

@doczoidberg there's a pull request (#1454) for that, so probably soon :)

"angularfire2": "^5.0.0-rc.6" seems to be working with ssr. Did anything change ?

@kpsrinivas were you able to make the ssr work with rc.6?

@andreaaschei yes.

angularfire2@next has more SSR work, will be cutting RC.7 shortly. Give it
a spin.
On Fri, Apr 13, 2018, 4:47 AM Srinivas Kolluri<EMAIL_ADDRESS>wrote:

@andreaaschei https://github.com/andreaaschei yes.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/angular/angularfire2/issues/1073#issuecomment-381068921,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AACvr1oL7Y9a8gjw9Z3CRMN_yqKFRWvnks5toGY8gaJpZM4OZObk
.

Seems to be working with RC.7 although some modifications are needed to the official universal guide if you're using material and other libraries in the server.ts file. Thanks @jamesdaniels and the team at angular firebase for the very helpful video highly recommend checking it out.
https://www.youtube.com/watch?v=wij2-gyG12E
Still will need to test it further but great job guys!

We're working on those. This is a nessisary first step and was already a
large change, so we wanted to get out and in people's hands while we work
on state-transfer story (will require a change to the Firebase JS SDK) and
auth (a needed change just landed in the SDK).
On Thu, Apr 19, 2018, 1:20 PM Patrick Michalina<EMAIL_ADDRESS>wrote:

SSR in the minimal sense. It still does not have state transfer nor does
it have auth.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/angular/angularfire2/issues/1073#issuecomment-382851479,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AACvr3fLZcDVzPtJfciP10YUJJyoKRTbks5tqON9gaJpZM4OZObk
.


Bug Fix: Adapt Keiser driver to different bike versions

Keiser M3 bikes come in multiple revisions with version 6.29 and lower bikes emitting data packets every ~ 2 seconds and version 6.30 and higher bikes emitting data packets every ~ 0.3 seconds.
The Keiser stats timer needs to be adapted to these two version of bikes with the timeout value being:

Version <= 6.29: Timeout: 7 sec
Version >= 6.30: Timeout: 2 sec (possibly 1 sec)

Created pull request #63 to address this.

Fixed by #63.


Usage or 'reified' in Evaluation

The Evaluation chapter says
This value will be passed off to Haskell and reified into real world effects.

I believe this is somewhat confusing. In my understanding, that value is not reified into real world effects. On the contrary, it is a reification of real world effects, which can then be interpreted to actually cause those effects.
Or am I misunderstanding the concept of reification?

I mean to say it is lifted into the main function of Haskell and evaluated. Perhaps that isn't clear from the text?


Server detection bug + Updated BR parser

Hello again, we've been doing an extensive amount of tests with the library and noticed a few things, the first of which is an important bug.
When doing whois queries by domain, the function aio_run passes the search_term (which is the domain) to both the base aio_run and also the _get_server_name (if it doesn't have a server), however _get_server_name wants the tld as else it can't find the proper server.
https://github.com/pogzyb/asyncwhois/blob/7cb3527959b6960299f72df8a08a20daa298d1fa/asyncwhois/query.py#L213-L216
This is easily solved by passing both things to aio_run and then passing each variable to the corresponding function, this also happens on the non aio version.
A second thing is that, on _aio_do_query, each time you do a query you store the output and try to parse the response for a preferred WHOIS server name:
https://github.com/pogzyb/asyncwhois/blob/7cb3527959b6960299f72df8a08a20daa298d1fa/asyncwhois/query.py#L159-L186
When no server is found or you do aio_run without server, the chain + regex comes in handy as it finds a whois server to go to, and also even when there's already a server it sometimes redirects you to another one (which maybe has better information but i don't know if its the case), which is the case for:
domain: "seanho.com" whois_server: "whois.porkbun.com"
However, we found some examples where the first call would get good information, it would find a server, make a second call that didn't respond, and then crash. This is the case with:
domain: "correoparaguayo.top", whois_server: "www.gname.com" and the information that query_output provided is:
"Domain Name: correoparaguayo.top\r\nRegistry Domain ID: D20241104G10001G_33606946-top\r\nRegistrar WHOIS Server: www.gname.com\r\nRegistrar URL: http://www.gname.com\r\nUpdated Date: 2024-11-04T09:10:03Z\r\nCreation Date: 2024-11-04T09:09:31Z\r\nRegistry Expiry Date: 2025-11-04T09:09:31Z\r\nRegistrar: Gname.com Pte. Ltd.\r\nRegistrar IANA ID: 1923\r\nRegistrar Abuse Contact Email<EMAIL_ADDRESS>Abuse Contact Phone: +65.6531989391\r\n...
We noticed that commenting the recursive call:
        '''
        # parse response for the referred WHOIS server name
        whois_server = self._find_match(regex, query_output)
        whois_server = whois_server.lower()
        if (
            whois_server
            and whois_server != server
            and not whois_server.startswith("http")
        ):
            # recursive call to find the authoritative server
            chain = await self._aio_do_query(
                whois_server, data, self.whois_server_regex, chain
            )
    # return the WHOIS query chain
    '''

Would not only solve this problem, but it would also make the library blazingly fast (it was already very fast before, but it improved quite a bit), it also didn't seem to affect much the data integrity (take this with a grain of salt, i will test it better tomorrow morning).
The "correoparaguayo.top" seems like a corner case, however it isn't so rare, we found a few more (can't recall them, too much tests), it would be great if there was a way to first of all, be able to "set" a max depth (as for us, for example, max depth = 0 would seemingly work (i'll have to check completely tomorrow)) and also to have a bit more strict control on these recursive calls so it tries to call something and if it would crash, for it to get handled and return the data that it already had. (You would need to have sub timeouts or something, right now the general query has a timeout of 10 seconds i think, maybe the first one would need to have 5 seconds and then a max of 2 recursive calls with 2 seconds each? I don't know, that's a thing to decide)
And lastly, we found several problems when dealing with .br datetimes, these got solved by adding this:
    TLDBaseKeys.CREATED: r"created: *([^#\n]*)",
    TLDBaseKeys.UPDATED: r"changed: *(.+)",

To:
https://github.com/pogzyb/asyncwhois/blob/7cb3527959b6960299f72df8a08a20daa298d1fa/asyncwhois/tldparsers.py#L181-L189
If anything is not clear, or you want me to give more examples or paste the code or anything feel free to ask, as I've put quite a big wall of text and everything i've explained might not be so clear.

Hi,
Thanks again for the clear explanation and providing examples! I'm happy that this library is useful and I appreciate your help with making it better.

When doing whois queries by domain, the function aio_run passes the search_term (which is the domain) to both the base aio_run and also the _get_server_name (if it doesn't have a server), however _get_server_name wants the tld as else it can't find the proper server.

Oh wow! Good observation. This will always add an unnecessary call to IANA. I'll get a PR together right away to fix this.

When no server is found or you do aio_run without server, the chain + regex comes in handy as it finds a whois server to go to, and also even when there's already a server it sometimes redirects you to another one (which maybe has better information but i don't know if its the case), ...

Yes, this is exactly right. Ultimately, we want the "authoritative" response, which will have the most accurate information. In most cases, we can find the server information for the TLD in server/domains.py , otherwise the code will default to starting with a call to IANA (currently happening because of the bug you pointed out).

... Would not only solve this problem, but it would also make the library blazingly fast (it was already very fast before, but it improved quite a bit), it also didn't seem to affect much the data integrity (take this with a grain of salt, i will test it better tomorrow morning).

I see how doing this would make things much faster, but yes the trade-off is "data integrity". Stopping before getting to the authoritative source will likely mean that responses are less accurate or lacking certain items like registrant information. Like you pointed out, there are certainly instances were non-authoritative responses are perfectly OK, but it's hard to judge. If during you're testing you find that there a majority of cases where "stopping early" yields good results, then I would be interested in implementing a flag or switch for this.

The "correoparaguayo.top" seems like a corner case, however it isn't so rare, we found a few more (can't recall them, too much tests), it would be great if there was a way to first of all, be able to "set" a max depth.

I agree that "correoparaguayo.top" falls more into the edge-case category. Typically, I would stick to handling them via string comparisons like so:
          if (
              whois_server
              and whois_server != server
              and not whois_server.startswith("http")  # edge-case
              and not whois_server.startswith("www.")  # edge-case
          ):
              # recursive call to find the authoritative server
              chain = await self._aio_do_query(
                  whois_server, data, self.whois_server_regex, chain
              )

Again, happy to change things though if you feel there's a better solution. I do something very similar to your "max depth" idea in the whodap project for RDAP queries:

def _get_authoritative_response(
        self, href: str, seen: List[str], depth: int = 0
    ) -> Optional[httpx.Response]:
        """
        Makes HTTP calls to RDAP servers until it finds
        the authoritative source.

        :param href: href containing the location of an RDAP
        :param depth: recursion counter
        :return: `httpx` response object
        """
        resp = self._get_request(href)
        try:
            self._check_status_code(resp.status_code)
        except NotFoundError:
            # Occasionally, gTLD RDAP servers are wrong or not fully implemented.
            # If we've succeeded previously, but now the href returns a 404,
            # return None, so the last OK response is returned.
            if depth != 0:
                return None
            else:
                raise
        # check for more authoritative source
        try:
            # If for some reason the response is invalid json, then just return None.
            # This may happen if we request an authoritative href that is not actually
            # rdap+json, but instead a webpage/html.
            rdap_json = resp.json()
        except JSONDecodeError:
            return None
        links = rdap_json.get("links")
        if links:
            next_href = self._check_next_href(href, links)
            if next_href and next_href not in seen:
                seen.append(next_href)
                resp = (
                    self._get_authoritative_response(next_href, seen, depth + 1) or resp
                )
        # return authoritative response
        return resp

And lastly, we found several problems when dealing with .br datetimes, these got solved by adding ...

Thanks so much! That should be an easy fix.

Hello again and thanks for the fast responses and changes!
I've been testing the data-integrity difference between the two methods, getting the response from the first server and parsing it vs doing a recursive checking to try to find the authoritative response, and found out that, at least for our case, the option to be able to choose a max depth or some way not to enter into the recursive callings would be very benefitial.
Even though the recursive calls ended up giving more information overall when they worked, we found out that there were a ton of calls that would return as if there was no information for that domain (when initially they had information) or that would end up crashing (and therefore not returning any information), and as we're actually only interested on the created and updated dates, working with the first query is nearly optimal for us.
It's quite possible that in your use case this doesn't happen as often because it depends quite a bit on the type of domains that's being checked, but in our case it was pretty relevant: (first is without recursive calling, second is the current library version)

I was gonna edit a fork and propose changes for this directly but don't know if, since you already have a similar system for rdap, you already had an idea in mind.
Thanks for everything!

Wow, that is interesting. In that case, adding this as a feature makes sense. Honestly, I think most of the developers who use this library are primarily concerned with retrieving the created/updated/expires dates, so this could be a nice addition for everyone.

I was gonna edit a fork and propose changes for this directly but don't know if, since you already have a similar system for rdap, you already had an idea in mind.

Sounds good - please go ahead and open a PR with your changes. I can review or modify if needed.
Thanks!

Created the pull request.
These are the tests when using no max_depth and using 0:

And this is before the changes (the same as using no max_depth):

If you can, test them and If they're okay squash them (On the second commit I only changed spacing)


What should I do with 5 constructions-duplicates?

We discovered that there are 5 constructions in the database that duplicate other 5 constructions in the database. They all have different ID numbers with their counterparts. For example constructions ID 1531 and ID 1790 are identical and we want only keep 1531.
I am ready to do anything you say to disturb your code the least possible. One solution is just delete these entries. Another solution that maybe you like more is that we keep these numbers but put there five different constructions (we have such a list for the future) that will not be duplicative. I am asking you because I do not know how you code different entries. If you have a specific construction assigned to a specific number or not, I do not want to damage the code. So, I can do whatever you say, what is the easiest option for you.
The numbers of constructions to delete or to fill with different content are:
ID 403, 1116, 1668, 1673, 1790.
I coloured their lines in red in the database.
I do not know how they appeared in the database.

I recommend to remove the rows which are duplicate. My conversion scripts should then pick it up. Keeping this issue open as reminder to check that 5 files then disappeared.

Ok. I have deleted those 5 rows.


Improve Run.pop_queued reliability

Its deployed in fioed and didn't blow up. on monday i'll try pushing a build with many targets to it to stress it a little more

things are looking promising in fioed.io. I'll deploy to osf-prod tomorrow


Show menu behind the dropdown button

Hey, Thanks for this great package. I am trying to build a dropdown like this.

I am having problem achieving the exact design. especially the part highlighted in red. I am able to achieve something like this.

It is possible to achieve the same design with this package? What is the best way to achieve something like this?
Thanks.

The dropdown menu is pushed above the button so this is currently unachievable.
If you've a thought about doing such behavior, i'm open for it.


Cloning a parent collection crashes the backend

An infinite loop causes a backend instance to crash (out of memory) when cloning a parent collection.

Fixed in 3664b7f0d9fbee8edc7be466bc91cc7961eb59c1.


Removed description from events table

I don't think you need to remove the binding here.
events/_form.html has the line <textarea data-prop="description" name="events[description]" placeholder="Enter your event description" required></textarea> which uses the description binding.

@davidhjones Can you review again when you get an opportunity? I added the binding back.


ZREVRANGEBYSCORE issue

Expected behavior
We use a score sorted set to store our user story timelines, these scores are in the form of timestamps
        RScoredSortedSet storyTimeLine = redissonClient.getScoredSortedSet("timeline");
        storyTimeLine.add(timestamp,storyId);

Actual behavior
Collection<String> stories = timeline.valueRangeReversed(startDate.intValue(), endDate.intValue());

should return the list of stories but it returns empty.
Steps to reproduce or test case
When i run the same command from the redis terminal it returns the values
ZREVRANGEBYSCORE timeline<PHONE_NUMBER><PHONE_NUMBER> withscores limit 0 100

Redis version
4.0.0
Redisson version
3.8.0
Redisson configuration

You should use RScoredSortedSet.valueRange(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive) method instead


cannot create the symfony project from the server

php version: 7.2.5

I increased RAM to 2 GB, can you check if this is better?

thanks Pieter
That seemed to be part of the problem...but not only...I'm going to do some more fiddling

sorted


Need to hide first row of column group before positioning records.

In w2grid.prototype.resizeRecords() function, top of records is calculated according to the height of columns.
        if (bodyOverflowX || bodyOverflowY) {
            columns.find('> table > tbody > tr:nth-child(1) td.w2ui-head-last').css('width', w2utils.scrollBarSize()).show();
            records.css({
                top: ((this.columnGroups.length > 0 && this.show.columns ? 1 : 0) + w2utils.getSize(columns, 'height')) +'px',
                "-webkit-overflow-scrolling": "touch",
                "overflow-x": (bodyOverflowX ? 'auto' : 'hidden'),
                "overflow-y": (bodyOverflowY ? 'auto' : 'hidden') });
        } else {
            columns.find('> table > tbody > tr:nth-child(1) td.w2ui-head-last').hide();
            records.css({
                top: ((this.columnGroups.length > 0 && this.show.columns ? 1 : 0) + w2utils.getSize(columns, 'height')) +'px',
                overflow: 'hidden'
            });
            if (records.length > 0) { this.last.scrollTop  = 0; this.last.scrollLeft = 0; } // if no scrollbars, always show top
        }

But
        // if there are column groups - hide first row (needed for sizing)
        if (columns.find('> table > tbody > tr').length == 3) {
            columns.find('> table > tbody > tr:nth-child(1) td').html('').css({
                'height' : '0px',
                'border' : '0px',
                'padding': '0px',
                'margin' : '0px'
            });
        }

is called subsequently causing a wrong position for records. Though resizeRecords() is called more than once which will finally correct its position, an ugly gap between column head and records is observable when loading data (see screen shot below).
Moving code block hiding first row of column group ahead of calculating top of records can correct this issue.

Can you please create as JS fiddle. You can link http://w2ui.com/src/w2ui.js, which is a version from current master.

Here is my JS fiddle page: http://jsfiddle.net/4wmcysze/2/
Run it, you can notice a flick showing a white gap between column header and records.
Please consider to correct the issue as I mentioned.

I can not understand your problem
in my browser it looks good
or style is something you want to deploy

Though the final result looks OK, load some data into grid and refresh it, an annoying flick will happen.  In my web app running on IE 11, a white gap is visible for seconds while loading remote data.
I can figure out some facts as below:

A w2ui grid is configured with column group, there are really 3 rows to be created as grid header.
The first row will adjust its height to 0 inside w2grid.prototype.resizeRecords()
refresh() calls resize() -> resizeRecords() twice which will finally hide the first row of grid header with column group, and the second call will adjust top position for records body correctly.
But the later resizeRecords() is called asynchronously via setTimeout. If browser is busy doing something else, a white gap between grid header and records body is visible.

Reproducible (but IMHO less noticeable) in w2ui 1.5
http://jsfiddle.net/nv69pz3s/1/

It is noticeable for us. We're developing enterprise application accessing remote data frequently. Such a blameable flckering will annoy our users and degrade our reputation.
A minor change of calling order:

Shrink height of the first row in grid header with column group.
Calculating top position for records body.

will fix the issue, IMHO will introduce no side effect.


cool but wtf

the preview apps are actually cool but preview yaml uses fcking 14gb RAM on my M1 Mac :D

It shouldn't do -- let me look into that. Is it Yaml Previewer, Yaml Thumbnailer or PreviewYaml that's showing the excessive usage?

Unable to repro. I'd need a copy of the file you're rendering to proceed further.

Sorry, I just went to uninstall and never use it again haha. The preview apps are generally a nice idea, but it would make more sense if you could just brew install preview-code for example and all file types are in it.
I guess the prob was that it was emulated using Rosetta, cause it was not optimized for arm64 macOS but I cant remember.


Importing CommonJS module fails due to exports object having a null prototype

Describe the bug
I've been running into a problem which results in certain module imports failing with an error of "exports.hasOwnProperty is not a function". From what I can tell, this happens when the following conditions are met:

The evaluated code was generated by a version of TypeScript older than 4 (technically older than 4.0.0-dev.20200711) and used CommonJS as the target format
The evaluated code was generated from source which contained an export * from ... statement to re-export all the named exports from another module
The module is included in the deps.inline array of the Vitest config

I've learned the following things:

The error does not appear if the module is evaluated using Node directly. I think this is what Vitest essentially does by default, and is why using deps.inline causes the issue, but please correct me if I'm wrong
During the development of TypeScript 4, a PR, https://github.com/microsoft/TypeScript/pull/39537, was merge which altered the way TypeScript compiles import * from statements so that the generated code would use  Object.prototype.hasOwnProperty.call to invoke the method rather than relying on exports having Object in its prototype chain. This fix made it into the 4.0.0-dev-20200711 nightly, and appears to be present in all subsequent versions
Vitest appears to use Object.create(null) to create its exports object

This bug took a fair amount of digging, and I only ran into it because I was dealing with another, much stranger bug where
a CommonJS module from (an internal company) package generated with TypeScript 3.7 had all the exports (which were re-exported from other files) it was supposed to when evaluated in a browser (after being bundled by Vite), but when used in Vitest only had a subset of those exports available. (I'm still trying to figure out the reason for that difference so I can either figure out the right thing to do or file an issue.) That smelled like a resolution issue, so I tried using deps.inline, which lead me to the exports.hasOwnProperty problem. I edited the problematic code to use call to invoke the hasOwnProperty method on the exports object, and that made my tests pass.
As I mentioned earlier, newer versions of TypeScript shouldn't produce this issue. Sadly, I've run into code which can't be migrated to a newer version at the moment. Presumably there's other code out there written for Node which expected exports to have Object in its prototype chain. Both of these seem like good reasons to me that this is a bug which should be fixed. If others agree, I'd be happy to try and put together a PR to do so.
Reproduction
I created rimunroe/vitest-commonjs-exports-prototype-issue to demonstrate the issue. A summary of this issue is included in the readme along with steps to reproduce it.
System Info
System:
  OS: macOS 13.1
  CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
  Memory: 26.67 GB / 64.00 GB
  Shell: 5.8.1 - /bin/zsh
Binaries:
  Node: 16.17.0 - ~/.nvm/versions/node/v16.17.0/bin/node
  npm: 8.15.0 - ~/.nvm/versions/node/v16.17.0/bin/npm
Browsers:
  Chrome: 109.0.5414.119
  Firefox: 109.0
  Safari: 16.2
npmPackages:
  vitest: 0.28.1 => 0.28.1

Used Package Manager
npm
Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
[X] The provided reproduction is a minimal reproducible example of the bug.

I guess we can support object prototype methods on cjsExport Proxy.


OCI repository with Chart and Image : warehouse display both (no matter if it's an chart or image warehouse)

Checklist

[X] I've searched the issue queue to verify this is not a duplicate bug report.
[X] I've included steps to reproduce the bug.
[X] I've pasted the output of kargo version.
[X] I've pasted logs, if applicable.

Description

I have an OCI repository with Charts and Images in it.
When I create a warehouse (image or chart) it display charts AND images versions.
Screenshots

Steps to Reproduce
An OCI repo with charts and images in it.
Create a chart warehouse connected to this repo.
=> Images version are also displayed
Version
/ $ kargo version
{
  "Version": "v1.0.1",
  "BuildDate": "2024-10-22T00:33:07Z",
  "GitCommit": "9fc3e3b417de09d4fd561ceeb1d87cece989bd4a",
  "GitTreeDirty": false,
  "GoVersion": "go1.23.2",
  "Compiler": "gc",
  "Platform": "linux/amd64"
}

I suspect you are subscribed to images using something like a tag selector. When Kargo selects images using such a selector, it relies solely on the tag list provided by the registry API, which is a simple list containing strings. Because of this, it has no idea about the image type (which would require at least one additional request per listed tag).
While I see us benefiting from an image type selector complementary to the existing platform selector at some point, I would not see us enabling this by default, as it changes the complexity from O(1) to O(n).
Until we have such a feature, I can see a couple of ways for you to work around this problem for container images:

Use an allowTags regex expression, as I can see a pattern of v1.0.0. versus 1.0.0.
Not putting all your eggs in the same basket, i.e. have separate image repositories for Helm charts versus images.

For the Helm chart discovery part, the quick fix would be for us to ignore anything that isn't a strict SemVer (which is how helm itself determines what is and isn't a chart): https://github.com/helm/helm/blob/v3.16.1/pkg/registry/client.go#L682-L690
I will draft a pull request to enforce this.


Problems with printing (Str-P)

Hi,
thanks for this great piece of software. I have been using remark.js happily for a couple of slides but ran into a problem when I had to provide PDFs of my slides.
Browser: recent chromium 50.0.2661.94 (same problem in chrome).
Description: When browser is in a rather full screen size window (appr. 1600x1000 px) the rendered print (through Str-P) looks like linked image below with broad borders to the right and bottom.
http://www.filedropper.com/screenshot20160612093108
If I significantly reduce the window size of the browser the borders disappear but the images shift far down over the edge
http://www.filedropper.com/screenshot20160612093838
Styles are  unchanged from the remark.js intro slides.
Slide code is this:
---
## Boot from ISO image

If you own the image, no need to be root!

`qemu-kvm -m 512M -cdrom sysresccd.iso`

<img src="qemu_rescuecd.png" alt="qemu screenshot" width="66%"/>
---

The size of the image is 640x503

There is a related issue #50 (unfortunately closed  although export with Chrome usually does not work as expected, espiecially for 16:9). You may be also interested in #313.

In issue #50, mpusz came with a solution: a dedicated CSS hack that worked for me under Chromium 52.

Printing issues are a never ending story, especially since the browser support changes from one version to the next. Please give DeckTape a go, as mentioned here.


Google Storage parallel upload

Does the Google Storage Java SDK provides an API for parallel multi-parts upload? Is there any example out there?

I will take a look but I won't be able to get to this immediately.

Any update on this? Tx

@lesv or @tswast do either of you know?

I don't know.
Only sample for uploading I'm aware of is https://github.com/GoogleCloudPlatform/google-cloud-java/blob/master/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/BucketSnippets.java#L227 linked from https://cloud.google.com/storage/docs/object-basics#storage-upload-object-java which doesn't explicitly do a multi-part upload.

Plain upload it's quite easy. The documentation suggest that parallel upload can be implemented just splitting the original object in chunks and upload them in parallel, them compose all the chunks in a single object.
It's not clear how to perform the compose operation by using the Java API.

Looking at Storage.writer, it doesn't appear that there is a way to get more than one WriteChannel.  But I didn't work on that API, @tswast might know more.

We don't have any code samples at https://cloud.google.com/storage/docs/composite-objects so my guess is the client libraries don't support it in any language. I'll follow up with Omar.

@tswast This seems like it should be a FR, rather than block GA -- thoughts?

Yeah, definitely a new feature for the client libraries to support the compose operation. I don't know enough about how people tend to use Cloud Storage to know if it should be a GA blocker.
Seems like it would be a useful feature for large files.

I found this issue in the sample sheet. I reviewed current Storage examples and the compose operation is supported by the Java client.
https://github.com/GoogleCloudPlatform/google-cloud-java/blob/c3d18ffce9d9895550dd5d2acc1d0ff125305898/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/StorageExample.java#L446

This is still an open issue on my side. I will give a try to this example. Thanks.

Closing this out because the compose operation is supported in google-cloud-storage.


[Bug] Discord Crashing by open Settings

Before Reporting

[X] I found no existing issues matching my bug
[X] My issue is not caused by a plugin or theme

Describe the Bug
No Plugins or theme installed
Expected Behavior
Open settings
Steps To Reproduce
1.Open Settings in Discord
2.Crash
Operating System
Windows
Discord Version
Stable
BetterDiscord Version
v1.8.4
Anything else?
https://youtu.be/e9CvPZoDoTM
Workaround : Rightclick the settings
Error :
dba4fb0b04a3f8198c97.js:152 TypeError: Cannot read property 'Header' of undefined
    at he.render (<anonymous>:4:119159)
    at Cs (71e2907e1982c4e4e19e.js:1623)
    at Rs (71e2907e1982c4e4e19e.js:1622)
    at yu (71e2907e1982c4e4e19e.js:1663)
    at Oc (71e2907e1982c4e4e19e.js:1655)
    at Ic (71e2907e1982c4e4e19e.js:1655)
    at hc (71e2907e1982c4e4e19e.js:1654)
    at ic (71e2907e1982c4e4e19e.js:1651)
    at oc (71e2907e1982c4e4e19e.js:1650)
    at g (71e2907e1982c4e4e19e.js:1772)
    at L (71e2907e1982c4e4e19e.js:1773)
    at t.exports (dba4fb0b04a3f8198c97.js:21)
    at g.<computed> (dba4fb0b04a3f8198c97.js:36)
    at Number.m (dba4fb0b04a3f8198c97.js:36)
    at MessagePort.b (dba4fb0b04a3f8198c97.js:36)

I get the same behavior on Linux (Gentoo Base System release 2.13).

Same Problem, but if you press Control + R it resolve(Press until it work)

I have the same problem (Windows)

Same on Windows

Same problem on Windows

Same problem Win10 64x

Fedora 37, same problem here too. Can also confirm that reloading the window in place (Ctrl+R) provides a temporary solution

same
win10

I don't know how, but the fact that the ctrl + r solution works disappoints me. Maybe because it didn't help me to understand the source of the problem and because I'm afraid the bug will happen again, I guess :l

I don't know how, but the fact that the ctrl + r solution works disappoints me. Maybe because it didn't help me to understand the source of the problem and because I'm afraid the bug will happen again, I guess :l

The Problem is that some Components of the CSS Layout are not found/Loaded. So it crashes. But ctrl+r maybe loads those missing components

same problem on windows 10

Same problem here on W11 Pro. VCs also seem to be busted in this bug, the green ring around speaking users does not seem to be updating at all and voice transmission doesn't work, despite being able to hear everyone else.

I get this too on stable release of discord. But I dont get with latest release of discord ptb. I have Windows 10 64bit

If i'm in a voicecall for longer than 10min and click the settings it crashes, after that if i wanna join any voice channel it gives me RTC connecting till i switch the audio mode. If discord crashes via the settings then its gonna crash infinitely if i press the settings till i press ctrl+r.

Same when it asks me to update a Plugin (it drags me in to the plugin/Settings screen)

same on win 11, just installed today, stable last discord, last better discord ver.

RTC

I'm having the same issue with the RTC thing. What do you mean by "audio mode"? Where's that option?

I'm having the same issue with the RTC thing. What do you mean by "audio mode"? Where's that option?
Settings > Voice & Video > Scroll down > Audio Subsystem > And just witch between normal and experimental.

Getting the same bug too, I have to use web Discord for now. Win10 64-bit x64 22h2 on high-end hardware.

a9b168fe85091eaa359c.js:152 TypeError: Cannot read property 'Header' of undefined
at he.render (:4:119159)
at Cs (3b4371c2a53c83d58eb5.js:1623)
at Rs (3b4371c2a53c83d58eb5.js:1622)
at yu (3b4371c2a53c83d58eb5.js:1663)
at Oc (3b4371c2a53c83d58eb5.js:1655)
at Ic (3b4371c2a53c83d58eb5.js:1655)
at hc (3b4371c2a53c83d58eb5.js:1654)
at ic (3b4371c2a53c83d58eb5.js:1651)
at oc (3b4371c2a53c83d58eb5.js:1650)
at g (3b4371c2a53c83d58eb5.js:1772)
at L (3b4371c2a53c83d58eb5.js:1773)
at t.exports (a9b168fe85091eaa359c.js:21)
at g. (a9b168fe85091eaa359c.js:36)
at Number.m (a9b168fe85091eaa359c.js:36)
at MessagePort.b (a9b168fe85091eaa359c.js:36)

I've submitted #1530 to fix this issue! Please be patient.

Same issue, Press Control + R to solve it.

Same issue, Press Control + R to solve it.

Ctrl+R doesn't resolve it. The error will appear again the next time you try to open settings.

spamming ctrl + r helps sometimes

Win 11 - Betterdiscord app 1.8.4 - Latest Stable Discord vers.
Issue : Without any plugin or theme, Discord crashes as soon as I press the settings button
Exactly the same problem.


update python versions in ci

Update some python 3.9s to 3.11s
Drop astropy-dev as it no longer provides the astropy.io.misc.asdf extension and is not a direct dependency.

Thanks for the reviews!


[BEAM-8996] Improvements to the Flink runner page

The options are now auto-generated and we can remove the old disclaimers.

The option table now only includes the Flink-specific options, so link to the
general pipeline options.

Run Python2_PVR_Flink PreCommit

Thanks!


Revert "[stdlib] AutoreleasingUnsafeMutablePointer: Switch subscripts to _read accessors"

This was an ABI break, since it didn't make it into 5.0. Using _read here is unimportant, so we're just going to revert rather than try being fancy.
This reverts commit 04586e39163c532fa09f1d71d1aa0b35ffa92140.
Fixes rdar://problem/51503385

@swift-ci please test

Cc @nkcsgexi -- this is not currently detected by the ABI checker

@lorentey Thanks for the heads-up! Filed rdar://52063421 to keep track of this enhancement.

I guess adding the original getter and setting _read to @_alwaysEmitIntoClient would be a workable alternative.
I'm rather surprised that pointee._read is called from libswiftCore; apparently @_transparent doesn't do its thing for such accessors. It would be interesting to see what code is generated before/after this change.

If it's satisfying a protocol requirement, it might not be inlined.

If it's going through a protocol requirement, then the set of accessors on the concrete implementation shouldn't impact the abstract interface. @_alwaysEmitIntoClient would still be OK to give concrete code an opportunity to benefit.


structMap rule for CSIP83, CSIP84, CSIP86 does not fire

In the Schematron rules for structMap, the following rule doesn't fire (i.e. none of its assertions are tested):
<rule context="/mets:mets/mets:structMap[@LABEL = 'CSIP']">
  <assert id="CSIP83" role="ERROR" test="@ID">An xml:id identifier for the structural description (structMap) used for internal package references. It must be unique within the package.</assert>
  <assert id="CSIP84" role="ERROR" test="mets:div">The structural map MUST comprises a single division.</assert>
  <assert id="CSIP86" role="ERROR" test="mets:div[@LABEL = /mets:mets/@OBJID]">The package’s top-level structural division div element’s @LABEL attribute value must be identical to the package identifier, i.e. the same value as the mets/@OBJID attribute.</assert>
</rule>

The rules right before and after that one work OK, e.g. when I include the appropriately tweaked version of CSIP86 in the following rule, it works correctly:
<rule context="/mets:mets/mets:structMap[@LABEL = 'CSIP']/mets:div">
  <assert id="CSIP86a" role="ERROR" test="@LABEL = /mets:mets/@OBJID">The package’s top-level structural division div element’s @LABEL attribute value must be identical to the package identifier, i.e. the same value as the mets/@OBJID attribute.</assert>
  <assert id="CSIP85" role="ERROR" test="@ID">An xml:id identifier must be unique within the package.</assert>
  <assert id="CSIP88" role="ERROR" test="mets:div[@LABEL = 'Metadata']">The package’s top-level structural division div element’s @LABEL attribute value must be identical to the package identifier, i.e. the same value as the mets/@OBJID attribute.</assert>
  <assert id="CSIP93" role="WARN" test="mets:div[@LABEL = 'Documentation']">The documentation referenced in the file section file groups is described in the structural map with one sub division.</assert>
  <assert id="CSIP97" role="WARN" test="mets:div[@LABEL = 'Schemas']">The schemas referenced in the file section file groups are described in the structural map within a single sub-division.</assert>
  <assert id="CSIP101" role="WARN" test="mets:div[@LABEL = 'Representations']">When no representations are present the content referenced in the file section file group with @USE attribute value “Representations” is described in the structural map as a single sub division.</assert>
</rule>

Test environment: Docker image pulled on 2020-05-30, Digest: sha256:174a85e7c65deb3635d22ef3e44c57b3dd3a62c56b9cd6e3e29f0c4d889fb162

@koit I'll create a PR and Docker build for you to test for this one.


When an upstream microservice is unavailable (ex. no servers are up) Zuul sends a 500 Internal Server Error instead of 503 Service Unavailable

This is a special case of https://github.com/spring-cloud/spring-cloud-netflix/issues/406. The fix for 406 addresses situations where the upstream microservice sends a 503. However, if the upstream service is completely unavailable, Zuul sends back a 500 error where as ideally it should be a 503 service unavailable.
In such cases, Ribbon throws a ClientException exception of type 'GENERAL' with the message 'Load balancer does not have available servers for client: XXX', which gets converted to 500 by RibbonRoutingFilter.
IMO, this should be mapped to more specific 503 service unavailable instead of a generic 500 error so that the downstream services can handle this scenario gracefully.
[I am using Brixton SR3]

I'll help in this issue ok @spencergibb?

I create the issue and PR in Ribbon project to return the SERVICE_UNAVAILABLE when no servers are up. When the PR merged I update the version on spring-netflix project.

The changes in Ribbon LGTM, but I am not too familiar with that project either.

@FelipeAdorno
Is the PR merged?
Could you please tell me about the issue's url in Ribbon project?

Sorry, I found it above.


Rename project

Fixes #24

While I wait for the new groupId to be registered I'll take the chance to fix the sonar cloud issues. I'll only merge this PR once I'm able to publish the jars to the new groupId.

The code smells can be addressed later, as a few of the changes mentioned there will be addressed in 0.5


Clarify comment

The removed sentence:
a) Repeats the one above it
b) Introduces new terminology: "offered"
c) Has a grammatical error "by an identifying components"
After tripping up on it, I realized the sentence right above was perfect and could replace it.
Minor, but I hope it helps someone!

Thanks, @bitwombat !


[DOC]:  How to compute loss and backpropagation in 2D tensor parallelism?

📚 The doc issue
Description: I am trying to implement 2D tensor parallelism and I am having trouble computing loss and performing backpropagation. As shown in the documentation at https://colossalai.org/docs/features/2D_tensor_parallel/, the final output of the network has only one-quarter of the size of the regular output, which leads to size mismatch errors when computing the loss with the output and labels directly. For example, when using a dataset such as CIFAR10 with a batch size of 64, the label tensor has a size of (64). However, the output tensor has a size of (32, 5), resulting in a dimension mismatch error when calculating the loss using the output and label tensors.
Suggestions:  I suggest that the document be improved to include the code for calculating the loss and performing backpropagation in the 2D tensor parallelism scenario.
Thank you!

Thanks for your feedback!
May I know the codes you ran? If you ran correctly, there should not be a dimentionality issue for gradient computations as well as backward operations.

"""
torchrun --nproc_per_node 4 train.py
"""

CONFIG = dict(parallel=dict(
    data=1,
    pipeline=1,
    tensor=dict(size=4, mode='2d'),
))

class MLP(torch.nn.Module):
    def __init__(self, dim: int = 256):
        super().__init__()
        intermediate_dim = dim * 4
        self.dense_1 = col_nn.Linear(dim, intermediate_dim)
        print_rank_0(f'Weight of the first linear layer: {self.dense_1.weight.shape}')
        self.activation = torch.nn.GELU()
        self.dense_2 = col_nn.Linear(intermediate_dim, 10, bias=False)
        print_rank_0(f'Weight of the second linear layer: {self.dense_2.weight.shape}')

    def forward(self, x):
        print_rank_0(f'Input shape: {x.shape}')
        x = self.dense_1(x)
        print_rank_0(f'Output of the first linear layer: {x.shape}')
        x = self.activation(x)
        x = self.dense_2(x)
        print_rank_0(f'Output of the second linear layer: {x.shape}')
        return x

def train():
    colossalai.launch_from_torch(config=CONFIG)
    logger = get_dist_logger()

    input_size = 3 * 32 * 32
    model = MLP(dim = input_size)

    train_dataset = CIFAR10(
        root=Path('data/cifar10/'),
        download=True,
        transform=transforms.Compose([
            transforms.RandomCrop(size=32, padding=4),
            transforms.RandomHorizontalFlip(),
            transforms.ToTensor(),
            transforms.Normalize(
                mean=[0.4914, 0.4822, 0.4465],
                std=[0.2023, 0.1994, 0.2010]
            ),
            transforms.Lambda(lambda x: x.view(-1)),
        ])
    )
    train_dataloader = get_dataloader(...)
    criterion = nn.CrossEntropyLoss(reduction='sum')
    optimizer = optim.Adam(model.parameters(), lr=1e-3)
    lr_scheduler = CosineAnnealingWarmupLR(...)

    engine, train_dataloader, test_dataloader, _ = colossalai.initialize(...)

    for epoch in range(5):
        engine.train()

        if gpc.get_global_rank() == 0:
            trainLoader = tqdm(train_dataloader)
        else:
            trainLoader = train_dataloader

        for data, label in trainLoader:
            engine.zero_grad()
            data = data.cuda()
            # print_rank_0(f'raw data shape: {data.shape}')  # [bs, 3x32x32=3072]
            torch.distributed.broadcast(data, src=0)
            data = torch.chunk(data, 2, dim=0)[gpc.get_local_rank(ParallelMode.PARALLEL_2D_COL)]
            data = torch.chunk(data, 2, dim=-1)[gpc.get_local_rank(ParallelMode.PARALLEL_2D_ROW)]
            # print_rank_0(f'broadcasted data shape: {data.shape}')  # [bs/2, 3072/2=1536]
            label = label.cuda()

            output = engine(data)
            # print_rank_0(f'output shape: {output.shape}')  # [bs/2, 10/2=5]

            train_loss = engine.criterion(output, label)
            # print_rank_0(f'train_loss: {train_loss}')
            engine.backward(train_loss)
            engine.step()

    gpc.destroy()

Here is my code, which was written with reference to the official documentation. I am using the CIFAR10 dataset and dividing the images into 10 classes. Prior to training, I partition the data and the size changes from [bs, 3072] to [bs/2, 1536]. Without using TP, the output size should be [bs, 10], and here it is [bs/2, 5]. This leads to an error when computing the loss, as the output and label (with a size of [32]) dimensions do not match, resulting in a ValueError: "Expected input batch_size (16) to match target batch_size (32)".
Thank you for your help.


feat: Add incoming placements to placement queue

When a placement is received from the record queue it should be added to
the placement queue to be processed by the placement queue listener.
TIS21-1684

Created as draft due to dependant PR #126


fix the implementation of ColumnMap::replicate was incorrect

Proposed changes
The implementation of ColumnArray::replicate was incorrect too.

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

run buildall

run buildall

run buildall


Update bug report template

Update bug report template with:

related VS Code extensions (like pyright)
value of the python.languageServer setting (it isn't live yet, will be available in the next release, do we want to wait?)

[x] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
[x] Title summarizes what is changing.
[ ] Has a news entry file (remember to thank yourself!).
[ ] Appropriate comments and documentation strings in the code.
[ ] Has sufficient logging.
[ ] Has telemetry for enhancements.
[ ] Unit tests & system/integration tests are added/updated.
[ ] Test plan is updated as appropriate.
[ ] package-lock.json has been regenerated by running npm install (if dependencies have changed).
[ ] The wiki is updated with any design decisions/details.

Codecov Report

Merging #9957 into master will increase coverage by <.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #9957      +/-   ##
==========================================
+ Coverage   61.18%   61.19%   +<.01%
==========================================
  Files         564      564
  Lines       30077    30077
  Branches     4550     4550
==========================================
+ Hits        18404    18407       +3
+ Misses      10642    10640       -2
+ Partials     1031     1030       -1

Impacted Files
Coverage Δ

src/client/common/utils/platform.ts
70.58% <0%> (ø)
:arrow_up:

src/client/common/process/proc.ts
15.21% <0%> (+0.72%)
:arrow_up:

src/client/datascience/debugLocationTracker.ts
78.12% <0%> (+1.56%)
:arrow_up:

src/client/linters/pydocstyle.ts
88.88% <0%> (+2.22%)
:arrow_up:

Continue to review full report at Codecov.

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


Blog Post: Managing GitHub at Pulumi With Pulumi

Resolves https://github.com/pulumi/home/issues/1877. Needs a few more housekeeping TODOs but would appreciate feedback of the main body

links are now checked in hugo prs, since https://github.com/pulumi/pulumi-hugo/pull/1106


Added a git clean to the Jenkinsfile

@gautamkmr @nswamy
Adding git clean because some builds are picking changes from otherbranches.
Let's merge only after the PR build succeeds.

LGTM


Centos 7 to Alma 8 upgrade in a Linode - Stage 3 failure

i attempted the script in Centos 7 installed Linode virtual server.
now the script is failing with following bit. my logs are also empty (or may be i do something wrong).
it looks like some incompatibility with the Linode boot system. any ideas or tips to fix or reverse is much appreciated.
i tried to start the WHM manually after failing but getting the following error.
rtt min/avg/max/mdev = 0.415/0.502/0.590/0.090 ms
root@ln1-daltx [~]# /usr/local/cpanel/scripts/restartsrv_*
warn [restartsrv_httpd] The system is unable to find systemd configuration for the 'httpd' service...
Cpanel::Exception::Service::BinaryNotFound
Service Status
        undefined status from Cpanel::ServiceManager::Services::Httpd

Service Error
        (XID gnc22q) The system could not find the “/usr/local/apache/bin/apachectl” binary for the “httpd” service because of an error: No such file or directory

httpd has failed. Contact your system administrator if the service does not automagically recover.

below is the log i can extract after the stage 3 failure.
thanks.
~viraj
[linodexxxx@xxxx-xxx lish]#
Job 403548661 - Linode Snapshot completed.
[linodexxxx@xxxx-xxx lish]#
[linodexxxx@xxxx-xxx lish]
* 2023-03-20 15:50:51 (4165) [INFO]   File "/usr/lib/python2.7/site-packages/leapp/repository/actor_definition.py", line 72, in _do_run
* 2023-03-20 15:50:51 (4165) [INFO]     actor_instance.run(*args, **kwargs)
* 2023-03-20 15:50:51 (4165) [INFO]   File "/usr/lib/python2.7/site-packages/leapp/actors/__init__.py", line 290, in run
* 2023-03-20 15:50:51 (4165) [INFO]     self.process(*args)
* 2023-03-20 15:50:51 (4165) [INFO]   File "/usr/share/leapp-repository/repositories/system_upgrade/common/actors/systemfacts/actor.py", line 65, in process
* 2023-03-20 15:50:51 (4165) [INFO]     bios_grubcfg_details = systemfacts.get_bios_grubcfg_details()
* 2023-03-20 15:50:51 (4165) [INFO]   File "/usr/share/leapp-repository/repositories/system_upgrade/common/actors/systemfacts/libraries/systemfacts.py", line 326, in get_bios_grubcfg_details
* 2023-03-20 15:50:51 (4165) [INFO]     with open('/boot/grub2/grub.cfg') as fo:
* 2023-03-20 15:50:51 (4165) [INFO] IOError: [Errno 2] No such file or directory: '/boot/grub2/grub.cfg'
* 2023-03-20 15:50:51 (4165) [INFO]
* 2023-03-20 15:50:51 (4165) [INFO]
* 2023-03-20 15:50:51 (4165) [INFO] =============================================================================================
* 2023-03-20 15:50:51 (4165) [INFO] Actor system_facts unexpectedly terminated with exit code: 1 - Please check the above details
* 2023-03-20 15:50:51 (4165) [INFO] =============================================================================================
* 2023-03-20 15:50:51 (4165) [INFO] 2023-03-20 15:50:51.828 ERROR    PID: 25161 leapp: Actor system_facts unexpectedly terminated with exit code: 1
* 2023-03-20 15:50:51 (4165) [INFO] 2023-03-20 15:50:51.923 ERROR    PID: 25161 leapp: Upgrade workflow failed, check log for details
* 2023-03-20 15:50:51 (4165) [INFO]
* 2023-03-20 15:50:51 (4165) [INFO] Debug output written to /var/log/leapp/leapp-upgrade.log
* 2023-03-20 15:50:51 (4165) [INFO]
* 2023-03-20 15:50:51 (4165) [INFO] ============================================================
* 2023-03-20 15:50:51 (4165) [INFO]                            REPORT
* 2023-03-20 15:50:51 (4165) [INFO] ============================================================
* 2023-03-20 15:50:51 (4165) [INFO]
* 2023-03-20 15:50:51 (4165) [INFO] A report has been generated at /var/log/leapp/leapp-report.json
* 2023-03-20 15:50:51 (4165) [INFO] A report has been generated at /var/log/leapp/leapp-report.txt
* 2023-03-20 15:50:51 (4165) [INFO]
* 2023-03-20 15:50:51 (4165) [INFO] ============================================================
* 2023-03-20 15:50:51 (4165) [INFO]                        END OF REPORT
* 2023-03-20 15:50:51 (4165) [INFO] ============================================================
* 2023-03-20 15:50:51 (4165) [INFO]
* 2023-03-20 15:50:51 (4165) [INFO] Answerfile has been generated at /var/log/leapp/answerfile
* 2023-03-20 15:50:51 (4182) [INFO]
* 2023-03-20 15:50:52 (703) [INFO] Sending notification: Fail to update to AlmaLinux 8
* 2023-03-20 15:50:52 (708) [ERROR] The elevation process failed during stage 3.
* 2023-03-20 15:50:52 (708) [ERROR]
* 2023-03-20 15:50:52 (708) [ERROR] You can continue the process after fixing the errors by running:
* 2023-03-20 15:50:52 (708) [ERROR]
* 2023-03-20 15:50:52 (708) [ERROR]     /usr/local/cpanel/scripts/elevate-cpanel --continue
* 2023-03-20 15:50:52 (708) [ERROR]
* 2023-03-20 15:50:52 (708) [ERROR] You can check the error log by running:
* 2023-03-20 15:50:52 (708) [ERROR]

when you say "my logs are empty" do you mean that /var/log/leapp/leapp-upgrade.log and /var/log/leapp/leapp-report.txt are empty?

yes. they were empty files. only the --check and --status gave some update
On Mon, Mar 20, 2023 at 6:37 PM Dan Fehrenbach @.***>
wrote:

when you say "my logs are empty" do you mean that
/var/log/leapp/leapp-upgrade.log and /var/log/leapp/leapp-report.txt are
empty?
—
Reply to this email directly, view it on GitHub
https://github.com/cpanel/elevate/issues/212#issuecomment-1476202519,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAEUAJLIKZSEIOWUEJZ2XXLW5BJALANCNFSM6AAAAAAWA4N4TQ
.
You are receiving this because you authored the thread.Message ID:
@.***>

when you say "my logs are empty" do you mean that /var/log/leapp/leapp-upgrade.log and /var/log/leapp/leapp-report.txt are empty?

is there a way to undo the Elevate script ?

hi Badtux,
The fact that the logs are empty is very odd and i can't explain it. Just to double check, if you run a command such as less /var/log/leapp/leapp-upgrade.log absolutely nothing appears? If there really is nothing, someone with more extensive knowledge of leapp will need to give you an explanation.
Elevate/leapp are not reversible - hence all of the warnings to take backups/snapshots prior to running the utility.
I am not a maintainer of this repo, i have only used it on various servers and run into various problems along the way...That said, I believe your options are now...

Find and trace other logs and troubleshoot where your elevation is stuck, perhaps /var/log/leapp/archive/ has some other logs.
Restore from a backup or snapshot, if you have one.
clean install

Hello,
We have had problems with GRUB on Linode systems in the past. Part of this comes from the fact that their default method of booting most systems is to boot into an instance of GRUB they manage but to let it read the GRUB configuration stored on the instance. However, their instance is based on a Debian/Ubuntu build, rather than a RHEL build, so the paths GRUB checks are different from what CentOS 7 and AlmaLinux 8 expect.
That said, it is strange that /boot/grub2/grub.cfg went missing. If you can, please provide us with the current state of /boot and GRUB's subdirectories within it using ls -l /boot{,/grub*}. Additionally, please provide the contents of the /var/cpanel/elevate file.

i managed to set the upstream kernel via grub2 using linode control panel.
the elevate script is now in progress. will give you an update
On Wed, Mar 22, 2023 at 12:08 AM Sloane Bernstein @.***>
wrote:

Hello,
We have had problems with GRUB on Linode systems in the past. Part of this
comes from the fact that their default method of booting most systems is to
boot into an instance of GRUB they manage but to let it read the GRUB
configuration stored on the instance. However, their instance is based on a
Debian/Ubuntu build, rather than a RHEL build, so the paths GRUB checks are
different from what CentOS 7 and AlmaLinux 8 expect.
That said, it is strange that /boot/grub2/grub.cfg went missing. If you
can, please provide us with the current state of /boot and GRUB's
subdirectories within it using ls -l /boot{,/grub*}. Additionally, please
provide the contents of the /var/cpanel/elevate file.
—
Reply to this email directly, view it on GitHub
https://github.com/cpanel/elevate/issues/212#issuecomment-1478406468,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAEUAJPEWLMK7G22HQGHMP3W5HYQ3ANCNFSM6AAAAAAWA4N4TQ
.
You are receiving this because you authored the thread.Message ID:
@.***>

hi,
i am getting following low and mid issues. do i have to fix all of them
before i continue? what are the options and if available how do i instruct
elevate to continue?
Summary:
Key: 539ccff19a53e473e2c3a660230c9062bf871893

Risk Factor: medium
Title: memcached has enabled UDP port
Summary: memcached in RHEL7 has UDP port enabled by default, but it is
disabled by default in RHEL8
Key: 0256d6f8f3b5c2add6ab2b315166c69442bfd641

Risk Factor: medium
Title: Module pam_pkcs11 will be removed from PAM configuration
Summary: Module pam_pkcs11 was surpassed by SSSD and therefore it was
removed from RHEL-8. Keeping it in PAM configuration may lock out the
system thus it will be automatically removed from PAM configuration before
upgrading to RHEL-8. Please switch to SSSD to recover the functionality of
pam_pkcs11.
Remediation: [hint] Configure SSSD to replace pam_pkcs11
Key: bf47e7305d6805e8bbeaa7593cf01e38030c23f3

Risk Factor: medium
Title: chrony using default configuration
Summary: default chrony configuration in RHEL8 uses leapsectz directive,
which cannot be used with leap smearing NTP servers, and uses a single pool
directive instead of four server directives
Key: c4222ebd18730a76f6bc7b3b66df898b106e6554

Risk Factor: low
Title: Some enabled RPM repositories are unknown to Leapp
Summary: The following repositories with Red Hat-signed packages are
unknown to Leapp:

cpanel-plugins

cpanel-addons-production-feed

And the following packages installed from those repositories may not be
upgraded:

cpanel-monitoring-agent

cpanel-banners-plugin

cpanel-dovecot-solr-server

cpanel-dovecot-solr-docs

cpanel-monitoring-whm-plugin

cpanel-analytics

cpanel-monitoring-cpanel-plugin

cpanel-dovecot-solr

cpanel-wp-cli

cpanel-wordpress-instance-manager-plugin

cpanel-dovecot-solr-contrib

cpanel-letsencrypt-v2

cpanel-dovecot-solr-contrib-extraction

Remediation: [hint] You can file a request to add this repository to the
scope of in-place upgrades by filing a support ticket
Key: 8e89e20c645cea600b240156071d81c64daab7ad

Risk Factor: low
Title: Grep has incompatible changes in the next major version
Summary: If a file contains data improperly encoded for the current locale,
and this is discovered before any of the file's contents are output, grep
now treats the file as binary.
The 'grep -P' no longer reports an error and exits when given invalid UTF-8
data. Instead, it considers the data to be non-matching.
In locales with multibyte character encodings other than UTF-8, grep -P now
reports an error and exits instead of misbehaving.
When searching binary data, grep now may treat non-text bytes as line
terminators. This can boost performance significantly.
The 'grep -z' no longer automatically treats the byte '\200' as binary data.
Context no longer excludes selected lines omitted because of -m. For
example, 'grep "^" -m1 -A1' now outputs the first two input lines, not just
the first line.
Remediation: [hint] Please update your scripts to be compatible with the
changes.
Key: 94665a499e2eeee35eca3e7093a7abe183384b16

Risk Factor: low
Title: The subscription-manager release is going to be kept as it is during
the upgrade
Summary: The upgrade is executed with the --no-rhsm option (or with the
LEAPP_NO_RHSM environment variable). In this case, the subscription-manager
will not be configured during the upgrade. If the system is subscribed and
release is set already, you could encounter issues to get RHEL content
using DNF/YUM after the upgrade.
Remediation: [hint] Set the new release (or unset it) after the upgrade
using subscription-manager: subscription-manager release --set 8.6
Key: 01986584e27e85ea18929586faf614eee011a121

Risk Factor: info
Title: Authselect will be used to configure PAM and nsswitch.conf.
Summary: There is a new tool called authselect in RHEL8 that replaced
authconfig. The upgrade process suggested an authselect profile that is
similar to your current configuration and your system will be switched to
this profile. Authselect call is: authselect select sssd with-fingerprint
--force. The process will also enable "oddjobd" systemd service on startup
Key: 319689b95eb55badec00c29d53ee79534433cd7c

Risk Factor: info
Title: SElinux disabled
Summary: SElinux disabled, continuing...
Key: 4f25fea9b15b9d1d07d52cc1de02073f295dac3d

~viraj
On Wed, Mar 22, 2023 at 8:28 AM Viraj Abayarathna @.***> wrote:

i managed to set the upstream kernel via grub2 using linode control panel.
the elevate script is now in progress. will give you an update
On Wed, Mar 22, 2023 at 12:08 AM Sloane Bernstein <
@.***> wrote:

Hello,
We have had problems with GRUB on Linode systems in the past. Part of
this comes from the fact that their default method of booting most systems
is to boot into an instance of GRUB they manage but to let it read the GRUB
configuration stored on the instance. However, their instance is based on a
Debian/Ubuntu build, rather than a RHEL build, so the paths GRUB checks are
different from what CentOS 7 and AlmaLinux 8 expect.
That said, it is strange that /boot/grub2/grub.cfg went missing. If you
can, please provide us with the current state of /boot and GRUB's
subdirectories within it using ls -l /boot{,/grub*}. Additionally,
please provide the contents of the /var/cpanel/elevate file.
—
Reply to this email directly, view it on GitHub
https://github.com/cpanel/elevate/issues/212#issuecomment-1478406468,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAEUAJPEWLMK7G22HQGHMP3W5HYQ3ANCNFSM6AAAAAAWA4N4TQ
.
You are receiving this because you authored the thread.Message ID:
@.***>

The next version will block upgrades if it determines your running kernel does not match what the default is in grub. This was fixed by #247

We had this same issue today 2nd August 2023, we use OnAPP.
`root@serv [~]# /scripts/elevate-cpanel --continue
-------------------------> [INFO] Restarting install process (stage=3)
-------------------------> [ERROR] # Upgrade process failed at stage=3 ; Running: tail -f /var/log/elevate-cpanel.log

2023-08-02 18:37:32 [INFO] Running: /usr/bin/systemctl restart elevate-cpanel.service
2023-08-02 18:37:32 [INFO]
2023-08-02 18:35:10 (4102) [INFO] A report has been generated at /var/log/leapp/leapp-report.json
2023-08-02 18:35:10 (4102) [INFO] A report has been generated at /var/log/leapp/leapp-report.txt
2023-08-02 18:35:10 (4102) [INFO]
2023-08-02 18:35:10 (4102) [INFO] ============================================================
2023-08-02 18:35:10 (4102) [INFO]                        END OF REPORT
2023-08-02 18:35:10 (4102) [INFO] ============================================================
2023-08-02 18:35:10 (4102) [INFO]
2023-08-02 18:35:10 (4102) [INFO] Answerfile has been generated at /var/log/leapp/answerfile
2023-08-02 18:35:10 (4119) [INFO]
2023-08-02 18:35:10 (4026) [INFO] Sending notification: Failed to update to AlmaLinux 8
2023-08-02 18:35:10 (4031) [ERROR] The elevation process failed during stage 3.
2023-08-02 18:35:10 (4031) [ERROR]
2023-08-02 18:35:10 (4031) [ERROR] You can continue the process after fixing the errors by running:
2023-08-02 18:35:10 (4031) [ERROR]
2023-08-02 18:35:10 (4031) [ERROR]     /usr/local/cpanel/scripts/elevate-cpanel --continue
2023-08-02 18:35:10 (4031) [ERROR]
2023-08-02 18:35:10 (4031) [ERROR] You can check the error log by running:
2023-08-02 18:35:10 (4031) [ERROR]
2023-08-02 18:35:10 (4031) [ERROR]     /usr/local/cpanel/scripts/elevate-cpanel
2023-08-02 18:35:10 (4031) [ERROR]
2023-08-02 18:35:10 (4031) [ERROR] Last Error:
2023-08-02 18:35:10 (4031) [ERROR]
2023-08-02 18:35:10 (4031) [ERROR] The 'leapp upgrade' process failed.
2023-08-02 18:35:10 (4031) [ERROR]
2023-08-02 18:35:10 (4031) [ERROR] Please investigate, resolve then re-run the following command to continue the update:
2023-08-02 18:35:10 (4031) [ERROR]
2023-08-02 18:35:10 (4031) [ERROR]     /scripts/elevate-cpanel --continue
2023-08-02 18:35:10 (4031) [ERROR]
2023-08-02 18:35:10 (4031) [ERROR]
2023-08-02 18:35:10 (4031) [ERROR] You can read the full leapp report at: /var/log/leapp/leapp-report.txt
2023-08-02 18:35:10 (5135) [FATAL] The 'leapp upgrade' process failed.

Please investigate, resolve then re-run the following command to continue the update:
/scripts/elevate-cpanel --continue

`
We did a full backup seconds before running the elevate and now running a bare metal recovery.

@chrisduk112 Did you get anywhere with resolving this?

We had this same issue today 2nd August 2023, we use OnAPP.
`root@serv [~]# /scripts/elevate-cpanel --continue
-------------------------> [INFO] Restarting install process (stage=3)
-------------------------> [ERROR] # Upgrade process failed at stage=3 ; Running: tail -f /var/log/elevate-cpanel.log
* 2023-08-02 18:37:32 [INFO] Running: /usr/bin/systemctl restart elevate-cpanel.service

* 2023-08-02 18:37:32 [INFO]

* 2023-08-02 18:35:10 (4102) [INFO] A report has been generated at /var/log/leapp/leapp-report.json

* 2023-08-02 18:35:10 (4102) [INFO] A report has been generated at /var/log/leapp/leapp-report.txt

* 2023-08-02 18:35:10 (4102) [INFO]

* 2023-08-02 18:35:10 (4102) [INFO] ============================================================

* 2023-08-02 18:35:10 (4102) [INFO]                        END OF REPORT

* 2023-08-02 18:35:10 (4102) [INFO] ============================================================

* 2023-08-02 18:35:10 (4102) [INFO]

* 2023-08-02 18:35:10 (4102) [INFO] Answerfile has been generated at /var/log/leapp/answerfile

* 2023-08-02 18:35:10 (4119) [INFO]

* 2023-08-02 18:35:10 (4026) [INFO] Sending notification: Failed to update to AlmaLinux 8

* 2023-08-02 18:35:10 (4031) [ERROR] The elevation process failed during stage 3.

* 2023-08-02 18:35:10 (4031) [ERROR]

* 2023-08-02 18:35:10 (4031) [ERROR] You can continue the process after fixing the errors by running:

* 2023-08-02 18:35:10 (4031) [ERROR]

* 2023-08-02 18:35:10 (4031) [ERROR]     /usr/local/cpanel/scripts/elevate-cpanel --continue

* 2023-08-02 18:35:10 (4031) [ERROR]

* 2023-08-02 18:35:10 (4031) [ERROR] You can check the error log by running:

* 2023-08-02 18:35:10 (4031) [ERROR]

* 2023-08-02 18:35:10 (4031) [ERROR]     /usr/local/cpanel/scripts/elevate-cpanel

* 2023-08-02 18:35:10 (4031) [ERROR]

* 2023-08-02 18:35:10 (4031) [ERROR] Last Error:

* 2023-08-02 18:35:10 (4031) [ERROR]

* 2023-08-02 18:35:10 (4031) [ERROR] The 'leapp upgrade' process failed.

* 2023-08-02 18:35:10 (4031) [ERROR]

* 2023-08-02 18:35:10 (4031) [ERROR] Please investigate, resolve then re-run the following command to continue the update:

* 2023-08-02 18:35:10 (4031) [ERROR]

* 2023-08-02 18:35:10 (4031) [ERROR]     /scripts/elevate-cpanel --continue

* 2023-08-02 18:35:10 (4031) [ERROR]

* 2023-08-02 18:35:10 (4031) [ERROR]

* 2023-08-02 18:35:10 (4031) [ERROR] You can read the full leapp report at: /var/log/leapp/leapp-report.txt

* 2023-08-02 18:35:10 (5135) [FATAL] The 'leapp upgrade' process failed.

Please investigate, resolve then re-run the following command to continue the update:
/scripts/elevate-cpanel --continue

You can read the full leapp report at: /var/log/leapp/leapp-report.txt
* 2023-08-02 18:37:32 (4088) [INFO] Running: /usr/bin/systemctl restart elevate-cpanel.service

* 2023-08-02 18:37:32 (4089) [INFO]

* 2023-08-02 18:37:32 [INFO]

* 2023-08-02 18:37:32 (4119) [INFO]

* 2023-08-02 18:37:33 (5692) [INFO] ******************************************************************************************

* 2023-08-02 18:37:33 (5693) [INFO] *

* 2023-08-02 18:37:33 (5694) [INFO] * Starting stage 3 of 5

* 2023-08-02 18:37:33 (5695) [INFO] *

* 2023-08-02 18:37:33 (5696) [INFO] ******************************************************************************************

* 2023-08-02 18:37:33 (5666) [INFO] Stage 3: skipping prep_for_leapp (already run)

* 2023-08-02 18:37:33 (5816) [INFO] Running leapp upgrade

* 2023-08-02 18:37:33 (4088) [INFO] Running: /usr/bin/leapp upgrade

* 2023-08-02 18:37:33 (4089) [INFO]

* 2023-08-02 18:37:41 (4102) [INFO] ==> Processing phase `configuration_phase`

* 2023-08-02 18:37:41 (4102) [INFO] ====> * ipu_workflow_config

* 2023-08-02 18:37:41 (4102) [INFO]         IPU workflow config actor

* 2023-08-02 18:37:41 (4102) [INFO] ==> Processing phase `FactsCollection`

* 2023-08-02 18:37:41 (4102) [INFO] ====> * system_facts

* 2023-08-02 18:37:41 (4102) [INFO]         Provides data about many facts from system.

* 2023-08-02 18:37:44 (4102) [INFO] Process Process-217:

* 2023-08-02 18:37:44 (4102) [INFO] Traceback (most recent call last):

* 2023-08-02 18:37:44 (4102) [INFO]   File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap

* 2023-08-02 18:37:44 (4102) [INFO]     self.run()

* 2023-08-02 18:37:44 (4102) [INFO]   File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run

* 2023-08-02 18:37:44 (4102) [INFO]     self._target(*self._args, **self._kwargs)

* 2023-08-02 18:37:44 (4102) [INFO]   File "/usr/lib/python2.7/site-packages/leapp/repository/actor_definition.py", line 72, in _do_run

* 2023-08-02 18:37:44 (4102) [INFO]     actor_instance.run(*args, **kwargs)

* 2023-08-02 18:37:44 (4102) [INFO]   File "/usr/lib/python2.7/site-packages/leapp/actors/**init**.py", line 290, in run

* 2023-08-02 18:37:44 (4102) [INFO]     self.process(*args)

* 2023-08-02 18:37:44 (4102) [INFO]   File "/usr/share/leapp-repository/repositories/system_upgrade/common/actors/systemfacts/actor.py", line 65, in process

* 2023-08-02 18:37:44 (4102) [INFO]     bios_grubcfg_details = systemfacts.get_bios_grubcfg_details()

* 2023-08-02 18:37:44 (4102) [INFO]   File "/usr/share/leapp-repository/repositories/system_upgrade/common/actors/systemfacts/libraries/systemfacts.py", line 326, in get_bios_grubcfg_details

* 2023-08-02 18:37:44 (4102) [INFO]     with open('/boot/grub2/grub.cfg') as fo:

* 2023-08-02 18:37:44 (4102) [INFO] IOError: [Errno 2] No such file or directory: '/boot/grub2/grub.cfg'

* 2023-08-02 18:37:44 (4102) [INFO]

* 2023-08-02 18:37:44 (4102) [INFO]

* 2023-08-02 18:37:44 (4102) [INFO] =============================================================================================

* 2023-08-02 18:37:44 (4102) [INFO] Actor system_facts unexpectedly terminated with exit code: 1 - Please check the above details

* 2023-08-02 18:37:44 (4102) [INFO] =============================================================================================

* 2023-08-02 18:37:44 (4102) [INFO] 2023-08-02 18:37:44.320 ERROR    PID: 3219 leapp: Actor system_facts unexpectedly terminated with exit code: 1

* 2023-08-02 18:37:44 (4102) [INFO] 2023-08-02 18:37:44.353 ERROR    PID: 3219 leapp: Upgrade workflow failed, check log for details

* 2023-08-02 18:37:44 (4102) [INFO]

* 2023-08-02 18:37:44 (4102) [INFO] Debug output written to /var/log/leapp/leapp-upgrade.log

* 2023-08-02 18:37:44 (4102) [INFO]

* 2023-08-02 18:37:44 (4102) [INFO] ============================================================

* 2023-08-02 18:37:44 (4102) [INFO]                            REPORT

* 2023-08-02 18:37:44 (4102) [INFO] ============================================================

* 2023-08-02 18:37:44 (4102) [INFO]

* 2023-08-02 18:37:44 (4102) [INFO] A report has been generated at /var/log/leapp/leapp-report.json

* 2023-08-02 18:37:44 (4102) [INFO] A report has been generated at /var/log/leapp/leapp-report.txt

* 2023-08-02 18:37:44 (4102) [INFO]

* 2023-08-02 18:37:44 (4102) [INFO] ============================================================

* 2023-08-02 18:37:44 (4102) [INFO]                        END OF REPORT

* 2023-08-02 18:37:44 (4102) [INFO] ============================================================

* 2023-08-02 18:37:44 (4102) [INFO]

* 2023-08-02 18:37:44 (4102) [INFO] Answerfile has been generated at /var/log/leapp/answerfile

* 2023-08-02 18:37:44 (4119) [INFO]

* 2023-08-02 18:37:44 (4026) [INFO] Sending notification: Failed to update to AlmaLinux 8

* 2023-08-02 18:37:44 (4031) [ERROR] The elevation process failed during stage 3.

* 2023-08-02 18:37:44 (4031) [ERROR]

* 2023-08-02 18:37:44 (4031) [ERROR] You can continue the process after fixing the errors by running:

* 2023-08-02 18:37:44 (4031) [ERROR]

* 2023-08-02 18:37:44 (4031) [ERROR]     /usr/local/cpanel/scripts/elevate-cpanel --continue

* 2023-08-02 18:37:44 (4031) [ERROR]

* 2023-08-02 18:37:44 (4031) [ERROR] You can check the error log by running:

* 2023-08-02 18:37:44 (4031) [ERROR]

* 2023-08-02 18:37:44 (4031) [ERROR]     /usr/local/cpanel/scripts/elevate-cpanel

* 2023-08-02 18:37:44 (4031) [ERROR]

* 2023-08-02 18:37:44 (4031) [ERROR] Last Error:

* 2023-08-02 18:37:44 (4031) [ERROR]

* 2023-08-02 18:37:44 (4031) [ERROR] The 'leapp upgrade' process failed.

* 2023-08-02 18:37:44 (4031) [ERROR]

* 2023-08-02 18:37:44 (4031) [ERROR] Please investigate, resolve then re-run the following command to continue the update:

* 2023-08-02 18:37:44 (4031) [ERROR]

* 2023-08-02 18:37:44 (4031) [ERROR]     /scripts/elevate-cpanel --continue

* 2023-08-02 18:37:44 (4031) [ERROR]

* 2023-08-02 18:37:44 (4031) [ERROR]

* 2023-08-02 18:37:44 (4031) [ERROR] You can read the full leapp report at: /var/log/leapp/leapp-report.txt

* 2023-08-02 18:37:44 (5135) [FATAL] The 'leapp upgrade' process failed.

` We did a full backup seconds before running the elevate and now running a bare metal recovery.


Bump go.opentelemetry.io/otel to v0.4.3.

v0.4.3 contains a breaking change that removes the TraceIDString() and SpanIDString() functions (https://github.com/open-telemetry/opentelemetry-go/pull/642).

I have this error
# github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace
app_1       | /go/pkg/mod/github.com/!google!cloud!platform/opentelemetry-operations-go/exporter/trace@v0.1.0/trace_proto.go:67:32: s.SpanContext.TraceIDString undefined (type core.SpanContext has no field or method TraceIDString)

with v0.4.3

Thank you!


Email notifier

Current coverage is 95.47% (diff: 86.95%)

Merging #258 into master will decrease coverage by 0.11%

@@             master       #258   diff @@
==========================================
  Files            55         57     +2
  Lines          1680       1702    +22
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
+ Hits           1606       1625    +19
- Misses           74         77     +3
  Partials          0          0

Powered by Codecov. Last update 4a175bf...db64488


Instance.getNearestGCRootPointer(): find out which field contains the reference

Hi Alexey!
I find memory leaks automatically in my OS.
However, I can see the instances making up a path to the GC root, but not the field names that link them together. Do I have to find the field name manually or is there an easier way?
Many greetings,
Stefan
Source. Current output without field names:
Checking module ID: #1016442 - System Version

Path to GC root:
  main$JavaXClassLoaderWithParent
    java.lang.Class
      main$SystemVersion
        java.lang.ThreadLocal$ThreadLocalMap$Entry
          java.lang.ThreadLocal$ThreadLocalMap$Entry[]
            java.lang.ThreadLocal$ThreadLocalMap
              main$191$1

Checking module ID: #1016805 - Provoke DeadLock (& have OS solve it) [Dyn Module]

Path to GC root:
  main$JavaXClassLoaderWithParent
    java.security.ProtectionDomain
      java.security.ProtectionDomain[]
        java.security.AccessControlContext
          javax.swing.JButton
            javax.swing.JInternalFrame
              java.lang.Object[]
                java.util.ArrayList
                  main$DesktopPaneWithFitPicture
                    javax.swing.JInternalFrame
                      java.lang.Class

OK, I built this myself now if someone is interested.


Merge and edit bdd and tdd files

Merge BDD and TDD docs to have an introduction to BDD.
Link to blogs for more information.

On second thought, a 'BDD Tutorial should be more than just a brief text about bdd & tdd. Closing this PR. (Fix the typo found by @olleolleolle on master)


i2c: use open drain for output rather than flipping between input and output.

Using gpio_enable and flipping the configuration appears to be a major cause of poor performance in the i2c driver, so this changes to using the outputs as open-drain only.

Great fix, the performance gain is significant. I did a test with DS3231 example with a delay of 1 us from sdk :

Thanks @ourairquality, this looks good to me! :+1:

Thanks @ourairquality.
Has anyone tried GPIO 16 with i2c already?

@sheinz It's not expected for work on GPIO 16 now as GPIO 16 has no open drain support (or at least it's not in the code yet).

One other inconvenient of GPIO 16, this pin is very slow to switch between state.


client configuration content shows in logs

Version: 1.7.0
Run args:
ovpn-admin \
  --templates.clientconfig-path=/mnt/setup/client.conf.tpl \
  --easyrsa.path=/mnt/certs \
  --easyrsa.index-path=/mnt/certs/pki/index.txt \
  --listen.port=8080

Even without --verbose and --debug arguments i can seed content of users config files, when press Download button in UI

please provide additional information and a description of your problem if you have such

@wzooff please check version 1.7.3
now client confg render  will be shown in the log only if the --verbose flag is present


reset to "latest" initialValues

After updating initialValues and then resetting the form, the the form resets back to the original initialValues and not the latest initialValues.  Is this the intended behavior?
When a new user is selected, I'm using the form plugin to return undefined
UserForm: (state, action) => {
    switch(action.type) {
      case 'LOAD_TARGET_USER':
        return undefined;
      default:
        return state;
    }
  }

and loading initial values through mapStateToProps.
export default reduxForm({form: 'UserForm', fields},
(state) => { return {initialValues: state.user.target} })
(UserForm);

Both resetForm() and destroyForm()+initializeForm(targetUser) reset the user info to the first user that was selected, instead of the most recent.  Is there a better way to do this?

Fixed this issue by setting targetUser to null when a userId is selected then load selected user object in a following action.

This seems to be my problem as well. I'm not using a form plugin.

Nevermind, my problem was that when I resetting the form I was calling:
store.dispatch(reset());
Rather than passing the form name:
store.dispatch(reset('formName'));

Is this the intended behavior?

Yes. https://github.com/erikras/redux-form/issues/370#issuecomment-166593091

The "workaround" if anyone is wondering, is to use enableReinitialize=true on props.

To reset form from outside of ReduxForm component:
import { reset } from 'redux-form'; mapDispatchToProps(dispatch) {   return {     resetForm: dispatch(reset('FORM_NAME')),   } }
To reset form inside ReduxForm component:
this.props.reset();

I'm not sure why but setting the enableReinitialize=true doesn't work on my case. However, manually triggering the reset on the form does.


[Bug] Cannot register

Is there an existing issue for this?

[X] Yes, I have searched the existing issues

Product Variant
Self-Hosted
Current Behavior
After I follow the instructions on the documentation page, the application is reachable, however, when I try to register I get the following issue:
AxiosError: Network error.
I've attached a screenshot that will show the error happening.

Expected Behavior
Allowing me to register.
Steps To Reproduce
1.Follow the following instructions: https://docs.rxresu.me/source-code/docker
2. Go to <IP_ADDRESS>:3000 and click on Register.
What browsers are you seeing the problem on?
Chrome
Anything else?
No response

I found solution.
You need to setup env value - PUBLIC_SERVER_URL.
In my case it was - PUBLIC_SERVER_URL=http://<IP_ADDRESS>:3100


ERA5 monthly means by hour of day: data poorly structured

For the reanalysis-era5-land-monthly-means:monthly_averaged_reanalysis_by_hour_of_day dataset (and, probably, the similarly structuredreanalysis-era5-single-levels-monthly-means:monthly_averaged_ensemble_members_by_hour_of_day and reanalysis-era5-single-levels-monthly-means:monthly_averaged_reanalysis_by_hour_of_day), the data structure is more or less unchanged from what the CDS API returns. Unfortunately this is not a helpful structure for these data. Ideally, one would want each of the 24 possible "hour of day" values to be implemented as a channel -- that is, you can select any subset of x (>= 0, <= 24) hours and receive x parallel time series at monthly resolution, with the timestamps placed in the middle of each month.
Instead, what we get is a single time series with 24 hourly values on the first day of every month, representing the averages for that month for the corresponding hours. (These values aren't monotonically increasing -- see Issue #5 -- but this doesn't significantly complicate the task of restructuring the data.)

These datasets have, for the time being, been blacklisted (see Issue #5 ). This issue will become relevant again if they need to be reinstated.

Closing for now -- can always reopen if it's decided that this actually needs fixing.


Remove deprecated DefaultRuntime config

Signed-off-by: zounengren<EMAIL_ADDRESS>

DefaultRuntime has been removed

Looks like this field was removed in another PR, so this one is no longer needed.


Address arch board feedback

Conclusions from Arch board:

Go with LRO design
SDK won't take dependency on Storage or DMLib. Service and REST API board will meet and work on changes on the service side
Rename Configuration on input types. As much as possible align with TA
Initializing collections using .Add
Rename StartTranslationFromAzureBlobs() and have overLoads of StartTranslation()
Consider a static method or overload for TranslationConfiguration constructor that creates a configuration given a simple set of parameters

StartTranslation(TranslationConfig single) -> maybe?
static TranslationConfig FromBlobStorage(special params...) ?

Remove Configuration from input types and consider aligning with Text Analytics
Add supported Glossary Formats, and Supported Text Documents

Design update https://apiview.dev/Assemblies/Review/46373cdd5bff4c86aeef03d3b8f79d50

Issues created for the specifics, and API view updated


Transforms acting on positions

I create a transform branch and move there the transform functions which act directly on the atomic positions, waiting for a more stable API

This issue has been addressed in #124


CDN jquery to html file

Added links in html to css style sheet, JS scripts sheet, and jquery 3.6.4. Waiting for approval to complete pull request.


Carousel in react-native-tabview flickers on tab change

https://github.com/archriss/react-native-snap-carousel/blob/1aebb185036813b1104ea01fc6229b43f10f4d9c/src/carousel/Carousel.js#L187
Do we still need this code?
I am using Carousel in react-native-tab-view, and Carousel flickers on tab change.
Green pane is react-native-tab-view, and Red pane is Carousel.

When I remove requestAnimationFrame, it works fine.
By the way, what is hideCarousel for?

I recall this same behaviour with a Card.cover component from React-Native-Paper UI system with snap-carousel.

any update on this? this SO thread suggests react-native-fast-image but it can be weird on android.


Perform network operation before onCreateSteps()

I want to perform an asynchronous retrofit call to fetch my Steps so that I can use them in OnCreateSteps(). How to do that?

Override on create method and do the necessary calls and convert whatever you need to string and use it on the oncreatesteps()