Account created on 26 February 2013, about 12 years ago
#

Merge Requests

More

Recent comments

🇪🇸Spain fjgarlin

aha! found it!

https://git.drupalcode.org/project/project_browser/-/blob/2.0.x/src/Proj...

Two ways to go around it.
- We change that part, by adding sha1 around it.
- Or we add a “safe” ID https://git.drupalcode.org/project/project_browser/-/blob/2.0.x/src/Plug...

I think option 1 is good as it will apply to all plugins.

🇪🇸Spain fjgarlin

Actually, we were already using md5 by calling getQueryCacheKey. I changed it to "sha1".

However, given the above output in the issue summary, this is not related to storing the "query:...", it's got to be something else.

🇪🇸Spain fjgarlin

The MR does not solve the issue. The problem is that "keyValue" has a limit for the "name" column

The issue is in this line, in PB code: https://git.drupalcode.org/project/project_browser/-/blob/2.0.x/src/Enab...

I suggest that we "md5" (or whatever technique is best) the "$cache_key".
Something like this:
$cache_key = md5($this->getQueryCacheKey($query));

🇪🇸Spain fjgarlin

https://www.drupal.org/jsonapi/index/project_modules?filter%5Bmachine_na...

...
"title": "Google Cloud Text-to-Speech Augmentor",
...
"field_composer_namespace": "drupal/augmentor_google_cloud_text_to_speech-augmentor_google_cloud_text_to_speech",
...
"field_project_machine_name": "augmentor_google_cloud_text_to_speech",
...

The "field_composer_namespace" value is 82 characters long.
The data seems correct, so it must be something happening in the code.

🇪🇸Spain fjgarlin

No worries at all. I know it was a small sample size, but as it requires coordination and possible changes with the runner it can wait.

🇪🇸Spain fjgarlin

In that case. Let's close this for now and focus on the other issues.

Maybe we can try enabling this feature in the future in the gitlab runner, but for now, we're trying to keep changes to a minimum, and this is not a real issue that we are facing right now.

Thanks for the MR and the investigation.

🇪🇸Spain fjgarlin

Great. I'll do that then, so we can also rebase the other open MRs.

🇪🇸Spain fjgarlin

I think the diference should be noticed in the jobs using the artifacts.

But... I'm confused. It seems that the flag needs to be enabled on the runner (according to the documentation and this issue), as the default value seems to be "false".

But we haven't made any change to the actual running configuration in +1 year (other than the regular updates).

So my confusion actually comes from the core issue, where it says that it "just works": https://www.drupal.org/project/drupal/issues/3521894#comment-16090831 📌 Stop trying to cache node_modules in gitlab jobs Active . Maybe it's somehow enabled via the GitLab admin UI (I don't have access to this).

I want to say that given that this MR is so simple we should probably go ahead and merge it anyway. There is no negative effects and if (or when) the flag is enabled, we should notice some gains.

RTBC.

🇪🇸Spain fjgarlin

Yeah, once it's in beta phase, we should update to this CORE_NEXT_MINOR: 11.2.x-dev. Maybe we can do something in the script to check when 11.2.0-beta* is available.

🇪🇸Spain fjgarlin

Testing any pipeline that uses the legacy driver should be good enough, or any D7 pipeline.
I think the change should be pretty safe because it actually happened a few years ago https://github.com/SeleniumHQ/selenium/pull/11409 upstream.

I think that, other than the @todo, everything looks good. RTBC (pending the removal of the todo).

🇪🇸Spain fjgarlin

Oh cool, this is a nice improvement on GitLab side. Yeah, let's review URLs and backticks all over.

🇪🇸Spain fjgarlin

We should have a sort of before/after to see if it makes any difference.

🇪🇸Spain fjgarlin

Added link to the project shown in the screenshot.

🇪🇸Spain fjgarlin

Maybe we can add the suggestions (eg: whitelist->allowlist). https://cspell.org/docs/api/cspell-types/interfaces/Settings#flagwords
That way it will not recommend derivatives of the words.

🇪🇸Spain fjgarlin

This was merged and a new tag was made, which is as well the new default-ref for all contrib.

🇪🇸Spain fjgarlin

The current redirection is something like this:
- "Create release link": https://git.drupalcode.org/project/config_notify/-/releases/new?tag_name...
- 301 to https://www.drupal.org/project/config_notify/releases/new , which 404s

We could create a menu path like project/%machine_name/releases/new, and from that, fetch the project with that machine_name and redirect to https://www.drupal.org/node/add/project-release/NID

The logic might be a bit trickier since machine_name does not need to be the same as the repository name.

---

