Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[AssetMapper] Add logical failure implementation#58275

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
wotta wants to merge7 commits intosymfony:7.4
base:7.4
Choose a base branch
Loading
fromwotta:feature-add-logical-failure-implementation

Conversation

wotta
Copy link

@wottawotta commentedSep 16, 2024
edited
Loading

QA
Branch?7.2
Bug fix?no
New feature?yes
Deprecations?no
LicenseMIT

The following feature/change is to make sure we can rely on the correct status codes in the CI/CD pipelines.
Whenever the download part fail now we get the correct failure status code.

Incase things are missing please let me know, Not sure if any additional information is needed since this seems like a small change which appears to be pretty clear.

Nek- reacted with thumbs up emoji
@carsonbot
Copy link

Hey!

I see that this is your first PR. That is great! Welcome!

Symfony has acontribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (seehttps://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (seehttps://symfony.com/releases)
  • Features and deprecations must be submitted against the 7.2 branch.

Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change.

When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

@carsonbot
Copy link

Hey!

Thanks for your PR. You are targeting branch "7.2" but it seems your PR description refers to branch "7.2 for features / 5.4, 6.4, and 7.1 for bug fixes".
Could you update the PR description or change target branch? This helps core maintainers a lot.

Cheers!

Carsonbot

@carsonbotcarsonbot changed the titlefeat: Added logical failure implementation[AssetMapper] feat: Added logical failure implementationSep 16, 2024
@smnandre
Copy link
Member

As there is already aLogicException availabe in AssetMapper, maybe we should use it instead of the global one ?
It would allow you to target more specifically the exceptions catched here.

For instance (some others in the class / related ones):

foreach ($remoteEntriesToDownloadas$package =>$entry) {
if (!isset($contents[$package])) {
thrownew \LogicException(\sprintf('The package "%s" was not downloaded.',$package));
}

I dont think this would be a BC break (cc@stof ?)

OskarStark reacted with thumbs up emoji

@OskarStarkOskarStark changed the title[AssetMapper] feat: Added logical failure implementation[AssetMapper] Add logical failure implementationSep 17, 2024
@wottawotta requested a review fromxabbuhSeptember 19, 2024 12:33
@wotta
Copy link
Author

I added additional exceptions to be catch'ed. Reason for this is because our pipeline was failing again with the following error. The added exceptions stopped the script from continuing which is what we need to not break our pipeline.

#28 70.49 [2024-09-25T17:41:43.741652+02:00] console.CRITICAL: Error thrown while running command "importmap:install". Message: "Idle timeout reached for "https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.2/webfonts/fa-solid-900.ttf"." {"exception":"[object] (Symfony\\Component\\HttpClient\\Exception\\TimeoutException(code: 0): Idle timeout reached for \"https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.2/webfonts/fa-solid-900.ttf\". at /var/www/html/vendor/symfony/http-client/Chunk/ErrorChunk.php:61)","command":"importmap:install","message":"Idle timeout reached for \"https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.2/webfonts/fa-solid-900.ttf\"."}#28 70.50 17:41:43 CRITICAL  [console] Error thrown while running command "importmap:install". Message: "Idle timeout reached for "https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.2/webfonts/fa-solid-900.ttf"." ["exception" => Symfony\Component\HttpClient\Exception\TimeoutException { …},"command" => "importmap:install","message" => "Idle timeout reached for "https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.2/webfonts/fa-solid-900.ttf"."]

@wotta
Copy link
Author

Good morning@smnandre /@xabbuh.

Hope y'all are doing well. Do you happen to know how long it will take before the PR is going to be reviewed again?
I'll be able to communicate and manage expectations internally over here.

Thank you and I wish you an amazing day!

@wotta
Copy link
Author

Unsure why the tests are failing here.Error: Cannot instantiate abstract class Twig\Node\Node

@wottawotta requested a review fromxabbuhSeptember 27, 2024 11:40
Comment on lines +75 to +79
try {
$contents = $this->packageResolver->downloadPackages($remoteEntriesToDownload, $progressCallback);
} catch (TimeoutException|TransportException $exception) {
throw new LogicException($exception->getMessage());
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I don't think this is a good idea, as it's hiding the real exception. Also, this is not a "Logic" exception.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Ok, I understand but how would y'all like to see this in that case. It's hard to guess what direction I need to go with this.

Again I'm new to the Symfony world and just want to fix this specific issue because it is breaking deployments. And while I want to fix it I do want to do it while communicating.

Let me know if you have any thoughts on how to improve things. Have a nice evening!

@smnandre
Copy link
Member

I added additional exceptions to be catch'ed. Reason for this is because our pipeline was failing again with the following error. The added exceptions stopped the script from continuing which is what we need to not break our pipeline.

#28 70.49 [2024-09-25T17:41:43.741652+02:00] console.CRITICAL: Error thrown while running command "importmap:install". Message: "Idle timeout reached for "https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.2/webfonts/fa-solid-900.ttf"." {"exception":"[object] (Symfony\\Component\\HttpClient\\Exception\\TimeoutException(code: 0): Idle timeout reached for \"https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.2/webfonts/fa-solid-900.ttf\". at /var/www/html/vendor/symfony/http-client/Chunk/ErrorChunk.php:61)","command":"importmap:install","message":"Idle timeout reached for \"https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.2/webfonts/fa-solid-900.ttf\"."}#28 70.50 17:41:43 CRITICAL  [console] Error thrown while running command "importmap:install". Message: "Idle timeout reached for "https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.2/webfonts/fa-solid-900.ttf"." ["exception" => Symfony\Component\HttpClient\Exception\TimeoutException { …},"command" => "importmap:install","message" => "Idle timeout reached for "https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.2/webfonts/fa-solid-900.ttf"."]

Pure curiosity, is it always the same files that trigger the exceptions ? Does some http client tuning limit the problem ?

@wotta
Copy link
Author

wotta commentedSep 27, 2024
edited
Loading

Pure curiosity, is it always the same files that trigger the exceptions ? Does some http client tuning limit the problem ?

Great question! So the answer might be a bit useless but it's not always the same.

A month or maybe a bit more ago jsdelivr had issues. Not fully sure but I thought that was a certificate issue. That broke the deployments because import map didn't stop.

And every now and then the script fails without saying it went wrong because of timeouts, and or issues on jsdelivr's end. It is definitely not consistent but our issue can be easily solved if the import map script just returns the failure signal on error.

With on error I mean if anything halts the download process basically.

@fabpotfabpot modified the milestones:7.2,7.3Nov 20, 2024
@fabpotfabpot removed this from the7.3 milestoneMay 26, 2025
@fabpotfabpot added this to the7.4 milestoneMay 26, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@smnandresmnandresmnandre left review comments

@xabbuhxabbuhAwaiting requested review from xabbuh

Assignees
No one assigned
Projects
None yet
Milestone
7.4
Development

Successfully merging this pull request may close these issues.

5 participants
@wotta@carsonbot@smnandre@xabbuh@fabpot

[8]ページ先頭

©2009-2025 Movatter.jp