1
6 13 2023 Cohort 1 Sync Notes
j edited this page 2023-06-13 23:58:52 +02:00

1430h: started

Karen's still having trouble talking to the Docker for Desktop on Windows from the "commander" WSL distribution

Sloetjes can't run the playbook completely, because one of the ansible modules is reporting that the "requests" library isn't available during execution

Future problem solving:

  1. Create an issue here https://gogs.gtsplab.com:5432/SVIG/pricer/issues
  2. Use the pricer wiki repository to store any screenshots: git clone https://gogs.gtsplab.com:5432/SVIG/pricer.wiki
  3. If necessary, link to any screenshots from the wiki repository.

Creating an issue:

First, assume that the pricer repository is pulled, and you've made a commit with your changes to either:

  • a branch (username-issue-number, e.g. j-issue-3 or username-PR-number for a pull request)
  • or on main, protected by a feature flag. See notes below about feature flags.

Do not check in anything that will cause more failures in the main branch.

All issues should follow this format:

<<One sentence summary of the problem.>>

Reproduction:
<<Details of how to reproduce the problem>>

Expected:
<<What you expected to happen>>

Research:
<<Things you tried that didn't work, URLs you researched with, look at your command history>>

<<additional notes go here>>

Feature flags:

In Ansible:

How to only run plays when a feature flag is defined:

- name: test
  hosts: all
  tasks:
    - debug:
        msg: "test"
      when: "feature_flag is defined"

How to run the playbook with the feature flag turned on:

ansible-playbook -e 'feature_flag=true' test.yml

In Python:

import os

if 'feature_flag' in os.environ:
  <<broken code goes here>>

How to run the python code with the feature flag turned on:

feature_flag=true python test.py for a single execution, or

export feature_flag=true to turn it on in this shell from now on.

unset feature_flag will turn it off.

Note that the bourne shell does not allow spaces around the equals sign (=).