Another option, since releases are fully managed via drupal.org, might be to turn off "Releases" for all projects (https://gitlab.com/gitlab-org/gitlab/-/merge_requests/96373)

🇪🇸Spain fjgarlin

NW for the chromedriver args. The rest looks good.

🇪🇸Spain fjgarlin

From the core issue (comment #7):

It looks like chromedriver have deprecated --whitelisted-ips and replaced it with --allowed-ips, let's see if this works.

We should do this here too I guess.

--

Re change record: yes, let's do it and link to the core issue. As you say, the default is to allow failure, so the overall pipeline result shouldn't be affected. I can make a quick slack post once we merge it, pointing at the change record.

--

Re build.env, yes, it should be ignored in the cspell job.

🇪🇸Spain fjgarlin

Thanks for reporting the issue @heddn. I've opened and created an MR to fix the issue in 🐛 Fix CI_SERVER_URL usage as it changes on external instances Active .

🇪🇸Spain fjgarlin

I introduced a new variable for this altogether instead of relying on CI_SERVER_URL.

The MR is ready for review. The downstream pipelines are running: https://git.drupalcode.org/project/gitlab_templates/-/pipelines/495616

Note that we don't have any external integration to run this on, but given that we are hardcoding the URL to the correct value, it should just work.

🇪🇸Spain fjgarlin

The MR looks good and the tests above show it's working as expected. RTBC.

🇪🇸Spain fjgarlin

Great investigation and even greater that the fix will be just one one (yay for reusable snippets).

Here's a test showing that the ultimate value of the active...

I think you forgot to add the link there.

🇪🇸Spain fjgarlin

Thanks for the new MR.

I'd say that the last part deserves a separate issue to be investigated and addressed separately.

🇪🇸Spain fjgarlin

@oskar_calvo será el host este miércoles (gracias!!)

🇪🇸Spain fjgarlin

That sounds like a really good list 💙

Yup, I have the 3 commits stashed in the changelog and will commit them once we do the next release.

🇪🇸Spain fjgarlin

The link that was removed in the previous edit is: https://web.archive.org/web/20220320234512/https://www.drupal.org/node/1...

It’s D6 + 13 years old so not sure how relevant it can still be.

🇪🇸Spain fjgarlin

I think it all looks good. Thanks so much for this. I think it's a great refactoring.

🇪🇸Spain fjgarlin

Everything looks good now. I just made some really small suggestions about substituting a variable (it could have been a follow-up but it kind of made sense to address it here in one go).

Back to NW just based on that, everything else looks perfect and I'm really happy with the solution that you put together. I even learned the difference between calling a script (runs in a new shell) vs using source (runs in the same shell), so thanks for that too 🙂

🇪🇸Spain fjgarlin

I made some really small MR suggestions to change from this

**************************************************************************************************
 [ERROR] Curl failure
 _CURL_TEMPLATES_REPO=issue/gitlab_templates-3522611  _CURL_TEMPLATES_REF=3522611-curl-return-code  FILENAME=assets/phpcs.xml.dist
 Job ending with EXIT_CODE=22  
**************************************************************************************************

to this

**************************************************************************************************
 [ERROR] Curl failure
 - _CURL_TEMPLATES_REPO=issue/gitlab_templates-3522611
 - _CURL_TEMPLATES_REF=3522611-curl-return-code
 - FILENAME=assets/phpcs.xml.dist
 - FULL_URL=https://git.drupalcode.org/issue/gitlab_templates-3522611/-/raw/3522611-curl-return-code/assets/phpcs.xml.dist

 Job ending with EXIT_CODE=22  
**************************************************************************************************
🇪🇸Spain fjgarlin

Yeah, I think so, we now have +3.5K projects running GitLab CI (https://git.drupalcode.org/search?group_id=2&repository_ref=main&scope=b...)

This has now even passed the usage of DrupalCI ( https://www.drupal.org/project/drupalci/issues/3412417#comment-15410492 - October 2023).

Any projects wanting help can:
- https://www.drupal.org/docs/develop/git/using-gitlab-to-contribute-to-dr...
- Go through https://project.pages.drupalcode.org/gitlab_templates/
- Ask for help via the community #gitlab channel
- Create an issue in this queue asking for help

I updated the issue summary to reflect that.

🇪🇸Spain fjgarlin

🐛 Attributes are not rendered when showing the source code Active was merged. We'll need to re-evaluate this once the change is deployed and the code is re-parsed.

🇪🇸Spain fjgarlin

Merged as this will unblock some other critical issues. We can create follow-ups if needed.

This will go with the next deployment round to api.drupal.org.

Thanks so much!

🇪🇸Spain fjgarlin

The code looks good and phpstan is green again. The failing tests are not introduced here.
RTBC.

🇪🇸Spain fjgarlin

Something like this:

  rules:
    - if: '$FORCE_TEST_ONLY_JOB == "1"'
       when: always
    - *opt-in-current-rule
    - *skip-test-only-changes-rule
    - changes:
        - '**/tests/**/*Test.php'
      when: manual
🇪🇸Spain fjgarlin

We can only do it on one branch, or just do it for the parent issue (the one of failing curl) and then revert the change.
Or we can add a new rule that will trigger it, like setting a variable, which we could set in the gitlab_templates project when calling the downstream pipelines.

🇪🇸Spain fjgarlin

PHPStan is now happen. PHPCS is not, one variable became unused after the change.

🇪🇸Spain fjgarlin

The failing tests in the CI are mostly unrelated to the changes here, and defo not a blocker.

This is how it's rendered in the tests:

The code looks good and it opens the door to some of the other critical issues.
RTBC.

🇪🇸Spain fjgarlin

Great. Left another comment on one @todo.

Once that is addressed and the files are renamed back to what they need to be (remove the "-zzz") this will be good to go.

🇪🇸Spain fjgarlin

We could somehow alter a file using the before_script and maybe we also need to override the rules section for the "test-only job" on one of the files so it always runs as well.

🇪🇸Spain fjgarlin

It's also great that we can cover all cases but 1 (the test only) via the GTD!

🇪🇸Spain fjgarlin

I left some more feedback. Most of it is superficial and minor. I think the logic is perfect.

🇪🇸Spain fjgarlin

I made a suggestion in the MR and also added a @todo as PB will be part of core eventually.

🇪🇸Spain fjgarlin

Actually, as they have different purposes. We can leave it like that.

🇪🇸Spain fjgarlin

We already use a "versionless" user agent in some parts, like here: https://git.drupalcode.org/project/project_browser/-/blob/2.0.x/scripts/...
curl_setopt($ch, CURLOPT_USERAGENT, 'Curl.ProjectBrowser');

So I suggest to modify it slightly so we can do a regex that covers this and the new one with the version. I'll make a suggestion in the MR.

🇪🇸Spain fjgarlin

Agree, using a reference inside a script might not be an option at all.

I see both 1 and 2 as good options to be honest, so I'll let you go with whatever you find more comfortable.

1. 9x changes is not that bad given the size of the templates already, and the logic is simple enough. The logic here is simple and repetitive.
2. We could do the -f logic for that first one, and then use the PHP call in the others. The logic here is a but more complex but reusable.

🇪🇸Spain fjgarlin

The templates set the version of Drupal expected for the variant being run. If you want to keep the one set in the module's composer.json you need to add a variable to the composer job as shown in here https://project.pages.drupalcode.org/gitlab_templates/jobs/composer/#pac...

But yeah, if you want to test against the HEAD, the NEXT_MINOR variant is exactly that at the moment.

🇪🇸Spain fjgarlin

If left some feedback in the MR. I think that in most cases, we might want to exit with an error, but in one of the curls, where it's just extra information, we could just display a warning and continue.

🇪🇸Spain fjgarlin

Thanks for putting the results of the testing. They are really useful.

🇪🇸Spain fjgarlin

Happy to do the curl fail detection for all curl calls. It needs to be with -f as it will otherwise create a file which won't be empty, so it can be misleading. Also, this way we only need one call, and not two.

Good idea on a possible reusable snippet, if that's possible.

🇪🇸Spain fjgarlin

Postponing based on the previous comment.

🇪🇸Spain fjgarlin

Example with and without -f option in curl:

With (no file is downloaded):

curl -fOL https://git.drupalcode.org/project/gitlab_templates/-/raw/default-ref/scripts/get-gitlab-templates-version.php
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (56) The requested URL returned error: 404

Without (a file with that name and the 404 HTML is downloaded):

curl -OL https://git.drupalcode.org/project/gitlab_templates/-/raw/default-ref/scripts/get-gitlab-templates-version.php 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2206    0  2206    0     0   6999      0 --:--:-- --:--:-- --:--:--  7003
🇪🇸Spain fjgarlin

Slack conversation + credits to the people who helped in the thread so far.

🇪🇸Spain fjgarlin

Thanks for rebasing.

Yeah we can investigate, but we will merge only if we find it makes a real difference, which based on #6 / #7, we couldn't really prove.

🇪🇸Spain fjgarlin

This looks good to me. Thanks for addressing the feedback. RTBC.

🇪🇸Spain fjgarlin

Great, thanks for the additional testing and the extra digging.
Merging this. Thanks for reporting and testing!

🇪🇸Spain fjgarlin

Running: https://git.drupalcode.org/project/gitlab_templates_downstream/-/pipelin...

Weird, we can see the quotes in the output but it seems to think that it's an ok-name 🤷

Regardless, the change on this MR still makes sense in my opinion.

🇪🇸Spain fjgarlin

Yup, you'd just need to change the project and ref value in your .gitlab-ci.yml file point to this fork and branch and you'd be testing the change.
https://project.pages.drupalcode.org/gitlab_templates/info/testing-mrs/

🇪🇸Spain fjgarlin

Thanks for reporting, it is definitely a bug! We'll look into it.

Possible workarounds for now are to set the variable as you did or to remove the single quotes.

🇪🇸Spain fjgarlin

fjgarlin changed the visibility of the branch 3521685-ping-webdriver to hidden.

🇪🇸Spain fjgarlin

fjgarlin made their first commit to this issue’s fork.

Production build 0.71.5 2024