Skip to content

PostgreSQL Project @ GSoC 2021

Wow! The PostgreSQL Project got all 7 proposals accepted into Google Summer of Code 2021!

This year Google changed the participation terms a bit, and cut the time for the students in half. This is supposed to help students who can’t work full-time from home, especially in light of the global pandemic situation. It also means smaller projects, which are easier to handle even for students new to the project.

The PostgreSQL project got a great number of initial applications (29), and we talked with many of the students about refining their proposals. 27 out of the 29 applications were finally submitted by the students. Some are duplicates, some are clearly just copied from somewhere, but many propose good ideas.

After talking with available mentors, and “recruiting” a few more, we settled on 7 final applications, and submitted them to Google.

As usual many of the proposals are not directly developing code for core PostgreSQL, but work on tools and applications from the PostgreSQL ecosystem. Expect some great output over the following months.
 

  • Twitter
  • Bookmark PostgreSQL Project @ GSoC 2021 at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg PostgreSQL Project @ GSoC 2021
  • Bloglines PostgreSQL Project @ GSoC 2021
  • Technorati PostgreSQL Project @ GSoC 2021
  • Fark this: PostgreSQL Project @ GSoC 2021
  • Bookmark PostgreSQL Project @ GSoC 2021 at YahooMyWeb
  • Bookmark PostgreSQL Project @ GSoC 2021 at Furl.net
  • Bookmark PostgreSQL Project @ GSoC 2021 at reddit.com
  • Bookmark PostgreSQL Project @ GSoC 2021 at blinklist.com
  • Bookmark PostgreSQL Project @ GSoC 2021 at Spurl.net
  • Bookmark PostgreSQL Project @ GSoC 2021 at Simpy.com
  • Bookmark PostgreSQL Project @ GSoC 2021 at blogmarks
  • Bookmark PostgreSQL Project @ GSoC 2021 with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

Ansible and string comparisation for IDs

Was running in a stupid problem where Ansible (version 2.9.x) throws an error when a variable is defined. The Play:

- name: Check if id is defined
  fail:
    msg: "No id defined for {{ inventory_hostname }}!"
  when: id is not defined or id|length == 0

And the error:

TASK [Check if id is defined] *****************************************
fatal: [xxx.xxx.xxx.xxx]: FAILED! => {"msg": "The conditional check 'id is not defined or id|length == 0' failed. The error was: Unexpected templating type error occurred on ({% if id is not defined or id|length == 0 %} True {% else %} False {% endif %}): object of type 'int' has no len()\n\nThe error appears to be in '/path/to/playbook/configuration.yml': line 57, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n    - name: Check if id is defined\n      ^ here\n"}

Ok, it tries to compare an integer, fine. There are two ways to fix this problem:

1: Change the type to a string by updating the inventory:

From:

id=1

to:

id="1"

But this might have other consequences, as the other parts of the Playbook might depend on this being an integer.

2: Compare as string

when: id is not defined or id|string|length == 0

This casts the integer to a string, and then the length() function works.

  • Twitter
  • Bookmark Ansible and string comparisation for IDs at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Ansible and string comparisation for IDs
  • Bloglines Ansible and string comparisation for IDs
  • Technorati Ansible and string comparisation for IDs
  • Fark this: Ansible and string comparisation for IDs
  • Bookmark Ansible and string comparisation for IDs at YahooMyWeb
  • Bookmark Ansible and string comparisation for IDs at Furl.net
  • Bookmark Ansible and string comparisation for IDs at reddit.com
  • Bookmark Ansible and string comparisation for IDs at blinklist.com
  • Bookmark Ansible and string comparisation for IDs at Spurl.net
  • Bookmark Ansible and string comparisation for IDs at Simpy.com
  • Bookmark Ansible and string comparisation for IDs at blogmarks
  • Bookmark Ansible and string comparisation for IDs with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca