Category: Open Source
NDTV पर Adani Group पर अधिग्रहण पर बोले Ravish Kumar, ‘मैं सबसे महंगा Anchor’ |वनइंडिया हिंदी |*News
#NDTV #ravishkumar #resignation #Adanigroup
NDTV and Ravish Kumar, Ravish Kumar resignation from NDTV, ravish, ravish ndtv, Ravish Kumar Ravish Kumar, Adani Group, Adani NDTV, Gautam Adani, Godi Media, Adani Enterprises, AMG Media Networks Ltd, NDTV Share, New Delhi Television Ltd, Prannoy Roy, Radhika Roy, Adani Open Offer NDTV, एनडीटीवी, रवीश कुमार, अडाणी ग्रुप, अदानी ग्रुप, एंकर रवीश कुमार, oneindia hindi, oneindia hindi news, वनइंडिया हिंदी, वनइंडिया हिंदी न्यूज़
Specbee: The Ultimate Guide to Jumpstart your Drupal Contribution Journey
Ankitha and Su…
23 Aug, 2022
Introduction
Being an open-source content management system, Drupal encourages contributions from the community of developers and users worldwide in various forms. It could be in the form of code which includes patches to core and contributed projects, in non-code ways including marketing, documenting, event organization or by monetarily supporting the project. This article will walk you through everything you need to know to start your Drupal code contribution journey from scratch.
Why Contribute to Drupal
Of course, giving back to a project that supports the way you work and probably live every day might be a strong enough reason for you to voluntarily contribute and improve the open source project. But if you’re looking for a little more incentive to contribute, here are some of the benefits we’ve seen:
- Your contributions help Drupal stay relevant and up-to-date with the advancements happening in all its dependencies over time
- You can gain more knowledge about Drupal which in turn will enable you to build better applications for your clients
- It gives a competitive edge to the organizations that sponsor time for contribution as their developers are gaining more skill and knowledge and by showcasing themselves as an expert
- Collaborate and meet with people who share the same interests as you
How to Contribute
To begin with, create an account on drupal.org for yourself and update your profile with the required details.
Account creation on Drupal.org
Look for an Issue
Once the account is created, the next step would be to find the right issue. It might vary based on your interest:
1. You could find an issue from the issue queue – https://www.drupal.org/project/issues. For more specific searching, you could click on the ‘Advanced search’ and use the filters.
- Issue tags – Issues are attached with different tags. The “novice” tag indicates that the issue needs a simple fix and any beginner could choose it, the “Needs documentation” tag indicates that this issue needs some documentation change, and so on.
- Issue status – Once the issue is created it goes through different states. Based on the current issue status, you could decide the next steps it needs to move forward.
- Issue priority – It defines the priority of the issue, whether it’s a critical bug or it could be a minor fix.
- Issue category – It indicates the category of the issue, whether it’s a bug, or is it a task, or it could be a new feature request to the project.
- Specific project – Here you could directly specify the project that you are interested in.
Issue filters
2. Or start from the project you were always interested to work on, by visiting the module/theme/profile page – https://www.drupal.org/project/. In the right sidebar, look for “All issues” link – https://www.drupal.org/project/issues/?categories=All
3. Or work on a bug that you came across in core, or any contributed modules/themes/profiles while working on a project. It’s also the right way to contribute. One should always practice keeping their “contributor mode” ON even while working on projects, this gives an opportunity to explore and contribute a fix to hidden issues!
Life Cycle of a Drupal Issue
Once an issue is created, it goes through different states. The following are the different issue statuses you will come across:
- Active – When a new issue is created, it is in an Active state.
- Needs review – When the issue needs to be worked upon, it is in a Needs Work state.
- Needs work – Once the issue is picked, the patches are successfully submitted and all the test cases are passing, the issue’s state should be changed to Needs Review.
- Reviewed & tested by the community – Once the issue is reviewed by any contributor, the issue is moved to the “Reviewed & tested by the community” (RTBC) state where one of the members from the core community team reviews the issue.
- Fixed – When an issue passes from the RTBC state, it is moved to the Fixed state.
- Closed (fixed) – After the Fixed state, the issue moves to Closed (fixed) automatically within two weeks. This is the last state of an issue.
- Closed (duplicate) – When any issue gets created which is a duplicate of any earlier one, it directly gets closed as Closed (duplicate).
- Closed (won’t fix) – This state represents that an issue has no solution.
- Closed (works as designed) – This state represents that an issue raised is providing the functionality what it was supposed to and so moved to “works as designed”. In other words, the issue raised is not a bug but a feature.
- Closed (cannot reproduce) – When an issue is not reproducible is moved to this state.
- Closed (outdated) – When an issue is either too old to fix or gets fixed within some other module’s issue, the state can be Closed (outdated) for that issue.
- Patch (to be ported) – When a Patch is to be ported for other versions of the Drupal/Contributed module.
- Postponed – When the Issue/Feature/bug is postponed by the author/community and doesn’t need a fix.
- Postponed (maintainer needs more info) – When an issue is raised but according to the maintainer of the Contributed module, more info is needed about the issue to get it fixed.
Create an Issue
To create an issue for the module. Go to the issue queue of the module https://www.drupal.org/project/issues/?categories=All and click on Create a new issue.
The next step is to give details of the issue that needs to be created.
1. Title: Add the title of the issue.
2. Project: The project name will be auto-selected.
3. Category: Select the category of the project. There are 5 category
- Bug: A bug is a functional error in the system. For example, php error, data loss, memory leak, Incorrect or misleading documentation, Incorrect or misleading user interface text etc.
- Task: These are not a functional bug but “needs to be done” before the release. For example Refactoring code to make it more readable, and maintainable, Adding automated tests, Updating code to new APIs, Improving coding standards etc.
- Feature request: This is a request for completely new functionality to be added to the module.
- Support Request: If we need help on any part of the module or want to know about the drupal core functionality. We can tag support requests and add the question.
- Plan: This tag is used when you have a problem that can not be resolved using one issue. Plan issues will often have multiple sub-steps related to “child” issues.
4. Priority: Select the priority of the issue. Here we have Critical, Major, Normal and Minor. Choose normal unless it’s really serious. Or you can select it as normal and let the maintainer or reviewer can change it as required.
5. Status: Select Active for new issues.
6. Version: Select the version of the project in which the issue has to be fixed.
7. Component: Select the nearest match to the issue. These can be changed later. The components here are based on the module. The options defers from module to module.
8. Assigned: The issue can be assigned to anyone. It is not mandatory and can be assigned later.
9. Tags: Tag the issue with appropriate tags. This can be left empty if we don’t have knowledge of issue tags. This is not mandatory and can be tagged later.
10. Issue summary and Relationships: Expand the field and we have the editor add the details of the issue. There are some predefined headings in the editor and we can replace them if we don’t want them in the issue details.
- Parent issue: To tag the parent issue.
- Related issue: To tag the related issue.
11. Files: We can add the files related to the issues or we can upload the patch to the issue while creating under files. And save the issue.
After saving the issue. The created issue will be added to the issue queue of the respective module.
To create an issue for the drupal core https://www.drupal.org/node/add/project-issue/drupal is the link. And the steps will same as creating the issue in the module. But there are some guidelines to create a core issue which will be displayed on the above link.
These are the guidelines to be followed while creating the core issue.
Create a Patch
There are 2 cases here
- Create a new patch
- Update the existing patch.
To create a new patch
- Go to the version control tab of the module. https://www.drupal.org/project/ /git-instructions is the link to the page.
- Select the branch to work and click on the Show button.
Clicking on the show button will get you the git command, copy and run the command in your terminal and change the directory to the cloned module.
- Do the changes to fix the issue.
- The command to create the patch is:
git diff > --.patch
- Issue description will be the title of the issue, where all the letters should be lowercase and space must be filled with underscores. This is optional.
- The issue number will be in the URL of the issue. This will be unique for the issues this will be mandatory in naming the patch file.
- The comment number is the latest comment id in which the patch will be uploaded.
Consider you need to add a new file to the patch. The new file will be untracked and the command git diff will not track the file.
To add a new file to the patch
- Add the new file using the git add command
- Run
git diff HEAD > --.patch
To update an existing patch
1. Clone the project to which you need to add the patch.
2. Goto the issue page right click on the patch link and click on Copy address link.
3. Download the patch to your local using the curl or wget command.
To download the patch using the curl command:
curl -O
4. To apply the patch run the command:
git apply
5. After applying the patch you will get the changes of the patch in your local. Add the further changes required to the patch and create a new patch.
When we are updating the existing patch we need to create an interdiff file. Interdiff file is nothing but a difference between the old patch and the new patch. This will help the reviewer to know the changes done in the new patch.
The following is the command to create an interdiff:
interdiff > interdiff_-.txt
Consider you have an old download patch 3302030-2.patch and a new updated patch you have created 3302030-3.patch. To create the interdiff between these two files, the command would be:
interdiff 3302030-2.patch 3302030-3.patch > interdiff_2-3.txt
Submit a Patch
After creating a patch we need to submit the patch.
To submit the patch go to the issue page.
1. Issue metadata
In the issue metadata, change the status to the needs review. Unassign the issue if the issue is assigned to you and add or remove the tags as needed.
2. Attribute this contribution
Check the relevant options and add the organization if you are working for any organization. Adding this the credits will be given to the organization along with you when the issue gets fixed.
3. Add a description of the changes done in the patch under the comment section.
4. Choose the patch file, interdiff file and upload it under files.
Here we have added the files one by one and hit on upload after choosing the file. Clicking on upload the file will be uploaded and gets added to the list below.
NOTE: Interdiff is not required while adding a new patch.
5. After uploading the file click on the save button. This will update the issue page and we can see the patch uploaded with a new comment number.
Patches for core issues should be submitted using the same procedure.
Review a Patch
Now you know how to look for an issue, create a patch and upload it. What’s next? How can we make sure that the right patch gets committed ASAP? Reviewing a patch is an equally important step in moving the issue forward. If you feel that writing lines of code aren’t your thing, then why not try reviewing the existing patches?
Before we begin, would highly recommend adding Dreditor extension to your browser.
Dreditor extension
It provides you with a ‘Review’ button for the patch/interdiff files. On click, it displays the changes in an easy-to-read format.
‘Review’ button from Dreditor
Patch file changes without Dreditor
Now we are all set to find an issue for reviewing!
- Filter the issues with the status ‘Needs Review’.
- Take your pick from the list.
- Read through the comments & pick the latest patch uploaded in the issue.
- Make sure the patch has passed the test cases and has turned green.
Patch that passed the tests
- Download the patch file and apply the patch on your local into your core/module/theme/profile by running:
git apply -v
- Test if it’s working as per expectation/needs some work.
- Change the issue status and add comments with images/videos supporting your points. Your comment should have details like, whether the patch applied to the latest version, what steps were followed to reproduce the issue, issue behavior before & after applying the patch etc.
- If all looks good, change the status to ‘RTBC’.
- If there is any scope for some extra work/changes, update the status to ‘Needs Work’.
Other ways to Contribute
Other than code contributions, the Drupal project has many areas that you can contribute to including improving its quality and reach. You can choose your method of contribution to this community based on your interests. Some of the contribution areas::
- By Mentoring – If you have some experience contributing, you can help others get started by becoming a mentor, either online or in person.
- To Documentation – All of the documentation for the Drupal Project is freely contributed by people all around the World, just like you.
- Knowledge Sharing – An important way to contribute to the Drupal project is by sharing your knowledge about Drupal by writing blog posts, giving a presentation at your local Drupal Group meetup, a DrupalCamp, or a DrupalCon, becoming a trainer, etc.
- Event Planning – By organizing or volunteering in virtual or in-person Drupal events like meetups, sprints etc.
- By Marketing – You can work with other marketing teams around the globe to create Drupal-branded marketing and sales materials that can be shared and used by everyone selling Drupal services.
- By contributing Modules/Themes – Collaboration on Drupal projects including modules, distributions, and themes is an integral way to contribute to the Drupal community.
Stay Connected & Updated!
• Slack
- The Drupal community has a primary Slack workspace known simply as ‘Drupal’ – – http://drupal.slack.com/
- You will find a variety of channels for different topics, like #support, #bugsmash, #contribute, #drupal10rediness, etc.
• Blogs
- Members of the Drupal community write blog posts about Drupal.
- Even YOU can be one of them!
• Social Media – Twitter, LinkedIn, etc
- Following any Drupal-related profiles can keep you updated with all ongoing changes/events happening around Drupal.
Drupal Code of Conduct
As Drupal is a open source and our community is growing, it is imperative that we preserve the things that got us here. Here are some of the points with respect to conduct.
- Be collaborative
As Drupal have a larger community, collaboration is the key. By working as a team, we can bring the best in the drupal platform.
- Be respectful
As everyone makes a valuable contribution to Drupal, the community and its members treat each other with respect.
- When we are unsure, ask for help
Nobody is perfect in Drupal, and nobody is expected to know everything in the Drupal community. Asking questions may fix many problems, so questions are encouraged.
- Please contact your peers/slack admin if you are a victim of, or witness to, harassment, or need help with the administration of Slack.
https://www.drupal.org/dcoc is the link to the doc where you can find the code of conduct in depth.
Final Thoughts
As an organization who lives and breathes Drupal, we are always committed to giving back to the project in any way we can. If you’re looking for a trusted Drupal agency for your next project, our experts would be happy to help. Talk to us today!
BSDCan 2022 videos are available
Video recordings from
BSDCan 2022
are now
available.
OpenBSD-related sessions include:
- Building a Large Scale Threat Intelligence System with OpenBSD – Lawrence Teo (
lteo@
) - Network Management with the OpenBSD Packet Filter Toolset – Massimiliano Stucchi, Peter N M Hansteen, Tom Smyth
- PolyglotBSD – Brian Callahan (
bcallah@
)
That’s several hours of intense OpenBSD entertainment (and some sister BSDs) right there!
Elevate Your Organization’s Open Source Strategy
The Linux Foundation’s LFX provides various tools to help open source communities design and adopt a successful project strategy considering all moving parts. So how do they do it? Let’s explore that here.
The post Elevate Your Organization’s Open Source Strategy appeared first on Linux Foundation.
The post Elevate Your Organization’s Open Source Strategy appeared first on Linux.com.
Bash 08 – Arrays and For Loops
Arrays are like variable because it holds a value. Let’s look at arrays a little more.
Array
An array can hold multiple values, and an index manages each element of information.
Let’s look at an example to make this a little easier to understand. Let’s assume we have an array containing 12 entries. Each entry is an element, and each…
https://www.linux.org/threads/bash-08-–-arrays-and-for-loops.40972/
How Firefox’s Total Cookie Protection and container extensions work together
When we recently announced the full public roll-out of Firefox Total Cookie Protection — a new default browser feature that automatically confines cookies to the websites that created them, thus eliminating the most common method that sites use to track you around the web — it raised a question: Do container extensions like Mozilla’s Facebook […]
The post How Firefox’s Total Cookie Protection and container extensions work together appeared first on The Mozilla Blog.
Andy Wingo: accessing webassembly reference-typed arrays from c++
The WebAssembly garbage collection proposal is coming soonish (really!) and will extend WebAssembly with the the capability to create and access arrays whose memory is automatically managed by the host. As long as some system component has a reference to an array, it will be kept alive, and as soon as nobody references it any more, it becomes “garbage” and is thus eligible for collection.
(In a way it’s funny to define the proposal this way, in terms of what happens to garbage objects that by definition aren’t part of the program’s future any more; really the interesting thing is the new things you can do with live data, defining new data types and representing them outside of linear memory and passing them between components without copying. But “extensible-arrays-structs-and-other-data-types” just isn’t as catchy as “GC”. Anyway, I digress!)
One potential use case for garbage-collected arrays is for passing large buffers between parts of a WebAssembly system. For example, a webcam driver could produce a stream of frames as reference-typed arrays of bytes, and then pass them by reference to a sandboxed WebAssembly instance to, I don’t know, identify cats in the images or something. You get the idea. Reference-typed arrays let you avoid copying large video frames.
A lot of image-processing code is written in C++ or Rust. With WebAssembly 1.0, you just have linear memory and no reference-typed values, which works well for these languages that like to think of memory as having a single address space. But once you get reference-typed arrays in the mix, you effectively have multiple address spaces: you can’t address the contents of the array using a normal pointer, as you might be able to do if you mmap‘d the buffer into a program’s address space. So what do you do?
reference-typed values are special
The broader question of C++ and GC-managed arrays is, well, too broad for today. The set of array types is infinite, because it’s not just arrays of i32, it’s also arrays of arrays of i32, and arrays of those, and arrays of records, and so on.
So let’s limit the question to just arrays of i8, to see if we can make some progress. So imagine a C function that takes an array of i8:
void process(array_of_i8 array) { // ? }
If you know WebAssembly, there’s a clear translation of the sort of code that we want:
(func (param $array (ref (array i8))) ; operate on local 0 )
The WebAssembly function will have an array as a parameter. But, here we start to run into more problems with the LLVM toolchain that we use to compile C and other languages to WebAssembly. When the C front-end of LLVM (clang) compiles a function to the LLVM middle-end’s intermediate representation (IR), it models all local variables (including function parameters) as mutable memory locations created with alloca. Later optimizations might turn these memory locations back to SSA variables and thence to registers or stack slots. But, a reference-typed value has no bit representation, and it can’t be stored to linear memory: there is no alloca that can hold it.
Incidentally this problem is not isolated to future extensions to WebAssembly; the externref and funcref data types that landed in WebAssembly 2.0 and in all browsers are also reference types that can’t be written to main memory. Similarly, the table data type which is also part of shipping WebAssembly is not dissimilar to GC-managed arrays, except that they are statically allocated at compile-time.
At Igalia, my colleagues Paulo Matos and Alex Bradbury have been hard at work to solve this gnarly problem and finally expose reference-typed values to C. The full details and final vision are probably a bit too much for this article, but some bits on the mechanism will help.
Firstly, note that LLVM has a fairly traditional breakdown between front-end (clang), middle-end (“the IR layer”), and back-end (“the MC layer”). The back-end can be quite target-specific, and though it can be annoying, we’ve managed to get fairly good support for reference types there.
In the IR layer, we are currently representing GC-managed values as opaque pointers into non-default, non-integral address spaces. LLVM attaches an address space (an integer less than 224 or so) to each pointer, mostly for OpenCL and GPU sorts of use-cases, and we abuse this to prevent LLVM from doing much reasoning about these values.
This is a bit of a theme, incidentally: get the IR layer to avoid assuming anything about reference-typed values. We’re fighting the system, in a way. As another example, because LLVM is really oriented towards lowering high-level constructs to low-level machine operations, it doesn’t necessarily preserve types attached to pointers on the IR layer. Whereas for WebAssembly, we need exactly that: we reify types when we write out WebAssembly object files, and we need LLVM to pass some types through from front-end to back-end unmolested. We’ve had to change tack a number of times to get a good way to preserve data from front-end to back-end, and probably will have to do so again before we end up with a final design.
Finally on the front-end we need to generate an alloca in different address spaces depending on the type being allocated. And because reference-typed arrays can’t be stored to main memory, there are semantic restrictions as to how they can be used, which need to be enforced by clang. Fortunately, this set of restrictions is similar enough to what is imposed by the ARM C Language Extensions (ACLE) for scalable vector (SVE) values, which also don’t have a known bit representation at compile-time, so we can piggy-back on those. This patch hasn’t landed yet, but who knows, it might land soon; in the mean-time we are going to run ahead of upstream a bit to show how you might define and use an array type definition. Further tacks here are also expected, as we try to thread the needle between exposing these features to users and not imposing too much of a burden on clang maintenance.
accessing array contents
All this is a bit basic, though; it just gives you enough to have a local variable or a function parameter of a reference-valued type. Let’s continue our example:
void process(array_of_i8 array) { uint32_t sum; for (size_t idx = 0; i < __builtin_wasm_array_length(array); i++) sum += (uint8_t)__builtin_wasm_array_ref_i8(array, idx); // ... }
The most basic way to extend C to access these otherwise opaque values is to expose some builtins, say __builtin_wasm_array_length and so on. Probably you need different intrinsics for each scalar array element type (i8, i16, and so on), and one for arrays which return reference-typed values. We’ll talk about arrays of references another day, but focusing on the i8 case, the C builtin then lowers to a dedicated LLVM intrinsic, which passes through the middle layer unscathed.
In C++ I think we can provide some nicer syntax which preserves the syntactic illusion of array access.
I think this is going to be sufficient as an MVP, but there’s one caveat: SIMD. You can indeed have an array of i128 values, but you can only access that array’s elements as i128; worse, you can’t load multiple data from an i8 array as i128 or even i32.
Compare this to to the memory control proposal, which instead proposes to map buffers to non-default memories. In WebAssembly, you can in theory (and perhaps soon in practice) have multiple memories. The easiest way I can see on the toolchain side is to use the address space feature in clang:
void process(uint8_t *array __attribute__((address_space(42))), size_t len) { uint32_t sum; for (size_t idx = 0; i < len; i++) sum += array[idx]; // ... }
How exactly to plumb the mapping between address spaces which can only be specified by number from the front-end to the back-end is a little gnarly; really you’d like to declare the set of address spaces that a compilation unit uses symbolically, and then have the linker produce a final allocation of memory indices. But I digress, it’s clear that with this solution we can use SIMD instructions to load multiple bytes from memory at a time, so it’s a winner with respect to accessing GC arrays.
Or is it? Perhaps there could be SIMD extensions for packed GC arrays. I think it makes sense, but it’s a fair amount of (admittedly somewhat mechanical) specification and implementation work.
& future
In some future bloggies we’ll talk about how we will declare new reference types: first some basics, then some more integrated visions for reference types and C++. Lots going on, and this is just a brain-dump of the current state of things; thoughts are very much welcome.